1 2 3 4 Previous Next 49 Replies Latest reply on Jun 3, 2008 9:36 AM by whitty69 Go to original post
      • 15. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
        rob.stryker

        Still looking into this. It seems the code here has not changed between versions (somewhat obviously)... so I'm not sure how deep this goes. Will continue debugging.

        • 16. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
          rob.stryker

          IVirtualComponent component = ComponentCore.createComponent(p);
          IVirtualReference[] references = component.getReferences();
          System.out.println(references.length + " references");

          Under 2.0.1 this returns 9, under 2.0.2 this returns 0. Just keeping users up to date while I debug in case someone has any further info.

          • 17. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
            rob.stryker

            I just wanted to keep you up to date so you know whats going on.

            My last comment was wrong. That part was giving me problems, but that wasn't the root cause at all. The real killer here is that JEEFlexProjDeployable has changed *SUBSTANTIALLY* between 2.0.1 and 2.0.2. This is the class that converts a flexible project into a module and allows you to get the resources tree for a module.

            I suspect such a large change was not supposed to occur, but I'm not sure.

            The eclipse bug is opened, and it's about as hectic and disorganized as my posts here are ;)

            https://bugs.eclipse.org/bugs/show_bug.cgi?id=222518

            • 18. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
              mvidal0001

              Hi

              What is the best way to keep moving on with this problem ?

              • 19. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                erimag

                Nice work, Rob! Following this with interest....

                • 20. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                  maxandersen

                  mvidal - use Eclipse 3.2.1/WTP 2.0.1 instead of the latest one.

                  There might be another workaround in form of adding the missing jars to the manifest.mf of the jars that uses them (e.g. the War) . But I haven't verifed this yet.

                  • 21. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                    rob.stryker

                    http://jira.jboss.org/jira/browse/JBIDE-1862 - a workaround exists ;)

                    Remove the module tags for the missing jars in the application.xml. You may need to close / re-open or unpublish / republish the ear project right after making these changes.

                    This is not a full solution, though, as it doesn't allow the module tags to remain if the user wants them there ;)

                    • 22. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                      donatas

                      I have stumbled upon this bug too. IMHO putting libraries as modules into application.xml breaks Java EE specification compatibility.
                      Java EE 5 specification (page 152) defines four module types: web, ejb, application client and resource adapter. Libraries, commonly used in ejb and/or web modules may be placed in ear file, but they *are not* modules.

                      Libraries should be dealt this way (Java EE 5 specification page 167):

                      ...
                      c. A directory named lib is considered to be the library directory, as described in Section EE.8.2.1, “Bundled Libraries.â€�
                      d.For all files in the application package with a filename extension of .jar, but not contained in the lib directory, do the following:
                      i. If the JAR file contains a META-INF/MANIFEST.MF file with a Main-Class attribute, or contains a META-INF/application-client.xml file, consider the JAR file to be an application client module.
                      ii. If the JAR file contains a META-INF/ejb-jar.xml file, or contains any class with an EJB component annotation (Stateless, etc.), consider the JAR file to be an EJB module.
                      iii. All other JAR files are ignored unless referenced by a JAR file discovered above using one of the JAR file reference mechanisms such as the Class-Path header in a manifest file.

                      If deleting tags "modules" with libraries solves the issue, this means, that bug is not with WTP, but with JBoss Tools implementation. Libraries must not be placed within tags "module".

                      • 23. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool

                        Did anybody have ever test create project after you started JBoss AS?

                        For me, the project was deploy successfull in the first time but when i restart server, it cann't deploy anymore unless remove some jar from application.xml

                        I just curious why when i start JBoss AS before creating project, it deploy success?

                        • 24. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                          maxandersen

                          donatsec - it really is a bug in WTP no matter how we fix our application.xml. What if you have an external WAR or JAR module in your EAR that is not an WTP project - then it would not get deployed.

                          nat_tul - most likely because WTP's model haven't at that time picked up the application.xml lines and does not "hide" the jars from the deployer.

                          In any case, we are working with the WTP guys on figuring out a workaround plus future fix.

                          • 25. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool

                            BTW jboss-seam.jar is a JEE module (contains ejb-jar.xml) so it should be deployable when specified in application.xml as an ejb moidule but it doesn't

                            • 26. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool

                              I tried generating a new project using the new seam wizard and discovered the numerous errors described in these postings.
                              I was able to make the deployed application work by copying from another previously deployed seam-gen application.
                              That is, I copied from a working deployed source [JBOSS_HOME]/server/default/deploy/absences.ear
                              to the newly generated project as deployed to jboss at [JBOSS_HOME]/server/default/deploy/seamTests-ear.ear

                              1. Manually copy jboss-seam.jar from absences.ear to seamTests-ear.ear
                              2. Manually copy the jars from within absences.ear/lib to seamTests-ear.ear (not within a lib sub-folder)
                              3. Manually copy the images files from within absences.ear/absences.war/img to seamTests-ear.ear/seamTests.war/img (these files are either corrupted or not deployed at all)

                              There were also a few relative URL references that needed changing due to the rather different layout of the newly generated folders. This affected my custom skin properties and references to graphics in the img folder.

                              The seamTests application then works. However, as soon as I make a change in eclipse or start the server from within eclipse, it undoes ALL of the above 3 steps as it re-dploys.

                              I don't know if any of this is helpful to those who are capable of working on the problem but here it is just in case.

                              ===================

                              I also tried generating a seamTests as a WAR rather than as an EAR.
                              The resulting application failed on an error while reading WEB-INF/components.xml:
                              Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                              That class is coorrectly defined as a listener in web.xml and all of the seam jars seem to be present in WEB-INF/lib

                              Another oddity: The WEB-INF/classes folder contained a java source file Authenticator.java instead of Authenticator.class

                              Anyway, I guess I'll stick with SEAM-GEN for now until this is resolved.

                              Good luck to the hard workers who are trying to fix this !
                              (And thanks)

                              • 27. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                                maxandersen

                                Matteg - yes what you describe is what is caused by the regression bug in wtp 2.0.2.

                                Hence for now we can only recommend to use WTP 2.0.1 since it does not have this bug.

                                • 28. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                                  ziphyre

                                  There is a new patch on the WTP page addressing this issue.

                                  http://download.eclipse.org/webtools/patches/

                                  And a question. I didn't install a patch manually before. So just unzipping in the eclipse folder is sufficient? And does it break following updates?

                                  Thanks

                                  • 29. Re: upgrade to WTP 2.0.2 breaks EAR deployment in JBoss Tool
                                    maxandersen

                                    that is what we are trying to find out...I would rather they did a hotfix release but they seem to be reluctant to do this.