I am going to list down steps required to get the Sample bookshelf code working with Siebel web client.
1. Siebel is not compatible with Java 1.7.
If you compile from Java 1.7 or above you will get the following error while calling service from Siebel
Class name incorrect or does not extend SiebelBusinessService : AddBusinessService -- JVM Exception:java.lang.UnsupportedClassVersionError: AddBusinessService : Unsupported major.minor version 51.0(SBL-EAI-05010)For workaround Siebel Tools comes with a older version of jdk which can help you to compile and get rid of the above error.
2. Remove "package com.example.jbs" from the sample code
This code is required when you want to package the class into jar file, which is not essential to get the code working. If you want to keep this intact then you will have to keep the java file in com\example\jbs folder. We recommend remove this declaration to avoid more complexity.
4. How to compile the sample code.
Place the copy the code into AddBusinessService.java file and compile using following command.
javac -cp C:\Siebel\8.1\Tools_1\CLASSES\Siebel.jar AddBusinessService.java5. Change the @Class parameter to the direct class name : AddBusinesService
If you have removed the package com.example.jbs then change the @class to AddBusinessService.
6. Update the Classpath
If you decide to keep the class file then you need to provide the folder location of the file in CLASSPATH parameter of JAVA subsection. Simplest parameter will look like.:
[JAVA]
DLL = C:\Program Files\java\jre6\bin\client\jvm.dll
CLASSPATH = C:\Siebel\8.1\Tools_1\CLASSES\Siebel.jar;C:\Siebel\8.1\Tools_1\CLASSES\SiebelJI_enu.jar;C:\Siebel\8.1\Tools_1\CLASSES\.
VMOPTIONS = -Xrs -Djava.compiler=NONE -Djms.log=C:\logs\
Be mindful of the period(.) at the end of the directory, this tells the JVM where to look for class files to execute code.
Further reading :
Doc ID 797092.1
Doc ID 490022.1
Bookshelf
Java Business Service (JBS) Tutorial by Jason
Hope it helps
-Jim
Thanks
ReplyDelete