10 Replies Latest reply on Jul 6, 2010 8:43 PM by snjeza

    Problem with Jboss Tools Maven

    arissonleal

      Hi,

       

      I created a seam maven project following this link http://relation.to/Bloggers/UsingMavenWithJBossTools, but when a deploy the project it makes a messy with the libs.

       

      In my project deployed at jboss AS, the libs appear this way /lib/lib/richfaces-api-3.3.1.GA. When I start the Jboss AS he can't find the path for libs and don't up the project.

       

      If i change all libs for /lib/* every thing works fine.

       

      Is this a bug with Jboss Tools eclipse plugin?

       

      environment:

      eclipse-jee-galileo-SR2-win32

      Jboss tools 3.1 stable release

      m2eclipse 0.10

        • 1. Re: Problem with Jboss Tools Maven
          snjeza

          This issue is caused by a Webtools 3.1.2 bug. You should install a patch using http://download.eclipse.org/webtools/updates/ (Patches 2010 04 13). You can also download this patch from http://download.eclipse.org/webtools/patches/drops/R3.1.2/P-3.1.2-20100423061036/.

          • 2. Re: Problem with Jboss Tools Maven
            arissonleal

            Hi Snjezana Peco,

             

            Thanks for your answer, but don't work.

             

            With a clean eclipse I installed the Patch you said, after I installed the m2eclipse plugin and jboss tools, but the problem persist. Now I still have /lib/lib folders and it duplicate all jars.

             

            Any clue?

             

            Thanks.

            • 3. Re: Problem with Jboss Tools Maven
              snjeza

              I only can reproduce the issue when the patch isn't installed. Check if you have installed the correct patch (Help>About Eclipse>Installation Details).

              The patched features are shown in the attached screenshot.

              wtppatch.png

              • 4. Re: Problem with Jboss Tools Maven
                arissonleal

                Thanks for your attention Snjezana Peco.

                 

                Look my eclipse Installation Details:

                eclipse.jpg

                My ear project libs with /lib/lib folders and duplicate jars:

                libs.jpg

                • 5. Re: Problem with Jboss Tools Maven
                  snjeza

                  Can you reproduce the issue when creating a new project or importing any project example?

                  If you are using an existing project, it is possible that the project contains an invalid settings that you have to correct manually.

                  • 6. Re: Problem with Jboss Tools Maven
                    sanches
                    Hello Snjezana,
                    I've got similar problem with multiple nested lib directories with Eclipse Galileo 3.5.2.
                    Luckily, I found your message and resolved it with  (Patches 2010 04 13). btw, I clicked Maven -> Update project settings to fix the issue with nested lib dirs.
                    However, another problem still hasn't gone with that patch:
                    For the project which should compose EAR file, eclipse generates META-INF/application.xml which is rather different from the one built by pure maven command-line. And that one generated and deployed by eclipse can not be recognized by jboss-5.1.0.GA. Stack trace:
                    18:36:04,769 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss/jboss-5.1.0.GA/server/standard/deploy/lightear.ear/ state=PreReal mode=Manual requiredState=Real
                    org.jboss.deployers.spi.DeploymentException: Error deploying lightear.ear: failed to initialize bean container
                    at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
                    at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
                    at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
                    at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                    at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                    at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                    at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
                    at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
                    at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
                    at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                    at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                    at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                    at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                    at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                    at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
                    at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
                    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
                    at org.jboss.Main.boot(Main.java:221)
                    at org.jboss.Main$1.run(Main.java:556)
                    at java.lang.Thread.run(Thread.java:619)
                    Caused by: java.lang.RuntimeException: failed to initialize bean container
                    at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:257)
                    at org.jboss.ejb3.mdb.MessagingContainer.<init>(MessagingContainer.java:87)
                    at org.jboss.ejb3.mdb.MDB.<init>(MDB.java:63)
                    at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:339)
                    at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:218)
                    at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:734)
                    at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:685)
                    at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:667)
                    at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:630)
                    at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:507)
                    at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
                    ... 33 more
                    Caused by: java.lang.IllegalStateException: Null beannMetaData
                    at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
                    at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
                    at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
                    at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
                    at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:195)
                    at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:253)
                    ... 43 more
                    Caused by: java.lang.NullPointerException
                    at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268)
                    ... 48 more
                    18:36:04,898 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                    Normally, Maven generates following content for application.xml:
                    ...
                      <module>
                        <ejb>environment.jar</ejb>
                      </module>
                    ...
                    (and appropriate directory structure)
                    But fresh installed eclipse galileo plus JBoss Tools 3.1 :: Eclipse 3.5.2 generates different one:
                    ...
                      <module>
                        <ejb>environment-1.0-SNAPSHOT.ejb</ejb>
                      </module>
                    ...
                    Differences:
                    1) "-1.0-SNAPSHOT" is appended
                    2) .ejb extension is instead of .jar
                    Deployed on the server directory also contains folders named ...-1.0-SNAPSHOT.ejb
                    As a result of such deployment descriptor+directory structure, Jboss can not recognize deployment and throws exception (above)
                    Is this also known problem?
                    Thanks,
                    Alexander.
                    • 7. Re: Problem with Jboss Tools Maven
                      snjeza

                      That issue is related to the m2eclipse wtp integration.

                      I have created a patch, but it isn't applied yet. See https://jira.jboss.org/browse/JBIDE-4809

                      • 8. Re: Problem with Jboss Tools Maven
                        sanches

                        Thank you, Snjezana.

                        
                        

                        The workaround mentioned by Fred Bricon

                        <bundleFileName>ejb-{project.version}.jar</bundleFileName>

                        did not work for me although.

                        Maven itself respects parameter bundleFileName, but eclipse's deployer - does not... even with recently updated Maven Integration for Eclipse 0.10.2 .20100623 from Sonatype, Inc.

                        Looks like https://issues.sonatype.org/browse/MNGECLIPSE-2155 is fixed and closed already.

                        
                        

                        Is there any way to apply it for eclipse Galileo?

                        • 9. Re: Problem with Jboss Tools Maven
                          arissonleal

                          Hi Snjezana Peco,

                           

                          In the ear project "Properties > Module Assembly", still shows messed libraries like the image I posted before, but it deployed in the Jboss AS correctly.

                           

                          I created a new project and worked fine.

                           

                          Thanks for your attention.

                          • 10. Re: Problem with Jboss Tools Maven
                            snjeza

                            Alexander Lengson wrote:

                             

                            Thank you, Snjezana.

                             

                             

                            The workaround mentioned by Fred Bricon

                            <bundleFileName>ejb-{project.version}.jar</bundleFileName>

                            did not work for me although.

                            Maven itself respects parameter bundleFileName, but eclipse's deployer - does not... even with recently updated Maven Integration for Eclipse 0.10.2 .20100623 from Sonatype, Inc.

                             

                            Looks like https://issues.sonatype.org/browse/MNGECLIPSE-2155 is fixed and closed already.

                             

                             

                            Is there any way to apply it for eclipse Galileo?

                            You can build m2eclipse-wtp from git. See http://m2eclipse.sonatype.org/project-information.html. M2eclipse-core 0.10.2 is compatible with Galileo.