6 Replies Latest reply on Aug 6, 2002 6:25 PM by dsundstrom

    XDoclet and JBoss 3.0.0 RC1

    mozer

      Hi.

      I'm having problems deploying CMR stuff on JBoss 3.0.0 RC1 with an XDoclet-generated jbosscmp-jdbc.xml. Looking through the forums, it seems that substantial changes have been made to the DTD of jbosscmp-jdbc.xml, so the file that XDoclet 1.1.2 generates is no longer valid. Is this correct?

      And if so, does anyone know how far off support for the new DTD in XDoclet is?

      Specifically, the error given by JBoss during deployment looks like this:

      14:10:34,628 ERROR [EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Atleast one role of a foreign-key mapped relationship must have key fields: ejb-relation-name=technical-location
      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:595)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java:322)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:155)


      /Peter

        • 1. Re: XDoclet and JBoss 3.0.0 RC1
          davidjencks

          I thought this was fixed in 1.1.2, I'm pretty sure it is fixed in xdoclet cvs and the xdoclet/xjavadoc binary in jboss cvs. I think I added a tag to suppress these empty elements, and I think someone else made another fix. You might look in the xdoclet templates.

          • 2. Re: XDoclet and JBoss 3.0.0 RC1
            mozer

            Hmm...I compared my generated xml to the DTD online, and the xml was definitely wrong.

            I tried substituting the xdoclet.jar that ant uses ($ANT_HOME/lib/xdoclet.jar) with the one from the jboss cvs, but then ant complained about a missing EjbDocletTask class. Still, if I list the contents of the cvs version of xdoclet.jar, the class is, of course, there. Is there some sort of dependency problem that stops me from simply switching xdoclet jars?

            /Peter

            • 3. Re: XDoclet and JBoss 3.0.0 RC1
              aguevara

              try adding xjavadoc.jar the the classpath, with the new xdoclet that file is required for the ejbdoclet task

              • 4. Re: XDoclet and JBoss 3.0.0 RC1
                aguevara

                hi...

                adding xjavadoc.jar worked for me, well at least xdoclet ran, but still I'm getting the same error you pointed out previusly when deploying the beans.

                • 5. Re: XDoclet and JBoss 3.0.0 RC1

                  Peter - did you get over this - I am having exactly the same problem on HEAD with a 1-N unidirectional relationship and whatever version of xdoclet is in HEAD.

                  I think it looks like xdoclet just failing to insert a key-field in jbosscmp-jdbc.xml, but cannot find a tag that will do it.

                  I would be very grateful to hear if you had any luck.

                  The test programs seem to do it, but I cannot isolate whatever it is that they are doing....

                  Jules

                  P.S.

                  Just to complicate matters (and possibly the cause of my problem) is the fact that the Object on the 1 side of the realationship has a complex key.

                  Maybe I will make it a simple key and see if that works...

                  • 6. Re: XDoclet and JBoss 3.0.0 RC1
                    dsundstrom

                    I have been using XDoclet cvs HEAD, and all of these wierd problems seem to have gone away.