Solved

J2EE cmp mapping errors verifier errors

Posted on 2004-09-04
6
388 Views
Last Modified: 2013-11-24
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.cmpmapping.ASCmpMappingTest      FAILED

with an error message of  :

For [ datingservice#ejb-jar-ic.jar#MessageBean ]
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-factory-resource to be used with the beans. ] while initializing JDOCodeGenerator. Please check your descriptors and mapping files for consistency



And:

MessageBean      tests.ejb.runtime.cmpmapping.ASCmpMappingTest      FAILED

with an error of :

For [ datingservice#ejb-jar-ic.jar#CustomerBean ]
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-factory-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
0
Comment
Question by:snip_face
  • 2
  • 2
6 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11989617
Can you post the <cmp-resource> part of your ejb-jar.xml file?
0
 

Author Comment

by:snip_face
ID: 11997630
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/datingservice</res-ref-name>
   <res-type>javax.sql.DataSource</res-type>    
   <res-auth>Container</res-auth>          
   <res-sharing-scope>Shareable</res-sharing-scope>      
 </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

0
 

Author Comment

by:snip_face
ID: 11997772
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-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.4.2_04] from [Sun Microsystems Inc.]|#]

[#|2004-09-08T01:23:39.214+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0020:Following is the information about the JMX MBeanServer used:|#]

[#|2004-09-08T01:23:39.354+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.tools.admin|_ThreadID=10;|ADM0001:MBeanServer initialized successfully|#]

[#|2004-09-08T01:23:41.121+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|Creating virtual server server|#]

[#|2004-09-08T01:23:41.137+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|S1AS AVK Instrumentation disabled|#]

[#|2004-09-08T01:23:41.356+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.security|_ThreadID=10;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2004-09-08T01:23:42.748+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=10;|JTS5014: Recoverable JTS instance, serverId = [100]|#]

[#|2004-09-08T01:23:43.514+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Satisfying Optional Packages dependencies...|#]

[#|2004-09-08T01:23:43.655+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=10;|RAR7008 : Initialized monitoring registry and listeners|#]

[#|2004-09-08T01:23:44.093+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5100:Loading system apps|#]

[#|2004-09-08T01:23:44.437+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [MEjbApp] loaded successfully!|#]

[#|2004-09-08T01:23:44.749+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=10;|EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]|#]

[#|2004-09-08T01:23:44.749+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!|#]

[#|2004-09-08T01:23:44.937+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0302: Starting Tomcat.|#]

[#|2004-09-08T01:23:45.031+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [adminapp] in virtual server [server] at [/web1]|#]

[#|2004-09-08T01:23:45.109+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: Loading web module [admingui] in virtual server [server] at [/asadmin]|#]

[#|2004-09-08T01:23:45.109+1000|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=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-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0100: 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-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Starting tomcat server|#]

[#|2004-09-08T01:23:45.125+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.Embedded|_ThreadID=10;|Catalina naming disabled|#]

[#|2004-09-08T01:23:45.187+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.core.StandardEngine|_ThreadID=10;|Starting Servlet Engine: Sun-Java-System/Application-Server-PE-8.0|#]

[#|2004-09-08T01:23:46.954+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.catalina.startup.ContextConfig|_ThreadID=10;|Missing application web.xml, using defaults only StandardEngine[server].StandardHost[server].StandardContext[]|#]

[#|2004-09-08T01:23:48.127+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Initializing Coyote HTTP/1.1 on port 8080|#]

[#|2004-09-08T01:23:48.158+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Starting Coyote HTTP/1.1 on port 8080|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:1043
      at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:260)
      at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:144)
      at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1350)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:991)
      at com.sun.enterprise.web.WebContainer.start(WebContainer.java:490)
      at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:506)
      at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
      at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:295)
      at com.sun.enterprise.server.PEMain.run(PEMain.java:220)
      at com.sun.enterprise.server.PEMain.main(PEMain.java:172)
      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.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Service com.sun.enterprise.web.PEWebContainerLifecycle@c77c8 cannot be started! : com.sun.appserv.server.ServerLifecycleException: WEB0105: An error occurred while starting the web container|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5071: An error occured during initialization
com.sun.appserv.server.ServerLifecycleException: WEB0105: An error occurred while starting the web container
      at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:515)
      at com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
      at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:295)
      at com.sun.enterprise.server.PEMain.run(PEMain.java:220)
      at com.sun.enterprise.server.PEMain.main(PEMain.java:172)
      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.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:1043
      at org.apache.coyote.tomcat5.CoyoteConnector.initialize(CoyoteConnector.java:1352)
      at org.apache.catalina.startup.Embedded.start(Embedded.java:991)
      at com.sun.enterprise.web.WebContainer.start(WebContainer.java:490)
      at com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:506)
      ... 9 more
|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Server Startup failed. Exiting...|#]

[#|2004-09-08T01:23:48.236+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Server shutdown in progress...|#]

[#|2004-09-08T01:23:48.236+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=10;|WEB0303: Stopping Tomcat.|#]

[#|2004-09-08T01:23:48.236+1000|INFO|sun-appserver-pe8.0.0_01|org.apache.coyote.http11.Http11Protocol|_ThreadID=10;|Stoping http11 protocol on 8080 server:type=ThreadPool,name=http8080|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|org.apache.coyote.tomcat5.CoyoteConnector|_ThreadID=10;|Coyote connector has not been started|#]

[#|2004-09-08T01:23:48.236+1000|SEVERE|sun-appserver-pe8.0.0_01|org.apache.coyote.tomcat5.CoyoteConnector|_ThreadID=10;|Coyote connector has not been started|#]

[#|2004-09-08T01:23:48.283+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5051: Shutting down all J2EE applications ...|#]

[#|2004-09-08T01:23:48.283+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=10;|EJB5122:EJB Timer Service shutdown at [2004/09/08 01:23:48]|#]

[#|2004-09-08T01:23:48.283+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|CORE5052: Application shutdown complete.|#]

[#|2004-09-08T01:23:48.377+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5023: JMS service successfully started. Instance Name = imqbroker, Home = [C:\Sun\AppServer\imq\bin].|#]

[#|2004-09-08T01:23:48.377+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5025: JMS service shutting down.|#]

[#|2004-09-08T01:23:49.847+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.resource.jms|_ThreadID=10;|JMS5026: JMS service shutdown complete.|#]

[#|2004-09-08T01:23:49.847+1000|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=10;|Server stopped due to Server startup failure.|#]

[#|2004-09-08T01:23:49.847+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|sending notification to server...server|#]

[#|2004-09-08T01:23:49.847+1000|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.core|_ThreadID=11;|Server shutdown complete.|#]

0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 12003768
> java.net.BindException: Address already in use: JVM_Bind:1043

This means that you are trying to run a service in a port that is already used by another service. This usually happens when you try to run the same programme twice, or another one that listens to the same port.

For the other problem you have, you have to define a <cmp-resource> part. Take a look at this link:

http://forum.java.sun.com/thread.jsp?thread=518110&forum=136&message=2473009
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now