COMPRESSING WEBLOGIC CLIENT JAR FILE

The Weblogic documentation recommends using the weblogic.jar to run client Java
application that access EJB/JMS/.... As we all know, this is a very large jar
file and the remote client is not using all of the classes in it. Are there any
tools to help us extract the required weblogic client class and build a smaller
JAR file for deployment to client machine. Has anyone run into similar

This whitepaper describes currently available options:
http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whitepapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwhitepapersmallfootprintclient.htm
Nick Minutello <[email protected]> wrote:
There are some Weblogic tools like utils.zipToJar (or something like that) that
will take the -verbose output of your client and extract the correct classes out
of weblogic.jar. This is a bit risky, because you have to make sure that you exercise
EVERY code path, to make sure that you dont get a ClassNotFoundException at runtime.
Its poor, but it can work.
Otherwise.... you are screwed. You can use RMI-IIOP, but that wont help you with
JMS.
This has been a long-running issue with Weblogic that doesnt seem to have a simple
solution. I know some of their Professional Service people have been pushing for
it since WLS5.1...
I sincerely hope they come up with a solution soon. Can you imagine what our users
will think when they have to wait for the 37 Meg jar in WLS7 to download (we use
Java WebStart)...
-Nick
"brian chan" <[email protected]> wrote:
The Weblogic documentation recommends using the weblogic.jar to run client
Java
application that access EJB/JMS/.... As we all know, this is a very large
jar
file and the remote client is not using all of the classes in it. Are
there any
tools to help us extract the required weblogic client class and build
a smaller
JAR file for deployment to client machine. Has anyone run into similar
Dimitri

Similar Messages

  • (261705413) Q RPCC-7 Does the client.jar file tie you Weblogic Server?

    Q<RPCC-7> BEA is providing client-side helpers in the client.jar file, including
    parsing and SOAP facilities, etc. But, are we saying that there is nothing
    in there that ties the client to the server-side WLS implemenation? It seems
    that putting the interface of the underlying implementation EJB SLS bean is a
    coupling...??? It also seems that by coupling the client to WebLogic classes
    (weblogic.soap.WebServiceProxy|SoapMethod) we are coupling it to WLS.
    A<RPCC-7>: I understand your concerns, but you are not tied to WLS that tightly.
    Certainly, the static client code utilizes the EJB interface that underlies the
    web service but it is possible to invoke the web service dynamically. The use
    of weblogic library classes to invoke the web service just indicates the use of
    weblogic's client API. This client API can also be used to invoked webservices
    hosted on other application server or frameworks. Additionally, other client APIs
    can be used to invoke this web service, for instance the VB client example that
    ended Thursday's presentation. Lastly, the remote interface in the client.jar
    file could actually just be a java presentation generated from a WSDL file that
    represents a C# web service (this is actually only possible in WLS7.0 and not
    6.1 but the point is you do not actually know the inderlying framework or implementation
    andnor should you care).
    Adam

    check the server log;
    /app/oracle/product/fwm11g/user_projects/domains/fwm_domain/servers/AdminServer/logs/AdminServer.log
    you can launch the console and see if it is running; http://<server>:<port>/console

  • Client.jar file not being generated by weblogic 6.1

    Hi,
    I have developed a web service for our Internal network. I have deployed the web
    service onto weblogic 6.1 and have been able to obtain the wsdl file. I have coded
    my java client, but to compile and run the client, I require the client.jar file,
    which weblogic should create on its own once the actual web service is successfully
    deployed. wl server is not able able to create the client.jar file and hence I am
    unable to run the client. Could anyone tell me why the client.jar file is not being
    created and is there any workaround for coding the java client without using the
    client.jar file.
    Thanx
    sudipto

    Hi Sudipto,
    I'm assuming that you used the <wsgen> Ant task (in your build.xml) to create this
    web service, right?
    Are you sure the client.jar file isn't in the web-services.war? You can verify this
    by extracting this file (web-services.war) from the .ear for your web service, and
    viewing its contents with WinZip (or the jar.exe utility that comes with the JDK).
    There is a way to create client code without having a client.jar (or a WSDL document),
    but it takes a little more work :-) I have attached a "heavily commented" example
    of this, at the bottom of this post.
    Regards,
    Mike Wooten
    "Sudipto" <[email protected]> wrote:
    >
    Hi,
    I have developed a web service for our Internal network. I have deployed
    the web
    service onto weblogic 6.1 and have been able to obtain the wsdl file. I
    have coded
    my java client, but to compile and run the client, I require the client.jar
    file,
    which weblogic should create on its own once the actual web service is successfully
    deployed. wl server is not able able to create the client.jar file and hence
    I am
    unable to run the client. Could anyone tell me why the client.jar file is
    not being
    created and is there any workaround for coding the java client without using
    the
    client.jar file.
    Thanx
    sudipto[NoWSDLWeatherClient.java]

  • How to create a client jar file???

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

  • 'WebLogic upgrade jar file' assemby missing 11.1.2.1

    Hello all,
    I was going through the Installation guide for installing 11.1.2.1 & found that in the required assemblies for foudation services there is a assembly called 'WebLogic upgrade jar file' mentioned in the tutorial. When i extract the foundation
    files 1-7 I don't see that assembly in that extract. I even extracted the additional content release & i did'nt see that assemby in the folder where i extracted.
    Thanks!

    It is mandatory and yes extract it into the same folder. While they are improving the documentation in this release they did miss a pretty big dependency in the form of the Weblogic software.
    You will want the following packages for a Planning installation:
    Oracle Hyperion Enterprise Performance Management System Installer, Fusion Edition Release 11.1.2.1.0 for Microsoft Windows (64-bit)
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 for Microsoft Windows (64-bit) Part 1 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 for Microsoft Windows (64-bit) Part 2 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 for Microsoft Windows (64-bit) Part 3 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 for Microsoft Windows (64-bit) Part 4 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 Part 5 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 Part 6 of 7
    Oracle Hyperion Foundation Services Release 11.1.2.1.0 Part 7 of 7
    Oracle Hyperion Calculation Manager Release 11.1.2.1.0
    Oracle Hyperion Enterprise Performance Management Architect, Fusion Edition Release 11.1.2.1.0
    Oracle Essbase Release 11.1.2.1.0 Part 1 of 2
    Oracle Essbase Release 11.1.2.1.0 Part 2 of 2 for Microsoft Windows (64-bit)
    Oracle Essbase Clients Release 11.1.2.1.0
    Oracle Essbase Spreadsheet Add-in Release 11.1.2.1.0 for Microsoft Windows
    Oracle Hyperion Financial Reporting, Fusion Edition Release 11.1.2.1.0
    Oracle Hyperion Financial Reporting Studio and Print Server, Fusion Edition Release 11.1.2.1.0 for Microsoft Windows
    Oracle Hyperion Enterprise Performance Management Reporting and Analysis Core Components Release 11.1.2.1.0
    Hyperion Web Analysis Release 11.1.2.1.0
    Oracle Hyperion Planning, Fusion Edition Release 11.1.2.1.0
    Oracle Hyperion Planning, Fusion Edition Offline Planning Module Release 11.1.2.1 for Microsoft Windows
    Oracle Hyperion Financial Close Management Release 11.1.2.1.0
    Oracle Hyperion Enterprise Performance Management System Additional Content Release 11.1.2.1.0
    Regards,
    John A. Booth
    http://www.metavero.com
    Edited by: Jbooth on Apr 28, 2011 5:13 AM - Removed Weblogic specific package from list.

  • Weblogic-client.jar

    Where is the weblogic-client.jar?
    I get error as follows
    D:\JDeveloper11g_20090318\jdk160_05\bin\javaw.exe -client -classpath E:\Jdeveloper10131_20090318\jdev\mywork\GDHZDJDCIntegrationTest\PAPI_Linux\classes;F:\share\lib\b1base.jar;F:\share\lib\b1oracle.jar;F:\share\lib\b1util.jar;F:\share\lib\fuegopapi-client.jar;F:\share\lib\weblogic.jar;F:\share\lib\wlclient.jar papi_linux.VM_192_168_1_103_linux
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/utils/NestedException
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
         at java.lang.Class.getConstructor0(Class.java:2699)
         at java.lang.Class.newInstance0(Class.java:326)
         at java.lang.Class.newInstance(Class.java:308)
         at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:147)
         at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:298)
         at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:223)
         at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:128)
         at fuego.configuration.ConfigurationLoader.parse(ConfigurationLoader.java:116)
         at fuego.directory.DefaultDirectoryConfiguration.create(DefaultDirectoryConfiguration.java:52)
         at fuego.directory.DirectoryConfigurationResource.load(DirectoryConfigurationResource.java:81)
         at fuego.directory.DirectoryConfigurationManager.loadDirectoryConfiguration(DirectoryConfigurationManager.java:392)
         at fuego.directory.DirectoryConfigurationManager.getDirectoryConfiguration(DirectoryConfigurationManager.java:331)
         at fuego.directory.DirectoryConfigurationManager.getDirectoryConfigType(DirectoryConfigurationManager.java:313)
         at fuego.directory.provider.Factory.getDirectoryFactory(Factory.java:216)
         at fuego.directory.Directory.startAnonymousSession(Directory.java:211)
         at fuego.papi.impl.ProcessServiceFactoryImpl.obtainSchemaId(ProcessServiceFactoryImpl.java:200)
         at fuego.papi.impl.ProcessServiceFactoryImpl.create(ProcessServiceFactoryImpl.java:75)
         at fuego.papi.impl.ProcessServiceFactoryImpl.create(ProcessServiceFactoryImpl.java:63)
         at fuego.papi.ProcessService.create(ProcessService.java:335)
         at papi_linux.VM_192_168_1_103_linux.main(VM_192_168_1_103_linux.java:29)
    Caused by: java.lang.ClassNotFoundException: weblogic.utils.NestedException
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         ... 34 more
    Process exited with exit code 1.

    Just add "wlfullclient.jar" in your classpath....
    To make this jar u can follow the steps mentioned in this link: http://jaysensharma.wordpress.com/2010/02/03/building-wlfullclient-jar/

  • IO Error while deploying application client jar file ???????

    Hi,
    In my .ear file, one application-client jar(which contains all helper classes which are used in whole application) file is there. While deploying .ear file, all ejb are getting deployed well, while deploying application client jar file(Global.jar file here) it is giving the following message:
    IO Error deploying Global.jar: D:\oracle9ias\oc4j_extended\j2ee\home\applications\trainiumear\Global.jar
    Here is application-client.xml of Global.jar file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application-client_1_2.dtd'>
    <application-client>
    <display-name>TrainiumClientApp</display-name>
    <description>Application description</description>
    </application-client>
    My Environment: Oracle9iAS (9.0.3.0.0), Windows-NT
    Please let me know Why i am getting 'IO Error' , where i may done wrong ?
    Thanks in Advance
    Srinivas

    Srinivas,
    Before we continue, PLEASE tell me if you've looked through the available
    documentation, code samples, "how-to" documents, etc., for OC4J. It
    seems to me that you're mixing things up a bit. I use the "deploy"
    command to deploy my EARs, example (partial):
    java -jar admin.jar ormi://<host> admin <password> -deploy ...
    And my EAR file is not in the "application-deployments" directory
    when I issue that command.
    Perhaps you could also show me the contents of your "application.xml"
    file for this application you are having trouble with.
    But I repeat, please tell me if you have already looked at the
    available documents regarding OC4J!
    Thanks,
    Avi.

  • Problem for downloading Weather client.jar file

    Hi,
    I downloaded Weblogic server6.1 windows version.my system enveronmet is:Compaq system
    with 20GB and 128MB Ram
    OS is windows-98.Iam able to run server and compile and create example Weather.ear
    file.but iam geting problem when iam try to download Client.jar from this URL:http://host:port/weather
    here i change host is my system name and port is 7001 like what ever you given instruction
    in document.but it's not opning that file it's giving error that error message I
    attach with this message.this is my problem please tell me how to solve this problem.
    Thanking you
    seenu
    [att1.html]

    I would like to know too. I am a newbie on this matter as well. I am curious about the RUNCLIENT. Can I use java <className that references the EJB>?

  • Weblogic Classes / Jar files

    Is there place that list the classes for a particular weblogic jar file? Right now a developer asked me what .jar file does this class, weblogic.logging.NonCatalogLogger, live in. The only way I know how to find out is to unjar each jar file until I find it. Is there an easier way?
    Thanks.

    you can use jarscan tool
    http://it.cybergav.in/2009/09/30/scanning-jars-with-jarscan/

  • SAP JMS Provider client jar files

    Hi,
    We are attempting to use the JMS provider service on XI 3.0 SR1 as the messaging system.  What are the jar files that an external J2EE application need to access the SAP JMS provider?  Has anyone used the SAP JMS provider? I greatly appreciate if you can share your experience.
    thanks.
    James Chang

    Hello James,
    The performance for such big number of messages depends mainly on the message size. If you are sending just a TextMessage with short text, then the SAP JMS provider is able to handle 100 000 messages per hour. That value represents an average number of 30 messages per second that is covered.
    However, please have in mind two issues :
    The messages will be transferred through a TCP/IP connection, so make sure that your network bandwidth to the SAP J2EE server is able to handle such load without any delays. If the messages are persistent (default mode) they will be stored in the server database. That will be the main bottleneck for the message sending especially if the size of your message is big (>100K).
    I think it will be best if you create a small prototype on your environment and verify the number of messages that can be sent.
    Best Regards
    Peter Peshev

  • Which JAR file has the class weblogic.xml.domimpl.Loader ?

    when an Axis web-service WSDL is read and parsed using weblogic client - i get this error. which weblogic-10 jar file has this class "weblogic/xml/domimpl/Loader" ?
    java.lang.NoClassDefFoundError: weblogic/xml/domimpl/Loader
    at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:168)
    at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:58)
    at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
    at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:402)
    at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:388)
    at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:78)
    at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:65)
    at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:468)
    at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:114)
    at com.qwest.assia.service.client.Provisioning_Info_Impl.<init>(Unknown Source)
    at com.qwest.assia.service.client.Provisioning_Info_Impl.<init>(Unknown Source)
    at com.qwest.iom.connector.adapter.webservice.qcontrol.AssiaWebServiceConnectionFactory.getWebServiceConnection(AssiaWebServiceConnectionFactory.java:64)
    at com.qwest.mdw.connector.webservice.WebServiceConnectionFactory.getConnection(WebServiceConnectionFactory.java:25)
    at com.qwest.iom.connector.adapter.webservice.qcontrol.AssiaWebServiceTestCase.test_MyAccountWebService(AssiaWebServiceTestCase.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

    Hi,
    I found it in ADF 11g R2 documentation - http://docs.oracle.com/cd/E24382_01/web.1112/e16182/taskflows_regions.htm#insertedID10
    I guess this is 11g R2 feature.
    I have a requirement to display the multiple regions dynamically. This feature suits my requirement perfectly, but unfortunately it is not available in 11g R1.
    Can we achieve the similar functionality in 11g R1 through other means?
    Thanks
    Ravi

  • Files missing in the ear and client jar

    Hi,
    I'm following the examples to build a web service using ANT servicegen task. My
    web service calls a lot of other java classes, and those java classes in turn
    call other classes. When I used the following taskes to generate the service and
    client code, I found the generated ear, war and client jar files only contain
    the compiled classes which are used directly by the web service class. Those classes
    called indirectly by web service are missing.
    <target name="ear">
    <servicegen
    destEar="${build}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.iit.integration.txlife.txlife28.txlifeProcessor.TxlifeProcessor"
    targetNamespace="${namespace}"
    serviceName="TxlifeWebService"
    serviceURI="/txlifews"
         generateTypes="True"
    expandMethods="True">
    <client
    packageName="com.iit.integration.txlife.txlife28.client"
    clientJarName="${client_jar_file}"
    />
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    </target>
    <!-- generate the client jar and build the client calling class -->
    <target name="client" depends="ear">
    <clientgen
    ear="${build}/${ear_file}"
    warName="${war_file}"
    packageName="com.iit.integration.txlife.txlife28.client"
    clientJar="${client}/${client_jar_file}">
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </clientgen>
    So when I invoked the client code, I always got the class not found exception.
    Not sure if I missed anything here.
    Thanks a lot,
    Henry
    [build.xml]

    Any required support classes have to be in the client's/server's classpath. Or
    at least that's what I do.
    "Henry Niu" <[email protected]> wrote:
    >
    >
    >
    Hi,
    I'm following the examples to build a web service using ANT servicegen
    task. My
    web service calls a lot of other java classes, and those java classes
    in turn
    call other classes. When I used the following taskes to generate the
    service and
    client code, I found the generated ear, war and client jar files only
    contain
    the compiled classes which are used directly by the web service class.
    Those classes
    called indirectly by web service are missing.
    <target name="ear">
    <servicegen
    destEar="${build}/${ear_file}"
    warName="${war_file}">
    <service
    javaClassComponents="com.iit.integration.txlife.txlife28.txlifeProcessor.TxlifeProcessor"
    targetNamespace="${namespace}"
    serviceName="TxlifeWebService"
    serviceURI="/txlifews"
         generateTypes="True"
    expandMethods="True">
    <client
    packageName="com.iit.integration.txlife.txlife28.client"
    clientJarName="${client_jar_file}"
    />
    </service>
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </servicegen>
    </target>
    <!-- generate the client jar and build the client calling class -->
    <target name="client" depends="ear">
    <clientgen
    ear="${build}/${ear_file}"
    warName="${war_file}"
    packageName="com.iit.integration.txlife.txlife28.client"
    clientJar="${client}/${client_jar_file}">
    <classpath>
    <pathelement path="${build}"/>
    <pathelement path="${java.class.path}"/>
    </classpath>
    </clientgen>
    So when I invoked the client code, I always got the class not found exception.
    Not sure if I missed anything here.
    Thanks a lot,
    Henry

  • How to dynamically load jar files - limiting scope to that thread

    Dynamically loading jar files has been discussed a lot. I have read a quite a few posts, articles, and demo code for doing just that. However, I have yet to find a solution to my problem. Most people modify their system class loader and are happy. I have done that and was happy for a time. Occasionally, you will see reference to an application server or tomcat or some other large project that have successfully been able to load and unload jar files, allow for dynamic deployment of code, etc. However, I have not been able to achieve similar success; And my problem is much less complicated.
    I have an application that executes a thread to send a given file/message to a standard JMS Server Queue. Depending on the parameters selected by the user, this thread may need to communicate with one of a number of JMS Servers, ie. JBoss, WebLogic, EAServer, Glassfish, etc. All of which can be done with the same code, but each needs to load their own flavor of JMS Client Jar files. In this instance, spawning a separate JVM for each communication would work from a classloader perspective. However, I need to keep it in the family and run under the same JVM, albeit each JMS Server Connection will be created and maintained in separate Threads.
    I am close, I am doing the following...
    1. Creating a new URLClassLoader in the run() method of each thread.
    2. Set this threads contextClassLoader to the new URLClassLoader.
    3. Load the javax.jms.JMSException class with the URLClassLoader.loadClass() method.
    4. Create an initialContext object within this thread.
    Note: I read that the initialContext and subsequent conext lookup calls would use the Thread�s
    contextClassLoader for finding/loading classes.
    5. Perform context.lookup calls for a connectionFactory and Queue name.
    6. Create JMS Connection, etc. Send Message.
    Most of this seems to work. However, I am still getting a NoClassDefFoundError exception for the javax.jms.JMSException class ( Note step #3 - tried to cure unsuccessfully).
    If I include one of the JMS Client jar files ( ie wljmsclient.jar for weblogic ) in the classpath then it works for all the different JMS Servers, but I do not have confidence that each of the providers implemented these classes that now resolve the same way. It may work for now, but, I believe I am just lucky.
    Can anyone shine some light on this for me and all the others who have wanted to dynamically load classes/jar files on a per Thread basis?

    Thanks to everyone - I got it working!
    First, BenSchulz' s dumpClassLoader() method helped me to visualize the classLoader hierarchy. I am still not completely sure I understand why my initial class was always found by the systemClassLoader, but knowning that - was the step I needed to find the solution.
    Second, kdgregory suggested that I use a "glue class". I thought that I already was using a "glue class" because I did not have any JMSClient specific classes exposed to the rest of the application. They were all handled by my QueueAdmin class. However...
    The real problem turned out to be that my two isolating classes (the parent "MessageSender", and the child "QueueAdmin") were contained within the same jar file that was included in the classpath. This meant that no matter what I did the classes were loaded by the systemClassLoader. Isolating them in classes was just the first step. I had to remove them from my jar file and create another jar file just for those JMSClient specific classes. Then this jar file was only included int custom classLoader that I created when I wanted to instantiate a JMSClient session.
    I had to create an interface in the primary jar file that could be loaded by the systemClassLoader to provide the stubs for the individual methods that I needed to call in the MessageSender/QueueAdmin Classes. These JMSClient specific classes had to implement the interface so as to provide a relationship between the systemClassLoader classes and the custom classLoader classes.
    Finally, when I loaded and instantiated the JMSClient specific classes with the custom classLoader I had to cast them to the interface class in order to make the method calls necessary to send the messages to the individual JMS Servers.
    psuedu code/concept ....
    Primary Jar File   -  Included in ClassPath                                                      
    Class<?> cls = ClassLoader.loadClass( "JMSClient.MessageSender" )
    JMSClientInterface jmsClient = (JMSClientInterface) cls.newInstance()                            
    jmsClient.sendMessage()                                                                      
    JMSClient Jar File  -  Loaded by Custom ClassLoader Only
    MessageSender impliments Primary.JMSClientInterface{
        sendMessage() {
            Class<?> cls=ClassLoader.loadClass( "JMSClient.QueueAdmin" )
            QueueAdmin queueAdmin=(QueueAdmin) cls.newInstance()
            queueAdmin.JMSClientSpecificMethod()
        }

  • Returning XML. Client.jar not properly created

    Hi. I'm trying to deploy a web service that has some methods that receive Document
    as parameter and return Document as result type.
    Weblogic generates a client.jar that don't have all the needed classes, like,
    LiteralCodec, and many others.
    Anybody knows what classes I need?
    Thanks

    Thanks Manoj.
    "SBC" <[email protected]> wrote:
    >
    I created a RPC web service & it ran fine. After I made changes I downloaded
    the
    client.jar file. But when I ant on client classes I am getting error
    saying that
    javac can not find the EJB classes. I looked into client.jar file & it
    seems that
    my EJB interface class is not there. My wsdl file shows my changes. When
    I restarted
    the server I did not get any errors so it means my ejb got deployed fine.
    When
    is the client.jar created?
    Any words of advice....
    Thanks in advance.

  • Why is the .jar file not created??

    the error i get is :
    com.sun.kvem.midletsuite.InvalidJadException: Reason = 36
    Error in opening jar file: list.jar
    and in the \j2mewtk\2.5.2\apps\list\bin there are only 2 files are :
    list.jad
    MANIFEST.MF.
    Why is that so?
    Edited by: angelusPiper on May 7, 2009 7:24 AM

    Hi Sudipto,
    I'm assuming that you used the <wsgen> Ant task (in your build.xml) to create this
    web service, right?
    Are you sure the client.jar file isn't in the web-services.war? You can verify this
    by extracting this file (web-services.war) from the .ear for your web service, and
    viewing its contents with WinZip (or the jar.exe utility that comes with the JDK).
    There is a way to create client code without having a client.jar (or a WSDL document),
    but it takes a little more work :-) I have attached a "heavily commented" example
    of this, at the bottom of this post.
    Regards,
    Mike Wooten
    "Sudipto" <[email protected]> wrote:
    >
    Hi,
    I have developed a web service for our Internal network. I have deployed
    the web
    service onto weblogic 6.1 and have been able to obtain the wsdl file. I
    have coded
    my java client, but to compile and run the client, I require the client.jar
    file,
    which weblogic should create on its own once the actual web service is successfully
    deployed. wl server is not able able to create the client.jar file and hence
    I am
    unable to run the client. Could anyone tell me why the client.jar file is
    not being
    created and is there any workaround for coding the java client without using
    the
    client.jar file.
    Thanx
    sudipto[NoWSDLWeatherClient.java]

Maybe you are looking for