Tuesday 21 April 2009

4-Writing JAVA Clients for Calling BEA WebLogic EJBs

IV- wlfullclient.jar issue and how to find wlfullclient.jar

Oracle® WebLogic Server
Programming Stand-alone Clients
10g Release 3 (10.1.3)

“For WebLogic Server 10.0 and later releases, client applications need to use the wlfullclient.jar file instead of the weblogic.jar. Note that not all functionality available with weblogic.jar is available with the wlfullclient.jar.”

You can not find wlfullclient.jar on the internet. You have to create one with a jar tool. For that:

Programming Stand-alone Clients
Using the WebLogic JarBuilder Tool
http://edocs.bea.com/wls/docs103/client/jarbuilder.html
Creating a wlfullclient.jar for JDK 1.6 client applications
Use the following steps to create a wlfullclient.jar file for a JDK 1.6 client application:
Change directories to the server/lib directory.
cd WL_HOME/server/lib
Use the following command to create wlfullclient.jar in the server/lib directory:
java -jar wljarbuilder.jar
You can now copy and bundle the wlfullclient.jar with client applications.
Add the wlfullclient.jar to the client application’s classpath.

Creating a wlfullclient5.jar for JDK 1.5 client applications
Change directories to the server/lib directory.
cd WL_HOME/server/lib
Use the following command to create wlfullclient.jar in the server/lib directory:
java -jar wljarbuilder.jar -profile wlfullclient5
You can now copy and bundle the wlfullclient5.jar with client applications
Add the wlfullclient5.jar to the client application’s classpath.

IMPORTANT NOTE: Adding only wlfullclient.jar helps to stop interceptor related messages that come from the JBOSS EJBs. My Weblogic.jar(length=34992886bytes) that comes with WebLogic server’s lib misses weblogic/security/acl/UserInfo
while the one I found on the internet(length=37363256bytes) has them. The use of javax.interceptor.interceptors in the JBOSS example forced me to keep the jboss-ejb3x.jar, jbossall-client.jar and ejb3-persistence.jar. I lost a lot of time, before I found out that I must use wlfullclient.java. It solved all the jar problems.

(The below error gets corected by the use of weblogic or wlclient.jar:
run:
[java] JVM args ignored when same JVM is used.
[java] java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject )

One issue about wlfullclient was, my Jdeveloper11g used JDK1.6 while ant used JDK1.5. So, I chose to use the 1.5 wlfullclient. Nevertheless, if you want to control the JDK you can set it in the ant build file:




I had some problems while I was using wlfullclient.jar. Some libs did not exist or stg like that. But I can not remember exactly. My solution uses wlfullclient5.jar.


( prev ) ( next )