EJB 5032 & EJB 5017 errors Pls respond

Hi , We are trying to access a CMP entity bean from the TEST application generated by Sun One Studio(V4-update1, iAS7), we are getting the following error
Error description by SUN docs says that the Bean does not have a public constructor, but we have ejbCreate with public access. Pls Let me know anyone faced similar issues
Rgds,
Girish
SEVERE: EJB5032: Exception in creating new bean : [{0}]
java.lang.NullPointerException
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl.jdoLookupPersistenceManagerFactory(SchemesEJBBean1952982800_ConcreteImpl.java:1451)
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl.setEntityContext(SchemesEJBBean1952982800_ConcreteImpl.java:1481)
at com.sun.ejb.containers.EntityContainer$EntityContextFactory.create(EntityContainer.java:2599)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:176)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:133)
at com.sun.ejb.containers.EntityContainer.getPooledEJB(EntityContainer.java:1896)
at com.sun.ejb.containers.EntityContainer.getContext(EntityContainer.java:560)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:452)
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.findAll(SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.java:99)
at schemes.ejb._SchemesEJBHome_Stub.findAll(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:233)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:98)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:191)
at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
SEVERE: EJB5017: Exception while running preinvoke : ejbName = [SchemesEJB]
SEVERE:
javax.ejb.EJBException: nested exception is: java.lang.NullPointerExceptionjava.lang.NullPointerException
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl.jdoLookupPersistenceManagerFactory(SchemesEJBBean1952982800_ConcreteImpl.java:1451)
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl.setEntityContext(SchemesEJBBean1952982800_ConcreteImpl.java:1481)
at com.sun.ejb.containers.EntityContainer$EntityContextFactory.create(EntityContainer.java:2599)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:176)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:133)
at com.sun.ejb.containers.EntityContainer.getPooledEJB(EntityContainer.java:1896)
at com.sun.ejb.containers.EntityContainer.getContext(EntityContainer.java:560)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:452)
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.findAll(SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.java:99)
at schemes.ejb._SchemesEJBHome_Stub.findAll(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.forte4j.j2ee.ejbtest.webtest.InvocableMethod$MethodIM.invoke(InvocableMethod.java:233)
at com.sun.forte4j.j2ee.ejbtest.webtest.EjbInvoker.getInvocationResults(EjbInvoker.java:98)
at com.sun.forte4j.j2ee.ejbtest.webtest.DispatchHelper.getForward(DispatchHelper.java:191)
at jasper.dispatch_jsp._jspService(_dispatch_jsp.java:127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
at com.sun.ejb.containers.EntityContainer$EntityContextFactory.create(EntityContainer.java:2607)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:176)
at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:133)
at com.sun.ejb.containers.EntityContainer.getPooledEJB(EntityContainer.java:1896)
at com.sun.ejb.containers.EntityContainer.getContext(EntityContainer.java:560)
at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:452)
at schemes.ejb.SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.findAll(SchemesEJBBean1952982800_ConcreteImpl_RemoteHomeImpl.java:99)
at schemes.ejb._SchemesEJBHome_Stub.findAll(Unknown Source)
at sun.refl

Hello Girish,
You did not set jndi-name in the cmp-resource correctly.
It must reference persistence-manager-factory-resource not
jdbc-resource.
On the other note - your bean must have a public
constructor for the container to be able to create new
instance. ejbCreate will be called on such instance.
Regards,
Marina

Similar Messages

  • Error during deployment of stateless session EJB using EJB 3.0

    having trouble deploying a stateless session bean to app server 10.1.3.1 oc4j container.
    deceided to go through oracles demo: How-To Develop a Stateless Session EJB using EJB 3.0 (http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-stateless-ejb/doc/how-to-ejb30-stateless-ejb.html).
    the demo encounters the same issue. so i assume there is something wrong with the app server set up, and not my source code.
    here is the deployment log:
    [Jul 1, 2009 11:59:25 AM] Application Deployer for test_ws STARTS.
    [Jul 1, 2009 11:59:25 AM] Copy the archive to C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear begins...
    [Jul 1, 2009 11:59:25 AM] Unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Done unpacking test_ws.ear
    [Jul 1, 2009 11:59:25 AM] Initialize C:\product\10.1.3.1\OracleAS_1\j2ee\home\applications\test_ws.ear ends...
    [Jul 1, 2009 11:59:25 AM] Starting application : test_ws
    [Jul 1, 2009 11:59:25 AM] Initializing ClassLoader(s)
    [Jul 1, 2009 11:59:25 AM] Initializing EJB container
    [Jul 1, 2009 11:59:25 AM] Loading connector(s)
    [Jul 1, 2009 11:59:26 AM] Starting up resource adapters
    [Jul 1, 2009 11:59:26 AM] Processing EJB module: ejb30ws-ejb.jar
    [Jul 1, 2009 11:59:26 AM] application : test_ws is in failed state
    [Jul 1, 2009 11:59:26 AM] Operation failed with error: java.lang.NoClassDefFoundError
    the opmn log reveals the same error, but no more detail.
    any ideas???
    /stuck

    I am having exactly the same issue. Was this issue resolved? If so, please share the resolution and if not can someone please suggest what could be wrong.
    Thanks

  • @WebService in EJB 3.0 ? Error on deployment

    Hi,
    I have implemented a stateless Session EJB with a @WebService Annotation. The EJB Modul can be deployed on a Glassfish Server with out errors.
    When I try to deploy the EJB Modul on Weblogic 10.0 I got the following Error:
    <23.10.2007 15.03 Uhr GMT+01:00> <Error> <HTTP> <BEA-101216> <Servlet: "WSEE_SERVLET" failed to preload on startup in Web application: "/ix_workflow/WorkflowModelService".
    class: org.imixs.workflow.jee.ejb.jaxws.GetEnvironmentList could not be found
         at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:272)
         at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:566)
         at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:513)
         at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:358)
         at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:245)
         Truncated. see log file for complete stacktrace
    >
    <23.10.2007 15.03 Uhr GMT+01:00> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1193148199315' for task '35'. Error is: 'weblogic.application.ModuleException: Exception activating module: EJBModule(BEA_Test1.jar)
    Unable to deploy EJB: WorkflowManagerImplementation from BEA_Test1.jar:
    My code dose not include a Class
    org.imixs.workflow.jee.ejb.jaxws.GetEnvironmentList
    nor the package org.imixs.workflow.jee.ejb.jaxws
    Can anybody help me or give me a hint what this error message means?
    Thanks a lot
    Ralph

    Hi, Rick
    Thanks for your help.
    I deleted de application-client.xml file, added the following lines to the web.xml file:
         <ejb-ref>
              <ejb-ref-name>ejb/SessionEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <remote>ar.com.eds.ejb3.model.SessionEJB</remote>
         </ejb-ref>
    and now I´m using oracle.j2ee.rmi.RMIInitialContextFactory
    there is no error, and it doesn´t throw any exception but the following line returns null.
    SessionEJB sessionEJB = (SessionEJB)context.lookup("java:comp/env/ejb/SessionEJB");
    Its seems the lookup method finds the remote ejb because it doesn´t fail, but it returns null.
    Any idea what is wrong?
    Mauricio.

  • The server deploy EJB but I run EJB Client program,The error msg is can't find JNDI

    Hi all:
    I am using Weblogic 6.1/SP2. I use the console to start
    server and deploy EJB jar,from the msg I see my EJB jar
    been deployed. When I run EJB Client program, the error
    msg is can't find JNDI name t3://URL:11003.....
    I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
    Last week I did deploy EJB and ran the client both
    suceessful. Any ideas, Thank you.

    Sabha:
    Thank you for your help info, I soloved the problem.
    The problem is the ejb jar was deleted(I don't why)
    then System Admin to deploy EJB jar from Admin console.
    After that everything is fine.
    "Sabha" <[email protected]> wrote:
    Run weblogic.Admin -url ... LIST to see whether the JNDI name is there
    . or
    you can view the jndi tree of the server from the console (right click
    on
    server name) and check whether the ejb home is bound to the correct jndi
    name.
    -Sabha
    "Matthew Shinn" <[email protected]> wrote in message
    news:[email protected]..
    Hi Albert,
    I would double check to make sure the EJB was indeed deployed (check
    server log). What message did you see that leads you to believe itwas
    successfully deployed? Also, verify the JNDI name you are lookingup in
    your client matches the JNDI name for the EJB. If this doesn't solve
    the problem, please post the error message and stack trace you are
    seeing on the client.
    - Matt
    Albert Pi wrote:
    Hi all:
    I am using Weblogic 6.1/SP2. I use the console to start
    server and deploy EJB jar,from the msg I see my EJB jar
    been deployed. When I run EJB Client program, the error
    msg is can't find JNDI name t3://URL:11003.....
    I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
    Last week I did deploy EJB and ran the client both
    suceessful. Any ideas, Thank you.

  • EJB-QL (foreign key)- error

    hi everyone. i am stuck, cheked everything and don't know where to look. i hope someone will help me. i use websphere 5.0
    i have 2 cmp entity ejb with one-many relationship between them. I wrote QL query using foriegn key. when i generate EJB-RDB mapping the error appears in TASK saying " myTable o does not have a field myforeignkey". when i click on tast it opens ejb dep...descriptor. i check descriptor and foreign key is there.
    where should i look? when i run validation before mapping generation it doesn't produce any error.

    i am new to J2ee and i let websphere to generate all description code. I spend 4 hours looking for this error and i just can'f fix it. it looks fine to me. can you have a look? i know the code is big. if you get extra time then help me. i cut it down. there is two entity beans each with one attribute. order id has second attribute as foreign key -generatorhome_id.
    the full error is like this:
    WQRY0036E:OrderId o does not have a field generatorhome_id. when i click on it takes me to my created <query-method> findByFor
    please help if have time. the code should be straight forward. if you want me to simplify code so you can better understand then let me know.
    <?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 id="ejb-jar_ID">
         <display-name>EJB</display-name>
         <enterprise-beans>
              <entity id="OrderId">
                   <ejb-name>OrderId</ejb-name>
                   <local-home>com.ibm.pbw.ejb.OrderIdLocalHome</local-home>
                   <local>com.ibm.pbw.ejb.OrderIdLocal</local>
                   <ejb-class>com.ibm.pbw.ejb.OrderIdBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>com.ibm.pbw.ejb.OrderIdKey</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>OrderId</abstract-schema-name>
                   <cmp-field id="CMPAttribute_1088406971782">
                        <field-name>ind</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>Generated to support relationships. Do NOT delete.</description>
                        <field-name>generatorhome_id</field-name>
                   </cmp-field>
                   <ejb-local-ref id="EJBLocalRef_1088406284143">
                        <ejb-ref-name>ejb/GeneratorHome</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.ibm.pbw.ejb.GeneratorHomeLocalHome</local-home>
                        <local>com.ibm.pbw.ejb.GeneratorHomeLocal</local>
                        <ejb-link>GeneratorHome</ejb-link>
                   </ejb-local-ref>
                   <query>
                        <description></description>
                        <query-method>
                             <method-name>findByFor</method-name>
                             <method-params>
                                  <method-param>int</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>select object(o) from OrderId o where o.generatorhome_id = ?1</ejb-ql>
                   </query>
              </entity>
              <entity id="GeneratorHome">
                   <ejb-name>GeneratorHome</ejb-name>
                   <local-home>com.ibm.pbw.ejb.GeneratorHomeLocalHome</local-home>
                   <local>com.ibm.pbw.ejb.GeneratorHomeLocal</local>
                   <ejb-class>com.ibm.pbw.ejb.GeneratorHomeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>com.ibm.pbw.ejb.GeneratorHomeKey</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>GeneratorHome</abstract-schema-name>
                   <cmp-field id="CMPAttribute_1088406971792">
                        <field-name>id</field-name>
                   </cmp-field>
                   <ejb-local-ref id="EJBLocalRef_1088406284153">
                        <ejb-ref-name>ejb/OrderId</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.ibm.pbw.ejb.OrderIdLocalHome</local-home>
                        <local>com.ibm.pbw.ejb.OrderIdLocal</local>
                        <ejb-link>OrderId</ejb-link>
                   </ejb-local-ref>
              </entity>
         </enterprise-beans>
         <relationships>
              <ejb-relation>
                   <description></description>
                   <ejb-relation-name>GeneratorHome-OrderId</ejb-relation-name>
                   <ejb-relationship-role id="EJBRelationshipRole_1088406971782">
                        <ejb-relationship-role-name>generatorhome</ejb-relationship-role-name>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>OrderId</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>generatorhome</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role id="EJBRelationshipRole_1088406971783">
                        <ejb-relationship-role-name>orderid</ejb-relationship-role-name>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>GeneratorHome</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>orderid</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
         </relationships>
    </ejb-jar>

  • JDeveloper Unilateral relationship ejb-jar.xml verifying error

    I am huge difficulty with tables that have relationships mapping in one direction (unilateral).
    If I give you a really basic scenario of table Emp which has Employee information and a Dept_no foreign key. I also have a table Dept which has department info and includes it's primary key of Dept_no.
    When dragging and dropping tables from the Oracle Database onto the UML Diagram (OC4J container), the relationships automatically configure as bilateral. The ejb-jar.xml builds and the verifying Enterprise Beans verifies OK. If I select the relationship on the diagram and change it to be unilateral from Employee -> Department, it will still compile the EJB related source, but the ejb-jar.xml file will no longer verify the Enterprise Beans.
    Now there have been a million ways that I have tried to get this simple example to work.
    Here's my ejb-jar.xml and the orion-ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!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>
    <description>Entity Bean ( CMP )</description>
    <display-name>Dept</display-name>
    <ejb-name>Dept</ejb-name>
    <local-home>nz.co.fal.DeptLocalHome</local-home>
    <local>nz.co.fal.DeptLocal</local>
    <ejb-class>nz.co.fal.impl.DeptBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Dept</abstract-schema-name>
    <cmp-field>
    <field-name>deptno</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>dname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>loc</field-name>
    </cmp-field>
    <primkey-field>deptno</primkey-field>
    </entity>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>Emp</display-name>
    <ejb-name>Emp</ejb-name>
    <local-home>nz.co.fal.EmpLocalHome</local-home>
    <local>nz.co.fal.EmpLocal</local>
    <ejb-class>nz.co.fal.impl.EmpBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Emp</abstract-schema-name>
    <cmp-field>
    <field-name>empno</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>ename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>job</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>mgr</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>hiredate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>sal</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>comm</field-name>
    </cmp-field>
    <primkey-field>empno</primkey-field>
    </entity>
    </enterprise-beans>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>Emp - Dept</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Dept may have one Emp</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Dept</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Emp may have one Dept</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Emp</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>dept_deptno</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    </ejb-jar>
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="Dept" data-source="jdbc/Connection1DS" table="DEPT">
    <primkey-mapping>
    <cmp-field-mapping name="deptno" persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    </primkey-mapping>
    <cmp-field-mapping name="deptno" persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    <cmp-field-mapping name="dname" persistence-name="DNAME" persistence-type="VARCHAR2(14)"/>
    <cmp-field-mapping name="loc" persistence-name="LOC" persistence-type="VARCHAR2(13)"/>
    </entity-deployment>
    <entity-deployment name="Emp" data-source="jdbc/Connection1DS" table="EMP">
    <primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(4)"/>
    </primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(4)"/>
    <cmp-field-mapping name="ename" persistence-name="ENAME" persistence-type="VARCHAR2(10)"/>
    <cmp-field-mapping name="job" persistence-name="JOB" persistence-type="VARCHAR2(9)"/>
    <cmp-field-mapping name="mgr" persistence-name="MGR" persistence-type="NUMBER(4)"/>
    <cmp-field-mapping name="hiredate" persistence-name="HIREDATE" persistence-type="DATE"/>
    <cmp-field-mapping name="sal" persistence-name="SAL" persistence-type="NUMBER(7,2)"/>
    <cmp-field-mapping name="comm" persistence-name="COMM" persistence-type="NUMBER(7,2)"/>
    <cmp-field-mapping name="dept_deptno">
    <entity-ref home="Dept">
    <cmp-field-mapping persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="<default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    DeptBean.java (Department ejb Bean class)
    package nz.co.fal.impl;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import java.util.Collection;
    import nz.co.fal.EmpLocal;
    public abstract class DeptBean implements EntityBean {
    private EntityContext context;
    public Long ejbCreate() {
    return null;
    public void ejbPostCreate() {
    public Long ejbCreate(Long deptno) {
    setDeptno(deptno);
    return deptno;
    public void ejbPostCreate(Long deptno) {
    public void ejbActivate() {
    public void ejbLoad() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void ejbStore() {
    public void setEntityContext(EntityContext ctx) {
    this.context = ctx;
    public void unsetEntityContext() {
    this.context = null;
    public abstract Long getDeptno();
    public abstract void setDeptno(Long newDeptno);
    public abstract String getDname();
    public abstract void setDname(String newDname);
    public abstract String getLoc();
    public abstract void setLoc(String newLoc);
    DeptLocal.java
    package nz.co.fal;
    import javax.ejb.EJBLocalObject;
    import java.util.Collection;
    public interface DeptLocal extends EJBLocalObject {
    Long getDeptno();
    void setDeptno(Long newDeptno);
    String getDname();
    void setDname(String newDname);
    String getLoc();
    void setLoc(String newLoc);
    DeptLocalHome.java
    package nz.co.fal;
    import javax.ejb.EJBLocalHome;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import java.util.Collection;
    public interface DeptLocalHome extends EJBLocalHome {
    DeptLocal create() throws CreateException;
    DeptLocal findByPrimaryKey(Long primaryKey) throws FinderException;
    Collection findAll() throws FinderException;
    DeptLocal create(Long deptno) throws CreateException;
    EmpBean.java (ejb Bean class for Emp)
    public abstract class EmpBean implements EntityBean {
    private EntityContext context;
    public Long ejbCreate() {
    return null;
    public void ejbPostCreate() {
    public Long ejbCreate(Long empno) {
    setEmpno(empno);
    return empno;
    public void ejbPostCreate(Long empno) {
    public void ejbActivate() {
    public void ejbLoad() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void ejbStore() {
    public void setEntityContext(EntityContext ctx) {
    this.context = ctx;
    public void unsetEntityContext() {
    this.context = null;
    public abstract Long getEmpno();
    public abstract void setEmpno(Long newEmpno);
    public abstract String getEname();
    public abstract void setEname(String newEname);
    public abstract String getJob();
    public abstract void setJob(String newJob);
    public abstract Long getMgr();
    public abstract void setMgr(Long newMgr);
    public abstract Timestamp getHiredate();
    public abstract void setHiredate(Timestamp newHiredate);
    public abstract Long getSal();
    public abstract void setSal(Long newSal);
    public abstract Long getComm();
    public abstract void setComm(Long newComm);
    public abstract DeptLocal getDept_deptno();
    public abstract void setDept_deptno(DeptLocal newDept_deptno);
    EmpLocal.java (ejb local interface for Emp)
    package nz.co.fal;
    import javax.ejb.EJBLocalObject;
    import java.sql.Timestamp;
    public interface EmpLocal extends EJBLocalObject {
    Long getEmpno();
    void setEmpno(Long newEmpno);
    String getEname();
    void setEname(String newEname);
    String getJob();
    void setJob(String newJob);
    Long getMgr();
    void setMgr(Long newMgr);
    Timestamp getHiredate();
    void setHiredate(Timestamp newHiredate);
    Long getSal();
    void setSal(Long newSal);
    Long getComm();
    void setComm(Long newComm);
    DeptLocal getDept_deptno();
    void setDept_deptno(DeptLocal newDept_deptno);
    EmpLocalHome.java (ejb local home for Emp)
    package nz.co.fal;
    import javax.ejb.EJBLocalHome;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import java.util.Collection;
    public interface EmpLocalHome extends EJBLocalHome {
    EmpLocal create() throws CreateException;
    EmpLocal findByPrimaryKey(Long primaryKey) throws FinderException;
    Collection findAll() throws FinderException;
    EmpLocal create(Long empno) throws CreateException;
    that's probably all the relevant information.
    As I said if I can't map relationships unilaterally from Oracle tables, then that is a huge issue for our project.
    Any Help, would be fantastic - THANKYOU.
    Geoff

    Geoff,
    please repost your question in the JDeveloper forum
    JDeveloper and ADF
    the JDeveloper product management team monitors their forum and you will receive a faster response.
    thanks - OTN

  • J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

    When load (run) the following EJB (JDev 10.1.3.1.0 embedded server) loads with no problem:
    package project2;
    import javax.ejb.Stateless;
    @Stateless
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    When load the following, only difference is name attribute for the @Stateless annotation:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalled")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");    }
    Get the following error message - Why?
    2006-08-24 15:48:54.640 WARNING J2EE JNDI-00009 EJB Reference "ejb/SessionEJBCalled" could not be resolved. Allowing J2EEContext creation to continue anyway
    Finally - If I specify the name as per the following all is well:
    package project2;
    import javax.ejb.Stateless;
    @Stateless(name="SessionEJBCalledBean")
    public class SessionEJBCalledBean implements SessionEJBCalledLocal {
    public SessionEJBCalledBean() {    }
    public void display() {  System.out.println("In called - Project2");   }
    Would be appreciated if someone could tell me what is going on?
    Thanks - Ken

  • [Error] PLS-00049 (6: 19): PLS-00049: bad bind variable 'NEW.T1NAM'

    1. create table t1
    (t1ID int,
    t1nam varchar2(33)
    2. create or replace view t1t2t3
    t1id, t1name, t2id, t2nam, t2cty, t2st, aid, aname, bid, bname, t3id, t3nam
    as
    select * from t1, t2, t1 a, t1 b, t3
    where t1.t1ID = t2.id(+)
    and T2.CTY = a.t1ID(+)
    and t2.sty = b.t1ID(+)
    and t1.t1ID = t3.t3id(+)
    3. CREATE OR REPLACE TRIGGER t1t2t3
    INSTEAD OF INSERT or update
    ON t1t2t3
    BEGIN
    insert into t1
    values(:new.t1ID, :new.t1nam);
    END t1t2t3;
    Get error:
    [Error] PLS-00049 (6: 19): PLS-00049: bad bind variable 'NEW.T1NAM'
    Pls advise. I am using Toad.
    Thanks.

    tnam1 not belongs to t1t2t3.
    :new should be used to te columns of the table on which you are writing the trigger.
    Here i think t1t2t3 has t1name field you have to use :new.t1name instead of :new.t1nam(which belongs to table t1)

  • Getting error PLS-00307: too many declarations while instantiating object.

    Hi,
    I'm using oracle 10.2.0.4.0
    I've created an object obj_bsk as follows:
    create or replace type obj_bsk as object
    (batch_set_key varchar2(64),
    constructor function obj_bsk
    return self as result,
    constructor function obj_bsk(p_batch_set_key in varchar2)
    return self as result,
    member procedure display_batch_set_key
    and object body as
    create or replace type body obj_bsk as
    constructor function obj_bsk
    return self as result is
    begin
    self.batch_set_key := sys_guid();
    return;
    end;
    constructor function obj_bsk (p_batch_set_key varchar2)
    return self as result is
    begin
    self.batch_set_key := p_batch_set_key;
    return;
    end;
    member procedure display_batch_set_key is
    begin
    dbms_output.put_line('batch_set_key is:' || self.batch_set_key);
    end;
    end;
    Then I've created a package test_obj as follows:
    specification:
    create or replace package test_obj is
    -- Author : TSHARMA
    -- Created : 31/01/2012 10:32:37
    -- Purpose : to test objects
    my_bsk obj_bsk;
    g_batch_set_key varchar2(64);
    procedure show_obj_val;
    end test_obj;
    body:
    create or replace package body test_obj is
    procedure show_obj_val is
    begin
    my_bsk.display_batch_set_key();
    end;
    begin
    -- Initialization
    if (g_batch_set_key is not null) then
    my_bsk := obj_bsk(g_batch_set_key);
    else
    my_bsk := obj_bsk();
    end if;
    end test_obj;
    When I'm compiling the package I'm getting following error:
    Compilation errors for PACKAGE BODY TSHARMA.TEST_OBJ
    Error: PLS-00307: too many declarations of 'OBJ_BSK' match this call
    Line: 12
    Text: my_bsk := obj_bsk(g_batch_set_key);
    Error: PL/SQL: Statement ignored
    Line: 12
    Text: my_bsk := obj_bsk(g_batch_set_key);
    Can anyone please explain why oracle is viewing it as too many call for constructor when both constructors are different.
    and how to resolve the issue.
    Thanks
    Tarun

    I've solved the problem. Though it is strange.
    The error occurred because I'm using p_batch_set_key as parameter constructor.
    i.e. constructor function obj_bsk(p_batch_set_key in varchar2)
    return self as result,
    once I changed it to the same name as variable name in object it compiled fine.
    i.e constructor function obj_bsk(batch_set_key in varchar2)
    return self as result,
    It is very strange. Can anyone plesae explain why the parameter name should be same as variable name in object.
    Thanks
    Tarun

  • Use SDO_NN in procedure: ERROR: PLS-00707: unsupported construct or internal error [2603]

    Hi,
    I have a problem with use SDO_NN function in a procedure. In case that I use SDO_NN in a SELECT command, it works. In case that I create an anonymous PL/SQL block, it works. But when I create a procedure, it doesn't work and there is an error: ERROR: PLS-00707: unsupported construct or internal error [2603].
    Here is the PL/SQL block, that works:
    BEGIN
    INSERT INTO K3_BlizkeDFB(SO1, SO2, VZDALENOST)
    SELECT  distinct
       ISO.kod AS SO1, SO.kod AS SO2, MDSYS.SDO_NN_DISTANCE(1) AS VZDAL
       FROM StavebniObjektDFB SO, StavebniObjektDFB_INDEX ISO 
       WHERE SDO_NN(ISO.geom,  SO.geom,
          'sdo_num_res=4', 1) = 'TRUE'
          AND ISO.kod<>SO.kod
          AND MDSYS.SDO_NN_DISTANCE(1)<=2;
    END;
    Here is an attempt to create a procedure that doesn't work:
    CREATE OR REPLACE PROCEDURE K1_BlizkeDFB AS
    BEGIN
    INSERT INTO K3_BlizkeDFB(SO1, SO2, VZDALENOST)
    SELECT  distinct
       ISO.kod AS SO1, SO.kod AS SO2, MDSYS.SDO_NN_DISTANCE(1) AS VZDAL
       FROM StavebniObjektDFB SO, StavebniObjektDFB_INDEX ISO 
       WHERE SDO_NN(ISO.geom,  SO.geom,
          'sdo_num_res=4', 1) = 'TRUE'
          AND ISO.kod<>SO.kod
          AND MDSYS.SDO_NN_DISTANCE(1)<=2;
    END;
    Can someone explain, what's wrong?
    Thanks
    Jindra

    Hi Jindra,
    Googling your error message says that this is sqldeveloper issue.  You can verify this by compiling your procedure with sqlplus.  Sounds like you need to update your software.
    Cheers,
    Paul

  • EJBs with .ejb extension

    Please let me know when/how/where can i have EJBs with .ejb extension?

    It's a Weblogic thing. The tool mentioned in the linked post, EJBgen, is similar to XDoclet in that you use special annotations in a single file that is parsed to generate all of the EJB interfaces. The .ejb suffix is commonly used for these files.

  • Abap runtime error pls clarify

    hi experts,
    when i am opening pa30 screen i am getting always abap runtime error pls tell me how to rectify it.

    Hi,
    The transaction PA30 contains the Object oriented programming. Please check your SAPGui have latest patch updated.
    For identifying the error reason. you need to paste initial page of your short dump here.
    aRs

  • Creating  Standard EJB Descriptor (ejb-jar.xml) by JDeveloper

    Hi
    If I create a Session Bean by JDeveloper it create a weblogic-ejb-jar file (Weblogic EJB Descriptor) for it
    Do you know how can I use JDeveloper for creating Standard EJB Descriptor (ejb-jar.xml) for my Session Bean ? please if you can explain step by step
    thank you

    Hi,
    Right-click Model project and select New -> General -> Deployment Descriptors -> Java EE Deployment Descriptor and click OK, on the next screen you can choose ejb-jar.xml.
    Pedja

  • Error PLS 00363  expression "string" cannot be used as an assignment target in sentence SELF.ATTRIBUTE1:=PARAMETER;

    Hi everybody. I wrote de following  type
    create or replace TYPE ALMACEN AS OBJECT
      id_almacen number(10),
      descripcion varchar2(40),
      existencias number(6),
      precio number(4),
      member function movimiento (p_num number)  return boolean
    create or replace TYPE BODY ALMACEN AS
      member function movimiento (p_num number)  return boolean AS
      v_inf boolean;
      n number(6);
      BEGIN
        if self.existencias+p_num>=0 then
        self.existencias:=existencias+p_num;
        return TRUE;
        else return FALSE;
        end if;
      END movimiento;
    END;
    I have Oracle 11g release I.
    In previous releases it worked, but now SQLDeveloper marks
    self.existencias:=existencias+p_num;
    Error PLS 00363  expression "string" cannot be used as an assignment target in sentence
    Please, What's wrong?
    Thanking in advance

    Hi,
    Not quite a PL/SQL XML question but anyway...
    Since the member function modifies the object instance, the implicit argument "self" must be declared explicitly as "IN OUT" :
    member function movimiento (self in out nocopy almacen, p_num number)  return boolean

  • Error PLS-00355 occurs when open cursor in procedure

    Hello everybody,
    I have a problen that really drives me mad:
    Whenever I try to compile the following procedure, the Error "PLS-00355: use of pl/sql table not allowed in this context" occurs but I can't see what is wrong. I hope the wisdome of the community will help to solve the problem.
    Here is the code:
    CREATE or REPLACE PROCEDURE data_year(study_year IN NUMBER) AS
    sep CONSTANT CHAR := ';';
    CURSOR cursor_year(year_of_interest NUMBER) IS
    select
    BBS_CONDITIONS.COUNTRYNUM as country,
    BBS_CONDITIONS.STATENUM as state,
    BBS_CONDITIONS.ROUTE as route,
    BBS_ROUTES.LATITUDE as lat,
    BBS_ROUTES.LONGITUDE as lon,
    BBS_SUMMARY.AOU as aou,
    BBS_SPECIES.ENGLISH_COMMON_NAME as name,
    BBS_SPECIES.MIGRATION_TYPE as migtype,
    BBS_SUMMARY.SPECIESTOTAL as count,
    BBS_CONDITIONS.MONTH as smonth,
    BBS_CONDITIONS.STARTTIME as starttime,
    BBS_CONDITIONS.ENDTIME as endtime,
    BBS_CONDITIONS.RPID as rpid,
    BBS_CONDITIONS.ASSISTANT as assistant
    from BBS_SPECIES,
    BBS_ROUTES,
    BBS_SUMMARY,
    BBS_CONDITIONS
    where BBS_ROUTES.ROUTE = BBS_CONDITIONS.ROUTE
    and BBS_ROUTES.STATENUM = BBS_CONDITIONS.STATENUM
    and BBS_ROUTES.COUNTRYNUM = BBS_CONDITIONS.COUNTRYNUM
    and BBS_SPECIES.AOU = BBS_SUMMARY.AOU
    and BBS_CONDITIONS.YEAR = BBS_SUMMARY.YEAR
    and BBS_CONDITIONS.ROUTE = BBS_SUMMARY.ROUTE
    and BBS_CONDITIONS.STATENUM = BBS_SUMMARY.STATENUM
    and BBS_CONDITIONS.COUNTRYNUM = BBS_SUMMARY.COUNTRYNUM
    and BBS_SPECIES.CLASS_ID = 0
    and BBS_CONDITIONS.YEAR = year_of_interest
    order by country, state, route, migtype, aou;
    rec_year cursor_year%ROWTYPE;
    i NUMBER := 1;
    TYPE table_year_type IS TABLE OF cursor_year%ROWTYPE;
    table_year table_year_type;
    BEGIN -- Begin of procedure data_year
    table_year := table_year();
    OPEN cursor_year(study_year);
    LOOP
    FETCH cursor_year into rec_year;
    EXIT WHEN cursor_year%NOTFOUND;
    table_year.EXTEND(1);
    table_year(i) := rec_year;
    i := i+1;
    END LOOP;
    CLOSE cursor_year;
    DBMS_OUTPUT.PUT_LINE('country' || sep || 'state' || sep || 'route' || sep || 'lat' || sep || 'lon'
    || sep || 'aou' || sep || 'name' || sep || 'migtype' || sep || 'count' || sep || 'month' || sep
    || 'starttime' || sep || 'endtime' || sep || 'rpid' || sep || 'assistant');
    FOR i in table_year.FIRST..table_year.LAST LOOP
    DBMS_OUTPUT.PUT_LINE(TO_CHAR(table_year(i).country) || sep || TO_CHAR(table_year(i).state) ||
    sep || TO_CHAR(table_year(i).route) || sep || TO_CHAR(table_year(i).lat) || sep ||
    TO_CHAR(table_year(i).lon) || sep || TO_CHAR(table_year(i).aou) || sep ||
    table_year(i).name || sep || TO_CHAR(table_year(i).migtype) || sep ||
    TO_CHAR(table_year(i).count) || sep || TO_CHAR(table_year(i).smonth) || sep ||
    TO_CHAR(table_year(i).starttime) || sep || TO_CHAR(table_year(i).endtime) || sep ||
    TO_CHAR(table_year(i).rpid) || sep || TO_CHAR(table_year(i).assistant));
    END LOOP;
    END; -- End of procedure data_year
    Thanks ahead, TC

    Does it give a line number? I'm wondering if it might be
    table_year := table_year();
    that's causing the problem. Try removing it and see.
    Even better, change your code to
       TYPE table_year_type IS TABLE OF cursor_year%ROWTYPE INDEX BY BINARY_INTEGER;
       table_year     table_year_type;
    BEGIN        
        OPEN cursor_year (study_year);
        FETCH cursor_year BULK COLLECT INTO table_year;
        CLOSE cursor_year;
    ...Edited by: Dave Hemming on Nov 21, 2008 9:51 AM

Maybe you are looking for