snip_face
asked on
J2EE cmp mapping errors verifier errors
Hello People, I was just looking for some help with possible the most evil program ever, the j2ee deploy tool.
Basicly what I have is a dating system, with a CustomerBean, MessageBean and a DatingBean that controls the system. Now both the dating and customer have database tables that the beans are mapped to, and they both map correctly. Now I have set up a jdbc resource in the admin section
of jdbc/datingservice , I have captured the schema, hence the mapping, and set the JNDI name for both of the CMP customer and message beans to jdbc/datingservice. As well as this I have set a resurce ref to jdbc/datingservice for both beans.
Now I thought this was all I had to do, but apparently not. When I attempt to verify I get :
CustomerBean tests.ejb.runtime.cmpmappi ng.ASCmpMa ppingTest FAILED
with an error message of :
For [ datingservice#ejb-jar-ic.j ar#Message Bean ]
Error: Exception [ JDO74033: Cannot deploy application 'datingservice' module 'ejb-jar-ic' with CMP beans: cmp-resource is not defined for this module. The minimum requirement for a cmp-resource is to specify the jndi-name of a jdbc-resource or a persistence-manager-factor y-resource to be used with the beans. ] while initializing JDOCodeGenerator. Please check your descriptors and mapping files for consistency
And:
MessageBean tests.ejb.runtime.cmpmappi ng.ASCmpMa ppingTest FAILED
with an error of :
For [ datingservice#ejb-jar-ic.j ar#Custome rBean ]
Error: Exception [ JDO74033: Cannot deploy application 'datingservice' module 'ejb-jar-ic' with CMP beans: cmp-resource is not defined for this module. The minimum requirement for a cmp-resource is to specify the jndi-name of a jdbc-resource or a persistence-manager-factor y-resource to be used with the beans. ] while initializing JDOCodeGenerator. Please check your descriptors and mapping files for consistency
Now I thought I had done everything I needed to, but I've probably missed something stupid.
Thanks for any reply Snip_face
Basicly what I have is a dating system, with a CustomerBean, MessageBean and a DatingBean that controls the system. Now both the dating and customer have database tables that the beans are mapped to, and they both map correctly. Now I have set up a jdbc resource in the admin section
of jdbc/datingservice , I have captured the schema, hence the mapping, and set the JNDI name for both of the CMP customer and message beans to jdbc/datingservice. As well as this I have set a resurce ref to jdbc/datingservice for both beans.
Now I thought this was all I had to do, but apparently not. When I attempt to verify I get :
CustomerBean tests.ejb.runtime.cmpmappi
with an error message of :
For [ datingservice#ejb-jar-ic.j
Error: Exception [ JDO74033: Cannot deploy application 'datingservice' module 'ejb-jar-ic' with CMP beans: cmp-resource is not defined for this module. The minimum requirement for a cmp-resource is to specify the jndi-name of a jdbc-resource or a persistence-manager-factor
And:
MessageBean tests.ejb.runtime.cmpmappi
with an error of :
For [ datingservice#ejb-jar-ic.j
Error: Exception [ JDO74033: Cannot deploy application 'datingservice' module 'ejb-jar-ic' with CMP beans: cmp-resource is not defined for this module. The minimum requirement for a cmp-resource is to specify the jndi-name of a jdbc-resource or a persistence-manager-factor
Now I thought I had done everything I needed to, but I've probably missed something stupid.
Thanks for any reply Snip_face
Can you post the <cmp-resource> part of your ejb-jar.xml file?
ASKER
Now sorry, I'm new to j2ee, so just bear with me.
I went into the ejb-jar.xml and searched for the specific tag, but was unable to find it, so I'm just posting the bit relating to the jdbc ref I created, in the hope that it's possible relavent.
<resource-ref>
<res-ref-name>jdbc/datings ervice</re s-ref-name >
<res-type>javax.sql.DataSo urce</res- type>
<res-auth>Container</res-a uth>
<res-sharing-scope>Shareab le</res-sh aring-scop e>
</resource-ref>
Also I was wondering How to set JNDI name for an entity bean
Now I'm just using the Sun J2EE tools, which don't have ability to set the JNDI name of entity beans, only session beans. Thats is unless it is hidden away somewhere, as I follow the method for a session bean of going to the general tab->sun-specific settings then inputting the JNDI name, however the box is not present for entity beans.
Now I know that your able to set the JNDI name through the ejb-jar.xml file, but I thought that you would also be able to do it through the deploy tool.
Snip_face
I went into the ejb-jar.xml and searched for the specific tag, but was unable to find it, so I'm just posting the bit relating to the jdbc ref I created, in the hope that it's possible relavent.
<resource-ref>
<res-ref-name>jdbc/datings
<res-type>javax.sql.DataSo
<res-auth>Container</res-a
<res-sharing-scope>Shareab
</resource-ref>
Also I was wondering How to set JNDI name for an entity bean
Now I'm just using the Sun J2EE tools, which don't have ability to set the JNDI name of entity beans, only session beans. Thats is unless it is hidden away somewhere, as I follow the method for a session bean of going to the general tab->sun-specific settings then inputting the JNDI name, however the box is not present for entity beans.
Now I know that your able to set the JNDI name through the ejb-jar.xml file, but I thought that you would also be able to do it through the deploy tool.
Snip_face
ASKER
One thing I forgot to add, when I ran my ear file I didn't get the above two errors. Also another problem is ocassionly the webserver will refuse to start and the only thing that fixes it is a re-install of j2ee. Now I have my server log when I try and start and it fails:
Starting Sun Java System Application Server Platform Edition 8.0.0_01 (build b08-fcs) ...
[#|2004-09-08T01:23:38.620 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|C ORE5076: Using [Java HotSpot(TM) Client VM, Version 1.4.2_04] from [Sun Microsystems Inc.]|#]
[#|2004-09-08T01:23:39.214 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. tools.admi n|_ThreadI D=10;|ADM0 020:Follow ing is the information about the JMX MBeanServer used:|#]
[#|2004-09-08T01:23:39.354 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. tools.admi n|_ThreadI D=10;|ADM0 001:MBeanS erver initialized successfully|#]
[#|2004-09-08T01:23:41.121 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|Cr eating virtual server server|#]
[#|2004-09-08T01:23:41.137 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|S 1AS AVK Instrumentation disabled|#]
[#|2004-09-08T01:23:41.356 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core.secur ity|_Threa dID=10;|SE C1143: Loading policy provider com.sun.enterprise.securit y.provider .PolicyWra pper.|#]
[#|2004-09-08T01:23:42.748 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core.trans action|_Th readID=10; |JTS5014: Recoverable JTS instance, serverId = [100]|#]
[#|2004-09-08T01:23:43.514 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|S atisfying Optional Packages dependencies...|#]
[#|2004-09-08T01:23:43.655 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.resourc e.resource adapter|_T hreadID=10 ;|RAR7008 : Initialized monitoring registry and listeners|#]
[#|2004-09-08T01:23:44.093 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|C ORE5100:Lo ading system apps|#]
[#|2004-09-08T01:23:44.437 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core.class loading|_T hreadID=10 ;|LDR5010: All ejb(s) of [MEjbApp] loaded successfully!|#]
[#|2004-09-08T01:23:44.749 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. ejb|_Threa dID=10;|EJ B5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]|#]
[#|2004-09-08T01:23:44.749 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core.class loading|_T hreadID=10 ;|LDR5010: All ejb(s) of [__ejb_container_timer_app ] loaded successfully!|#]
[#|2004-09-08T01:23:44.937 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|WE B0302: Starting Tomcat.|#]
[#|2004-09-08T01:23:45.031 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|WE B0100: Loading web module [adminapp] in virtual server [server] at [/web1]|#]
[#|2004-09-08T01:23:45.109 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|WE B0100: Loading web module [admingui] in virtual server [server] at [/asadmin]|#]
[#|2004-09-08T01:23:45.109 +1000|WARN ING|sun-ap pserver-pe 8.0.0_01|j avax.enter prise.syst em.contain er.web|_Th readID=10; |WEB0500: default-locale attribute of locale-charset-info element has been deprecated and is being ignored. Use default-charset attribute of parameter-encoding element instead|#]
[#|2004-09-08T01:23:45.109 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|WE B0100: Loading web module [com_sun_web_ui] in virtual server [server] at [/com_sun_web_ui]|#]
[#|2004-09-08T01:23:45.125 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.cat alina.star tup.Embedd ed|_Thread ID=10;|Sta rting tomcat server|#]
[#|2004-09-08T01:23:45.125 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.cat alina.star tup.Embedd ed|_Thread ID=10;|Cat alina naming disabled|#]
[#|2004-09-08T01:23:45.187 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.cat alina.core .StandardE ngine|_Thr eadID=10;| Starting Servlet Engine: Sun-Java-System/Applicatio n-Server-P E-8.0|#]
[#|2004-09-08T01:23:46.954 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.cat alina.star tup.Contex tConfig|_T hreadID=10 ;|Missing application web.xml, using defaults only StandardEngine[server].Sta ndardHost[ server].St andardCont ext[]|#]
[#|2004-09-08T01:23:48.127 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.coy ote.http11 .Http11Pro tocol|_Thr eadID=10;| Initializi ng Coyote HTTP/1.1 on port 8080|#]
[#|2004-09-08T01:23:48.158 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.coy ote.http11 .Http11Pro tocol|_Thr eadID=10;| Starting Coyote HTTP/1.1 on port 8080|#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|or g.apache.c oyote.http 11.Http11P rotocol|_T hreadID=10 ;|Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:1043
at org.apache.tomcat.util.net .PoolTcpEn dpoint.ini tEndpoint( PoolTcpEnd point.java :260)
at org.apache.coyote.http11.H ttp11Proto col.init(H ttp11Proto col.java:1 44)
at org.apache.coyote.tomcat5. CoyoteConn ector.init ialize(Coy oteConnect or.java:13 50)
at org.apache.catalina.startu p.Embedded .start(Emb edded.java :991)
at com.sun.enterprise.web.Web Container. start(WebC ontainer.j ava:490)
at com.sun.enterprise.web.PEW ebContaine r.startIns tance(PEWe bContainer .java:506)
at com.sun.enterprise.web.PEW ebContaine rLifecycle .onStartup (PEWebCont ainerLifec ycle.java: 54)
at com.sun.enterprise.server. Applicatio nServer.on Startup(Ap plicationS erver.java :295)
at com.sun.enterprise.server. PEMain.run (PEMain.ja va:220)
at com.sun.enterprise.server. PEMain.mai n(PEMain.j ava:172)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:32 4)
at org.apache.commons.launche r.ChildMai n.run(Chil dMain.java :269)
|#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|ja vax.enterp rise.syste m.core|_Th readID=10; |Service com.sun.enterprise.web.PEW ebContaine rLifecycle @c77c8 cannot be started! : com.sun.appserv.server.Ser verLifecyc leExceptio n: WEB0105: An error occurred while starting the web container|#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|ja vax.enterp rise.syste m.core|_Th readID=10; |CORE5071: An error occured during initialization
com.sun.appserv.server.Ser verLifecyc leExceptio n: WEB0105: An error occurred while starting the web container
at com.sun.enterprise.web.PEW ebContaine r.startIns tance(PEWe bContainer .java:515)
at com.sun.enterprise.web.PEW ebContaine rLifecycle .onStartup (PEWebCont ainerLifec ycle.java: 54)
at com.sun.enterprise.server. Applicatio nServer.on Startup(Ap plicationS erver.java :295)
at com.sun.enterprise.server. PEMain.run (PEMain.ja va:220)
at com.sun.enterprise.server. PEMain.mai n(PEMain.j ava:172)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:32 4)
at org.apache.commons.launche r.ChildMai n.run(Chil dMain.java :269)
Caused by: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:1043
at org.apache.coyote.tomcat5. CoyoteConn ector.init ialize(Coy oteConnect or.java:13 52)
at org.apache.catalina.startu p.Embedded .start(Emb edded.java :991)
at com.sun.enterprise.web.Web Container. start(WebC ontainer.j ava:490)
at com.sun.enterprise.web.PEW ebContaine r.startIns tance(PEWe bContainer .java:506)
... 9 more
|#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|ja vax.enterp rise.syste m.core|_Th readID=10; |Server Startup failed. Exiting...|#]
[#|2004-09-08T01:23:48.236 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|S erver shutdown in progress...|#]
[#|2004-09-08T01:23:48.236 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. web|_Threa dID=10;|WE B0303: Stopping Tomcat.|#]
[#|2004-09-08T01:23:48.236 +1000|INFO |sun-appse rver-pe8.0 .0_01|org. apache.coy ote.http11 .Http11Pro tocol|_Thr eadID=10;| Stoping http11 protocol on 8080 server:type=ThreadPool,nam e=http8080 |#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|or g.apache.c oyote.tomc at5.Coyote Connector| _ThreadID= 10;|Coyote connector has not been started|#]
[#|2004-09-08T01:23:48.236 +1000|SEVE RE|sun-app server-pe8 .0.0_01|or g.apache.c oyote.tomc at5.Coyote Connector| _ThreadID= 10;|Coyote connector has not been started|#]
[#|2004-09-08T01:23:48.283 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|C ORE5051: Shutting down all J2EE applications ...|#]
[#|2004-09-08T01:23:48.283 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. container. ejb|_Threa dID=10;|EJ B5122:EJB Timer Service shutdown at [2004/09/08 01:23:48]|#]
[#|2004-09-08T01:23:48.283 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=10;|C ORE5052: Application shutdown complete.|#]
[#|2004-09-08T01:23:48.377 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.resourc e.jms|_Thr eadID=10;| JMS5023: JMS service successfully started. Instance Name = imqbroker, Home = [C:\Sun\AppServer\imq\bin] .|#]
[#|2004-09-08T01:23:48.377 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.resourc e.jms|_Thr eadID=10;| JMS5025: JMS service shutting down.|#]
[#|2004-09-08T01:23:49.847 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.resourc e.jms|_Thr eadID=10;| JMS5026: JMS service shutdown complete.|#]
[#|2004-09-08T01:23:49.847 +1000|SEVE RE|sun-app server-pe8 .0.0_01|ja vax.enterp rise.syste m.core|_Th readID=10; |Server stopped due to Server startup failure.|#]
[#|2004-09-08T01:23:49.847 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=11;|s ending notification to server...server|#]
[#|2004-09-08T01:23:49.847 +1000|INFO |sun-appse rver-pe8.0 .0_01|java x.enterpri se.system. core|_Thre adID=11;|S erver shutdown complete.|#]
Starting Sun Java System Application Server Platform Edition 8.0.0_01 (build b08-fcs) ...
[#|2004-09-08T01:23:38.620
[#|2004-09-08T01:23:39.214
[#|2004-09-08T01:23:39.354
[#|2004-09-08T01:23:41.121
[#|2004-09-08T01:23:41.137
[#|2004-09-08T01:23:41.356
[#|2004-09-08T01:23:42.748
[#|2004-09-08T01:23:43.514
[#|2004-09-08T01:23:43.655
[#|2004-09-08T01:23:44.093
[#|2004-09-08T01:23:44.437
[#|2004-09-08T01:23:44.749
[#|2004-09-08T01:23:44.749
[#|2004-09-08T01:23:44.937
[#|2004-09-08T01:23:45.031
[#|2004-09-08T01:23:45.109
[#|2004-09-08T01:23:45.109
[#|2004-09-08T01:23:45.109
[#|2004-09-08T01:23:45.125
[#|2004-09-08T01:23:45.125
[#|2004-09-08T01:23:45.187
[#|2004-09-08T01:23:46.954
[#|2004-09-08T01:23:48.127
[#|2004-09-08T01:23:48.158
[#|2004-09-08T01:23:48.236
java.net.BindException: Address already in use: JVM_Bind:1043
at org.apache.tomcat.util.net
at org.apache.coyote.http11.H
at org.apache.coyote.tomcat5.
at org.apache.catalina.startu
at com.sun.enterprise.web.Web
at com.sun.enterprise.web.PEW
at com.sun.enterprise.web.PEW
at com.sun.enterprise.server.
at com.sun.enterprise.server.
at com.sun.enterprise.server.
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.commons.launche
|#]
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
com.sun.appserv.server.Ser
at com.sun.enterprise.web.PEW
at com.sun.enterprise.web.PEW
at com.sun.enterprise.server.
at com.sun.enterprise.server.
at com.sun.enterprise.server.
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.commons.launche
Caused by: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:1043
at org.apache.coyote.tomcat5.
at org.apache.catalina.startu
at com.sun.enterprise.web.Web
at com.sun.enterprise.web.PEW
... 9 more
|#]
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.236
[#|2004-09-08T01:23:48.283
[#|2004-09-08T01:23:48.283
[#|2004-09-08T01:23:48.283
[#|2004-09-08T01:23:48.377
[#|2004-09-08T01:23:48.377
[#|2004-09-08T01:23:49.847
[#|2004-09-08T01:23:49.847
[#|2004-09-08T01:23:49.847
[#|2004-09-08T01:23:49.847
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.