-
1. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 9:46 AM (in response to matt_hannay)I am still getting some deployment problems
See attached??
I have also upgraded to jboss3.0RC3
I have 2 beans with a unidirectional M->1 relationship
i.e players->team
I have deployed each of the EJB in seperate jars.
the team bean deplys fine (but the jbosscmp-jdbc.xml
file is as per the xml in the CMP workbook)
the player bean gives the error as in the capture.log
and below. (The jbosscmp-jdbc.xml is as per the jbosscmp-jdbc_3_0.dtd)
I can deploy the beans with out relation ships and query/update the database, no worries.
2002-05-21 23:24:23,942 DEBUG [org.jboss.system.ServiceController] removing service: jboss.j2ee:service=EJB,jndiName=MLBTeamBean
2002-05-21 23:24:23,943 DEBUG [org.jboss.system.ServiceController] no need to remove jboss.j2ee:service=EJB,jndiName=MLBTeamBean from server
2002-05-21 23:24:23,943 INFO [org.jboss.ejb.EjbModule] Remove JSR-77 EJB Module: jboss.management.single:J2EEApplication= ,J2EEServer=Single,j2eeType=EJBMo
dule,name=mlbPlayer.jar
2002-05-21 23:24:23,945 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] preDeregister(), parent: jboss.management.single:J2EEServer=Single,name=
2002-05-21 23:24:23,946 ERROR [org.jboss.ejb.EjbModule] Initialization failed
org.jboss.deployment.DeploymentException: Atleast one role of a foreign-key mapped relationship must have key fields: ejb-relation-name=player-team
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:316)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:325)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:67)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:602)
What am I still doing wrong ???
Matt -
2. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 9:47 AM (in response to matt_hannay)The files
-
3. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
timfox May 21, 2002 11:06 AM (in response to matt_hannay)Hi matt
I have had this problem too.
The examples in the cmp workbook are well out of date- I have found it's best to ignore them and work from the latest dtds now. -
4. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 6:14 PM (in response to matt_hannay)All the DTD's now confirm too the new DTD, but
I am still getting the same Exception -
5. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 7:05 PM (in response to matt_hannay)I have an entity bean drployed to jboss3.0RC3
I could deploy it with the old DTD now I use the
new DTD and get the following NullPointerExceptions
2002-05-22 09:00:55,031 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.MLBTeamBean] Loading standardjbosscmp-jdbc.xml : file:/homes/odin3/matthewh/j
boss-3.0.0RC3_tomcat-4.0.3/server/default/conf/standardjbosscmp-jdbc.xml
2002-05-22 09:00:55,226 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.MLBTeamBean] jar:file:/homes/odin3/matthewh/jboss-3.0.0RC3_tomcat-4.0.3/serve
r/default/tmp/deploy/server/default/deploy/mlbTeam.jar/109.mlbTeam.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
2002-05-22 09:00:55,233 ERROR [org.jboss.metadata.XmlFileLoader] java.lang.NullPointerException:-1:2
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:260)
I do not have any empty fields in the xml. -
6. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 7:06 PM (in response to matt_hannay)The xml files:
-
7. Re: EJB 2.0 CMP and jbosscmp-jdbc.xml
matt_hannay May 21, 2002 9:11 PM (in response to matt_hannay)Any Idears!! I have none! other than jboss may not be pharsing the xml file to the DTD.