1 2 Previous Next 27 Replies Latest reply on Jun 3, 2009 11:12 AM by peterj

    Please Help Deployment the weirdest error I ever had in 10 y

      I am running a jboss 4.0 server and I have a built a new version of a war file.

      I deleted the old war file and placed the new one in the jboss folder, it still runs the old java code. I tried to shutdown jboss, restart the server etc. Still same thing. I tried to remove jsp files from the war file, and the jsp I removed are not accessible, so it must be it is using this war file. But still the old code. Stop jboss clear all temp and work folder, delete all bin files and everything on my PC rebuild the war, check so the war have new classes added and updated dates for all classes. Place the war in Jboss folder....... still runs the old code.

      I cannot for the world of me understand how it even finds this old code!

      Please help !!! If you need anymore info please let me know!

        • 1. Re: Please Help Deployment the weirdest error I ever had in
          jaikiran

           

          "dakiar" wrote:

          I cannot for the world of me understand how it even finds this old code!

          Please help !!! If you need anymore info please let me know!


          By old code, you mean the java code? Maybe your classpath has a jar containing the old code and is being picked up by the application? Can you post the console output (not the server.log)? And a bit more details about how you access this code/jsp.


          • 2. Re: Please Help Deployment the weirdest error I ever had in

            Yes, I also thought it was picking up an old jar! But inside the war file it just has all my classes, and the jar files related to the building are all jar files which are related to API's I am using.... so I doubt my code would be in them.


            I got help from a man with a lot of experiance with jboss for almost one hour and he also had no clue what was going on :(

            I do not have web access to the console. How could I access the information you want?

            • 3. Re: Please Help Deployment the weirdest error I ever had in
              jaikiran

               

              "dakiar" wrote:

              I do not have web access to the console. How could I access the information you want?


              Zip the server.log and boot.log and upload it to some accessible place. Also remember to tell us how you are accessing the application and what makes you think the old classes are being used. If the logs do not provide us some hints, we do have another option which prints out the jar file from which the class is being loaded. You can add -verbose:class to the JAVA_OPTS section in the server startup script. Then start the server (you might want to redirect the STDOUT output to a file because the logs will be too verbose) and then access your application to try and reproduce this issue. Look into the redirected log to see which jar is being used to load your class.


              • 4. Re: Please Help Deployment the weirdest error I ever had in

                http://fts.capgemini.com/sftp/41100/weirdness.zip

                Here are these two files.

                It is a struts app, so the jsp will call functions from the java apps. In the new code I changed everything in that class, and added a lot of System.out.println however it dumps an error on a line I have removed completely, so I am sure it is accessing old class. If I however remove a jsp file from the war, it immidietely reacts. ( Yes I know it sounds like the jar thing you said, I already investigated it )

                Thank you,
                Dak.

                • 5. Re: Please Help Deployment the weirdest error I ever had in

                  Sorry I made a mistake with the link:

                  http://fts.capgemini.com/ftp/616277/weirdness.zip

                  • 6. Re: Please Help Deployment the weirdest error I ever had in
                    jaikiran

                    The only thing that stands out is:

                    2009-05-28 16:43:20,691 INFO [org.jboss.web.tomcat.tc5.TomcatDeployer] deploy, ctxPath=/recks, warUrl=file:/usr/jboss/server/all/tmp/deploy/tmp41271recks.war/
                    2009-05-28 16:43:22,981 INFO [STDOUT] = Initializing control file . . .
                    2009-05-28 16:43:22,984 INFO [STDOUT] /usr/jboss/server/default/conf/controlfile.dat
                    2009-05-28 16:43:22,984 INFO [STDOUT] = Config path: /usr/jboss/server/default/conf
                    2009-05-28 16:43:22,984 INFO [STDOUT] = Control file /usr/jboss/server/default/conf/controlfile.dat loaded . . .
                    2009-05-28 16:43:22,985 INFO [STDOUT] = Properties in the file /usr/jboss/server/default/conf/paths.properties loaded . . .
                    


                    You are deploying in the "all" configuration, but looks like your code is picking up some files from the "default" configuration (/usr/jboss/server/default/conf/controlfile.dat). I don't know what that file does and whether it relates to your exception. But that's the only thing that stands out.

                    • 7. Re: Please Help Deployment the weirdest error I ever had in

                      No it is not :(

                      I also checked the

                      warUrl=file:/usr/jboss/server/all/tmp/deploy/tmp41340recks.war/

                      It definetely have the new version of the DBUtility class inside it, so I am asking myself how can it possibly still execute code from the old version ?!!??! where does it find this code? I am woundering whatever the server is having gremlins.

                      Is there any kind of cache which could have been used?? I rebooted the server and emptied all temp and work folders as I said, is there anyway a cache could still be active ???

                      Could it somehow be related to apache? or that apache has cached the old code somewhere outside of Jboss? ( I think it sounds very unlikely , but I am getting desperate here )

                      • 8. Re: Please Help Deployment the weirdest error I ever had in
                        jaikiran

                         

                        where does it find this code?


                        Try what i suggested in my earlier post:

                        If the logs do not provide us some hints, we do have another option which prints out the jar file from which the class is being loaded. You can add -verbose:class to the JAVA_OPTS section in the server startup script. Then start the server (you might want to redirect the STDOUT output to a file because the logs will be too verbose) and then access your application to try and reproduce this issue. Look into the redirected log to see which jar is being used to load your class.


                        • 9. Re: Please Help Deployment the weirdest error I ever had in

                          Ok I have done it and now have a file with a lot of info, what to do next???

                          • 10. Re: Please Help Deployment the weirdest error I ever had in
                            jaikiran

                             

                            "dakiar" wrote:
                            Ok I have done it and now have a file with a lot of info, what to do next???


                            Search for the name of the class which you believe is the "old" class. The log will contain the name and location of the jar file from where the class was loaded.

                            • 11. Re: Please Help Deployment the weirdest error I ever had in

                              Thanks a lot for your help jaikiran, I will check it first thing monday morning. Have a great weekend!

                              • 12. Re: Please Help Deployment the weirdest error I ever had in

                                It did not help, it is loaded from

                                15:40:00,504 INFO [TomcatDeployer] deploy, ctxPath=/recks, warUrl=file:/usr/jboss/server/all/tmp/deploy/tmp53270recks.war/

                                After that it just said loaded ( and which package and the class name )

                                So it should mean it is loaded from that war file ?!?!?!?!!?

                                :(

                                • 13. Re: Please Help Deployment the weirdest error I ever had in
                                  jaikiran

                                  I'm not sure you are looking at the right logs. Can you upload those logs and the change that you did to the run script to include -verbose:class, to some accessible place? Also let us know the fully qualified classname which you think is being loaded from some old code.

                                  • 14. Re: Please Help Deployment the weirdest error I ever had in

                                    I changed inside the run.sh script to the following:
                                    JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -verbose:class"

                                    Is this correct?

                                    To get the following new message in the OUT log:

                                    15:40:00,504 INFO [TomcatDeployer] deploy, ctxPath=/recks, warUrl=file:/usr/jboss/server/all/tmp/deploy/tmp53270recks.war/
                                    [Loaded com.capgemini.in.recks.util.DBUtility] ( this is the class which drops the error, and I changed but it is still running an old version of )

                                    should I get even more messages than this ?

                                    1 2 Previous Next