7 Replies Latest reply on Aug 19, 2013 6:52 AM by Thanh Long Trinh

    How to setup JBoss 6 on Windows server 2008?

    Thanh Long Trinh Newbie

      Hi all,

       

      I have been developing web application using JBoss 6 server. I added jboss-6.1.0.Final to NetBeans on local already and need to setup on Windows server 2008. Can anyone help me which version I should choose and guideline how to setup on Windows server 2008?

      I am a dev and not familiar with setting up server so that I really need help from you guys.

       

      Thanks and best regards!

        • 1. Re: How to setup JBoss 6 on Windows server 2008?
          Nicklas Karlsson Master

          I'm not sure about what you are asking. Which AS version to migrate to from 6.1.0?

          • 2. Re: How to setup JBoss 6 on Windows server 2008?
            Wolf-Dieter Fink Master

            Hi Thanh,

            welome to the forums.

             

            I'm not sure which JBoss version do you mean. jboss-6.1.0.Final sounds to me you use the 'old' community version which is out of date. (also you are posting in the EAP forum which is meant for the EAP6.1.0 only)

             

            So please post a bit more details that we are able to help.

            • 3. Re: How to setup JBoss 6 on Windows server 2008?
              Thanh Long Trinh Newbie

              Thank you guys!

               

              I've installed successfully. If I meet any issues, I will need support from you.

               

              Regards!

              • 4. Re: How to setup JBoss 6 on Windows server 2008?
                Thanh Long Trinh Newbie

                Hi all,

                 

                I am new on EJB and JBoss. So I were frustrated with JBoss server and need you help.

                I created simplest EJB project. It runs smoothly on other servers (GlassFish, Tomcat) but JBoss. Below are pictures of issue.

                Did I do any wrong? Please help.

                 

                I saw it on admin console of JBoss:

                meap_jboss.PNG

                 

                But when running on JBoss 6:

                jboss.PNG

                and running on GlassFish:

                GlassFish.PNG

                 

                Thanks and best regards!

                • 5. Re: How to setup JBoss 6 on Windows server 2008?
                  Nicklas Karlsson Master

                  I am sure the server log will tell you what goes wrong during deployment

                  • 6. Re: How to setup JBoss 6 on Windows server 2008?
                    Thanh Long Trinh Newbie

                    Hi Nicklas Karlsson and all,

                     

                    I setup Jboss 7.1.1 final and It seemly works well.

                    But I meet other problem below.

                    Please help me to verify this error. Do I miss any config when setup JBoss?

                    I searched for this error but failure. Do we need to copy mysql-connector-java-5.1.6-bin.jar to anywhere in JBoss?

                    Because when I changed server to GlashFish, It runs well.

                     

                    Thanks and best regards.

                     

                    <pre>

                    16:45:54,809 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http--127.0.0.1-8080-1) HHH000402: Using Hibernate built-in connection pool (not for production use!)

                    16:45:54,813 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http--127.0.0.1-8080-1) HHH000115: Hibernate connection pool size: 20

                    16:45:54,815 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http--127.0.0.1-8080-1) HHH000006: Autocommit mode: true

                    16:45:54,946 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http--127.0.0.1-8080-1) HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/stew]

                    16:45:54,949 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (http--127.0.0.1-8080-1) HHH000046: Connection properties: {user=root, password=****, autocommit=true, release_mode=auto}

                    16:45:54,953 WARN  [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (http--127.0.0.1-8080-1) HHH000342: Could not obtain connection to query metadata : No suitable driver found for jdbc:mysql://localhost:3306/stew

                    16:45:54,996 INFO  [org.hibernate.dialect.Dialect] (http--127.0.0.1-8080-1) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect

                    16:45:54,997 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (http--127.0.0.1-8080-1) HHH000422: Disabling contextual LOB creation as connection was null

                    16:45:54,998 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (http--127.0.0.1-8080-1) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory

                    16:45:55,049 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (http--127.0.0.1-8080-1) HHH000397: Using ASTQueryTranslatorFactory

                    16:45:55,085 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (http--127.0.0.1-8080-1) HHH000228: Running hbm2ddl schema update

                    16:45:55,086 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (http--127.0.0.1-8080-1) HHH000102: Fetching database metadata

                    16:45:55,087 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (http--127.0.0.1-8080-1) HHH000319: Could not get database metadata: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/stew

                              at java.sql.DriverManager.getConnection(DriverManager.java:602) [rt.jar:1.6.0_25]

                              at java.sql.DriverManager.getConnection(DriverManager.java:154) [rt.jar:1.6.0_25]

                              at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                              at meap.stew.controllers.UserController.getUserByToken(UserController.java:177) [classes:]

                              at meap.stew.APIs.LogServlet.logging(LogServlet.java:125) [classes:]

                              at meap.stew.APIs.LogServlet.doPost(LogServlet.java:100) [classes:]

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]

                     

                     

                    16:45:55,200 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (http--127.0.0.1-8080-1) HHH000299: Could not complete schema update: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/stew

                              at java.sql.DriverManager.getConnection(DriverManager.java:602) [rt.jar:1.6.0_25]

                              at java.sql.DriverManager.getConnection(DriverManager.java:154) [rt.jar:1.6.0_25]

                              at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:194) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:457) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

                              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                              at meap.stew.controllers.UserController.getUserByToken(UserController.java:177) [classes:]

                              at meap.stew.APIs.LogServlet.logging(LogServlet.java:125) [classes:]

                              at meap.stew.APIs.LogServlet.doPost(LogServlet.java:100) [classes:]

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]

                     

                     

                    16:45:55,303 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 0, SQLState: 08001

                    16:45:55,304 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) No suitable driver found for jdbc:mysql://localhost:3306/stew

                     

                    </pre>

                    • 7. Re: How to setup JBoss 6 on Windows server 2008?
                      Thanh Long Trinh Newbie

                      Please see below for persistence.xml:

                       

                      <?xml version='1.0' encoding='utf-8'?>

                      <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

                       

                       

                          <persistence-unit name="JPA" transaction-type="RESOURCE_LOCAL">

                              <provider>org.hibernate.ejb.HibernatePersistence</provider>

                              <class>meap.stew.entities.AppUser</class>

                              <class>meap.stew.entities.DataSyncTracking</class>

                              <class>meap.stew.entities.DeviceRegister</class>

                              <class>meap.stew.entities.Group</class>

                              <class>meap.stew.entities.Log</class>

                              <class>meap.stew.entities.Message</class>

                              <class>meap.stew.entities.MessageSent</class>

                              <class>meap.stew.entities.Role</class>

                              <class>meap.stew.entities.User</class>

                              <class>meap.stew.entities.UserData</class>

                              <class>meap.stew.entities.UserGroupDetail</class>

                              <properties>

                                  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

                                  <property name="hibernate.hbm2ddl.auto" value="update"/>

                                  <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>

                                  <property name="hibernate.connection.username" value="root"/>

                                  <property name="hibernate.connection.password" value=""/>

                                  <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/stew"/>

                              </properties>

                          </persistence-unit>

                       

                       

                      </persistence>