12 Replies Latest reply on Oct 14, 2011 3:31 PM by Tom Medrek

    Upgrading from 4.0.4 to 4.2.2

    Steve Singer Newbie

      Hi --

      We've got an application running just fine under 4.0.4 and want to upgrade to 4.2.2. Is there a guide or steps to do this? We can't just copy the server folder from 4.0.4 to 4.2.2 (since the structure inside is different), and when I try to just copy what I think is needed the application won't start.

      I figure there must be a quick guide for this upgrade, but I've searched the site and can't find it. Thanks in advance!

        • 1. Re: Upgrading from 4.0.4 to 4.2.2
          Peter Johnson Master

          As far as I know there is no migration guide. To migrate, do this:

          1) If you changed any existing configuration files, then you need to make the corresponding changes to the new configuration files.

          2) Rebuild and redeploy your application(s) (EARs, WARs, SARs) using the new libraries in 4.2.2.

          3) Web services have changed dramatically. Either give up or redevelop (or search for other posts on moving axis-based web services forward).

          4) Move over other files (*-ds.xml, *-service.xml). But first compare files of that kind to see if you have to make any changes. For example, the MBeans used to declare queues and topics are probably slightly different.

          5) Post the errors you get when you deploy the app (start the app server first, then deploy one thing at a time, if the deployer throws an exception, post it)

          • 2. Re: Upgrading from 4.0.4 to 4.2.2
            Steve Singer Newbie

            Thanks. As you mentioned, I'm getting errors all over the place with y Web Services. But more concerning is I can't even get a JSP to compile on 4.2.2. Obviously, it works fine in 4.0.4GA and has nothing to do with the services. Just a plan old JSP. The error is:

            org.apache.jasper.JasperException: Unable to compile class for JSP:

            An error occurred at line: 36 in the generated java file
            The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

            Stacktrace:
            org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
            org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
            org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
            org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
            org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
            org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
            org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
            org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
            org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
            org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

            • 3. Re: Upgrading from 4.0.4 to 4.2.2
              Peter Johnson Master

              Is the call to getJspApplicationContext in the original JSP file or was it generated when the JSP was converted to servlet source? Also, is this being done at deploy time, or are you attempting to precompile the JSP? If precompiling, are you using 4.2.2 to precompile?

              Also, I looked at JspFactory in 4.0.3 and 4.0.5 (I don't have a 4.0.4) and in neither case does JspFactory have that method, and JspFactory is an abstract class that does not extend anything.

              If none of the above helps, then post the generated servlet source file (or at least the first 40 or so lines) - it should be in the work directory somewhere.

              • 4. Re: Upgrading from 4.0.4 to 4.2.2
                Steve Singer Newbie

                First of all, thanks for your help. I appreciate it. It is not in the actual code, it is being generated. It looks like the generated java is quite different in 4.0.4 and 4.2.2. In 4.2.2, it generates two additional methods, _jspInit() and _jspDestroy(). The problem is in the _jspInit() method, which is:

                public void _jspInit() {
                _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
                _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
                }

                This is where the bad method call is. Do you think there might be a missing class, or some version conflict?

                • 5. Re: Upgrading from 4.0.4 to 4.2.2
                  Peter Johnson Master

                  I just now checked other generated servlets, and they contain the same code and compile just fine. You do not, by any chance, have a copy of the servlet jar file in your web app?

                  • 6. Re: Upgrading from 4.0.4 to 4.2.2
                    Steve Singer Newbie

                    No, but here's something interesting --

                    In 4.0.4, there are two servlet JARs, javax.servlet.jar and javax.servlet.jsp.jar. The second one had the "JSP" classes init.

                    In 4.2.2, there is only one file, servlet-api.jar. This JAR has a "jsp" package/folder to hold the JSP classes, but this folder is empty. Do you think it's possible that the build ogt 4.2.2GA I got was somehow bad?

                    • 7. Re: Upgrading from 4.0.4 to 4.2.2
                      Peter Johnson Master

                      In 4.0.4, JspFactory appears in server/xxx/lib/javax.servlet.jsp.jar. In 4.2.2 it appears in server/xxx/lib/jsp-api.jar. The one in jsp-api.jar contains the getJspApplicationContext method. Your application must be picking up a copy of that class from some other location.

                      One way to track this down is to restart the app server using the "-verbose:class" JVM command line option. This option identifies the jar file for every class loaded. Start the app server and once it is up deploy your app. The jar file for JspFactory should show up on the command line.

                      • 8. Re: Upgrading from 4.0.4 to 4.2.2
                        Steve Singer Newbie

                        Well, we weren't including the servlet jar, but we were including j2ee.jar, which includes the servlet API. I took that out and now the JSP compiles and I can get into the application. Still got plenty of problems, of course, but I can probably figure those out!

                        Thanks for your help!

                        • 9. Re: Upgrading from 4.0.4 to 4.2.2
                          Peter Johnson Master

                           

                          ssinger wrote:
                          we were including j2ee.jar, which includes the servlet API. I took that out


                          I'm not sure if the word "that" in the phrase "I took that out" refers to "the servlet API" or to "j2ee.jar." You should not be including j2ee.jar in your apps. All of the classes in there should come from the various jars in the server/xxx/lib directory.

                          • 10. Re: Upgrading from 4.0.4 to 4.2.2
                            Thorsten Anzenberger Newbie

                            Hello

                            I upgraded to the new jboss and when i try to start the Server i get the following error while publishing :

                            Publishing failed
                            Publish failed using Ant publisher
                            unable to assemble module
                            duplicate entry: .svn/all-wcprops
                            Publish failed using Ant publisher
                            unable to assemble module
                            duplicate entry: .svn/all-wcprops
                            Publish failed using Ant publisher
                            unable to assemble module
                            duplicate entry: .svn/all-wcprops

                            We have our code in subversion and there seems to be a problem with it.
                            Can anyone help ?

                            • 11. Re: Upgrading from 4.0.4 to 4.2.2
                              Christian Schuhegger Newbie

                              Hello Thanz,

                              were you able to solve your problem? I have the same problem with JBoss and Glassfish. I've filed a bug report at:
                              https://glassfishplugins.dev.java.net/issues/show_bug.cgi?id=55
                              "publish failed using ant publisher: duplicate entry: .svn/all-wcprops"

                              Any further information would be appreciated!

                              • 12. Re: Upgrading from 4.0.4 to 4.2.2
                                Tom Medrek Newbie

                                Hi,

                                 

                                We use jbossAS 4.0.4 as our web application server for the Business Objects (BO) reporting suite using IE7.0 browser & Windows 2003 servers.  Now BO wants us to upgrade to jbossAS 4.2.3 but I'm also finding a lack of detail in upgrading jbossAS (everywhere.)  BO requires that we deploy our web appls to jbossAS using the WDEPLOY utility.  For BO service pack upgrades, we have to make file comparisons of our new & prior web.xml files first (e.g.  C:\Program Files (x86)\Business Objects\deployment\workdir\jboss404\resources\web\InfoViewApp\WEB-INF\web.xml), then manually update the new web.xml files and WDEPLOY.  SAP support notes that jbossAS is not their software when I ask them for details. 

                                 

                                I hope to be getting a sandbox for trial-and-error testing soon but don't know whether I should un-install the old version first, etc?  If anyone has suggestions for any jbossAS upgrade to 4.2.3 I'd also appreciate a reply. 

                                 

                                Thanx!

                                 

                                Tom