11 Replies Latest reply on Jan 22, 2003 10:22 PM by franksun

    JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23.52

    agupta_25

      Hello everybody,

      I am new to JBoss and as part of my learning process, I am in the midst of setting up the above configuration (see Subject) on my RedHat 8.0 system. Undoubtedly, a lot of people on this forum may be interested in such a setup and I am willing to share my experiences with one and all. It will, of course, take me a lot of time and effort to get all the pieces talking to each other and I hope to get some help from other folks. Here is where I am currently:

      - Install & setup of Tomcat (completed)
      - Install and setup of JBoss (completed)
      - Install and setup of mySQL (completed)
      - Tomcat talking to JBoss talking to mySQL (completed)

      In addition, I am also in the process of porting the Java Petstore 1.3 to JBoss. As part of this process, I will re-write the entire source for the Petstore to use XDoclet . I have already successfully deployed all the EJB code to JBoss and am currently getting the web code to play well with Tomcat.

      Once I have all the pieces working together, my intention was to import the setup into the Eclipse IDE to enable the perfect development platform.

      If there is sufficient interest, I can make this information available to everyone.

      Watch this topic for more info!

      -- Avinash.

        • 1. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
          ehenne

          Hi,

          I have done something similar but I am using Jboss 3.0 and Oracle. I have started to describe my experiences under the topic "Running PetStore 1.3 on JBoss 3.0" (http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ I tried to minimize the changes to Petstore, so I am not using XDoclet. I am looking forward to see more from your work.

          Elmar

          • 2. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
            hvenstrom

            Intrested for sure, I will watch you posts

            • 3. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
              fbaert

              Hey,

              I'm also interested in this topic as I am new to Jboss but have some experience in WebLogic and Websphere.

              • 4. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                agupta_25

                To keep the setup simple, I am first going to try and deploy the petstore app on JBoss 3.2beta2 + embedded Tomcat. Later I will separate the two. Here is where I am so far:

                - Have modified the *Petstore* code to use XDoclet tags.
                - The Petstore EJBs compile and deploy OK.
                - Get the home page for the Petstore, but unable to populate the database.

                If anyone is interested in replicating the setup so far, here are some generic instructions. Note that these instructions are for a RedHat 8.0 system. $HOME refers to your home directory. Please note that in order to keep the build process as close to the original as possible, I am assuming you have the Sun RI installed and the environment variable $J2EE_HOME pointing to the Sun RI.

                - Download Xdoclet 1.2.0 beta2 from (http://sourceforge.net/projects/xdoclet) and install it to $HOME/xdoclet

                - Download JBoss-Tomcat 3.2.0 beta2 from (http://sourceforge.net/project/showfiles.php?group_id=22866) and install it to $HOME/jboss-tomcat. I will refer to this as $JBOSS_HOME.

                - Download Ant 1.5.1 or later from (http://jakarta.apache.org/ant/bindownload.cgi) and install it to $HOME/ant-1.5.1

                - Download mySQL 3.23.52 for Redhat 8.0 from (ftp://ftp.redhat.com/pub/redhat/linux/8.0/en/os/i386/RedHat/RPMS) and install the RPMS

                - Create a database in mySQL named "PetStoreDB"

                - Create a user "developer" with password "developer" in
                mySQL and grant all privileges to PetStoreDB.

                - Download the mySQL JDBC driver from (http://www.mysql.com/downloads/api-jdbc-dev.html) and unzip it to $HOME

                - Copy the jar file from the above directory to $JBOSS_HOME/server/default/lib

                - Download petstore-service.xml from (http://home.attbi.com/~agupta/petstore-service.xml) and copy it to $JBOSS_HOME/server/default/deploy

                - Download login-config.xml from (http://home.attbi.com/~agupta/login-config.xml) and copy it to $JBOSS_HOME/server/default/conf

                - Download jbossmq-petstore-service.xml from (http://home.attbi.com/~agupta/jbossmq-petstore-service.xml) and copy it to $JBOSS_HOME/server/default/deploy

                - Edit $JBOSS_HOME/server/default/conf/standardjbosscmp-jdbc.xml and replace the line "<entity-command name="default"/>" in the "" section with "<entity-command name="key-generator"/>". Save the file.

                - Download the Petstore source from (http://home.attbi.com/~agupta/projects.tar.gz) and untar it to $HOME. This will create a directory called "projects"

                - Edit $HOME/projects/petstore/src/build.properties and make sure all the variables point to correct locations.

                - Edit $HOME/projects/petstore/src/apps/petstore/src/build.sh and make sure all the directory locations are correct.

                - Change the current directory to $HOME/projects/petstore/src/apps/petstore/src/ and run "build.sh"

                - If all goes well, you should have the "petstore.ear" file in "$HOME/projects/petstore/src/apps/petstore/build"

                - Copy the petsore.ear file from above location to $JBOSS_HOME/server/default/deploy

                - Start mySQL and Jboss. You should not see any errors during startup and the petsore.ear should deploy correctly.

                - Go to http://localhost:8080/petstore in a browser window.

                - You should see the petstore main page. Clicking on "Enter store" will generate an error.

                - Look at the server.log in $JBOSS_HOME/server/default/logs

                Since I am using the bleeding edge "unknown-pk" feature of Jboss 3.2 beta2 to generate unknown primary keys, I am still struggling to solve the error you see (http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ anyone has any solutions, I would appreciate it if you could post your solution online.

                More to come soon ...

                • 5. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                  agupta_25

                  Hello everyone, here are some new files:

                  http://home.attbi.com/~agupta/projects.jar
                  http://home.attbi.com/~agupta/petstore-service.xml
                  http://home.attbi.com/~agupta/login-config.xml
                  http://home.attbi.com/~agupta/jbossmq-petstore-service.xml

                  This version is a fully working version. You will need the latest JBoss (3.2.0beta2). It will NOT work with JBoss 3.0.x. You will also need the latest JDBC drivers (3.0.4 Gamma) from:

                  http://www.mysql.com/downloads/api-jdbc-dev.html

                  DO NOT EDIT $JBOSS_HOME/server/default/conf/standardjbosscmp-jdbc.xml as it says in the instructions above. It is no longer needed since I am not using the unknown-pk feature of JBoss. I decided to write the primary key generation myself.

                  Other changes to this release include changing the JMS connection factory from "ConnectionFactory" to "java:/JmsXA".

                  Also, I have updated the build.bat scripts so that you can build on Windows. Just make sure you update the %HOME% variable in each build.bat to reflect the drive where you installed JBoss, XDoclet and Ant.

                  Change the current directory to (in the following order):
                  $HOME/projects/petstore/src/apps/petstore/src/ and run "build.sh"
                  $HOME/projects/petstore/src/apps/supplier/src/ and run "build.sh"
                  $HOME/projects/petstore/src/apps/admin/src/ and run "build.sh"
                  $HOME/projects/petstore/src/apps/opc/src/ and run "build.sh"

                  Copy each EAR file to $JBOSS_HOME/server/default/deploy

                  You should not see any errors or warnings.

                  -- Avinash.

                  • 6. Error when build the petstore
                    franksun

                    When I build the petstore, it shows me the error message:
                    xdoclet-generate:

                    BUILD FAILED
                    file:C:/jboss3/examples/projects/petstore/src/components/asyncsender/src/build.xml:
                    86: taskdef class xdoclet.modules.ejb.EjbDocletTask cannot be found
                    Actually, the class xdoclet.modules.ejb.EjbDocletTask is in my classpath (it's Set in the build.bat)

                    Could you help me out of this trap? thanks!

                    • 7. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                      franksun

                      When I build the petstore, it shows me the error message:
                      xdoclet-generate:

                      BUILD FAILED
                      file:C:/jboss3/examples/projects/petstore/src/components/asyncsender/src/build.xml:
                      86: taskdef class xdoclet.modules.ejb.EjbDocletTask cannot be found
                      Actually, the class xdoclet.modules.ejb.EjbDocletTask is in my classpath (it's Set in the build.bat)

                      Could you help me out of this trap? thanks!

                      • 8. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                        agupta_25

                        Make sure that ALL the jar files mentioned in %XDOCLET_CLASSPATH% in build.bat actually do exist. Also, make sure you run the build.bat from C:/jboss3/examples/projects/petstore/src/apps/petstore/src

                        -- Avinash

                        • 9. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                          agupta_25

                          Just make sure that all the jar files mentioned in XDOCLET_CLASSPATH in build.bat actually DO EXIST (and the names match). Also, make sure you run build.bat from C:/jboss3/examples/projects/petstore/src/apps/petstore/src

                          -- Avinash.

                          • 10. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                            franksun

                            Hi,Thanks a lot, just like you said, it's because of the incorrect XDOCLET_CLASSPATH, I add some more .jar of xdoclet files in there, and it does work.
                            I got another 3 problems :
                            1. when booting up the jboss, it displays:

                            003-01-21 10:50:19,946 DEBUG [org.jboss.system.ServiceController] Creating service jboss.rmi:type=RMIClassLoader
                            2003-01-21 10:50:19,946 DEBUG [org.jboss.util.property.jmx.SystemPropertyClassValue] Error loading class org.jboss.system.JBossRMIClassLoader property java.rmi.server.RMIClassLoaderSpi not set.
                            java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.system.JBossRMIClassLoader at org.jboss.mx.loading.LoadMgr.beginLoadTask (LoadMgr.java:155)

                            2. I cannot do anything with the petstore, because it always displays the exception.

                            3. The size of Jboss server log is too big, it keeps increasing as jboss running. and cannot modify it's name unless stop the jboss server, because it's locked when jboss server running. so how to plan the server log size?

                            Your kind help is appreciated!
                            frank


                            • 11. Re: JBoss 3.2beta2 + Apache 2.0.40 + Tomcat 4.1 + mySQL 3.23
                              franksun

                              Could anyboby help me out of here? ~_~