Using JarSettings to generate EJB client jar, but supported classes missed

Appreciated for any comments in advance.
I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
Please advise how I can add the implementation of this interface to client jar?
Best Regards,
James

Hi James,
I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
- Matt

Similar Messages

  • Generating EJB Client jars

    Hi,
    i want to know wheather there is any way to generate client jars for any specified ejb's in oracle 10g. In weblogic using appc generates a client jar that contains all required classes for the ejb's including the Stub implementation classes.
    I need the client jar's in order to make it available to a war file which does a lookup of these beans.
    Any ant taks that oracle provides for this??

    You need to deploy the class files specific to your client as well as the generated stubs for the EJB.

  • Generate Ejb client Jar

    Hi,
    I m working with Jdeveloper 10G and oracle 9IAS 9.0.3.
    I ve deployed an Ejb module on 9IAS
    I m now wondering how generate the EJB client jar (Stubs and interfaces )to access my EJB module from anywhere.
    Any Idea?

    I found the answer.
    specify the client jar name in the jar settings and the workshop will generate the client jar for you.
    inlcude the client jar and the wlclient.jar in the remote client application.

  • Ejb-client.jar

    Hi,
    I've got an EJB system that until now have been packaging as just a
    bean jar and not bothering with a ejb-client.jar. I now want to
    package as follows
    a). A bean EAR file (containing bean jar, and dependency jars) - for
    deploying on EJB server.
    b). An app EAR file (containing WAR, containing ejb-client.jar).
    The first part is done. The second raised questions about the contents
    of the ejb-client.jar. I have packaged the Home/Remote interfaces and
    all necessary utility classes (i.e omitting the Local/LocalHome/EJB
    classes). What I need to know is what goes in there in terms of
    descriptors.
    Do I just package the exact same ejb-jar.xml, jboss.xml,
    jbosscmp-jdbc.xml, weblogic-ejb-jar.xml, weblogic-cmp-rdbms-jar.xml ?
    or do I have to change these in some way ?
    Do I also add the ejb-client-jar tag to the ejb-jar.xml ? (would this
    also go in the ejb-jar.xml that goes in the bean jar ?) ... and indeed
    what would I put in there ... just the name of ejb-client-jar file
    even though its only being packaged into any application WAR (what
    purpose does it serve) ?
    TIA

    The ejb-link value should include pathnames relative to the top level of the EAR
    file.
    <ejb-link>../my_beans-client.jar#CurrencyExchange</ejb-link>
    Andy Jefferson <[email protected]> wrote:
    Deepak Vohra wrote:
    An ejb-client.jar contains the class files, the home and remote interfaces
    and the primary key class, a client program needs to call the EJBs
    contained in the ejb-jar file.
    Also, ejb-client.jar contains a copy of any classes from the ejb-jarfile
    that
    are referenced by the home and remote interfaces and the primary key
    class. Deployment descriptors are not required in the ejb-client.jar.
    ejb-client-jar element is not a required element in ejb-jar.xml. If
    ejb-client-jar.xml is specified in ejb-jar.xml ejbc generates the
    ejb-clent.jar file.
    Thx. I'm not interested in using any server-specific tools (like ejbc)
    since
    I'm deploying to multiple servers and so am generating the ejb-client
    jar
    myself in my build process. In this context, what purpose does the
    <ejb-client-jar> tag in the ejb-jar.xml descriptor have ? Why does the
    beans jar need to know anything about where the client stubs are ?
    As far as I can tell I'm including the right things in my ejb-client.jar,
    and I've tried deploying my web-app EAR to WebLogic 7.0 and I always
    get
    that it can't find the ejb-link elements. What i've got in my EAR is
    my_app.war
    META-INF/application.xml
    and in the WAR
    my JSP files
    WEB-INF/web.xml
    WEB-INF/jboss-web.xml
    lib/my_beans-client.jar
    In the WEB-INF I have ejb-ref's like the following
    <ejb-ref >
    <ejb-ref-name>ejb/CurrencyExchangeHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>my_domain.CurrencyExchangeHome</home>
    <remote>my_domain.CurrencyExchangeRemote</remote>
    <ejb-link>my_beans-client.jar#CurrencyExchange</ejb-link>
    </ejb-ref>
    Should I be putting the my_beans-client.jar in the EAR and not the WAR
    Seems I am missing something, but not sure what exactly.

  • ejb-client-jar example from the core specification

    Hello all,
    the ejb3.0 specification says (chapter 60 page 241):
    the jar file that contains the client should contain one of the following: 
    • a reference to the ejb-client JAR file 
    • a reference to the ejb-jar file that contains the client view classes 
    • a copy of the client view classes  There is also an example on page 242:
    In this example, the Bean Provider has chosen to package the enterprise bean client view classes in a
    separate jar file and to reference that jar file from the other jar files that need those classes. Those classes
    are needed both by ejb2.jar, packaged in the same application as ejb1.jar, and by ejb3.jar,
    packaged in a different application. Those classes are also needed by ejb1.jar itself because they
    define the remote interface of the enterprise beans in ejb1.jar, and the Bean Provider has chosen the
    by reference approach to making these classes available.
    The deployment descriptor for ejb1.jar names the client view jar file in the ejb-client-jar
    element. Because ejb2.jar requires these client view classes, it includes a Class-Path reference to
    ejb1_client.jar.
    The Class-Path mechanism must be used by components in app2.ear to reference the client view jar
    file that corresponds to the enterprise beans packaged in ejb1.jar of app1.ear. Those enterprise
    beans are referenced by enterprise beans in ejb3.jar. Note that the client view jar file must be
    included directly in the app2.ear file.
        app1.ear:
            META-INF/application.xml
            ejb1.jar Class-Path: ejb1_client.jar
                deployment descriptor contains:
                    <ejb-client-jar>ejb1_client.jar</ejb-client-jar>
            ejb1_client.jar
            ejb2.jar Class-Path: ejb1_client.jar
        app2.ear:
            META-INF/application.xml
            ejb1_client.jar
            ejb3.jar Class-Path: ejb1_client.jarNow finally my questions are:
    1. Why did we need to include the ejb1_client.jar in app2.ear (or even in app1.ear), wasn't it enough to deploy the ejb1_client.jar separately then refer to it (using class-path in Manifest, or may be just by using <ejb-client-jar>) as the bullets quoted first suggest?
    2. How come we didn't need to use <ejb-client-jar> for ejb2.jar
    3. Since both of ejb1.jar and ejb2.jar are packaged in app1.ear couldn't we simply refer to the ejb1_client.jar in the Manifest file of app1.ear?
    Please, I appreciate your input on this

    I am guessing here and please correct me if I am wrong:
    ejb1.jar uses interfaces in ejb1_client.jar as the interface for some of the beans so we needed to use ejb-client-jar and we needed a reference in the manifest file.
    ejb2.jar uses some of the claess/interfaces as may be a return type but not as an interface for one of its beans so we didn't need to use ejb-client-jar but we needed an entry in the manifest file.
    regarding app1.ear, we can put the ejb1_client.jar in the META-INF/lib app1.ear without the need for any entries in the manifest files.
    Edited by: malrawi on Jun 14, 2009 11:59 PM

  • Two web apps using the same EJB client jar

    I am currently deploying two web apps on a server. Both web apps use an EJB client
    jar (the same jar) to access EJB's and both apps work when tested independently.
    The problem arises when I log into app A and then log into app B. As soon as
    I do app A loses it's references to the EJBHomes, and other classes.
    It seems a classloader is unloading the first classes and instances loaded by
    the first app and then loading them from app B's client.jar.
    If I put the client.jar in the system classpath everything is fine, but that's
    just a hack.
    Is it not possible to deploy two web apps on a server using the same client.jar's
    in their own WEB-INF/lib's?

    Joe,
    As Pravin mentions, the checking of those boxes in Workbench triggers scheduled jobs within the EAC that kicks off the scripts at the appropriate time/day. But as you've noticed, there's not a ton of flexibility and you don't get cron or Windows Scheduler-type capabilities.
    If you need to do something special, you can manually kick off the report generation scripts from your control directory using the runcommand.bat (or sh) script or place the command into a cron/Windows Scheduler job:
    For example, to kick off the WeeklyReports job, you would do this:
    runcommand.sh WeeklyReports runSo, assuming you go down the route of creating multiple ReportGenerators and scripts, you would create a job to kick off the new script you've created at the appropriate time.
    Hope that helps,
    Patrick
    http://branchbird.com

  • EJB Client JAR Creation - Workspace Studio (ALSB 3.0/WLS 10)

    hi
    I'm trying to create an EJB Client JAR for an 2.1 Session Bean EJB Created in a WLS 10 domain using BEA Workspace Studio (i.e. this is the Aqualogic Service Bus 3.0 Product install).
    I'm doing this in preparation for testing the ALSB EJB Transport which requires a client JAR.
    I simply can't get a useful JAR from the facility provided in the Workspace IDE. The Workspace help is pointing to an IBM generated page and I'm following the procedure there.
    I have configured the EJB for an EJB Client Project.
    If I export an EAR from the Application containing the EJB, the EAR only contains the EJB JAR (with a Manifest entry to a non-existent Client JAR).
    If I export the EJB Client Project to a JAR the JAR is simply empty i.e. contains some descriptor type artefacts but no classes.
    I have tried this quite a few times with the same outcome. Can anyone from BEA or the user community confirm whether or not this facility actually works!
    Thanks
    Jim Nicolson

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/ejbTransport/ejbtransport.html#wp1079062 . This is document for OSB 10xx and yours is a a version or two older than this (So it will be applicable).
    Can you please check if your EJB are complying to 2.1specification?
    However the latest version of service has support for both EJB 2.1 and EJB 3.0 specification
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/ejb.htm#CCGIFFCI
    Thanks
    Manoj

  • EJB Client JAR project produces empty JAR

    I've built an EJB module in WorkSpace Studio using the "WebLogic EJB Project" type, which is part of an EAR. I created a couple stateless session beans within this project, and then created an EJB Client JAR project using the "EJB Client JAR-->Create EJB Client Jar" menu item on the EJB project's hidden menu.
    According to the documentation, exporting an EAR file from the EAR project will cause the client JAR to be generated. I exported the EAR file from the EAR project, and sure enough, it included the client JAR (in /APP-INF/lib/). I extracted the client JAR from the EAR and opened it up to make sure it contained all of the client-side classes. I discovered that the client JAR was empty, the only contents being the MANIFEST.MF file. The interface classes were instead contained in the EJB JAR itself.
    How can I get the EJB client code to actually be included in the EJB client JAR?
    Thanks,
    Eric

    Well I have tried this with 6.1 and first
    1. One would expect the jar name to be the name in the ejb-jar.xml -
    ejb-client-jar section
    2. It outputs the file XXXEJB_Compiled.jar but it is same size as base jar
    this is 6.1 sp3
    whats up?
    Matthew Shinn wrote:
    Hi Sanjay,
    There is a bug in the documentation. The client-jar name should never be part of the
    ejbc command line. Step 3 below should be something like:
    java weblogic.ejbc xxxEJB.jar xxxEJB_Compiled.jar
    If you have an ejb-client-jar entry in your ejb-jar.xml, the client jar should be placed
    in the directory from which you ran ejbc. Make sure that the classes that you want to be
    put in the client-jar are not loaded from the classpath. This is very important or your
    client-jar won't be created correctly. The client-jar will only contain classes loaded
    from the input jar to ejbc. A bug for the incorrect documentation has already been filed
    and should be fixed soon.
    - Matt
    Sanjay Dwivedi wrote:
    Hi,
    I am trying to use the
    <ejb-client-jar> sub-element of the Sun's <ejb-jar> (EB 2.0 DTD) element of the
    ejb-jar.xml to generate the ejb-client.jar. I followed the step as documented
    by WebLogic but the files in EJB jars and ejb-client jars are identical. Here
    is what I am doing:
    1. Build the xxxEJB.jar for my EJB by running the WebLogic.ejbc on the standard
    EJB jar file.
    2. My ejb-jar.xml file has following line:
    <ejb-jar>
    <ejb-client-jar>xxxEJBClient.jar</ejb-client-jar>
    </ejb-jar>
    3. Next I used the following command to generate the ejb-client.jar file
    java weblogic.ejbc xxxEJB.jar xxxEJBClient.jar
    My xxxEJBClient.jar files consists of exactly same files (with same sizes) as
    the xxxEJB.jar file. Only difference is that the xxxEJB.jar file includes generated
    java source files for the bean implementation class and home/remote classes.
    In my opinion the xxxEJBClient.jar should not contain the EJB implementation classes.
    Any experience using the ejb-client-jar for generating the ejb-client.jar?
    Thanks,
    Sanjay.
    [att1.html]

  • Can we stop the server from generating a client jar

    When an EAR module is deployed, the server generates a large (a few MB) client jar inside the deployment directory. AFAIK this jar is never used for anything unless you have ACC clients. Please correct me if I'm wrong!
    Recently, we've had some worrying exceptions logged, indicating that there is a problem reading this client jar, and the context indicates that the server is attempting to set up a class loader for it. Everything works fine anyway.
    We have a few hundred EAR's deployed in each of our servers, and the EAR's contain on avarage about 30-40 entity beans, so you can imagine that we worry about every unnecessary resource allocation.
    Also, every exception logged requires attention from the admins so we would really like to get rid of these jars if we can, and if they are in fact unnecessary.
    TIA,
    Gunnar Grim

    Hello, Gunnar.
    You are correct that the generated jar is for launching clients using ACC. (Historically some users have taken the generated app client jar and added it to the classpath for non-ACC clients, but this is not an officially supported use of it.)
    You said that recently exceptions have been reported, which I assume means that this was not always true. It would seem that something in the environment or the applications has changed to trigger the exceptions. Identifying whatever that change has been might help identify the root cause of the new problem. Have you changed anything in the environment or the applications around the time the exceptions began appearing?
    Can you post an example of one of the exceptions you are concerned about?
    Also, what version of the product are you using?
    - Tim

  • Manifest to ejb-client-jar ??

    Hi,
    I have an EAR with an EJB module. Into the EJBmodule.jar my Manifest.mf lists many jars in "Class-path:".
    In EJB1.1 it's deprecated (if I understood it well...), can I specify many jars in the ejb-jar.xml <ejb-client-jar> element?? (If yes, how to write them??)
    Example:
    -- Manifest
    Class-path: myjar1.jar myjar2.jar
    --> <ejb-client-jar>myjar1.jar myjar2.jar</ejb-client-jar> ?

    I realized that class-path has not to do with ejb-client-jar... but is this a kind of filter on the client view of beans (i.e. another jar with only stubs and interfaces?? this should be a deploy-tool yield..)?

  • ClassCastException running JDev Generated EJB Client

    Hi,
    I'm trying to test a CMP entity bean I created by using the JDev903 generated TestClient class. First I run the EJB I want to test, then I attempt to run the Client class. I get a ClassCastException. The exception occurs on the call to PortableRemoteObject.
    How do I get this to run? I'm not sure how to get past this exception. Is there something else I need to run? Is there something that needs to be set in a config file.
    I kinda expected this to run outta da box.
    package Samplecom.ngit.iis.cmedia.cmptest;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import com.ngit.iis.cmedia.cmptest.Tcmmtpic;
    import com.ngit.iis.cmedia.cmptest.TcmmtpicHome;
    import java.util.Collection;
    import java.util.Iterator;
    import javax.naming.NamingException;
    public class TcmmtpicClient {
    public static void main(String [] args) {
    TcmmtpicClient tcmmtpicClient = new TcmmtpicClient();
    try {
    Context context = getInitialContext();
    TcmmtpicHome tcmmtpicHome = (TcmmtpicHome)PortableRemoteObject.narrow(context.lookup("Tcmmtpic"), TcmmtpicHome.class); <=== EXCEPTION OCCURS HERE ===>
    Tcmmtpic tcmmtpic;
    // Retrieve all instances using the findAll() method
    // (CMP Entity beans only)
    Collection coll = tcmmtpicHome.findAll();
    Iterator iter = coll.iterator();
    while (iter.hasNext()) {
    tcmmtpic = (Tcmmtpic)iter.next();
    System.out.println("tpic_cmvg_id = " + tcmmtpic.getTpic_cmvg_id());
    System.out.println("tpic_id = " + tcmmtpic.getTpic_id());
    System.out.println("tpic_sequence_no = " + tcmmtpic.getTpic_sequence_no());
    System.out.println("tpic_nm = " + tcmmtpic.getTpic_nm());
    System.out.println();
    } catch(Throwable ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
    return new InitialContext(env);
    Thanks,
    Art

    I was attempting to run this under JDev. I created a CMP from a table and then created the client to run it. I started the bean and then ran the client with the following result.
    The stack trace is listed below.
    C:\JDev903\jdk\bin\javaw.exe -ojvm -classpath J:\CM_SOURCE\workspaces\cmee\cmptest\classes;C:\JDev903\jdev\lib\jdev-rt.jar;C:\JDev903\j2ee\home\lib\activation.jar;C:\JDev903\j2ee\home\lib\ejb.jar;C:\JDev903\j2ee\home\lib\jaas.jar;C:\JDev903\j2ee\home\lib\jaxp.jar;C:\JDev903\j2ee\home\lib\jcert.jar;C:\JDev903\j2ee\home\lib\jdbc.jar;C:\JDev903\j2ee\home\lib\jms.jar;C:\JDev903\j2ee\home\lib\jndi.jar;C:\JDev903\j2ee\home\lib\jnet.jar;C:\JDev903\j2ee\home\lib\jsse.jar;C:\JDev903\j2ee\home\lib\jta.jar;C:\JDev903\j2ee\home\lib\mail.jar;C:\JDev903\j2ee\home\oc4j.jar;C:\JDev903\lib\xmlparserv2.jar;C:\JDev903\lib\xmlcomp.jar -Dhttp.proxyHost=spider.northgrum.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=*.ihsxtra.net|*.ihserc.com|*.logicon.com|*.grumman.com|*.northrop.com|*.northgrum.com Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient
    javax.naming.NamingException: Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:
         java.net.ConnectException: Connection refused: connect
         java.lang.Object com.evermind.server.rmi.RMIContext.lookup(java.lang.String)
              RMIContext.java:134
         java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
              InitialContext.java:350
         void Samplecom.ngit.iis.cmedia.cmptest.TcmmtpicClient.main(java.lang.String[])
              TcmmtpicClient.java:20
    Process exited with exit code 0.

  • ClassCastException by using Local Interface of EJB in other, but local EAR

    Hi,
    I get a ClassCastException if I try to cast the EJSWrapper-Class returned from local EJB Lookup to the interface it implements.
    The environment I use is WSADIE 5.1.1 with integrated Testenvironment.
    I have defined two EARs. One with a Web-Application and one wich contains the EJB to call from the WebApp. Both run in the same appserver instance wich means both run in the same JVM and i should be able to use Local Interface of the EJB.
    The EJB should use Libraries from the Server Environment while the WebApp uses newer Libs than the Server Environment offers(eg axis-rpc,wsdl4j,saaj). The Classloader-Policy of the EAR with the WebApp is set to PARENT_LAST while the Classloader-Policy of the EAR with the EJB is set to PARENT_FIRST.
    I do a Lookup by using an EJB-Local-Reference. The returned object is an EJSLocalStatelessHome-Object, wich implements my LocalEJBInterface. But if i try to cast to Object to this interface a ClassCastException occurs.
    The Classes of the EJB are packaged as follows:
    EJBName.jar contains the EJB-Impl class, the Serverside Implementations for RMI/IIOP interaction an EJSWrapper classes. This jar is packaged with the EJB-EAR.
    EJBClient.jar contains the Local- and Remote-Interface classes and the Stub-classes for EJBHome and EJB-Implementation. This jar is packaged wich both EARs, because of the interfaces, wich are needed in both projects.
    The Classloader of the EAR with the WebApp has no access the jar with the EJB-Impl, the generated Ties- and EJSWrapperclasses because it is located in only the EJB-EAR. But the interface-class is contained in the WebApp-EAR as described above.
    The exact Exception is as follows:
    java.lang.ClassCastException: com/ibm/wsrf/EJSLocalStatelessBPEAdapterHome_c2546ef5 incompatible with com/ibm/wsrf/BPEAdapterLocalHome
    java.lang.Throwable.<init>(Throwable.java)
    java.lang.Throwable.<init>(Throwable.java)
    java.lang.ClassCastException.<init>(ClassCastException.java:53)
    org.tempuri.ResourceDiscoveryService.DiscoverySoapHttpBindingImpl.getResourceEPR(DiscoverySoapHttpBindingImpl.java)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    ... The EJSLocalStatelessBPEAdapterHome_c2546ef5 implements the BPEAdapterLocalHome interface.
    Please, can anyone give me a hint how to solve this problem?
    Thanks in advance, Michael

    Problem solved!
    The different EAR contained each an own copy of the jar with the local and remote interfaces of the EJB. The Problem is caused by the separate classloaders of the EARs in an application server. Each EAR Classloader loads his own version of the interface classes. Is the same class loaded by different classloaders, the JVM handles this classes as different classes. An example if you create an instance of a class in one classloader and try to reference the created instance by the same class from another classloader, the association will fail, because of different classloaders in the same JVM.
    The solution in an application server where you have deployed two projects and want to use local interfaces is, store the interfaces(and only the interfaces) in an directory, where it is found by the parent classloader of the EAR classloaders. Remove the Jar with the interface from the EARs. The EAR Classloaders will then search in the their parent classloader for the interfaces. The interfaces will be loaded by the parent classloader and will recognized as compatible by the JVM.
    Greetings, hope this helps help others!
    Michael

  • Using JMX to read ejb manifest jar and ejb-jar.xml in ejb jar inside ear

    Hello,
    I have an ear deployed on weblogic console. I need to check contents of manifest file and ejb-jar.xml of a jar that is present in the deployed ear.
    Currently I am using below code to access jar inside ear deployed :
    Hashtable env = new Hashtable(5);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    url);
    env.put(Context.SECURITY_PRINCIPAL, user);
    env.put(Context.SECURITY_CREDENTIALS, password);
    Context ctx = new InitialContext(env);
    mBeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    String type = "EJBComponentRuntime";
    Set beans = mBeanHome.getMBeansByType(type);
    try{
    for(Iterator it=beans.iterator();it.hasNext();)
    EJBComponentRuntimeMBean rt = (EJBComponentRuntimeMBean)it.next();
    if(rt.getParent().getName().equals("xxx")){
    System.out.println(rt.getName());
    l.add(rt.getName());
    Here xxx is the ear. Now I need to get inside the jar (represented) by variable rt and access its manifest file,ejb-jar.xml
    Does anyone have an idea how to do this?
    regards
    Sameer

    Isn't it possible to put them there manually? :)

  • How to create EJB client without WL specific classes ?

    Hi,
    I have stateful session EJB running in WebLogic 5.1.
    Is it necessary to client that will access that EJB to have WebLogic classes in classpath ?
    Is it possible to write client that doesn't have any classes specific to Weblogic ?
    Uix

    Sure, if it's acceptable for your application to classload from WebLogic.
    For example: helper class to start WebLogic client (server is running on
    localhost:7001 and client classes are in c:/weblogic/myserver/clientclasses/):
    c:\WebLogicClient>set CLASSPATH=.
    c:\WebLogicClient>java WebLogicClient examples.ejb.basic.statelessSession.Client
    import java.net.*;
    import java.lang.reflect.*;
    public class WebLogicClient {
    /* client classpath. Should NOT be in the java classpath! */
    public static final String CLIENT_CLASSES =
         "file://C:/weblogic/myserver/clientclasses/";
    /* WebLogic server to classload from */
    public static final String WL_CLASSES =
         "http://localhost:7001/classes/";
    public static void main(String[] args) {
    try {
    ClassLoader cl = new URLClassLoader(new URL[] {
    new URL(CLIENT_CLASSES),
    new URL(WL_CLASSES)
    Thread.currentThread().setContextClassLoader(cl);
    Class clientClass = cl.loadClass(args[0]);
    Method methodMain = clientClass.getMethod("main",
              new Class[] {Class.forName("[Ljava.lang.String;")});
    String[] clientArgs = new String[args.length - 1];
    System.arraycopy(args, 1, clientArgs, 0, clientArgs.length);
    methodMain.invoke(null, new Object[] {clientArgs});
    } catch(Throwable oops) {
    oops.printStackTrace();
    uix <[email protected]> wrote:
    Hi,
    I have stateful session EJB running in WebLogic 5.1.
    Is it necessary to client that will access that EJB to have WebLogic classes in classpath ?
    Is it possible to write client that doesn't have any classes specific to Weblogic ?
    Uix--
    Dimitri

  • Missing DTOs in Client JAR Using Appc

    Hello,
    I've been running Appc on my server JAR to generate my client JAR. It works great,
    except that some of the files utilized by the application, namely the DTOs, are
    not being packaged into the JAR. I think I know why this is occurring, but I'm
    not sure how to fix it. Let me explain how a simplified version of the app works:
    It's a security administration app, so there's this idea of users and their roles.
    The only remote bean in the JAR is a stateless session bean. It has the following
    methods:
    public UserDTO getUser(String pUserId);
    public List getRolesForUser(String pUserId);
    public void updateUser(UserDTO pUser);
    public void replaceRolesForUser(List pRoles);
    Simple enough, right? The Appc process knows to place the UserDTO class in the
    client JAR since it is referenced in the interface. However, what the Appc process
    does not realize is that the List of roles being returned is actually a List of
    RoleDTOs.
    The calling client application uses the RoleDTO class when iterating through the
    list of roles. Since the client application is a remote application and thus
    has only the client EJB JAR in its classpath, the client app can't compile; it
    can't find a definition for RoleDTO. Is there some way to force the Appc process
    to include all DTOs?
    Thanks,
    Leo

    Thanks. That's what I thought!
    Rob Woollen <[email protected]> wrote:
    Your analysis is correct. There's no real clean solution in this case
    other than returning a RoleDTO[] or updating the client-jar file with
    the missing classes.
    -- Rob
    Leo J. Hart IV wrote:
    Hello,
    I've been running Appc on my server JAR to generate my client JAR.It works great,
    except that some of the files utilized by the application, namely theDTOs, are
    not being packaged into the JAR. I think I know why this is occurring,but I'm
    not sure how to fix it. Let me explain how a simplified version ofthe app works:
    It's a security administration app, so there's this idea of users andtheir roles.
    The only remote bean in the JAR is a stateless session bean. It hasthe following
    methods:
    public UserDTO getUser(String pUserId);
    public List getRolesForUser(String pUserId);
    public void updateUser(UserDTO pUser);
    public void replaceRolesForUser(List pRoles);
    Simple enough, right? The Appc process knows to place the UserDTOclass in the
    client JAR since it is referenced in the interface. However, whatthe Appc process
    does not realize is that the List of roles being returned is actuallya List of
    RoleDTOs.
    The calling client application uses the RoleDTO class when iteratingthrough the
    list of roles. Since the client application is a remote applicationand thus
    has only the client EJB JAR in its classpath, the client app can'tcompile; it
    can't find a definition for RoleDTO. Is there some way to force theAppc process
    to include all DTOs?
    Thanks,
    Leo

Maybe you are looking for

  • Iphone 3G no longer shows charging or recognized by PC

    Iphone 3G 3.1.2 no longer shows to be charging when connected to my PC or to a wall outlet. The computer does not recognize it at all, tried putting it into DFU and still, no recognition. What I've discovered is, that it does actually charge when plu

  • Folder in iPhoto not Visible with Apple TV

    I've had the new Apple TV for about a month now and love it. I created a folder/event in iPhoto to move a bunch of photos to so I could use as a screen saver when I play music. I can see the folder and it's contents in iPhoto, but when I go to Apple

  • Usb masse storage  in solaris 10 problem !!

    Hi all i have srss 3.0 with solaris10-GA, all work well but the usb masse storage does' nt recognize by srss3.0 are there solution for that problem. or patch for srss 3.0. thanks team

  • How to create interactive BW reports in Portal

    Hi customer wants following senario. From BW report is generated and displayed in portal.that report contains list of customers whose sales is less than 50% than targets.now when i click on perticular customer on the report it should show me details

  • Runtime error running Flash CS5

    Hello, I have this weird issue with Flash Professional CS5. It has worked just fine for me in the past but when i try to start it now it gives me the following error: "This application has requested the Runtime to terminate in an unusual way. Please