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.

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,

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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • BMP-/CMP-Entity Beans with JBoss 3.0 & MySQL 3.23

    Hi @all!
    Sorry, I`m a beginner in development of EJBs, but I`ve got already two of them (a session bean, a cmp-bean with Hypersonic DB) running.
    Now my question:
    Is it possible to develop bmp- or cmp-beans with JBuilder 6.0 and AppServer JBoss 3.0 and MySQL as relational database.
    If anybody here, has ever done this.
    Please contact for one or two short questions like:
    What will I have to do to get MySQL as persistence medium in JBoss?
    What will I have to do to get MySQL by a bmp-entity-bean over JNDI?
    What will I have to do to run my program? ;-)
    I�m always getting error messages like:
    ...no such entity...
    Or:
    ...MyDB not bound...
    Thanks
    Michael

    Now, I`ve done a little step in the right direction:
    It is possible to create CMP-Beans with JBoss 3.0 and MySQL database.
    You just have to put both on the same machine ;-) (Incredible...)
    But now I`ve got problems to implement a bean-managed-persistence Bean with JBoss 3.0 and mySQL.
    If I start my client application, I get the following error messages, although my EJB is correctly deployed:
    -- I`m calling: create(17, max, [email protected])
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.ServerException: null
    Embedded Exception
    null; nested exception is:
         javax.ejb.EJBException: null
    Embedded Exception
    null
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)-- Erfolglos: create(17, max, [email protected])
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:250)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:226)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:136)
         at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
         at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
         at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:185)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
         at $Proxy0.create(Unknown Source)
         at gaestebuch.BMPTestClient.create(BMPTestClient.java:71)
         at gaestebuch.BMPTestClient.main(BMPTestClient.java:309)
    Caused by: java.rmi.ServerException: null
    Embedded Exception
    null; nested exception is:
         javax.ejb.EJBException: null
    Embedded Exception
    null
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:119)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
         at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
         at org.jboss.ejb.Container.invoke(Container.java:726)
         at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
         at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: javax.ejb.EJBException: null
    Embedded Exception
    null
         at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:246)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
         at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:728)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)
         at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:257)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
         at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
         at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
         at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
         ... 19 more
    -- return of create(17, max, [email protected]): null.
    What is my mistake?
    Thanks, Michael

  • Little Help with CMP Entity Bean

    I have the following error:
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.j2ee:service=EjbModule,module=SISEPROEJB.jar
      State: FAILED
      Reason: org.jboss.deployment.DeploymentException: Atleast one role of a
    foreign-key mapped relationship must have key fields (or <primkey-field> is
    missing from ejb-jar.xml): ejb-relation-name=Abogado-to-AdmninistrativoI have two entity beans called abogado and adminsitrativo, the relation is abogado-has-many-adminitrativo, (one-to-many)
    Here is my xdoclet code in abogado:
             * @ejb.interface-method
             * @ejb.relation
             *    name="Abogado-to-Administrativo"
             *    role-name="Abogado-has-many-Administrativo"
             *    target-ejb = "Administrativo"
             *    target-role-name = "Administrativo-has-one-Abogado"
             * @jboss.target-relation related-pk-field = "userName"
             *    fk-column = "UserName_id_fk"
             * @return Collection de procesos administrativos
             public abstract Collection getProcesos();Here is the xdoclet code for administrativo
             * @ejb.interface-method
             * @ejb.relation name="Abogado-to-Admninistrativo"
             *    role-name="Administrativo-has-one-Abogado"
             *    target-ejb="Abogado"
             *    target-role-name="Abogado-has-many-Administrativo"
             *    target-multiple="true"
             * @return
             public abstract AbogadoLocal getAbogado();Both beans have pk fields defined with:
         * @ejb.persistence column-name = "id"
         * @ejb.pk-fieldand
         * @ejb.interface-method
         * @ejb.persistence column-name = "UserName"
         *     sql-type="VARCHAR"
         * @ejb.pk-fieldPlease help me I have been stuck here for the whole weekend.
    Thanks
    Daniel Castro

    Try the following forum (about EJB technology)
    http://forum.java.sun.com/forum.jspa?forumID=13

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

  • 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

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

  • Exception in calling a CMP Entity Bean

    I have deployed a simple CMP entity bean using jboss App. server, Now while executing the client i got the following exception,
    error in clientjavax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)]
    regards,
    NaveenBabu.A

    Hi,
    It is likely that some libraries are missing in your client environment. (it has nothing to do with security)
    Make sure that the libraries in JBoss client (folder your_jboss_folder/client) are in your client application classpath. In particular, look for jnp-client.jar.
    This should solve the problem.
    Bruno Collet
    http://www.practicalsoftwarearchitect.com

  • 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

  • Create CMP Entity Beans from Tables Wizard - Can't see any tables with DB2

    Hi,
    I'm trying to use the "Create CMP Entity Beans from Tables Wizard" to create an entity from a table in a DB2 database. The problem is, on page 2, I can't see any available tables. I have verified that the connection works (I can open the connection in the Navigator frame and I can see that table).
    Note that if I try this wizard on an Oracle database, I can see tables.
    WTF? Can someone please help?

    I second the motion. I too work in an environment with centralized data management (DBA's) that create and maintain all tables under a generic schema. This has prevented me from using the Create Entity Beans from Table feature of Jdev r3 preview.
    At least I can see that I'm not alone.
    Thanks
    When I select the "Create CMP Entity Beans from Tables Wizard," no tables or views are available to select. The JDev database connection is using an ID assigned to me.
    The tables that I am looking for were created by the DBA under his ID and are therefore in that schema. He did create Public Synonyms for them, but the tables still do not show up in the wizard.
    Is there a configuration step that I need to do to have those tables show up?
    Tables created by a DBA and then accessed by developers using a public synonym is a very common scenario and should be supported by JDeveloper (IMO).
    Thanks.
    I'm using JDev 9.0.2.8.2.

  • 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