Missing ejb stubs in client.jar

Hi,
When I deploy me ear file then sunOne will generate a clientEjb.jar for me automatically with the stubs inside.
Now I recently had to change the remote ejb's with local ejb's, but when I now deploy the ear the client jar does not include the stubs, yet then I get a javax.naming. NamingException: invoccation exception. If I include the stubs manually, it works.
Any idea why now suddenly these stubs are not included anymore
Version SunOne AS = Sun ONE Application Server 7.0.0_02
OS = Windows XP
J2EE=1.3
Thank you in advance

Hi joyv,
Please post the exception stack trace you observed. That will help to debug the problem further. Thanks.
--ken                                                                                                                                                                                                                                                           

Similar Messages

  • FileGeneration/Wlappc not including local ejb interfaces in client jar

    With the following setting in the EJB source:
    @FileGeneration(
              remoteClass = Constants.Bool.TRUE,
              remoteHome = Constants.Bool.TRUE,
              remoteClassName = "ReportService",
              remoteHomeName = "ReportServiceHome",
              localClass = Constants.Bool.TRUE,
              localHome = Constants.Bool.TRUE,
              localClassName = "ReportSvc",
              localHomeName = "ReportSvcHome")
              @JarSettings(ejbClientJar = "dist/ReportFacadeClient.jar")
              @JndiName(remote="service-ReportFacade", local="local-ReportFacade")
              @Session(maxBeansInFreePool = "100",
                        initialBeansInFreePool = "10",
                        transTimeoutSeconds = "0",
                        type = Session.SessionType.STATELESS,
                        defaultTransaction = Constants.TransactionAttribute.SUPPORTS,
                        ejbName = "statelessSession",
                        enableCallByReference = Constants.Bool.TRUE)
    Along with the "<ejb-client-jar>ReportServiceClient.jar</ejb-client-jar>" entry in the ejb-jar.xml
    the ant build script invocation of wlappc successfully creates the "dist/ReportFacadeClient.jar" file as specified which includes the Remote Home and Remote interface, however the local definitions are absent.
    It is confirmed that the wlcompile does create the local implementation and interface files, they are just missing from the client jar.
    Do I need to manually append them to the jar or is there a configuration setting that I am missing to have this done automatically as is is done
    for the remote interface?
    Thanks.

    Hi,
    the local interface and local home is for local client which is within the same application (.ear). So local client needn't any client jar. it can always load the classes (local interface, local home, etc. ) it needs.
    so there isn't needs to put local interface and local home to a client jar.
    the client jar is for client out of the application, and it will be a remote invocation certainly.

  • Question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    "Anoushka" <[email protected]> writes:
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?Most protocols (IIOP, T3, JRMP) provide a slot for encoding a codebase
    in RMI requests. The codebase is usually an http URL that specifies
    where to get classes that are not currently available to the
    client. This URL is used to construct a java.net.URLClassLoader which
    then downloads classes on demand. These classes can include stubs,
    object arguments - pretty much anything you like. There are certain
    security restrictions on the URLClassLoader which is why you sometimes
    have to specifiy a security manager in a client. T3 will for
    preference generate stubs in the client rather than download them,
    however this is not allowed in an applet - and so in this case T3 will
    also download stubs from the server.
    The net of this is that you don't have to put very much at all in a
    client jar UNLESS you can't use the URLClassLoader. In that instance
    you have to put EVERYTHING you need in the client jar.
    HTH
    andy

  • Missing classes from servicegen client jar

    If you generate the WSDL, stubs, etc from an EJB jar, not all the required classes
    are copied to the service_client.jar.
    If your EJB method takes a class (say HomeAddressDTO) and that class inherits from
    a base-class, AddressDTO, then the AddressDTO is not included in the client jar.
    Regards,
    Nick

    if you want to use the same classes on both client and server side
    pls set useservertypes=true in the client element of servicegen.
    It seems wls 7.0ga is not adding base classes for value types to
    the client.jar file. I have filed a CR on this bug. Hope this will be
    fixed for sp1.
    Anyway, it is ok to add more classes to the client.jar manually.
    You may have to do it when reflection cannot find all the required
    classes or if you want to add your client app specific classes.
    regards,
    -manoj
    "Michael Jouravlev" <[email protected]> wrote in message
    news:[email protected]..
    I have the same problem. Do you think it is a bug? AFAIK, the processlooks
    like this: value objects --> WSDL --> client-side stubs for value objects,
    that actually do not have much in common with original ones. As I
    understand, it is possible either to copy manually created value objectsto
    client JAR file (no portability to non-Java clients), or to generate these
    stubs from WSDL. There is a parameter for clientgen task which changes the
    default behaviour. In my case all the parent classes in my value object
    hierarchy are not "mirrored" in client JAR. I think that this is correct,
    because client stubs do not have any hierarchy in them, they are just flat
    structures.
    I added needed classes to client JAR manually, but I think that this is my
    personal design error that I need these classes.
    What do you think?
    Michael.
    "Nick Minutello" <[email protected]> wrote
    in message news:3d094c10$[email protected]..
    If you generate the WSDL, stubs, etc from an EJB jar, not all the
    required
    classes
    are copied to the service_client.jar.
    If your EJB method takes a class (say HomeAddressDTO) and that classinherits from
    a base-class, AddressDTO, then the AddressDTO is not included in theclient jar.
    Regards,
    Nick

  • What is the relation betweent stubs and client jars?

    I'm new to EJB and I was trying to have a stateless EJB A call another stateless EJB B that's in the same JVM but in another EAR? I believe to do this my EJB A needs to have the stubs from EJB B. Correct? How do I generate them using WSAD 5 if anyone knows? Are these stubs that I need part of client jars?
    Vishal

    Well I figured it out. For those that need to know the answer when trying to make a call from one ejb to another ejb that's in a different ear you have to get a client jar. The client jar has the remote home and remote interface stubs. The reason you need a client jars so that you can cast your reference after doing a JNDI lookup.
    In WSAD (Websphere Studio 5) there is no real functionality built in to create client jar so what you have to do is create an EJB Jar and then delete all classes except for the stubs that I mentioned above. This client jar is then imported into your EJB project as a library jar. Now you can import this package in you EJB session bean and use it to cast you reference.
    Vishal

  • Fundamental question on EJB, JNDI and client jars

    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

    hello,
    well, the process is fairly simple actually.. The client needn't necessarily have
    the container generated stub. as a client u could contact what is known as a boot-strap
    service to download the stub over the wire.. infact one of the advantages of RMI
    is precisely that. and since RMI is the underlying architecture of EJBs, it all
    becomes rather simple. when u 'lookup' a bean, what u are in essence doing is
    asking the server to send down the stub to your JVM. well.. right now this is
    what i got time for..i will try to post a lengthier explanation in a couple of
    days at leisure..
    Vijay
    "Anoushka" <[email protected]> wrote:
    >
    Hi,
    This is a very fundamental question on EJBs and their clients - what
    all should go into the client jar of an ejb?
    I know for sure that just the remote and home interface classes of the
    ejb are sufficient on the client's classpath to work with an EJB on a
    totally different server, but I dont understand the logic behind it.
    If the client has to pass its object parameters over the network to
    the server where the ejb bean is located, should the container
    generated stub not be present on the client's classpath? After the
    client does the JNDI lookup of the ejb home on the server, how does it
    serialize and pass the parameters over the network if the container
    generated stub is not present?
    Any help would be greatly appreciated. Pointers to material on the
    internet which explain this/related things in detail would be a great
    help.
    Thank you,
    Anoushka

  • 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.

  • 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

  • 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

  • How to use client.jar generated by deploytool for a EJB web service

    Hello!
    Could anyone help me?
    I use Sun Application Server to deploy my EJB module and expose it as a web service. Then I open deploytool tree and select localhost under Server branch. In the right panel it shows a list of web services deployed. I chose recently deployed service and press "Client Jar..." button to get generated client stubs.
    Good.
    Could anyone tell me how I should use this jar file? It does not contain ..._Service_Impl.class that is usually used to get service port and call service methods.
    Please, explain me.
    Thank you much

    try
    jar tf Client.jar and look at what is inside.
    Usually you run the client to connect to the server -- (java -classpath blah pack.age.name.Client)
    Dont know how its being done over there.

  • 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..)?

  • 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.

  • 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.

  • 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

  • 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

Maybe you are looking for

  • IMac Late 2006-Upgrading RAM

    Hey everyone! This may sound like a really dumb question but I figured I'd ask anyway because I am not sure what to do. I am considering upgrading the RAM on my late 2006 20 inch iMac which I purchased in April 2007 so that I can instal Mac OS X Lion

  • Problem with JavaMail: don't work after I made it a jar

    Hi, My program works fine if I use -classpath to mail.jar and activation.jar but when I jar it i get: javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.MessagingException: IOException while sending message; nested

  • CANNOT SYNC IPHONE

    When I try to sync my Iphone with Itunes, it just shuts down with the error ''Itunes has stopped working'' . My laptop is windows vista and has not synced any iphone before this so dont really know what to do. Any suggestions ?

  • Creating App for Client

    hi there, i'm currently developing my first iPhone/iPad app for a client. when publishing/releasing it in the app store i do not want my name to appear as the seller but the client's name. do i need to create an iPhone/iPad developer account for the

  • JSF  to render the updated data

    On the portlet, when i select the year and company name, it displays the appropriate company info. when i edit those information and save them, it updates the database and goes to another web page and displays the modified data. But when i select the