Friday, 15 May 2009

ActiveBPEL Exceptions Tricky

Platform: ActiveBPEL 3.1 + Tomcat 5.5.27 + Java2 SDK 1.4.2_18
The message part 'response' produced the following error during validation: cvc-complex-type.2.4.a: Invalid content was found starting with element 'vehicle'. One of '{company}' is expected.) :...

This happens when the given message is different from defined message in WSDL. Note that the order of the elements is very important: it has to be the exact same order as defined in WSDL. In BPEL, the order of Copy/To decides the order of elements appear in the message. Thus make sure the copy order is exactly the same as the element order defined in WSDL.

Error executing SOAP-RPC request. Operation not found for: bookRequest

Check if the process has been triggered and become active. If not, it's possibly caused by SOAP style type mismatch. When generating the BPP file, last step is select Binding style: mostly either Document Literal or RPC Encoding. Must select the one which is the same as defined in WSDL

Reason: WSDLException (at /schema): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.:

The incorrect referencing the location of those XSD, WSDL documents. BPP finds the documents by referring to catalog.xml which is generated when making BPR file. So MUST generate the BPR file by using Designer to ensure consistency.

org.xml.sax.SAXException: Deserializing parameter 'clientRequest': could not find deserializer for type {http://www.travelAgent.com/book/schema}requestOrderType

XML parser could not deserialize the message. It maybe caused by given message is different from what the parser expects. For example, the client may calls WS_1 by using WS_2's endpoint address. So message types mismatch and thus could not be deserialized.


Completed with fault: missingRequest (No matching receive for reply) :  [/process/flow/reply[@name='ReplyConfirmToCustomer']] [f]

Or

org.activebpel.rt.bpel.impl.AeBpelException: No matching receive for reply

In general however you can only reply to a Receive activity once and then that thread is closed so there is no longer anything to reply to. For example start the process with an onMessage and then in the onMessage container you reply to the receive. Once you have done that then all the replies in the Fault handlers become invalid.


http://localhost/active-bpel/SOAPMonitor --> not running or capturing anything!

Enabled the Soap Monitor in ActiveBPEL by editing $CATALINA_HOME/shared/classes/ae-server-config.wsdd

Tuesday, 6 January 2009

Oracle OraClient Network Configuration

After Oracle OraClient has been installed, network connection can be added, edited manually from Network Configuration File. This file locates in X:\oracle\product\10.2.0\client_1\network\admin\tnsnames.ora. Its syntax looks like


ServiceName =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = HostName)(PORT = HostPort))
)
(CONNECT_DATA =
(SERVICE_NAME = ServiceName)
)
)

Saturday, 13 December 2008

SVN for Eclipse Installation on Ubuntu

There are two SVN alternatives for Eclipse Subversive and Subclipse. In Windows, both of them seem work out of the box. But in Ubuntu, they require lot more steps to make it works.


Subclipse


For ubuntu and all other linux OS, a library called libsvn is required to install prior installation of Subclipse:


sudo apt-get install libsvn-java

In Eclipse, using Software Updates to obtain Subclipse, make sure include JavaHL adapter and SVNKit adapter. After installation, Eclipse may says that "JavaHL (JNI) Not Available". This is caused by JVM fails to find the libsvn library location (in /usr/lib/jni) which support JavaHL interface. Now, open eclipse.ini in eclipse installation folder and add follow line just after "-vmargs"

-Djava.library.path=/usr/lib/jni

Re-open eclipse the problem should be solved!


Update 16/12/2008 - I could not find a way to save SSH password.. which mean even time accessing the repository you are asked for password.. very annoying..


Subversive


So far, I still could not make Subversive works (the JavaHL part). Subversive contains two components that are required:



  • Subversive SVN Team Provider Plugin (Incubation)

  • Subversive SVN Connectors JavaHL and/or SVNKit


They can be grabbed from two different update URL check here. For some reasons, it may need to select/enable the correct update URL in Software Updates -> Manage Sites. Fail to do so may results to have old version of SVN Team Provider Plugin installed.


It seems that Subversive requires libsvn library as well, and JVM also fail to find libsvn location, but even apply above method, JavaHL still could not be loaded due to either "Could not find library" or "library has been loaded by another class loader"


Update 20/12/2008 - Forget about JavaHL!!! Use SVNKit which is purely bases on Java!!!

Thursday, 27 November 2008

Windows XP Installtion Note on K8

Here I just record several steps need to go through after installation is done. AMD K8 system ONLY!!



Hardware Driver Setup



  • Disable System Restore

  • Format D: and E: Drives (Or Document and ProgramFiles Drives)

  • Install Register Manager to E: Drive

  • Change all %ProgramFiles% entries into C:\Program Files

  • Open regedit -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. Modify CommonFilesDir, ProgramFilesDir and ProgramFilesPath

  • Install CPU Drivers (AMD K8 Driver, XP Fix and DualCore Optimizer

  • Install nF4 Chipset Driver

  • Install .Net Framework package (ATI Gfx Card ONLY!)

  • Install Gfx Card Driver

  • Install Audio Driver


Set Up User Profile



  • Login as Administrator

  • Copy User Folder from C:\Documents and Settings to D: Drive

  • Open regedit -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Change ProfileImagePath to new location from above step

  • Copy back up My Documents to that new location


Partition Size List



  • 10400 --> 10GB

  • 5154 --> 5GB

  • 41002 --> 40GB

  • 20600 --> 20GB

  • 30800 --> 30GB

  • 51300 --> 50GB

Tuesday, 25 November 2008

Thinkpad Middle Mouse Scrolling in Ubuntu 8.10

Originally from "aliencam dot net blog.", just keep a record here :)


I found a couple blogs that said they got middlemouse scrolling working on a thinkpad, but none of their methods worked on my x61Tablet with 64-bit Ubuntu 8.10 installed. This version of ubuntu uses evdev instead of the xorg.conf file that previous versions used, so it makes configuring the middle mouse button a little bit more difficult.


The first thing you should do (just for your own records) is this command:



xinput -list-props "TPPS/2 IBM TrackPoint"


that will return the properties of your trackpoint. (change “TPPS/2 IBM TrackPoint” to “DualPoint Stick” if you have an X200 or X61s.) I did not do this before changing settings, so I don’t know what the original looks like (if you do, please post it in the comments so I can have a record of it! I posted the final results of that command at the end.)



Now, what you will need to do is create a file, /etc/hal/fdi/policy/mouse-wheel.fdi with the following command:



sudo nano /etc/hal/fdi/policy/mouse-wheel.fdi


then paste in the contents with ctrl-shift-v:




true
2
4 5
6 7
true
200


save and quit by hitting ctrl-x, then “y”.



Now, the above configuration DOES NOT work for me, but it seems that it does for everybody else who has a blog (I can’t help but wonder if anyone actually tried it… so many comments just say it doesn’t work…) what happens is that the xinput list-props command shows the buttons as being mapped correctly, but nothing happens in xev or in real use. I cannot find any errors in any log files to indicate why.



So, what I do to get it working is in the above file, change “YAxisMapping” and “XAxisMapping” to be misspelled by adding an extra “s” as such: “YAxsisMapping” “XAxsisMapping” (you don’t have to do this, you can just delete those two lines and the next step will cause it to work. I just mess up the spelling so I can change it back later easily)



Now, create another file. This will be a shell script that is run at startup to map the horizontal scrolling correctly (If you don’t care about horizontal scrolling and only use vertical, just stop after you messed up or deleted the XAxisMapping and YAxisMapping lines).Use the following command:



nano /home/$USERNAME/.horizscrollscript


Then paste with ctrl-shift-v, or type in the following contents:



#!/bin/bash
#
#
# The following line sets the X-axis mapping to buttons 6 and 7 so that
# horizontal scrolling works.
xinput -set-int-prop "TPPS/2 IBM TrackPoint" "Wheel Emulation X Axis" 8 6 7


then save and close with ctrl-X, then “Y”. make the file executible with:



chmod +x /home/$USERNAME/.horizscrollscript

Now open the gnome sessions manager (System > Prefferences > Sessions, or alt-f2 and “gnome-session-properties”) and click “add”

for the “Name” field, name it something so you know what it does (I named it Horizontal Scroll Script).

In the “Command” field, enter the path to the file (/home/$USERNAME/.horizscrollscript)

The comment field is optional. Save and restart, and everything should be working!

Please leave a comment if this does or does not work for you, I’m curious to know if I messed something up and that is why the first art of the tutorial doesn’t work.

To test everything, you should try this command:

xinput -list-props "TPPS/2 IBM TrackPoint"

and it should return:

Device 'TPPS/2 IBM TrackPoint':
Device Enabled: 1
Middle Button Emulation: 1
Middle Button Timeout: 50
Wheel Emulation Inertia: 10
Wheel Emulation: 1
Wheel Emulation X Axis: 6, 7
Wheel Emulation Y Axis: 4, 5
Wheel Emulation Timeout: 200
Wheel Emulation Button: 2
Drag Lock Buttons: 0

those bolded lines are what we were trying to get! now to test how your computer sees you use those buttons, ust the command:

xev

then you can hit keys on the keyboard and watch what it returns, or put the mouse pointer in the box that pops up and watch that as well. You should be able to see that scrolling down is 5, up is 4, left is 6 and right is 7. (close xev with ctrl-z or by pressing the “x” on the box.)

Saturday, 22 November 2008

CSS problem on “Microsoft IE”

I have no intention to make it looks any better on IE 5 and 5.5. After I spent lots of time on tuning, it finally looks better (90%) on IE 6 and IE 7. I think this is quite achievement already!!! There are several IE 6 bugs which affect my site:

  • min-height, max-height does not work
  • width MUST be set, or element will extend as long as it can..(even over bound)
  • margin set to auto does not work

But who care?? People will finally find FireFox 3 is sooooo much better!!!