Problem in deploying CMP entity bean 2.0 in J2EE 1.4

i am trying to deploy a cmp entity bean 2.0 using j2ee1.4 deployment tool. the bean uses sql server as the database. i have successfully created a coonection pool for sql server using j2ee admin console. the entity bean class files are successfully compiled. but while deploying the entity bean i am not able to set the database settings and jndi name for the bean. can one please guide me in the deployment steps in j2ee1.4.
mohit

Mohit,
We are discussing this topic in the fourm below. I'm having the same problem so feel free to join our conversation.
~Howard
http://forum.java.sun.com/thread.jsp?forum=13&thread=478054

Similar Messages

  • Deploying CMP Entity Beans in Weblogic

    How to generate/convert the Orion xml file to Weblogic_RDBMS ?
    Thx

    petstore 1.3 will be available for the upcoming beta of weblogic 7.0...
    Andrew Sliwkowski(BEA)
    [email protected]
    "Nitin Sawant" <[email protected]> wrote in message
    news:3c04f6cd$[email protected]..
    >
    Appreciate if you can share your plans on releasing a petstore 1.3 patchfor weblogic.
    >
    >
    i am having problems deploying CMP Entity Beans in petstore 1.3 where theprimary
    key class is defined as java.lang.Object in the ejb-jar.xml descriptor(<prim-key-class>java.lang.Object</prim-key-class>).
    Does weblogic 6.1 with 1.3 features enabled support the above feature.
    Thanks,

  • I am facing a problem while deploying an Entity bean in iPlanet(sp3).I have attached the exception thrown.Why has this exception occured?

    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)

    Hi,
    I think you are trying to test the Hello world EJB example shipped with the product. As a first
    step I would recomend you to go through every line of the document on deploying this application,
    since, I too have experienced many errors while trying to deploy the sample applications, but on
    following the documentation, I subsequently overcame all the errors and have been working with the
    applications. So please follow the steps in documentation and let me know, if you still encounter any
    issues.
    Regards
    Raj
    Sandhya S wrote:
    I am facing a problem while deploying an Entity bean in iPlanet(sp3).I
    have attached the exception thrown.Why has this exception occured?
    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal
    exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at
    com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown
    Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Error Deploying CMP Entity Bean

    Hi,
    I am new to Entity Beans and am trying to deploy a CMP Entity Bean without any success.
    I did search this forum for similar issues and tried those suggestions as well but that has not helped. Was wondering if someone could help me out on this.
    The Entity bean has 2 fields: name and description.
    The ejb-jar.xml file for this bean is:
    <enterprise-beans>
    <entity>
    <ejb-name>Product</ejb-name>
    <home>example.cmp.ProductHome</home>
    <remote>example.cmp.Product</remote>
    <ejb-class>example.cmp.ProductBean</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>PRODUCTS</abstract-schema-name>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <primkey-field>name</primkey-field>
    <query>
    </query>
    </entity>
    </enterprise-beans>
    The error that I get while deploying the bean is:
    Error deploying EJB homes for: file:/C:/servers/oc4j1013/j2ee/home/applications/cmptest/cmptest.jar
    java.lang.InstantiationException: Error looking up cmt-datasource at jdbc/OracleDS (name not found)
    at com.evermind.server.ApplicationState.getDataSourceContainer(ApplicationState.java:384)
    Error deploying file:/C:/servers/oc4j1013/j2ee/home/applications/cmptest/cmptest.jar
    homes: Error looking up cmt-datasource at jdbc/OracleDS (name not found)
    [java] [TopLink Severe]: 2005.04.17 10:22:20.156--ServerSession(28816172)--
    Local Exception Stack:
    [java] Exception [TOPLINK-7060] (TopLink (Oracle OC4J CMP) - 10g release 3(10.1.3.0) (Build 041129)): oracle.toplink.exceptions.ValidationException
    [java] Exception Description: Cannot acquire data source [jdbc/OracleDS].
    [java] Internal Exception: javax.naming.NameNotFoundException: jdbc/OracleDS not found
    [java] at oracle.toplink.exceptions.ValidationException.cannotAcquireDataSource(ValidationException.java:208)
    [java] at oracle.toplink.internal.ejb.cmp.oc4j.Oc4jNonJtaConnector.getOrCreateDataSource(Oc4jNonJtaConnector.java:62)
    If anybody knows what the problem is please let me know.
    Thanks in advance.
    Bhupen

    Please note that the data-source has been re-architectured in 10.1.3 DP3 and you should have DataSource as follows:
    <data-sources xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd' schema-major-version='10' schema-minor-version='1'>
    <managed-data-source connection-pool-name='Example Connection Pool' jndi-name='jdbc/OracleDS' name='OracleManagedDS' />
    <connection-pool name='Example Connection Pool' >
    <connection-factory factory-class='oracle.jdbc.pool.OracleDataSource' user='scott' password='tiger' url='jdbc:oracle:thin:@localhost:1521:orcl'>
    </connection-factory>
    </connection-pool>
    </data-sources>

  • Problem in creating CMP Entity Bean - Pls Help

    I am trying to build one simple project having jsps to get connected to CMP Entity Bean.
    But while deploying I am getting the following error...
    Nov 15, 2004 10:59:09... Info: End of log messages of the target system.
    Nov 15, 2004 10:59:09... Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Nov 15, 2004 10:59:09... Error: Execution of deployment action for "EntityCMPAppln" aborted:
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application bcone.com/EntityCMPAppln and wait.
    Reason: Complex error : server ID 6155350:Application bcone.com/EntityCMPAppln cannot be started, because it has hard reference to resource CONFIG_DB with type javax.sql.DataSource, but it is not active on the server.
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Nov 15, 2004 10:59:09... Error: Deployment NOT successful for EntityCMPAppln
    Nov 15, 2004 10:59:09... Info: SDM configuration: Do not automatically start/stop J2EE Engine. Do not restore state of J2EE Engine now.
    Nov 15, 2004 10:59:09... Error: -
    At least one of the Deployments failed -
    Nov 15, 2004 11:05:16... Info: Request for Logon as admin accepted
    ===========================================
    Nov 15, 2004 11:05:08... Info: =   Starting to execute command 'remotegui'   =
    Nov 15, 2004 11:05:08... Info: ===============================================
    Nov 15, 2004 11:05:10... Info: SDM started successfully.
    Please tell me how to activate the CONFIG_DB reference in database. Or what Extra I have to do to run this example.
    Regards,
    Vivek Ojha

    Dear Benny,
    The code of the required files is pasted below....
    Application.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
                                 "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
        <display-name>EntityCMPAppln</display-name>
        <description>EAR description</description>
        <module>
            <ejb>EntityCMPEjb.jar</ejb>
        </module>
        <module>
            <web>
                <web-uri>EntityCMPWeb.war</web-uri>
                <context-root>/student</context-root>
            </web>
        </module>
    </application>
    Application-j2ee-engine.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
         <provider-name>bcone.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    data-source-aliases.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE data-source-aliases SYSTEM "data-source-aliases.dtd">
    <data-source-aliases>
         <aliases>
              <data-source-name>${com.sap.datasource.default}</data-source-name>
              <alias>STUDENTDB</alias>
         </aliases>
    </data-source-aliases>
    ejb-j2ee-engine.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
    <ejb-j2ee-engine>
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>StudentBean</ejb-name>
                   <resource-ref>
                        <res-ref-name>jdbc/STUDENTDB</res-ref-name>
                        <res-link>STUDENTDB</res-link>
                   </resource-ref>
                   <entity-props/>
              </enterprise-bean>
         </enterprise-beans>
    </ejb-j2ee-engine>
    ejb-jar.xml
    <?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>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <entity>
                   <ejb-name>StudentBean</ejb-name>
                   <home>com.bcone.ejb.StudentHome</home>
                   <remote>com.bcone.ejb.Student</remote>
                   <ejb-class>com.bcone.ejb.StudentBean</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>StudentBean</abstract-schema-name>
                   <cmp-field>
                        <field-name>studentId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>lname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>standard</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>fyear</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>fname</field-name>
                   </cmp-field>
                   <primkey-field>studentId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdbc/STUDENTDB</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
              </entity>
         </enterprise-beans>
    </ejb-jar>
    persistent.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE persistent-ejb-map SYSTEM "persistent.dtd">
    <persistent-ejb-map>
         <locking
              type="Table"/>
         <db-properties>
              <data-source-name>CONFIG_DB</data-source-name>
              <database-vendor
                   name="SAPDB"/>
         </db-properties>
         <entity-beans>
              <entity-bean>
                   <ejb-name>StudentBean</ejb-name>
                   <table-name>TMP_STUDENTNEW</table-name>
                   <field-map
                        key-type="PrimaryKey">
                        <field-name>studentId</field-name>
                        <column>
                             <column-name>STUDENTID</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>lname</field-name>
                        <column>
                             <column-name>LNAME</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>standard</field-name>
                        <column>
                             <column-name>STANDARD</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>fyear</field-name>
                        <column>
                             <column-name>FYEAR</column-name>
                        </column>
                   </field-map>
                   <field-map
                        key-type="NoKey">
                        <field-name>fname</field-name>
                        <column>
                             <column-name>FNAME</column-name>
                        </column>
                   </field-map>
              </entity-bean>
         </entity-beans>
         <relationships/>
    </persistent-ejb-map>
    StudentBean.java
    package com.bcone.ejb;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.RemoveException;
    import javax.ejb.CreateException;
    @abstractSchemaName StudentBean
    @cmpVersion 2.x
    @ejbHome <{com.bcone.ejb.StudentHome}>
    @ejbPrimaryKey <{java.lang.String}>
    @ejbRemote <{com.bcone.ejb.Student}>
    @hasSimplePK true
    public abstract class StudentBean implements EntityBean {
         public void ejbLoad() {
         public void ejbStore() {
         public void ejbRemove() throws RemoveException {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setEntityContext(EntityContext context) {
              myContext = context;
         public void unsetEntityContext() {
              myContext = null;
         private EntityContext myContext;
    @primKeyField
         public abstract String getStudentId();
         public abstract void setStudentId(String studentId);
         public abstract String getLname();
         public abstract void setLname(String lname);
         public abstract String getFname();
         public abstract void setFname(String fname);
         public abstract String getStandard();
         public abstract void setStandard(String standard);
         public abstract String getFyear();
         public abstract void setFyear(String fyear);
    Create Method.
         public String ejbCreate(
              String studentId,
              String fname,
              String lname,
              String standard,
              String fyear)
              throws CreateException {
              setStudentId(studentId);
              setFname(fname);
              setLname(lname);
              setStandard(standard);
              setFyear(fyear);
              return null;
    Post Create Method.
         public void ejbPostCreate(
              String studentId,
              String fname,
              String lname,
              String standard,
              String fyear) {
              // TODO : Implement
    StudentData.java
    Created on Nov 14, 2004
    To change the template for this generated file go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    package com.bcone.data;
    @author Administrator
    To change the template for this generated type comment go to
    Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
    public class StudentData {
         private String studentId;
         private String fname;
         private String lname;
         private String standard;
         private String fyear;
    @return
         public String getFname() {
              return fname;
    @return
         public String getFyear() {
              return fyear;
    @return
         public String getLname() {
              return lname;
    @return
         public String getStandard() {
              return standard;
    @return
         public String getStudentId() {
              return studentId;
    @param string
         public void setFname(String string) {
              fname = string;
    @param string
         public void setFyear(String string) {
              fyear = string;
    @param string
         public void setLname(String string) {
              lname = string;
    @param string
         public void setStandard(String string) {
              standard = string;
    @param string
         public void setStudentId(String string) {
              studentId = string;
    student.jsp
    <%@ page language="java" %>
    <html>
         <head>
              <title>
                   Title
              </title>
         </head>
         <body>
              <form method="POST" action="WEBBOT-SELF" name="Student" onSubmit="">
      <!--webbot bot="SaveResults" startspan U-File="_private/form_results.txt"
      S-Format="TEXT/CSV" S-Label-Fields="TRUE" ><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!webbot
      bot="SaveResults" endspan -->
      <br>
      <a href="/student/manageStudent.jsp?action=add" method="post"> Create </a>   
      <a href="/student/manageStudent.jsp?action=modify" method="post"> Modify </a>   
      <a href="/student/manageStudent.jsp?action=delete" method="post"> Delete </a>
      <br><br>
      <table border="1" width="32%">
        <tr>
          <td width="39%">Student ID </td>
          <td width="61%"><input type="text" name="studentId" size="20"></td>
        </tr>
        <tr>
          <td width="39%">First Name</td>
          <td width="61%"><input type="text" name="fname" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Last Name</td>
          <td width="61%"><input type="text" name="lname" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Standard</td>
          <td width="61%"><input type="text" name="standard" size="20"></td>
        </tr>
        <tr>
          <td width="39%">Fiscal Year</td>
          <td width="61%"><input type="text" name="fyear" size="20"></td>
        </tr>
        <tr>
          <td width="39%" align="center"><input type="submit" value="Submit" name="submit"></td>
          <td width="61%" align="center"><input type="reset" value="Reset" name="reset"></td>
        </tr>
      </table>
    </form>
         </body>
    </html>
    mamageStudent.jsp
    <%@ page language="java"
    import="javax.naming.,java.sql.,javax.sql,com.bcone.ejb."
    %>
    <html>
         <head>
              <title>
                   Manage Student
              </title>
         </head>
         <body>
              <h1>
              </h1>
    <jsp:useBean id="stu" class="com.bcone.data.StudentData" ></jsp:useBean>
    <jsp:setProperty name="stu" property="*" />
    <%
    try {
         InitialContext ctx = new InitialContext();
         StudentHome home = (StudentHome) ctx.lookup("java:comp/env/StudentBean");
         String str = request.getParameter("action");
         if("action".equals(str)) {
              Student rem = home.create(remote.setFname(stu.getStudentId(),stu.getFname(),stu.getLname(),stu.getStandard(),stu.getFyear());
              out.println(stu.getStudentId() + "Student Created");
         } else if ("modify".equals(str)) {
              Student remote  = home.findByPrimaryKey(stu.getStudentId());
              remote.setFname(stu.getFname());
              remote.setFname(stu.getLname());
              remote.setFname(stu.getStandard());
              remote.setFname(stu.getFyear());
              out.println(stu.getStudentId() + "Student modified");
         } else if ("delete".equals(str)) {
              Student stu1  = home.findByPrimaryKey(stu.getStudentId());
              stu1.remove();
              out.println(stu.getStudentId() + "Student deleted");
    } catch (Exception e) {
         out.println("Exception e"+e.toString());
    %>
         </body>
    </html>
    Regards,
    Vivek Ojha

  • Error in deploying CMP Entity Beans

    Hello,
    When I created a CMP Entity Bean using the JDeveloper Release Candidate and try to deploy it I get the following message:
    Auto-creating table: create table POGROUP_PRESS_RELEASE (press_release_id integer not null primary key, press_release_date varchar (255) null, title varchar (255) null, time varchar (255) null, release_type varchar (255) null, URL VARCHAR2(100))
    Warning: Error creating table: ORA-00955: name is already used by an existing object
    What does this mean? Does it mean that this bean cannot be deployed. If the table already exists in the database shouldn't it use the table instead of trying to create the table?
    Any help would be appreciated,
    Gopi

    initialize "table" attribute of <entity-deployment> element to POGROUP_PRESS_RELEASE.This will prevent auto-create functionality of OC4J.
    However this <entity-deployment> tag present only in orion-ejb-jar.xml.So you have to create this file and include along with ejb-jar.xml in jar file.
    Sample orion-ejb-jar.xml looks like this....
    <orion-ejb-jar deployment-version="1.0.2.2" deployment-time="ea013a2eda">
    <enterprise-beans>
    <entity-deployment name="TestHome" location="TestHome" wrapper="TestHome_EntityHomeWrapper5" table="POGROUP_PRESS_RELEASE" data-source="jdbc/OracleDS">
    <primkey-mapping>
    <cmp-field-mapping name="m_ID" persistence-name="ID" />
    </primkey-mapping>
    <resource-ref-mapping name="jdbc/OracleCoreDS" />
    </entity-deployment>
    </enterprise-beans>
    </entity-deployment>
    </orion-ejb-jar>
    For complete DTD :
    http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd
    Hope this helps.....
    --Venky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Deploying CMP entity bean throws compilation error.

    Jdeveloper build works fine but the server deployment ( embedded) fails. I linked tools.jar to j2ee home dir, same version as jdev uses. Session beans deploy OK.
    The table corr to the entity bean has a primary key and the entity bean was created by dragging-dropping table onto UML diagram.
    error is >>>cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping<<<, message details follow after dashed line.
    Platform details - Jdeveloper 9.0.3 on mdk 9.0, JDK 1.4.1 ( JDK 1.3.1 also does the same).
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    /usr/java/j2sdk1.4.1/bin/java -hotspot -classpath /var/jdeveloper/j2ee/home/oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Xrs com.evermind.server.OC4JServer -config /home/demo/jdevhome/system9.0.3.1035/oc4j-config/server.xml
    [waiting for the server to complete its initialization...]
    Embedded OC4J startup time: 9611 ms.
    Copying default deployment descriptor from archive at /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/META-INF/orion-ejb-jar.xml to deployment directory /home/demo/jdevhome/system9.0.3.1035/oc4j-config/application-deployments/current-workspace-app/classes...
    Auto-deploying file:/home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/ (No previous deployment found)... Error compiling /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes: cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

    Please note that the data-source has been re-architectured in 10.1.3 DP3 and you should have DataSource as follows:
    <data-sources xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd' schema-major-version='10' schema-minor-version='1'>
    <managed-data-source connection-pool-name='Example Connection Pool' jndi-name='jdbc/OracleDS' name='OracleManagedDS' />
    <connection-pool name='Example Connection Pool' >
    <connection-factory factory-class='oracle.jdbc.pool.OracleDataSource' user='scott' password='tiger' url='jdbc:oracle:thin:@localhost:1521:orcl'>
    </connection-factory>
    </connection-pool>
    </data-sources>

  • Help: Deploying CMP Entity Bean on Jboss (DB2)

    Hi, I have a problem which I have tried to solve for a couple of days now with now success.
    I have deployed an ordinary Entity CMP Bean which name is Customer.
    This bean has 2 fields, an id field and a customername field.
    I use DB2 where the table is named customer and the fields are named as the fields in the bean, id and customername.
    I have configured the db2-ds.xml file as follows, and put it in %jboss%\server\default\deploy:
    <local-tx-datasource>
    <jndi-name>DB2DS</jndi-name>
    <connection-url>jdbc:db2://192.168.10.220:6789/business</connection-url>
    <driver-class>COM.ibm.db2.jdbc.net.DB2Driver</driver-class>
    <user-name>db2admin</user-name>
    fuck4future
    <min-pool-size>5</min-pool-size>
    <max-pool-size>25</max-pool-size>
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
    -->
    <!-- sql to call on an existing pooled connection when it is obtained from pool
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
    -->
    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
    <type-mapping>DB2</type-mapping>
    </local-tx-datasource>
    I have created the jbosscmp-jdbc.xml file and put it in the META-INF directory in my ejb-application:
    <jbosscmp-jdbc>
    DB2DS
    <!--<datasource-mapping>DB2</datasource-mapping>-->
    <create-table>false</create-table>
    <enterprise-beans>
    <ejb-name>Customer</ejb-name>
    <table-name>customers</table-name>
    <cmp-field>
    <field-name>id</field-name>
    <column-name>id</column-name>
    </cmp-field>
    <cmp-field>
    <field-name>companyname</field-name>
    <column-name>companyname</column-name>
    </cmp-field>
    </enterprise-beans>
    </jbosscmp-jdbc>
    I have created the standardjaws.xml also in my META-INF directory of the ejb application. This file contains a lot of information (type-mappings), and starts with:
    java:/DB2DS
    <type-mapping>DB2</type-mapping>
    false
    I have the ejb-jar.xml file automaticly generated for me in my developer tool (WSAD).
    When I try to start my server I get the following error:
    ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
    state: FAILED
    Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: DB2DS was not deployed or type-mapping was not configured.
    ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
    etc.......
    Please can someone help me and give me a clue, what am I doing wrong??

    And this is my console :
    ===============================================================================
    JBoss Bootstrap Environment
    JBOSS_HOME: c:\jboss4\bin\\..
    JAVA: c:\program\java\jdk1.5.0_01\bin\java
    JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
    CLASSPATH: c:\program\java\jdk1.5.0_01\lib\tools.jar;c:\jboss4\bin\\run.jar
    ===============================================================================
    22:36:01,986 INFO [Server] Starting JBoss (MX MicroKernel)...
    22:36:01,986 INFO [Server] Release ID: JBoss [Zion] 4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
    22:36:01,986 INFO [Server] Home Dir: C:\jboss4
    22:36:01,986 INFO [Server] Home URL: file:/C:/jboss4/
    22:36:01,996 INFO [Server] Library URL: file:/C:/jboss4/lib/
    22:36:01,996 INFO [Server] Patch URL: null
    22:36:01,996 INFO [Server] Server Name: default
    22:36:01,996 INFO [Server] Server Home Dir: C:\jboss4\server\default
    22:36:01,996 INFO [Server] Server Home URL: file:/C:/jboss4/server/default/
    22:36:01,996 INFO [Server] Server Data Dir: C:\jboss4\server\default\data
    22:36:01,996 INFO [Server] Server Temp Dir: C:\jboss4\server\default\tmp
    22:36:02,006 INFO [Server] Server Config URL: file:/C:/jboss4/server/default/conf/
    22:36:02,006 INFO [Server] Server Library URL: file:/C:/jboss4/server/default/lib/
    22:36:02,006 INFO [Server] Root Deployment Filename: jboss-service.xml
    22:36:02,006 INFO [Server] Starting General Purpose Architecture (GPA)...
    22:36:02,336 INFO [ServerInfo] Java version: 1.5.0_01,Sun Microsystems Inc.
    22:36:02,336 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_01-b08,Sun Microsystems Inc.
    22:36:02,336 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
    22:36:02,827 INFO [Server] Core system initialized
    22:36:04,289 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
    22:36:04,379 INFO [WebService] Using RMI server codebase: http://CYONARA:8083/
    22:36:04,549 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
    22:36:08,625 INFO [Embedded] Catalina naming disabled
    22:36:09,246 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
    22:36:09,276 INFO [Catalina] Initialization processed in 571 ms
    22:36:09,276 INFO [StandardService] Starting service jboss.web
    22:36:09,286 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.28
    22:36:09,306 INFO [StandardHost] XML validation disabled
    22:36:09,336 INFO [Catalina] Server startup in 60 ms
    22:36:09,476 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/C:/jboss4/server/default/deploy/http-invoker.sar/invoker.war/
    22:36:10,187 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=file:/C:/jboss4/server/default/tmp/deploy/tmp43675jboss-ws4ee-exp.war/
    22:36:10,318 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/C:/jboss4/server/default/deploy/jbossweb-tomcat50.sar/ROOT.war/
    22:36:10,508 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/C:/jboss4/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
    22:36:12,741 INFO [MailService] Mail Service bound to java:/Mail
    22:36:13,272 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jboss-local-jdbc.rar
    22:36:13,412 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jboss-xa-jdbc.rar
    22:36:13,552 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jms/jms-ra.rar
    22:36:13,732 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/mail-ra.rar
    22:36:14,153 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2DS to JNDI name 'java:DB2DS'
    22:36:14,834 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS to JNDI name 'java:DefaultDS'
    22:36:14,864 WARN [ConfiguredIdentityLoginModule] Creating LoginModule with no configured password!
    22:36:15,145 INFO [A] Bound to JNDI name: queue/A
    22:36:15,145 INFO Bound to JNDI name: queue/B
    22:36:15,155 INFO [C] Bound to JNDI name: queue/C
    22:36:15,155 INFO [D] Bound to JNDI name: queue/D
    22:36:15,155 INFO [ex] Bound to JNDI name: queue/ex
    22:36:15,175 INFO [testTopic] Bound to JNDI name: topic/testTopic
    22:36:15,175 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
    22:36:15,185 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    22:36:15,185 INFO [testQueue] Bound to JNDI name: queue/testQueue
    22:36:15,235 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
    22:36:15,275 INFO [DLQ] Bound to JNDI name: queue/DLQ
    22:36:15,795 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA'
    22:36:15,835 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss4/server/default/deploy/jmx-console.war/
    22:36:15,996 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/C:/jboss4/server/default/deploy/management/web-console.war/
    22:36:16,526 INFO [EARDeployer] Init J2EE application: file:/C:/jboss4/server/default/deploy/HTC.ear
    22:36:16,787 INFO [EjbModule] Deploying Customer
    22:36:17,047 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=Customer,service=EJB
    org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1071)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:412)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
         at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
         at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy47.start(Unknown Source)
         at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy22.start(Unknown Source)
         at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:605)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy8.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy4.start(Unknown Source)
         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy5.deploy(Unknown Source)
         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
         at org.jboss.Main.boot(Main.java:162)
         at org.jboss.Main$1.run(Main.java:423)
         at java.lang.Thread.run(Thread.java:595)
    22:36:17,047 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=Customer,service=EJB
    org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1071)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:412)
         at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
         at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
         at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy47.start(Unknown Source)
         at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy22.start(Unknown Source)
         at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:605)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy8.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:416)
         at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy4.start(Unknown Source)
         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy5.deploy(Unknown Source)
         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
         at org.jboss.Main.boot(Main.java:162)
         at org.jboss.Main$1.run(Main.java:423)
         at java.lang.Thread.run(Thread.java:595)
    22:36:17,057 INFO [EJBDeployer] Deployed: file:/C:/jboss4/server/default/tmp/deploy/tmp43727HTC.ear-contents/HTC_BM_EJB.jar
    22:36:17,107 INFO [TomcatDeployer] deploy, ctxPath=/HTC BM Web, warUrl=file:/C:/jboss4/server/default/tmp/deploy/tmp43727HTC.ear-contents/HTC_BM_Web-exp.war/
    22:36:17,228 INFO [EARDeployer] Started J2EE application: file:/C:/jboss4/server/default/deploy/HTC.ear
    22:36:17,238 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    MBeans waiting for other MBeans:
    ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
    state: FAILED
    I Depend On:
    Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
    ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
    state: CREATED
    I Depend On:
    Depends On Me:
    MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
    ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
    state: CREATED
    I Depend On:
    Depends On Me:
    ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
    state: FAILED
    I Depend On:
    Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.

  • How to deploy CMP entity bean 2.0 ?

    Dear all,
    How should I write the EJB-QL for all the finder methods in my home bean during deployment? I�m using the j2sdkee-1_3_01-win to test out this bean. I have tried the following query:
    SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 but when I try to verify the bean, an error message appeared:
    Error: [ SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 ] has parsing error(s)
    Here is the detail:
    Test Name: tests.ejb.entity.ejbql.EjbQLFromCmpEntityDescriptor
    Test Assertion: EJB 2.0 Spec Chapter 10 Container managed persistent queries should comply with specification in its sytax and semantic rules
    Detailed Messages:
    Error: [ SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 ] has parsing error(s)

    Hope this is not too late...
    SELECT OBJECT(a) FROM ProductBean AS a WHERE a.basePrice > ?1

  • Error While Deploying A CMP Entity Bean With A Composite Primary Key

    Hello all,
    I have a problem deploying CMP Entity beans with composite primary keys. I have a CMP Entity Bean, which contains a composite primary key composed of two local stubs. If you know more about this please respond to my post on the EJB forum (subject: CMP Bean Local Stub as a Field of a Primary Key Class).
    In the mean time, can you please tell me what following error message means and how to resolve it? From what I understand it might be a problem with Sun ONE AS 7, but I would like to make sure it's not me doing something wrong.
    [05/Jan/2005:12:49:03] WARNING ( 1896):      Validation error in bean CustomerSubscription: The type of non-static field customer of the key class
    test.subscription.CustomerSubscriptionCMP_1530383317_JDOState$Oid must be primitive or must implement java.io.Serializable.
         Update the type of the key class field.
         Warning: All primary key columns in primary table CustomerSubscription of the bean corresponding to the generated class test.subscription.CustomerSubscriptionCMP_1530383317_JDOState must be mapped to key fields.
         Map the following primary key columns to key fields: CustomerSubscription.CustomerEmail,CustomerSubscription.SubscriptionType. If you already have fields mapped to these columns, verify that they are key fields.Is it enough that a primary key class be serializable or all fields have to implement Serializable or be a primitive?
    Please let me know if you need more information to answer my question.
    Thanks.
    Nikola

    Hi Nikola,
    There are several problems with your CMP bean.
    1. Fields of a Primary Key Class must be a subset of CMP fields, so yes, they must be either a primitive or a Serializable type.
    2. Sun Application Server does not support Primary Key fields of an arbitrary Serializable type (i.e. those that will be stored
    as BLOB in the database), but only primitives, Java wrappers, String, and Date/Time types.
    Do you try to use stubs instead of relationships or for some other reason?
    If it's the former - look at the CMR fields.
    If it's the latter, I suggest to store these fields as regular CMP fields and use some other value as the PK. If you prefer that
    the CMP container generates the PK values, use the Unknown
    PrimaryKey feature.
    Regards,
    -marina

  • Bad Performance/OutOfMemory Error in CMP Entity Bean with Large DB

    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() - (Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP Entity Beans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

    Hi
    You should use a Select Method, it does support cursors.
    Or a Home Select Method combination.
    Regards
    Thomas
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>>
    (without max-beans-in-cache directive the performance is worse)>
    Is there any documentation available to help us in deploying CMP
    Entity Beans with very large number of records (instances) ? Any help
    is greatly appreciated.>
    Regards>
    Rajan>
    >
    "Rajan Jena" <[email protected]> schrieb im Newsbeitrag
    news:3dadd7d1$[email protected]..
    >
    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() -(Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP EntityBeans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

  • Help about Date and Time by CMP entity bean

    I should have two fields in my cmp .one stores current date ,another one stores current time while ejbcreate();
    I should be able to get findmethod findobjectBetween ?! and ?2
    or that sorts of find method.what type of the method should I use.
    java.util.Date or Simply String?
    if I use java.tuil.Date as the type.
    How shoud my ejbcreate method look like?
    public abstract void setDate(Date mydate);
    public abstract Date getDate();
    ejbCreate(String name,String password,Date mydate,Date mytime)
    setDate()
    I suppose I use write a business method getCurrentDate() which uses
    java.util.Date().toLocale,But I think it just returns String
    help pls.

    I am using oc4j(Oracle9iAS (9.0.3.0.0))
    I am getting the following error using Timestamp while deploying cmp entity bean ejb1.1. Thanks...
    Auto-deploying TimestampTestEntity.jar (No previous deployment found)... TimestampTest_EntityBeanWrapper0.java:1558: Missing term.
    if (if(thread.contextContainer != null)
    ^
    TimestampTest_EntityBeanWrapper0.java:1558: ')' expected.
    if (if(thread.contextContainer != null)
    ^
    TimestampTest_EntityBeanWrapper0.java:1559: Invalid expression statement.
    response != null) {if(thread.contextContainer != null)
             ^
    TimestampTest_EntityBeanWrapper0.java:1559: ';' expected.
    response != null) {if(thread.contextContainer != null)
                    ^
    TimestampTest_EntityBeanWrapper0.java:1560: Missing term.
    response.setNanos(if(thread.contextContainer != null)
                      ^
    TimestampTest_EntityBeanWrapper0.java:1560: ')' expected.
    response.setNanos(if(thread.contextContainer != null)
                      ^
    TimestampTest_EntityBeanWrapper0.java:1561: ';' expected.
    response.getNanos());} // generated from BeanMethodCompilation
    ^
    7 errors
    Error compiling F:\oc4j\j2ee\home\applications\TimestampAppl/TimestampTestEntity.jar: Syntax error in source
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

  • CMP Entity Bean's problem with MS-SQL Server 2000

    Hi everyone!
    I have a problem regarding CMP Entity Bean on OC4J.
    I made one CMP Entity Bean and deployed it to OC4J.
    It was successful.
    I used MS-SQL Server 2000 as Datasource.
    So, I installed MS-SQL Server's JDBC Driver and add some jar files to classpath.
    And I updated 'data-sources.xml' in OC4J's config directory.
    Then, I updated also 'orion-ejb-jar.xml' in my application's directory.
    I changed data-source's name to my data-source's name which use MS-SQL Server 2000.
    Finally, I started OC4J and EJB Client program which called Enitiy Bean's create method.
    But, The error occured which was 'Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence'.
    What's wrong? I need any helps.
    Here is stack overflow message. Thank you. Best regards.
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence.
         at UserHome_EntityHomeWrapper2.create(UserHome_EntityHomeWrapper2.java:1114)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    at connection to localhost/127.0.0.1 as admin
         at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1530)
         at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1453)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:53)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
         at __Proxy0.create(Unknown Source)
         at com.emc.ksc.ejb.user.UserBeanTestClient1.create(UserBeanTestClient1.java:73)
         at com.emc.ksc.ejb.user.UserBeanTestClient1.<init>(UserBeanTestClient1.java:49)
         at com.emc.ksc.ejb.user.UserBeanTestClient1.main(UserBeanTestClient1.java:1077)

    Hi Young,
    From the information you have supplied, my guess is that the SQL
    string that OC4J is sending to SQL-Server is incorrect. So it may
    help if you could see the exact SQL string. In order to see the
    SQL string, I suggest you either run OC4J in "debug" mode, or try
    using "P6 Spy".
    The following web page has details on running OC4J in "debug" mode:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    And here is the web page for "P6 Spy"
    http://www.provision6.com/
    And these other web sites may also be of help (in general):
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.atlassian.com
    http://www.elephantwalker.com
    Good Luck,
    Avi.

  • Problems accessing fields in a CMP entity bean from a session bean

    Hello everybody,
    I'm getting the next problem: when I try to access a field in a CMP entity bean that I have instantiated from a session bean (trhoug entitybean.getNameOfField), I get the error "the entity bean does not exist in the database".
    This entity bean is accessing a table in an external database (not the DB of the WAS), but I know that it's getting the correct data from the table, since  I check the entitybean.size() and the entitybean.findByPrimaryKey(), and I get the right information. For some reason, the only thing that it doesn't work in the entity bean are the getter/setter methods (I created them automatically after having created the entity fields).
    I access the entity bean through its local interface...
    I know it's really difficult to give an answer with so few details, but... does anybody think I forgot something important to configure??
    Thank very much in advance!!
    Isidro

    getter and setter methods for cmp-fields are abstract.
    getter and setter methods for cmr-fields are abstract.
    "John Lee" <[email protected]> wrote:
    >
    Hi:
    Which method in a CMP Entity bean should be abstract? just only SetXXX
    and
    GetXXX?
    Thanks!
    John Lee

  • Error in weblogic.ejbc while deploying the CMP entity bean.!!!

    Tried to deploy the entity bean[CMP] with the following folder structure.
    examples [package]
    Product.class
    productBean.class
    etc.
    META-INF
    ejb-jar.xml
    weblogic-ejb-jar.xml.
    weblogic-cmp-rdbms-jar.xml
    created a jar..with the following command
    1.jar cvf rgegcmp.jar examples META-INF
    tried to create the stubs and skeletons using weblogic.ejbc command.
    2. java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
    C:\btcomprj\BTCOMPRJ\classes>java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductBean which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductHome which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.Product which is in the
    classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductLocalHome which i
    s in the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductLocal which is in
    the classpath. This class should only be located in the ejb-jar file.>
    <Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
    class examples.ProductPK which is in th
    e classpath. This class should only be located in the ejb-jar file.>
    ERROR: Error from ejbc: null
    java.lang.NullPointerException
    at
    weblogic.ejb20.deployer.CompositeMBeanDescriptor.getPersistenceUseIdentifier(Composite
    MBeanDescriptor.java:1484)
    at weblogic.ejb20.deployer.CMPInfoImpl.<init>(CMPInfoImpl.java:104)
    at
    weblogic.ejb20.deployer.EntityBeanInfoImpl.<init>(EntityBeanInfoImpl.java:135)
    at
    weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.java:349)
    at
    weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInf
    oImpl.java:438)
    at
    weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:16
    5)
    at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:151)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:332)
    at weblogic.ejbc20.runBody(ejbc20.java:479)
    at weblogic.utils.compiler.Tool.run(Tool.java:126)
    at weblogic.ejbc.main(ejbc.java:29)
    ERROR: ejbc found errors
    1. want to know why Null pointer exception is thrown by 'weblogic.ejbc'...
    is it indicating an error in my code(bean); .....
    i dont know how to fix the error.
    find the deployments descriptors which i have written for deployment.
    weblogic-ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Product</ejb-name>
    <jndi-name>rgexample</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    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>Product</ejb-name>
    <home>examples.ProductHome</home>
    <remote>examples.Product</remote>
    <local-home>examples.ProductLocalHome</local-home>
    <local>examples.ProductLocal</local>
    <ejb-class>examples.ProductBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>examples.ProductPK</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>ProductBean</abstract-schema-name>
    <cmp-field>
    <field-name>productID</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>description</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>basePrice</field-name>
    </cmp-field>
    <query>
    <query-method>
    <method-name>findByName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE name =
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByDescription</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE description
    = ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByBasePrice</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice =
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findExpensiveProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice >
    ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findCheapProducts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice < ?1]]>
    </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAllProducts</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE productID
    IS NOT NULL]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Product</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-cmp-rdbms-jar.xml
    <!DOCTYPE weblogic-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>Product</ejb-name>
    <data-source-name>examples-dataSource-demoPool</data-source-name>
    <table-map>
    <table-name>TORDER</table-name>
    <field-map>
    <cmp-field>productID</cmp-field>
    <dbms-column>PRODUCTID</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>name</cmp-field>
    <dbms-column>NAME</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>description</cmp-field>
    <dbms-column>DESCRIPTION</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>basePrice</cmp-field>
    <dbms-column>BASEPRICE</dbms-column>
    </field-map>
    </table-map>
    </weblogic-rdbms-bean>
    <create-default-dbms-tables>True</create-default-dbms-tables>
    </weblogic-rdbms-jar>

    If you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
    <persistence>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>7.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-use>
    </persistence>
    I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
    Give that a try and see if it doesn't solve your compilation failure.
    Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
    -thorick

Maybe you are looking for

  • Can't print from PC notebook through Airport Express

    I am using a Sony Vaio notebook running Windows XP. I just purchased an Airport Express along with a PowerBook G4 and have my HP DeskJet 5650 connected through the Airport Express. My PowerBook is having no trouble communicating with the printer, but

  • CD Burn error messages

    I am getting two messages when I try to burn a cd using the burn software that came with the computer. I used this a couple of times quite awhile back but now it is not working. The messages are "burn engine error" and "target disk error". I tried to

  • Action - Display smartform in PDF format

    Hi All, I have a requirement whereby on triggering of a print form action in crmd_order, the smartform should be displayed in PDF format and from there, user should be able to choose whether to save or to print the form. How can this be done? Thanks!

  • U2413 Color Calibration "Verify USB Connection"

    I am trying to use the Dell Ultrasharp Color Calibration Solution with an x-rite i1 Display Pro. Can't get beyond "Verify USB Connection". The USB cable between the monitor and computer is connected (tried both a USB 3.0 and a 2.0 port). The USB hub

  • 1 iMac. 2 users. Don't want to mix pictures.

    I will be buying an iMac and there will be two users (wife and I) both with iPhones.  I want to sync both phones to the computer and not mix photos, music, notes, etc. (essentially using it as two computers).  Is this possible?  I will be backing up