4 Replies Latest reply on Apr 26, 2007 10:46 AM by James Smith

    JBOSS-IDE and XDoclet

    Russ Newbie

      I am using Eclipse 3.2M3, JBossIDE-1.5RC2-ALL, xdoclet-1.2.3 on JBOSS4.03.SP1. I am running JDK 1.5.0Update6.

      I am following the JBOSS-IDE Tutorial. I have created the project as a J2EE 1.4 project instead of a J2EE1.3 project. I am attempting to deploy the Fibo application but something in the deployment descriptors is not there and JBOSS is complaining with the below error:


      [13:23:49,703] [INFO ] [TomcatDeployer] deploy, ctxPath=/fibo, warUrl=.../tmp/deploy/tmp22081FiboApp.ear-contents/FiboWeb-exp.war/
      [13:23:49,703] [WARN ] [ServiceController] Problem starting service jboss.web.deployment:war=FiboWeb.war,id=-1183325481
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-ref: ejb/Fibo, no ejb-link in web.xml and no jndi-name in jboss-web.xml)
      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:366)


      Is there something else that I need to add to the XDoclet configuration or do I have handle this manually?

      Any suggestions or feddback will be greatly appreciated.

      Thank you for reading my post.

      Russ

        • 1. Re: JBOSS-IDE and XDoclet
          Russ Newbie

          okay I figured one out, the Xdoclet tag @web.ejb-ref was missing one attribute "link" so I fixed it. The second issue appears the JBOSS-IDE is not reading the @jboss.ejb-ref tag in the servlet.

          Any suggestions?

          • 2. Re: JBOSS-IDE and XDoclet
            Russ Newbie

            I am still for some reason getting the error:


            [2005-12-31 14:38:42,500] [DEBUG] [org.jboss.web.WebModule] Starting failed jboss.web.deployment:war=FiboWeb.war,id=-1773394649
            org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-ref: ejb/Fibo, no ejb-link in web.xml and no jndi-name in jboss-web.xml)
            at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:366)


            Caused by: javax.naming.NamingException: ejb-ref: ejb/Fibo, no ejb-link in web.xml and no jndi-name in jboss-web.xml
            at org.jboss.web.AbstractWebDeployer.linkEjbRefs(AbstractWebDeployer.java:668)



            When i go look at the jboss-web.xml, the file is there but nothing is inside it other than the header and the tag

            <jboss-web>
            
             <!-- Resource Environment References -->
             <!--
             For additional resouce-env-ref tags add a merge file called jbossweb-resource-env-ref.xml
             -->
            
             <!-- Resource references -->
             <!--
             For additional resouce-ref tags add a merge file called jbossweb-resource-ref.xml
             -->
            
             <!-- EJB References -->
             <!--
             For additional ejb-ref tags add a merge file called jbossweb-ejb-ref.xml
             -->
            
             <!-- EJB Local References -->
            </jboss-web>
            



            When I look at the web.xml file, i see the link is making it.

            
            <ejb-ref >
             <description><![CDATA[Reference to the Fibo EJB]]></description>
             <ejb-ref-name>ejb/Fibo</ejb-ref-name>
             <ejb-ref-type>Session</ejb-ref-type>
             <home>jboss.tutorial.interfaces.FiboHome</home>
             <remote>jboss.tutorial.interfaces.Fibo</remote>
             <ejb-link>ejb/Fibo</ejb-link>
             </ejb-ref>
            



            Any suggestions would be appreciated.

            Russ

            • 3. Re: JBOSS-IDE and XDoclet
              Russ Newbie

              Happy New Year! Well it's the New Year some place. :-)

              Okay I figured it out. Several things were going on

              1) The build script was building jars, ear, war files, but for some reason it was not moving them to the bin directory. I still don't know why this is, but the information was being read from the bin directory; therefore, I still was getting the same error even after I fixed the deployment descriptors.

              2) The packaging build.xml did not have the correct information. I deleted it all and started over. This worked fine when I re-built the project.


              It is deploying properly now. This was a very good tutorial.

              • 4. Re: JBOSS-IDE and XDoclet
                James Smith Newbie

                Hi russray,

                I'm having the exact same problem as you, only with the 2.0 Beta2 version of the jboss tools.

                I added the link attribute as link= "ejb/Fibo" as you suggested and rebuilt but nothing happened :(

                I added:

                <ejb-ref>
                <ejb-ref-name>ejb/Fibo</ejb-ref-name>
                <jndi-name>ejb/Fibo</jndi-name>
                </ejb-ref>

                to jboss-web.xml, re-ran the packaging and this solved the problem.

                However.. did you find a way to make it work using xdoclet rather than hacking the .xml files? And did you figure out why it didn't work in the first place?

                Thanks in advance,

                James