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,

Similar Messages

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

  • How to Deploy an entity bean in Weblogic 6.1

    Hi friends,
    Could any one of u pls send me the Deployment steps for an entity bean
    in Weblogic 6.1 Server? or pls send me the URL from where i can get the step by
    step entity bean deployment process...
    Thanx in advance...
    Sridhar.Y.S.

    Copy Entity Ejb jar file to the config/mydomain/applications directory.
    http://edocs.beasys.com/wls/docs61/ejb/EJB_deployover.html#1011066
    "Sridhar" <[email protected]> wrote:
    >
    Hi friends,
    Could any one of u pls send me the Deployment steps for an entity
    bean
    in Weblogic 6.1 Server? or pls send me the URL from where i can get the
    step by
    step entity bean deployment process...
    Thanx in advance...
    Sridhar.Y.S.

  • 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

  • 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

  • Error while deploying an entity bean

    Hi,
    I am trying to deploy an entity bean in weblogic 7.0 .
    My weblogic-ejb-jar.xml has the entry as :
    <weblogic-enterprise-bean>
    <ejb-name>enroleejb.ManagedObjectImplHome</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
    <stateless-bean-methods-are-idempotent>False</stateless-bean-methods-are-ide
    mpotent>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    <trans-timeout-seconds>60</trans-timeout-seconds>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>enroleejb.ManagedObjectImplHome</jndi-name>
    </weblogic-enterprise-bean>
    When I run ejbc it gives the following error.
    [java] The file /meta-inf/weblogic-cmp-rdbms-jar.xml, specified in a
    type-storage element
    of your weblogic-ejb-jar.xml descriptor, does not exist in the jar
    file.
    [java] at
    weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceTy
    pe.java:475)
    [java] at
    weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.jav
    a:407)
    [java] at
    weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:114)
    [java] at
    weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPComp
    iler.java:64)
    [java] at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:223)
    [java] at
    weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:344)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:470)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
    [java] at weblogic.ejbc.main(ejbc.java:29)
    In the generated jar file I have meta-inf\weblogic-cmp-rdbms.jar file.
    Still it gives the error.
    What could be the problem?
    Any help would be appreciated.
    Thanks,
    Namrata

    Ejb jar file should have META-INF/weblogic-cmp-rdbms-jar.xml
    "Sarita Satoor" <[email protected]> wrote:
    Hi,
    I am trying to deploy an entity bean in weblogic 7.0 .
    My weblogic-ejb-jar.xml has the entry as :
    <weblogic-enterprise-bean>
    <ejb-name>enroleejb.ManagedObjectImplHome</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <stateless-clustering>
    <stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
    <stateless-bean-methods-are-idempotent>False</stateless-bean-methods-are-ide
    mpotent>
    </stateless-clustering>
    </stateless-session-descriptor>
    <transaction-descriptor>
    <trans-timeout-seconds>60</trans-timeout-seconds>
    </transaction-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>enroleejb.ManagedObjectImplHome</jndi-name>
    </weblogic-enterprise-bean>
    When I run ejbc it gives the following error.
    [java] The file /meta-inf/weblogic-cmp-rdbms-jar.xml, specified
    in a
    type-storage element
    of your weblogic-ejb-jar.xml descriptor, does not exist in the jar
    file.
    [java] at
    weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceTy
    pe.java:475)
    [java] at
    weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.jav
    a:407)
    [java] at
    weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:114)
    [java] at
    weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPComp
    iler.java:64)
    [java] at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:223)
    [java] at
    weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:344)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:470)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
    [java] at weblogic.ejbc.main(ejbc.java:29)
    In the generated jar file I have meta-inf\weblogic-cmp-rdbms.jar file.
    Still it gives the error.
    What could be the problem?
    Any help would be appreciated.
    Thanks,
    Namrata

  • 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

  • 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

  • Using oracle db sequence for auto generating of PKs for CMP entity beans

    Hi,
    I have read quite a number of threads about (auto) generation of keys for primary keys for the CMP entity beans.
    My requirement is I am migrating an application deployed on Weblogic to oc4j. The application is using cmp entity beans with auto key generation using a sequence in the Oracle db. This is specified in weblogic-cmp-rdbms-jar.xml file like below:
    <automatic-key-generation>
    <generator-type>Oracle</generator-type>
    <generator-name>REPUSER.DEPT_REPORT_SEQ</generator-name>
    <key-cache-size>1</key-cache-size>
    </automatic-key-generation>
    In the ejb-jar.xml, it is specified as:
    <prim-key-class>java.lang.Integer</prim-key-class>
    <primkey-field>id</primkey-field>
    Now, I need to migrate this to oc4j. Can somebody suggest me options and clarify my questions kindly?
    1) I have read articles that say that in the ejb-jar.xml, we need to specify <prim-key-class>java.lang.Object</prim-key-class> and this will create a column called 'autoid' in the respective entity table in the Oracle db.
    - How can I use this to assign the value to my primary field, say, id?
    2) Now, with the latest oc4j, can I use Oracle database sequence as the key generator for the values of the PKs just by specifying in the xml descriptor ejb-jar.xml?
    2.a) If yes, is there any article that explains with the code?
    2.b) If no, what are the alternatives I have?
    I have read many discussions that say that we can create a stateless session bean that can lookup the database sequence using simple JDBC call to return the nextval of the sequence. The SSB should be called in the ejbCreate() of the entity bean.
    My related question is, what is recommended for oc4j? What are limitations of the various options for the latest oc4j available?
    How should I go about deploying this kind of ejbs in oc4j?
    Any help and pointers are welcome. Please help.
    Thanks a lot.
    Vadi

    Hello ,
    Instead of exposing a get/set method for each arribute of your bean (corresponding to database table) expose only one object.
    For example
    public class CustomerBean implements javax.ejb.EntityBean{
    private CustomerVO objCustomer;
    private String customerName;
    private String customerMail;
    private String customerType;
    public CustomerVO getCustomer(){
    return this.objCustomer;
    public void setCustomer(CustomerVO objCustomer){
    this.objCustomer = objCustomer;
    public void ejbStore(){
    customerName = objCustomer.getName();
    customerMail = objCustomer.getMail();
    customerType = objCustomer.getType();
    HTH
    VJ

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

Maybe you are looking for

  • Any standard report to show WBS,settlement, asset no and asset cost/value

    Hi All, Please advice . Is there any standard report to show WBS,settlement, asset no and asset cost/value ? I tried tcode kosrlist_pr but it does not show asset cost/value.. it shows only WBS,settlement and asset no. Thank you. Best Regards, Nies

  • How to copy this wsld

    H i Experts ,                        mine is a Idoc to Webservice scenerio. I have 2 fields from R3 taht is going to go to web service. I cannot do 2 things.    The below mentioned part.. I dont know how do i store it in desktop,, and hw much should

  • Skype won't install

    I had to uninstall it because it would crash the second i opened it. Now that i'm reinstalling it, i open the SkypeSteup.exe thing and everything goes normally. The problem is, i've been stuck in the page that says "Skype is installing" for hours. Th

  • How do I come back to the Hierarchy List Display screen?

    Hi Gurus, I have designed a report (Hierarchy Sequential List Display). I would select a few records from the resulting report (by clicking on checkboxes that i've provided in the report) and perform an event which inturn executes BDC code. After exe

  • Fade out MP3 individually

    Tie this code to a button, if I repetitive press as  fast as I can, an error exception would appear in the application. I  found that it would not throw an error if I stop the sound when it  completely fade out. However, I wish the fade out function