EJB Dependencies in WebLogic

I have what I hope is a fairly straightforward question, but I can't seem to figure it out from the documentation.
I'm using Weblogic 6 and JBuilder. I'm trying to deploy an EJB. In the application folder of my Weblogic Server I put the .jar file for the EJB, and also a .jar file that contains a bunch of common classes needed by all the EJBs I'm working on. When the server starts up, the bean complains that it can't find the helper classes in the other .jar.
What do I need to do in order for the bean to be able to see and use classes in the other .jar file?

I am going from memory, but I believe that in WLS 6 that there is a \lib directory some where under the application deployment directory. This is where you need to add your helper .jar files.

Similar Messages

  • How can I use EJB component on Weblogic 8.1 server ?

    hi,dear sir:
    How can I use EJB component on Weblogic 8.1 server ?
    It need client jar to invoke ejb,but what will I to do for this jar file? what does it contain? format ?
    If my EJB module contain 100 session bean and 50 Entity bean,but I want invoke 20 session beans in my module, how can I to do?
    thank you...

    Hi,
    This forum is exclusively for Creator. please post this on appropriate forum
    regards
    CreatorTeam

  • EJB deployment in weblogic 8.1

    I am new to EJB's. I have truly tried to research and solve this problem. I am trying to deploy a simple EJB in wls 8.1.
    Here are snippets of ejb-jar.xml, web.xml, and weblogic-ejb-jar.xml:
    ejb-jar.xml:
    <ejb-jar>
    <enterprise-beans>
    <session>
    <display-name>UserScanSystems</display-name>
    <ejb-name>com.myCo.util.UserScanSystems</ejb-name>
    <home>com.myCo.util.UserScanSystemsHome</home>
    <remote>com.myCo.util.UserScanSystemsRemote</remote>
    <ejb-class>com.myCo.util.UserScanSystemsBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>com.myCo.util.UserScanSystems</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-ejb-jar.xml:
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>com.myCo.util.UserScanSystems</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
    </stateless-clustering>
    </stateless-session-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>com.myCo.util.UserScanSystems</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    in web.xml:
    <ejb-ref>
    <ejb-ref-name>ejb/UserScanSystems</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.myCo.util.UserScanSystemsHome</home>
    <remote>com.myCo.util.UserScanSystemsRemote</remote>
    <ejb-link>com.myCo.util.UserScanSystems</ejb-link>
    </ejb-ref>
    When I deploy I receive an error message that the ejb-link com.myCo.util.UserScanSystems could not be resolved. com.myCo.util.UserScanSystems is both the ejb-name in ejb-jar.xml and weblogic-ejb-jar.xml and the jndi-name in weblogic-ejb-jar.xml. I have tried another [unique] name for ejb-name but still receive the same problem. I am primarily deploying into an exploded webapp but have also tried deploying ear and war files using >../ejb/ejb.jar#com.myCo.util.UserScanSystems as a relative path to the jar containing the EJB but same type of error.
    what is the ejb-link supposed to be? the jndi-name in weblogic-ejb-jar.xml ? (In my case it's both jndi and ejb-name)
    What am I missing?
    Exception:weblogic.management.ApplicationException: activate failed for dts Module: dts Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'com.myCo.util.UserScanSystems' declared in the ejb-ref or ejb-local-ref 'ejb/UserScanSystems' in the application module 'dts' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.] weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'com.myCo.util.UserScanSystems' declared in the ejb-ref or ejb-local-ref 'ejb/UserScanSystems' in the application module 'dts' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct. at weblogic.deployment.EnvironmentBuilder.addEJBLinkRef(EnvironmentBuilder.java:664)
    Note that once the exploded version of application fails I can goto the weblogic console and deploy the EJB using the jar file that gets approot/ejb/ejb.jar but subsequnt deploy attempts at the application still fail.
    If anyone has a working example and could post ejb-jar.xml, pertaining piece of web.xml, and weblogic-ejb-jar.xml that would be GREAT!

    Refer to the ejb-link section in the ejb-local-ref.
    http://edocs.bea.com/wls/docs81/webapp/web_xml.html#1020090
    <ejb-link>../ejb.jar/#com.myCo.util.userScanSystems</ejb-link>

  • Steps to deploy an ejb application and running an ejb client in weblogic server6.1

    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet

    Hi.
    Check out the beanManaged example that ships with WLS and read the accompanying docs. This
    is a simple EJB with a servlet that invokes it.
    Michael
    shekhar sachdev wrote:
    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • EJB communication between weblogic and websphere

    Hello:
    I have weblogic 7.1 instance running in machine A and websphere running in machine B. I want to make a call to the ejb deployed from weblogic to websphere. Any experience in this would be very helpful. Or pl. post the procedure.
    Thx in advance.

    I don't think that there is any magic here, although I've never tried it.
    All you need is the compiled EJBHome and EJBObject interfaces in the
    classpath of the calling EJB, get an InitialContext in the JNDI namespace of
    the target EJB container using the name of the JNDI InitialContext Factory,
    do a lookup on the bean making sure to do a PortableRemoteObject.narrow when
    you are casting the Home stub with the vendor specific version of
    PortableRemoteObject(and that may be the real trick), call the appropriate
    create method, and you are rolling.
    I guess the question becomes how to make sure that when you are calling
    PortableRemoteObject.narrow on the Home stub, that you get the vendor
    specific version for the EJB container and JNDI namespace from which you are
    doing the lookup.
    I guess the answer is, I'm guessing. Have you tried it?
    bill
    "nebs om" <[email protected]> wrote in message
    news:30035468.1103738722864.JavaMail.root@jserv5...
    Hello:
    I have weblogic 7.1 instance running in machine A and websphere runningin machine B. I want to make a call to the ejb deployed from weblogic to
    websphere. Any experience in this would be very helpful. Or pl. post the
    procedure.
    >
    Thx in advance.

  • Call weblogic EJB without using weblogic.jndi.T3InitialContextFactory

    I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
    The context retrieval is as follows:
    Properties table = new Properties();
    table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
    Context context = new InitialContext(table);
    return context;
    but when I run the client I am getting the follwing error:
    javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No]
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
    at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
    at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
    at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
    at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
    at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
    at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
    Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
    at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
    at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
    at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
    at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
    ... 12 more
    I have the J2EE jar on the client path and all....but can't get through this error
    need help guys!
    Samir

    Samir j <> writes:
    Make sure IIOP is enabled on the server side. There was a bug in
    earlier 8.1 config wizards that defaulted it to off.
    andy
    I am trying to call an ejb on a weblogic server without using weblogic.jndi.T3InitialContextFactory.
    The context retrieval is as follows:
    Properties table = new Properties();
    table.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    table.put(Context.PROVIDER_URL, "iiop://localhost:7001");
    Context context = new InitialContext(table);
    return context;
    but when I run the client I am getting the follwing error:
    javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No]
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:362)
    at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:289)
    at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:245)
    at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:209)
    at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:69)
    at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.test.TestDirectDocumentLoad.getContext(TestDirectDocumentLoad.java:59)
    at com.test.TestDirectDocumentLoad.loadDocs(TestDirectDocumentLoad.java:139)
    at com.test.TestDirectDocumentLoad.main(TestDirectDocumentLoad.java:116)
    Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:173)
    at com.sun.corba.se.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:65)
    at com.sun.corba.se.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:67)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:652)
    at com.sun.corba.se.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:594)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1105)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:788)
    at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1186)
    at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1079)
    at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.java:2436)
    at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:340)
    ... 12 more
    I have the J2EE jar on the client path and all....but can't get through this error
    need help guys!
    Samir

  • Hi i when i am trying to deploy an EJB module on weblogic server i get the

    Hi all,
    when i am trying to deploy an EJB module on weblogic server i get the the following exception on the server.
    Exception:weblogic.management.ApplicationException: prepare failed for test Module: test Error: Exception preparing module: EJBModule(test,status=NEW) Unable to deploy EJB: D:\bea\weblogic81b\server\bin\myserver\upload\test.jar from test.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'HelloBean' at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:525) at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.(MBeanDeploymentInfoImpl.java:230) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1256) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:449) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2792) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1478) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1136) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:975) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2571) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2523) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2453) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:820) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:536) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:494) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
    [Deployer:149033]preparing application test on myserver
    [Deployer:149033]failed application test on myserver
    [Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application test on myserver.: Exception:weblogic.management.ApplicationException: prepare failed for test Module: test Error: Exception preparing module: EJBModule(test,status=NEW) Unable to deploy EJB: D:\bea\weblogic81b\server\bin\myserver\upload\test.jar from test.jar: weblogic.ejb20.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'HelloBean' at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:525) at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.(MBeanDeploymentInfoImpl.java:230) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1256) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:449) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2792) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1478) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1136) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:975) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2571) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2523) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2453) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:820) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:536) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:494) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178) at weblogic.kernel.ExecuteThread.run(ExecuteThread

    Hi, i am also facing the same problem.......
    my ejb-jar.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description><![CDATA[No Description.]]></description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    -->
    <!-- Entity Beans -->
    <entity >
    <description><![CDATA[Description for Account]]></description>
    <display-name>Name for Account</display-name>
    <ejb-name>Account</ejb-name>
    <home>com.app.j2ee.bmp.interfaces.AccountHome</home>
    <remote>com.app.j2ee.bmp.interfaces.Account</remote>
    <local-home>com.app.j2ee.bmp.interfaces.AccountLocalHome</local-home>
    <local>com.app.j2ee.bmp.interfaces.AccountLocal</local>
    <ejb-class>com.app.j2ee.bmp.ejb.AccountBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>com.app.j2ee.bmp.interfaces.AccountPK</prim-key-class>
    <reentrant>False</reentrant>
              <resource-ref>
              <res-ref-name>jdbc/ejbPool</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
              </resource-ref>
    </entity>
    </enterprise-beans>
    <!-- Relationships -->
    <!-- Assembly Descriptor -->
    <!--
    To specify your own assembly descriptor info here, add a file to your
    XDoclet merge directory called assembly-descriptor.xml that contains
    the <assembly-descriptor></assembly-descriptor> markup.
    -->
    <assembly-descriptor >
    <!--
    To specify additional security-role elements, add a file in the merge
    directory called ejb-security-roles.xml that contains them.
    -->
    <!-- method permissions -->
    <!--
    To specify additional method-permission elements, add a file in the merge
    directory called ejb-method-permissions.ent that contains them.
    -->
    <!-- transactions -->
    <!--
    To specify additional container-transaction elements, add a file in the merge
    directory called ejb-container-transactions.ent that contains them.
    -->
    <!-- finder transactions -->
    <!-- message destinations -->
    <!--
    To specify additional message-destination elements, add a file in the merge
    directory called ejb-message-destinations.ent that contains them.
    -->
    <!-- exclude list -->
    <!--
    To specify an exclude-list element, add a file in the merge directory
    called ejb-exclude-list.xml that contains it.
    -->
    <container-transaction>
              <method>
              <ejb-name>Account</ejb-name>
              <method-intf>Local</method-intf>
              <method-name>*</method-name>
              </method>
              <method>
              <ejb-name>Account</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
         </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • Please check this ejb-jar.xml, weblogic-ejb-jar.xml,weblogic-cmp-rdbms.xml

    i am getting a classcast exception.My Stateless and stateful session bean works
    fine .. problem only with Entity bean. Please check these xml files and let me
    know if i have missed anything.
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>stores</ejb-name>
    <home>Ejb.Stores.storesHome</home>
    <remote>Ejb.Stores.storesRemote</remote>
    <ejb-class>Ejb.Stores.storesBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>storesBean</abstract-schema-name>
    <cmp-field>
    <field-name>productId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>descrip</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>price</field-name>
    </cmp-field>
    <primkey-field>productId</primkey-field>
    <query>
    <query-method>
    <method-name>findPriceGreaterThan</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE a.price > ?1]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>stores</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------- end of ejb-ar.xml---------------------
    weblogic-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>stores</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-type>
         <persistence-use>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>6.0</type-version>
         </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>storesEntity</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ------------- end of weblogic-jar.xml----------
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
    EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>stores</ejb-name>
    <data-source-name>sqlTX</data-source-name>
    <table-name>ProductEJBTable</table-name>
    <field-map>
    <cmp-field>productId</cmp-field>
    <dbms-column>productId</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>descrip</cmp-field>
    <dbms-column>descrip</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>price</cmp-field>
    <dbms-column>price</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>false</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    ---------------- end of weblogic-cmp-rdbms-jar.xml----------
    Do i have to mention the connection Pool name anywhere .. My connection Pool name
    is sql7Pool and my datasource name which i have mentioned is sqlTx. I am using
    Sql server 7. I am deploying a jar file(not a war file) and accessng the EJB through
    a Servlet. Please any help would definitely be appreciated.
    Cheers
    Ashish.

    I thought you were getting a class cast exception but the stack trace shows
    a NullPointerException on line 38 of your servlet code. I am not sure if the
    code that you have attached is the complete code or just snippets of your
    complete code. Anyways, counting 38 lines in the code you attached points to
    the line "mr =
    mh.create(request.getParameter("login"),request.getParameter("name"));"
    which could be because "mh" is null. Can you verify "mh" is not null and
    also "objRef" is not null.
    Attaching the stack trace for ClassCastException would be useful.
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hey Anand,
    Thanks for your reply. I have attached the StackTrace,Servlet code andmy
    location and settings of my servlet .
    This is the StackTrace which i get :
    pl.java:265)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    before create
    java.lang.NullPointerException
    at trialweblogic.webServlet.doGet(webServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:265)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    -------------- end of StackTrace---------------------
    My Servlet Code is
    package trialweblogic;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.ObjectNotFoundException;
    import javax.ejb.DuplicateKeyException;
    import javax.ejb.EJBException;
    import java.rmi.RemoteException;
    import java.rmi.Remote;
    import trialweblogic.*;
    public class webServlet extends HttpServlet {
    masterHome mh;
    masterRemote mr;
    OutputStream out;
    private static final String CONTENT_TYPE = "text/html";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponseresponse)
    throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    // out = response.getOutputStream();
    try{
    InitialContext ic = new InitialContext();
    Object objRef = ic.lookup("masterBeanJNDI");
    mh =(masterHome)PortableRemoteObject.narrow(objRef,masterHome.class);
    >
    mr =mh.create(request.getParameter("login"),request.getParameter("name"));
    out.println("after create");
    }catch(Exception ex){
    ex.printStackTrace();
    public void destroy() {
    --------- end of servlet--------------
    I am using Weblogic 6.1. I have included the following in my web.xml filewhich
    is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF
    >
    >
    <servlet>
    <servlet-name>webServlet</servlet-name>
    <servlet-class>trialweblogic.webServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>webServlet</servlet-name>
    <url-pattern>/webServlet/*</url-pattern>
    </servlet-mapping>
    My Servlet is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF\class
    es\trialweblogic\
    folder. In this folder i also have the supporting files (home,remote &bean tooo).
    >
    >
    I call this servlet when te user submits the info from a JSP page.
    Hope this info helps in solving my problem. Do i have to mention theconnection
    Pool name anywhere in the xml descriptor or am i missing anything here. iguess
    Connection Pool name is not required since we are mentioning the JNDI namein
    the xml descriptor. Bye for now.Awaiting your reply.
    Cheers
    Ashish.
    "Anand Byrappagari" <[email protected]> wrote:
    It is unlikely that your xml descriptors can cause class cast exceptions.
    How did you install the servlet? Can you attach the servlet code that
    might
    help. Also complete stack trace of the exceptions would be helpful.
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    Hi Anand,
    Thanks for quic reply.Hey i am using weblogic6.1. I am Not usinga WAR
    and
    ear file.I have created a jar file and deployed it.now i have createda
    servlet
    to access entity bean.Is a war file neccessary for accesing an entitybean
    through
    Servlet or JSP ???I am using sql server 7. The error that it givesis -----
    java.lang.ClassCastException: Cannot narrow remote object<br>
    "inside lookup method aaaaaaa" java.lang.NullPointerException. <br>
    Hope to get ur reply soon. in another entity bean i am getting thiserror ---
    java.lang.ClassCastException:
    weblogic.jdbc.common.internal.RmiDataSource
    .. I
    can't understand wots this error. I feel i am missing something inmy xml
    descriptor.
    Bye for now.
    Cheers
    Ashish.
    "Anand Byrappagari" <[email protected]> wrote:
    Can you attach the stack trace for the exception? Also please describe
    you
    environment - are the war and jar files installed separately? Are
    they
    composed into a ear? Also when are you getting a classcast exception?
    -- Anand
    "Ashish Suvarna" <[email protected]> wrote in message
    news:[email protected]...
    i am getting a classcast exception.My Stateless and stateful sessionbean
    works
    fine .. problem only with Entity bean. Please check these xml filesand
    let me
    know if i have missed anything.
    ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans
    2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>stores</ejb-name>
    <home>Ejb.Stores.storesHome</home>
    <remote>Ejb.Stores.storesRemote</remote>
    <ejb-class>Ejb.Stores.storesBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>storesBean</abstract-schema-name>
    <cmp-field>
    <field-name>productId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>descrip</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>price</field-name>
    </cmp-field>
    <primkey-field>productId</primkey-field>
    <query>
    <query-method>
    <method-name>findPriceGreaterThan</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE
    a.price> >> >>> >> >?1]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>stores</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    ------------- end of ejb-ar.xml---------------------
    weblogic-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD
    WebLogic
    6.0.0 EJB//EN"
    "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>stores</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <jndi-name>storesEntity</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ------------- end of weblogic-jar.xml----------
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD
    WebLogic
    6.0.0
    EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dt
    d
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>stores</ejb-name>
    <data-source-name>sqlTX</data-source-name>
    <table-name>ProductEJBTable</table-name>
    <field-map>
    <cmp-field>productId</cmp-field>
    <dbms-column>productId</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>descrip</cmp-field>
    <dbms-column>descrip</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>price</cmp-field>
    <dbms-column>price</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>false</create-default-dbms-tables>
    </weblogic-rdbms-jar>
    ---------------- end of weblogic-cmp-rdbms-jar.xml----------
    Do i have to mention the connection Pool name anywhere .. My
    connection
    Pool name
    is sql7Pool and my datasource name which i have mentioned is sqlTx.I am
    using
    Sql server 7. I am deploying a jar file(not a war file) and accessngthe
    EJB through
    a Servlet. Please any help would definitely be appreciated.
    Cheers
    Ashish.

  • EJB  Deployment in WebLogic 8.1  very very urgent

    Hi
    In order deploy EJB application in Weblogic 8.1, is it necessary to compile
    the application in WebLogic.ejbc. I did not find such files in WebLogic 8.1
    In weblogic 7.0 versiion has such files.
    The present procedure is as follows.
    1. Create a jar file contains all class files.
    2. Create a jar file contains class jar files, plus .xml files
    3. Deploy into weblogic 8.1 server EJB Deployment utility.
    ==================
    Please help me.
    Murali

    They are reccomended because the next step going from your simple single EJB
    to anything interesting, like adding more EJB's adding web-apps, adding
    web-services etc etc involves ears. If the setup and overhead for an EAR is
    easy, then just start there.
    But no if you just doing helloworld you of course dont have to ears.
    cheers
    mbg
    "Christopher R. Gardner" <[email protected]> wrote in message
    news:3fc0560e$[email protected]..
    >
    "Mark Griffith" <[email protected]> wrote:
    You can still run ejbc from the command line its still there. And you
    can
    still run weblogic.Deployer. (I dont ever reccomend jaring up in dev,
    it
    just takes longer, do exploded its easier and faster).
    But ear's are easy, see:So ears are recommended even if you're just doing EJBs (e.g., a simpleHello World)
    and no web apps (none needed for the Hello World or a PC client)?
    http://www.niffgurd.com/mark/work/blog/
    Cheers
    mbg
    "Christopher R. Gardner" <[email protected]> wrote in message
    news:3fbfd6c6$[email protected]..
    My understanding is ejbc has been deprecated and replaced with appc.Moreover,
    BEA is encourgaging developers to deploy ear files. All I want todo is
    to use
    ant to deploy a jar file with a single EJB in it. I'm not findingthe WL
    documentation
    very helpful. Hopefully, you'll have better luck than I.
    "skmurali" <[email protected]> wrote:
    Hi
    In order deploy EJB application in Weblogic 8.1, is it necessary
    to compile
    the application in WebLogic.ejbc. I did not find such files in
    WebLogic
    8.1
    In weblogic 7.0 versiion has such files.
    The present procedure is as follows.
    1. Create a jar file contains all class files.
    2. Create a jar file contains class jar files, plus .xml files
    3. Deploy into weblogic 8.1 server EJB Deployment utility.
    ==================
    Please help me.
    Murali

  • EJB lookup with weblogic?

    Hi, experts
    I have a question with the EJB lookup in weblogic, this is a question which has been asked many times when I google that. But likely there is not a clearly answer, so maybe I can get the answer from the experts?
    If we lookup an EJB, we need to use the "mappedName#interface_name" as the query name used in lookup method, Is this the only way that we query the EJB? Or is there any other ways we can simply the query name?
    Thanks for your time.

    Try posting in the forum dedicated to WLS EJB - WebLogic Server - EJB
    Also, why don't you explain what you're looking for exactly, how would you like to look up the EJB's, or are you asking for a best practice? Describing your use case will help get the best answer, right now your question is extremely generic.

  • Calling foreign EJB server from Weblogic

    Hi,
    I'm trying to invoke an EJB hosted in an old PowerTier EJB Container from an 8.1 SP5 hosted EJB, and I'm running in to problems. (PowerTier is based on the JBroker ORB)
    So far the only way I can get it to work is by replacing Weblogic's ORB implementation with the JBroker one:
    -Djavax.rmi.CORBA.StubClass=com.sssw.jbroker.rmi.StubDelegate
    -Djavax.rmi.CORBA.UtilClass=com.sssw.jbroker.rmi.UtilDelegate
    -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sssw.jbroker.rmi.PortableRemoteObjectDelegate
    But I'd like to avoid doing this if possible.
    So I'd like to get this to work using the WL RMI-IIOP implementation to integrate with the PowerTier/JBroker server.
    After looking at : http://forums.bea.com/bea/message.jspa?messageID=202437541&tstart=0
    I tried the following:
    Properties config = new Properties();
    config.setProperty(
    Context.PROVIDER_URL, "<b>iiop</b>://xxx.xxx.xxxxx.xxx:389/cn=Instance1,ou=Development,cn=Xxxx%20Xxxxxxx%20Xxxxx,ou=Components,cn=Xxxxxx%20Xxxx,ou=Applications,o=xxxxxxxx,c=uk");
    InitialContext context = new InitialContext(config);
    URL changed to protect the innocent - but format maintained.
    When the server executes this I get the following exception:
    javax.naming.InvalidNameException: url does not contain a port
    at weblogic.corba.j2ee.naming.NameParser.parseURL(NameParser.java:419)
    at weblogic.corba.j2ee.naming.ORBHelper.parseURL(ORBHelper.java:533)
    at weblogic.corba.j2ee.naming.ORBHelper.getORBReference(ORBHelper.java:440)
    at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:97)
    at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:42)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    Any idea what is causing this exception? If I replace the '%20' with a normal spaces it makes no difference.
    Am I going about this the right way?
    Thanks!

    Getting a bit closer now.
    The Object retreived from LDAP was a javax.naming.Reference - which contains the IOR for the Home interface.
    // Get IOR from LDAP
    InitialContext context;
    Hashtable config = new Hashtable();
    config.put(Context.PROVIDER_URL,"ldap://<host>:389/");
    config.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    context = new InitialContext(config);
    Reference reference = (Reference)context.lookup("<path to home>");
    // Get IOR from reference
    String ior = "" + reference.get(0).getContent();
    // Get WLS ORB
    ORB orb = (ORB)new InitialContext().lookup("java:comp/ORB");
    Object object = orb.string_to_object(ior);
    FooHome home = (FooHome)PortableRemoteObject.narrow(object, FooHome.class);
    Foo foo = home.create();
    // Everything works fine up to here.
    foo.invokeMethod(); // <-- This fails with the following exception :
    java.rmi.RemoteException: ; nested exception is:
    org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
    at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:197)
    at weblogic.iiop.IIOPRemoteRef.invokeInternal(IIOPRemoteRef.java:205)
    at weblogic.iiop.IIOPRemoteRef.invoke(IIOPRemoteRef.java:153)
    at ztkt.pl.Foo_IIOP_WLStub.invokeMethod(Unknown Source)
    at com.xyz.ezs.wl.ejb.PLProxyBean.invoke(PLProxyBean.java:56)
    at com.xyz.ezs.wl.ejb.PLProxy_o3b3ao_EOImpl.invoke(PLProxy_o3b3ao_EOImpl.java:45)
    at com.xyz.ezs.wl.ejb.PLProxy_o3b3ao_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
    at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:306)
    at java.lang.Class.newInstance(Class.java:259)
    at weblogic.iiop.ReplyMessage.getThrowable(ReplyMessage.java:337)
    at weblogic.iiop.InboundResponseImpl.getThrowable(InboundResponseImpl.java:62)
    at weblogic.iiop.OutboundRequestImpl.sendReceive(OutboundRequestImpl.java:179)
    ... 15 more
    (Method, class and package names changed.)
    Has anyone seen this before? Any idea what might be causing it?

  • EJB deployed in Weblogic 10.3 invoking CORBA

    Hello,
    we are running an EJB3 application deployed in WebLogic 10.3 that must communicate with CORBA.
    We're having the following exception when trying to submit an WorkOrder.
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No; nested exception is: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at weblogic.corba.idl.RemoteDelegateImpl.postInvoke(RemoteDelegateImpl.java:477)
    at weblogic.corba.idl.RemoteDelegateImpl.invoke(RemoteDelegateImpl.java:384)
    at weblogic.corba.idl.RemoteDelegateImpl.invoke(RemoteDelegateImpl.java:341)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    at pt.vodafone.indev.esm.SMSProvExt._WorkOrderIntfStub.submit(_WorkOrderIntfStub.java:183)
    at pt.vodafone.in.business.WorkOrderFacade.createWorkOrder(WorkOrderFacade.java:227)
    I've searched the forum for similar problems and the solution was to include the wlfullclient.jar in client classpath.
    I've done that already however the problem persists. (maybe it's necessary to configure some IIOP parameters)
    Anyone have any clue for this problem?
    Thanks in advance.
    Regards.

    Hi,
    include wls-api.jar in your classpath and provide me an update...
    Regards.
    Kal.

  • Calling EJB deployed on Weblogic 10.3 from WebSphere Application Server 6

    Hi,
    We are trying to call an EJB(2.1) deployed in Weblogic 10.3 from WebSphere Application Server 6.
    The problem is that the jars containing Weblogic's initial context factory are compiled with JDK5. (Client jar was built as per [http://download.oracle.com/docs/cd/E15051_01/wls/docs103/client/jarbuilder.html] .)
    WebSphere is still running on JDK1.4.
    Therefore when trying to get the InitialContext to lookup up the bean we get major/minor version errors because of the compiler level mismatch.
    Has anyone faced a scenario like this and come up with a solution?
    Are there 1.4 jars for Weblogic 10.3 out there?
    Any help?
    Thanks

    Hi Dan,
    Yes I am using EJB 3. I saw this thread earlier also but :
    1. In my case I am not calling the EJB 3.0 methods directly. I am using a java client (Cataloged as a Java Class Library) which does the lookup and calls the EJB methods. (I am not cataloging and calling the EJB 3.0 methods directly).
    2. It is working perfectly fine when the EJB is deployed in Weblogic 10.0 or 10.2.
    I am very much new to this so please bear with my small and silly questions! Thanks a lot for you help !
    Cheers !
    Rajat

  • Deploying an EJB Jar on weblogic

    Hi
    i have an ear file which contains two components
    1. JAR file contains EJB's
    2. WAR file contains JSP's and servlets
    when i try to deply this ear on weblogic
    the JAR file succesfully deploy but on deploying WAR file
    it throws error
    Context path is already in use
    Kindly help me to solve this problem
    Puneet

    The Web application that is being deployed has been assigned a context path that is already in use.

  • EJB 2 into weblogic 8, help please.. how to invoke

    hello
    i have one ejb into weblogic, session ejb stateless.
    the ejb-jar file has this:
    <session>
    <description><![CDATA[MiCallejeroSession Session]]></description>
    <display-name>MiCallejeroSessionEJB</display-name>
    <ejb-name>MiCallejeroSessionEJB</ejb-name>
    <home>MiCallejeroEJB.MiCallejeroSessionEJB.MiCallejeroSessionHome</home>
    <remote>MiCallejeroEJB.MiCallejeroSessionEJB.MiCallejeroSession</remote>
    <ejb-class>MiCallejeroEJB.MiCallejeroSessionEJB.MiCallejeroSessionBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    and into the weblogic-ejb.jar i have this:
    <weblogic-enterprise-bean>
    <ejb-name>MiCallejeroSessionEJB</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>50</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering></stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    </transaction-descriptor>
    <jndi-name>Mi.MiCallejeroSessionEJB</jndi-name>
    </weblogic-enterprise-bean>
    when i want to referer to the ejb i think that i must to invoque the jndi name (Mi.MiCallejeroSessionEJB) but if i make this produces one error.
    for running imust to invoke using the:
    MiCallejeroEJB.MiCallejeroSessionEJB.MiCallejeroSessionHome. the home interface.
    wich is my error? can you help me?
    thanks

    You can invoke the SessionEJb without the JNDI name as
    MiCallejeroSessionHome sessionhome=null;
    InitialContext ctx = new InitialContext();
    sessionhome=(MiCallejeroSessionHome)ctx.lookup("java:comp/env/MiCallejeroSessionEJB");
    MiCallejeroSession session=null;
    session=sessionhome.create();
    I think we can invoke the EJBs without their JNDI names also.

Maybe you are looking for