1 2 Previous Next 23 Replies Latest reply on Feb 25, 2011 1:11 PM by Rob Stryker

    JBoss tools 3.2B1 sometimes doesn't deploy classes in web module

    arjan tijms Novice

      Hi,

       

      I'm using JBoss Tools 3.2 beta 1 with Eclipse 3.6.1 on Ubuntu 10.10 (64 bits) on JDK6U21. I have an EAR project that is deployed to JBoss AS 5.1. This initially works correctly, but after I stop the server, make some changes to my files, pull in new changes from Mercurial etc I restart the server.

       

      I then get class not found errors, and when I inspect the deployment in JBoss AS it seems that there are most classes are missing in the web module's WEB-INF directory. Strangely however, there are some classes that are deployed and for some classes that are missing, the package folder is there but it's empty.

       

      The "Server Log" view for the JBoss 5.1 Runtime Server mentions under the Publishing node:

       

      1 files modified in module my_main_ejb 31 minutes, 2 seconds ago

      81 files modified in module my_main_web 31 minutes, 2 seconds ago

       

      The 31 minutes exactly corresponds with the time I started the server and the classes where missing. The Modified time of the files that are present in the WEB-INF/classes also corresponds with this.

       

      I did notice that there are some suspect events in the log, but these are dated a couple of hours back where the deploy did work. It is:

       

      No publisher found for module DeletedModule[saxon9.jar,org.eclipse.jst.jee.server:/binary:/home/myuser/workspace/my_main/libraries/saxon9.jar.

       

      This did happen a couple of time before, and I could fix it by closing and re-opening the EAR and it's associated web and EJB projects and cleaning, restarting, etc (don't know exactly in which order). I remember a very similar bug in JBoss tools 3.1 where sometimes only the most recently touched files where deployed.

        • 1. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
          arjan tijms Novice

          Anyone cares to reply to this?

           

          I just had a similar thing happening. 18 hours ago I had a working deployment. I just updated my workspace from Hg and start the server. The Server Log mentiones 2 files modified in module my_main_web. The startup fails and when I inspect the deployment, I notice WEB-INF/lib only has two jar files, where there should be a dozen there.

          • 2. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
            arjan tijms Novice

            p.s.

             

            When I do a clean, I additionally get these entries in the server log:

             

            Full publish failed for module jbosscache-core.jar

            Full publish failed for module jgroups.jar

            Full publish failed for module my_foo.jar

            Full publish failed for module jxl.jar

            Full publish failed for module saxon9.jar

             

            Some of these jars are placed in the /lib directory of my ear file, some are in the .classpath of the webmodule and targetted to be included in WEB-INF/lib.

             

            Upon inspection, nothing is special about these libraries. There are for instance more libraries in the /lib of the ear, and there are no Full publish failed for them. In this case, the jars for which Full publish failed are in the deployment.

             

            What does this message exactly mean, and how can I find out what really goes wrong?

            • 3. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
              Max Rydahl Andersen Master

              sorry for some reason I missed your original posting.

               

              If you were on windows I would have said the files were most likely locked by a classloader somewhere but you say you are on Linux (Ubuntu) thus that is most likely not the case.

               

              But something is preventing the tool from accessing/copying or moving the file.

               

              Any traces of info in Eclipse error log view ?

              • 4. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                arjan tijms Novice

                Max Andersen wrote:

                 

                sorry for some reason I missed your original posting.

                 

                 

                Thanks for looking at it now

                 

                But something is preventing the tool from accessing/copying or moving the file.

                 

                Any traces of info in Eclipse error log view ?

                 

                Do note that in the case of the clean, the files where the warnings are being given for are copied correctly to the deployment directory. The messages thus seem to be bogus, but I'm not sure if there is any other effect that I'm not seeing here.

                 

                I deleted both the error log and the server log, did the clean again and watched both logs. Nothing shows up in the error log view after the clean. The same messages about Full publish failed appear in the server log again.

                • 5. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                  arjan tijms Novice

                  I stumbled upon an additional problem, not sure if this is related or not, but posting it here. I've upgraded to JBoss tool 3.2 beta 2 since the last post. Still on Ubuntu 10.10, 64 bits, Eclipse 3.6.1.

                   

                  Occasionally when I save a file in Eclipse while JBoss AS is running, e.g. save a single .xhtml file, this triggers the deployer to deploy hundreds of files again. The effect however is that not hundreds of files get deployed, but get deleted! This of course totally ruins the deployment. JBoss AS starts to complain about missing files, missing classes, or it reboots because WEB-INF/* has been touched, but then fails because WEB-INF is completely missing, etc.

                   

                  In one word: major chaos.

                   

                  After I saved my file, the following appeared in the Server Log view:

                   

                  2665 files modified in module my_main_web

                  No publisher found for module DeletedModule[saxon9.jar,org.eclipse.jst.jee.server:/binary:/home/my/eclipse36ee/workspace/my_main/my_main_web/libraries/saxon9.jar]

                  No publisher found for module DeletedModule[jxl.jar,org.eclipse.jst.jee.server:/binary:/home/my/eclipse36ee/workspace/my_main/my_main_web/libraries/jxl.jar]

                  • 6. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                    Max Rydahl Andersen Master

                    Arjan,

                     

                    I've heard from a few users having similar issues - *anything* you can tell us on how to reproduce this would be appreciated!

                    • 7. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                      arjan tijms Novice

                      Let me see, it happened a couple of times and keeps happening. When I shut-down JBoss AS, then do some editing and thereafter start up JBoss AS again, it correctly says "x filed modified in module ..." where x is the correct number (e.g. 1 or 2).

                       

                      What else... maybe some special is that I have two JBoss AS instances configured, and thus two run time servers defined in Eclipse. The second instance hosts a kind of messaging hub where the main app connects to via JMS, I don't edit this one often. This second instance has another set of ports defined.

                       

                      Other than that we're using MercurialEclipse. Something odd with that is that the directory in the workspace that comes from Mercurial is my_main, which contains the ear project my_main, my_main_ejb and my_main_web. Eclipse only gets to see those 3 nested directories, but not the parent folder.

                       

                      so the structure is:

                       

                       

                      workspace
                          my_main
                              my_main (EAR project)
                              my_main_ejb
                              my_main_web
                      

                       

                       

                      This is maybe a little weird. But I'm not sure it's related. Other than that I can't think of anything special. I just upgraded from Java6u21 to Java6u23, but this didn't make any difference. Let me know if there is anything specifically I can check.

                      • 8. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                        Max Rydahl Andersen Master

                        from your new and previous description it sounds like the server adapter thinks files or rather modules are being deleted (aka removed) from the deployment.

                         

                        Have the timestamp changed ?

                         

                        Does Mercurial remove/add files instead of just updating them ?

                         

                        Any specific action(s) you have done before saving the file you have been edited ?

                        • 9. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                          arjan tijms Novice

                          In the case where the files were deleted, I'm fairly sure I didn't touch Mercurial in between. I'll particular remember to pay attention to this from now on.

                           

                          MercurialEclipse works by calling command line Hg. I'm not 100% sure how this command does what it does internally. I'll try to check if I can monitor the filesystem somehow.

                           

                          About checking the timestamp, do you mean here to check the stamps of files that are still there in the deployment after a delete?

                          • 10. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                            Max Rydahl Andersen Master

                            yes or rather just try and spot if there are some changes, back and forth in time on surce or destination files that might reveal a pattern.

                            • 11. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                              arjan tijms Novice

                              I've now started up JBoss AS again and trying to reproduce, but so far no "luck". If I change a file, then there's the message "1 files modified in module my_main_web" and nothing strange seems to happen.

                               

                              For the moment, it seems that the sequence of steps of stopping JBoss AS, closing the projects and re-opening it, doing a clean and publish and then changing files while JBoss AS is not running, brought it back into a normal state.

                               

                              One thing I forgot to mention is that the Server Log earlier also showed a main list with a heading called "Unknown Event Type", with only entries having nothing more than "OK" beneath it.

                              • 12. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                                henk de boer Master

                                I'm seeing something similar as well. This seems strongly related to several other topics, like this one: http://community.jboss.org/thread/149053?tstart=0 and http://community.jboss.org/thread/148228?start=0&tstart=0 .

                                 

                                It's indeed hard to reproduce.

                                • 13. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                                  arjan tijms Novice

                                  I unfortunately keep seeing this problem.

                                   

                                  Just now it happened again right after doing a save in a regular Java file in the web module while JBoss AS was running. In the Server Log I noticed the message "2586 files modified ..."

                                   

                                  In the deployed web module, everything except META-INF and WEB-INF has been deleted. WEB-INF is empty too, except for the classes directory. The classes directory seem to contain only folders and non-class files though.

                                   

                                  Timestamps on the few (non class) files that are there in the deployment's web module are from a few weeks back. Folder (package) timestamps are from yesterday. Timestamps in my workspace in the WEB-INF directory are from a few weeks back to yesterday too.

                                   

                                  One perculiar thing I noticed is that when I unfold "JBoss 5.1 Runtime Server" in the Servers view, it first correctly shows the one and only ear module I deployed. However, when I unfold that one, it lists not only the ejb module and the web module, but also 2 libraries van the ear/lib directory! These are the jbosscache-core.jar and jgroups.jar that I found earlier in the Server Log.

                                   

                                  I however have more than those 2 libs in my ear/lib directory, so why it lists pricesely those two there is not clear. I checked all config files and even did a global grep on my filesystem, but could not find where JBoss tools could possibly store this information.

                                   

                                  When I unfold the web module, I see a similar thing. It lists two libraries: jxl.jar and saxon9.jar. Here too, I have much more libraries in the web module than those two.

                                   

                                  Maybe this is related. Where does JBoss tools remember it needs to list just those directories there? And how do I remove those from being listed?

                                  • 14. Re: JBoss tools 3.2B1 sometimes doesn't deploy classes in web module
                                    Max Rydahl Andersen Master

                                    is this on Beta1 or Beta2  ? If Beta1 please upgrade to Beta2.

                                     

                                    If Beta2 please open jira.

                                    1 2 Previous Next