1 2 Previous Next 22 Replies Latest reply on Mar 22, 2009 8:34 AM by jaikiran Go to original post
      • 15. Re: A ClassCastException
        peterj

        OK, going back to that issue, did you try the "-verbose:class" option I suggested?

        • 16. Re: A ClassCastException

          yes I did, and I've post you at first place in this page, explanation what happens. The important thing is that it isolate certain class

          org.apache.xcerces.impl.msg.XMLMessageFormatter
          which, when it try to load it, throws famous mentioned ClassCastException...

          • 17. Re: A ClassCastException
            peterj

            There should be a JAR file (or the full path to the class file) mentioned in the -verbose:class output. The only time I have not seen a JAR file mentioned was if the class came from rt.jar.

            • 18. Re: A ClassCastException
              peterj

              I looked at the error message again - the class you posted was not mentioned in the error message.

              • 19. Re: A ClassCastException

                Hi Peter. The last stack trace you are looking at, is the stack trace when I've omitted xercesImpl.jar file. This is the line after what exception occurs:

                
                [Loaded org.apache.xercesimpl.msg.XMLMessage FOrmatter from jar: /D:/Dokumenti/RADOVI/JAVA/Jboss_server/jboss-5.0.0.GA/server/default/deploy/afrodom_sler.war!/WEB-INF/lib/xercesImpl.jar]
                09:41:04, 218 ERROR [JBossContextConfig' XML error parsing: context.xml
                org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
                .
                .
                .
                .
                
                


                After that portion of stack trace, continue the one I 've posted in page one. It load a certain class from library of my application, when exception occurs. So what that telling us?!

                • 20. Re: A ClassCastException
                  jaikiran

                   

                  [Loaded org.apache.xercesimpl.msg.XMLMessage FOrmatter from jar: /D:/Dokumenti/RADOVI/JAVA/Jboss_ser
                  ver/jboss-5.0.0.GA/server/default/deploy/afrodom_sler.war!/WEB-INF/lib/xercesImpl.jar]


                  Looking at the logs i do see that *your* application's jar file is being picked up during the deployment. So that suggests that the classloader scoping is working.

                  Where is this
                  org.apache.xerces.xni.parser.XMLParserConfiguration

                  being loaded from? What do the verbose class logging show for this class?



                  • 21. Re: A ClassCastException

                    Sorry, I didn't see you answer. This is going to become an agony. I cannot deploy an application (how pathetic is that).
                    I'm not sure I'm understanding you, but EVERY exception occurs in xercesImpl.jar.
                    EVEN if I omit it AGAIN phantom exception occurs, not the same but still against the parsing... I'm completely exhausted , and have no idea what problem is... Changing server is one of solution, but... not ultimately solution...
                    How is possible, that you take an application, deploy it on much 'advanced' tomcat container, and WALLA. The application is deployed successfully without even warnings...
                    Now I'm trying to deploy the same application on the advance hi-tech application, and I cannot perform that for a seven days 12-14 hours a day. So what is the problem, huh?

                    • 22. Re: A ClassCastException
                      jaikiran

                      This topic is going nowhere. So let's just start from scratch. Here's what we will do:

                      1) Post the output of your original war file

                      jar -tf yourwar.war


                      I know you have already done it once. But let's do it clean again.

                      2) If we find some jar file in the war that might cause classloading issues, we will ask you to remove it from the war.

                      3) Let's get the war deployed without any classloading issues first and then see if you really need the jars to be included.

                      4) After we have deployed the war successfully, let's decide whether you really need those (removed) jars to be packaged in the war. If you don't need them then we are done. If you do need them, then let's later talk about classloading configurations.


                      1 2 Previous Next