12 Replies Latest reply on Nov 20, 2002 9:49 AM by Jerome Lacoste

    Jboss 2.4.X and Jetty 4.1 package

    Navdeep Newbie

      hi,
      This question is for greg or Jules or whoever can help me :-)
      I apologise if this is not the right forum for this question, if it is not where should I post this question? I was redirected to this forum and ask this question to either Greg or Jules.

      I am deploying JBoss on a windows NT machine and my question is...
      Is there a JBoss 2.X and Jetty 4.1 version available? I tried to upgrade the Jboss 2.4.7 Jetty4.0.4 package to use Jetty 4.1.2. But that does not work as the constructor for WebContextHandler in Jetty has changed.

      My problem is that we cant go to JBoss 3.0.3 version (which has Jetty 4.1) as the Datasource implementations have changed and JBoss no longer fakes XADatasource connection on non-XA supporting databases like Sybase's ASA & database.
      But we desperately need to go to Jetty version 4.1 as 4.0.X release of Jetty was not stable.
      Can some one please help.

      Thanks
      Navdeep

        • 1. Re: Jboss 2.4.X and Jetty 4.1 package
          Julian Gosnell Expert

          I will try to get one out this weekend

          Jules

          • 2. Re: Jboss 2.4.X and Jetty 4.1 package
            Navdeep Newbie

            Hi Jules,
            thanks a lot for your response. I have just one more question, where can I download this version from? JBoss download page does not seem to have it.
            Thanks
            NSB

            • 3. Re: Jboss 2.4.X and Jetty 4.1 package
              Julian Gosnell Expert

              you can't yet :-(

              I've started on it - but APIs have drifted further than I thought they had.

              I'll ping you when it becomes available.


              Jules

              • 4. Re: Jboss 2.4.X and Jetty 4.1 package
                Navdeep Newbie

                Thanks a lot for ur efforts Jules.... this is going to save us a lot of trouble.

                • 5. Re: Jboss 2.4.X and Jetty 4.1 package
                  Julian Gosnell Expert

                  Here is a quick update :

                  I am in the middle of doing the upgrade.

                  I have checked the current state of play into cvs (try cvs co -r Branch_2_4 jboss-2.4).

                  If you go into contrib/jetty, set your JBOSS_HOME and JETTY_HOME to fresh 2.4.10 and 4.1.3 distros and type 'cd src/build; sh ./build.sh -emacs clean bundle' (on unix/linux) you should get a new bundled distro.

                  This suffers from a few shortcomings as yet (namely an exception about where to write the logs), but is fully functional for servlets.

                  If anyone wants to give it a whirl and let me have some feedback it would be appreciated.

                  I am away all weekend, so won't be able to continue on this until next week.

                  Bear with me,


                  Jules

                  • 6. Re: Jboss 2.4.X and Jetty 4.1 package
                    Julian Gosnell Expert

                    I had a quick look at this last night :

                    The logging exception is no longer there.

                    JSP compilation is not properly integrated yet (was it ever in the 2.4.x series?) but precompiled JSPs (see FAQ on this forum) should work fine.

                    Classes for distributable sessions are not yet compiled, but these are an extra as far as 2.4.x goes, anyway.

                    Jety 4.2, currently in beta, should drop in happily as a replacement for 4.1, if you want to try out the serious performance improvements introduced by this release....

                    If a couple of people want to try checking this out and coming back to me with any problems, I will do a release when these have been ironed out and I have (if possible) JSP classpath (and maybe distributable sessions) working.

                    cvs co -r Branch_2_4 jboss-2.4
                    cd contrib/jetty/src/build (I think)
                    ./build.sh clean bundle
                    cd ../../bundle/jboss/bin
                    ./run_with_jetty.sh

                    or something like that...


                    Jules

                    • 7. Re: Jboss 2.4.X and Jetty 4.1 package
                      Navdeep Newbie

                      I will check it out by tomorrow evening and let you know what happens.
                      Thanks

                      • 8. Re: Jboss 2.4.X and Jetty 4.1 package
                        Navdeep Newbie

                        Hi Jules,
                        I tried compiling the code after downloading it. And the branch seems to be missing some files. (Also I have never built JBoss or Jetty so maybe I was doing something wrong. But I could not find the source code for the files I got error for.
                        Is there a binary distribution I can try out. If you have a ftp site or somplace I can download from it I will be real glad.

                        here is the compilation errors I got.
                        compile:
                        [javac] Compiling 5 source files to E:\CVS\jboss-2.4\contrib\jetty\build\classes
                        [javac] Note: sun.tools.javac.Main has been deprecated.
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\JBossWebApplicationContext.java:38: Class org.mortbay.jetty.servlet.We
                        plicationHandler not found in import.
                        [javac] import org.mortbay.jetty.servlet.WebApplicationHandler;
                        [javac] ^
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\Jetty.java:392: Method setContextPath(java.lang.String) not found in c
                        s org.mortbay.jetty.servlet.WebApplicationContext.
                        [javac] app.setContextPath(contextPath);
                        [javac] ^
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:35: class org.jboss.jetty.security.JBossU
                        Realm must be declared abstract. It does not define org.mortbay.http.UserPrincipal authenticate(java.lang.String, java.lang.String, org.mo
                        ay.http.HttpRequest) from interface org.mortbay.http.UserRealm.
                        [javac] public class JBossUserRealm
                        [javac] ^
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:35: class org.jboss.jetty.security.JBossU
                        Realm must be declared abstract. It does not define void dissassociate(org.mortbay.http.UserPrincipal) from interface org.mortbay.http.Use
                        alm.
                        [javac] public class JBossUserRealm
                        [javac] ^
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\mortbay\j2ee\J2EEWebApplicationContext.java:20: Wrong number of arguments in const
                        tor.
                        [javac] super(warUrl);
                        [javac] ^
                        [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\mortbay\j2ee\session\Manager.java:71: class org.mortbay.j2ee.session.Manager must
                        declared abstract. It does not define javax.servlet.http.HttpSession newHttpSession() from interface org.mortbay.jetty.servlet.SessionMana
                        .
                        [javac] public class Manager
                        [javac] ^
                        [javac] Note: E:\CVS\jboss-2.4\contrib\jetty\src\main\org\mortbay\j2ee\session\Manager.java uses or overrides a deprecated API. Recom
                        e with "-deprecation" for details.
                        [javac] 6 errors, 2 warnings

                        BUILD FAILED

                        • 9. Re: Jboss 2.4.X and Jetty 4.1 package
                          Julian Gosnell Expert

                          set JBOSS_HOME to a JBoss-2.4.10... binary release
                          set JETTY_HOME to a 4.1.3 binary release

                          Your build cannot find some Jetty classes, so JETTY_HOME must be wrong, or something like that.

                          What is JETTY_HOME set to ?

                          Jules

                          • 10. Re: Jboss 2.4.X and Jetty 4.1 package
                            Navdeep Newbie

                            Hi Jules,
                            sorry for the delay in trying what u suggested, I could not find the binary release of downloaded Jetty 4.1.3, so I used Jetty 4.1.4 instead, but I still get compilation errors. Is it possible that I can download a binary release from someplace?
                            Thanks
                            NSB

                            P.S. Here are the error I got.
                            prepare:
                            [echo] jboss.dist=E:\CVS\jboss
                            [echo] jetty.dist=E:\CVS\jetty414\Jetty-4.1.4
                            [echo] classpath=E:\CVS\jboss\client\jaas.jar;E:\CVS\jboss\client\jbosssx-client.jar;E:\CVS\jboss\client\jnp-client.jar;E:\CVS\jboss\cli
                            ent\jta-spec1_0_1.jar;E:\CVS\jboss\lib\jdbc2_0-stdext.jar;E:\CVS\jboss\lib\jaxp.jar;E:\CVS\jboss\lib\crimson.jar;E:\CVS\jboss\lib\jmxri.jar;E
                            :\CVS\jboss\lib\jboss-jaas.jar;E:\CVS\jboss\lib\ext\jboss-j2ee.jar;E:\CVS\jboss\lib\ext\jboss.jar;E:\CVS\jboss\lib\ext\jbosssx.jar;E:\CVS\jbo
                            ss\lib\ext\log4j.jar;E:\CVS\jetty414\Jetty-4.1.4\lib\javax.servlet.jar;E:\CVS\jetty414\Jetty-4.1.4\lib\org.mortbay.jmx.jar;E:\CVS\jetty414\Je
                            tty-4.1.4\lib\org.mortbay.jetty.jar;E:\CVS\jboss-2.4\contrib\jetty\build\classes

                            compile:
                            [javac] Compiling 1 source file to E:\CVS\jboss-2.4\contrib\jetty\build\classes
                            [javac] Note: sun.tools.javac.Main has been deprecated.
                            [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:38: Blank final variable '_log' may not have
                            been initialized. It must be assigned a value in an initializer, or in every constructor.
                            [javac] private final Logger _log;
                            [javac] ^
                            [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:39: Blank final variable '_realmName' may no
                            t have been initialized. It must be assigned a value in an initializer, or in every constructor.
                            [javac] private final String _realmName;
                            [javac] ^
                            [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:40: Blank final variable '_subjAttrName' may
                            not have been initialized. It must be assigned a value in an initializer, or in every constructor.
                            [javac] private final String _subjAttrName;
                            [javac] ^
                            [javac] E:\CVS\jboss-2.4\contrib\jetty\src\main\org\jboss\jetty\security\JBossUserRealm.java:41: Blank final variable '_useJAAS' may not
                            have been initialized. It must be assigned a value in an initializer, or in every constructor.
                            [javac] private final boolean _useJAAS;
                            [javac] ^
                            [javac] 4 errors, 1 warning

                            BUILD FAILED

                            • 11. Re: Jboss 2.4.X and Jetty 4.1 package
                              Julian Gosnell Expert

                              The problem is that you are on windows and I am on Linux - consequently the build.sh will not work for you.

                              Please look at it and try to do the equiv on Windows. If this doesn't work, post exactly what you did and I will try to figure out what went wrong.

                              It builds fine for me under Linux.


                              Jules

                              • 12. Re: Jboss 2.4.X and Jetty 4.1 package
                                Jerome Lacoste Newbie

                                nsbiggod,

                                I just built a JBoss 2.4.10 Jetty 4.2.1 package on windows NT. I didn't try deploying on it yet. Will post on this thread if I have problems.

                                I patched build.bat to make this work. I sent the patch to Jules who should put them in soon.

                                Here's my worklog (forget about point 4 as Jules will probably have patched the tree when you make your checkout):

                                Worklog: building JBoss 2.4.10 and Jetty 4.2.1 from source
                                Author Jerome Lacoste
                                Date 20/11/2002


                                Requirements:
                                - ant >= 1.4.1 ?? (used Ant 1.5.1)
                                - JDK >= 1.3 ?? (used JDK 1.4.1)


                                1- downloaded Jboss 2.4.10 and jetty

                                http://sourceforge.net/project/showfiles.php?group_id=22866
                                http://prdownloads.sourceforge.net/jboss/JBoss-2.4.10.zip?download

                                http://sourceforge.net/project/showfiles.php?group_id=7322
                                http://prdownloads.sourceforge.net/jetty/Jetty-4.2.1.zip?download
                                http://prdownloads.sourceforge.net/jetty/JettyExtra-4.2.1.zip?download

                                2- unzipped everything in D:\Dev\temp\

                                3- donwload source code from CVS (using cygwin)

                                105 cvs -d:pserver:anonymous@cvs.jboss.sourceforge.net:/cvsroot/jboss login
                                112 cvs -d:pserver:anonymous@cvs.jboss.sourceforge.net:/cvsroot/jboss -z3 co -r Branch_2_4 jboss-2.4

                                4- apply patches (cf diff2.txt)

                                5a- setenv & build (windows)

                                set ANT_HOME=...
                                set JAVA_HOME=...

                                cd D:\tmp\jboss2.4.10_jetty\jboss-2.4\contrib\jetty\src\build

                                set JBOSS_HOME=D:\dev\tmp\JBoss-2.4.10
                                set JETTY_HOME=D:\dev\tmp\Jetty-4.2.1

                                .\build.bat clean bundle

                                cd ..\..\bundle\JBoss-2.4.10_Jetty-4.2.1\jboss\bin

                                .\run_with_jetty.bat

                                voila!