1 2 3 Previous Next 40 Replies Latest reply on Jul 20, 2012 4:49 AM by nasircloud Go to original post
      • 30. Re: can not deploy war file in JBOSS-as-7.0.1
        nasircloud

        [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=

        com.mysql   h2

        [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=com.mysql

        [standalone@localhost:9999 /] ls subsystem=datasources/data-source=

        refapp-dev

        [standalone@localhost:9999 /] ls subsystem=datasources/data-source=refapp-dev

        connection-properties

        statistics

        allocation-retry=undefined

        allocation-retry-wait-millis=undefined

        background-validation=undefined

        background-validation-millis=undefined

        blocking-timeout-wait-millis=undefined

        check-valid-connection-sql=undefined

        connection-url=jdbc:mysql://localhost:3306/refapp-dev

        datasource-class=undefined

        driver-class=undefined

        driver-name=h2

        enabled=true

        exception-sorter-class-name=undefined

        exception-sorter-properties=undefined

        flush-strategy=undefined

        idle-timeout-minutes=undefined

        jndi-name=java:/refapp-dev

        jta=true

        max-pool-size=undefined

        min-pool-size=undefined

        new-connection-sql=undefined

        password=admin

        pool-prefill=undefined

        pool-use-strict-min=undefined

        prepared-statements-cache-size=undefined

        query-timeout=undefined

        reauth-plugin-class-name=undefined

        reauth-plugin-properties=undefined

        security-domain=undefined

        set-tx-query-timeout=false

        share-prepared-statements=false

        spy=false

        stale-connection-checker-class-name=undefined

        stale-connection-checker-properties=undefined

        track-statements="NOWARN"

        transaction-isolation=undefined

        url-delimiter=undefined

        url-selector-strategy-class-name=undefined

        use-ccm=true

        use-fast-fail=false

        use-java-context=true

        use-try-lock=undefined

        user-name=root

        valid-connection-checker-class-name=undefined

        valid-connection-checker-properties=undefined

        validate-on-match=false

        [standalone@localhost:9999 /]

        • 31. Re: can not deploy war file in JBOSS-as-7.0.1
          sfcoy

          nasir naseem siddiqui wrote:

           

          ...

          driver-name=h2

          ...
          [standalone@localhost:9999 /]

          That doesn't look right does it?

          • 32. Re: can not deploy war file in JBOSS-as-7.0.1
            nasircloud

            i have changed the driver name in standalone.xml now i got this

             

            You are disconnected at the moment. Type 'connect' to connect to the server or '

            help' for the list of supported commands.

            [disconnected /] connect

            [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=

            com.mysql   h2

            [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=com.mysql

            [standalone@localhost:9999 /]  ls subsystem=datasources/data-source=

            refapp-dev

            [standalone@localhost:9999 /]  ls subsystem=datasources/data-source=refapp-dev

            connection-properties

            allocation-retry=undefined

            allocation-retry-wait-millis=undefined

            background-validation=undefined

            background-validation-millis=undefined

            blocking-timeout-wait-millis=undefined

            check-valid-connection-sql=undefined

            connection-url=jdbc:mysql://localhost:3306/refapp-dev

            datasource-class=undefined

            driver-class=undefined

            driver-name=com.mysql

            enabled=true

            exception-sorter-class-name=undefined

            exception-sorter-properties=undefined

            flush-strategy=undefined

            idle-timeout-minutes=undefined

            jndi-name=java:/refapp-dev

            jta=true

            max-pool-size=undefined

            min-pool-size=undefined

            new-connection-sql=undefined

            password=admin

            pool-prefill=undefined

            pool-use-strict-min=undefined

            prepared-statements-cache-size=undefined

            query-timeout=undefined

            reauth-plugin-class-name=undefined

            reauth-plugin-properties=undefined

            security-domain=undefined

            set-tx-query-timeout=false

            share-prepared-statements=false

            spy=false

            stale-connection-checker-class-name=undefined

            stale-connection-checker-properties=undefined

            track-statements="NOWARN"

            transaction-isolation=undefined

            url-delimiter=undefined

            url-selector-strategy-class-name=undefined

            use-ccm=true

            use-fast-fail=false

            use-java-context=true

            use-try-lock=undefined

            user-name=root

            valid-connection-checker-class-name=undefined

            valid-connection-checker-properties=undefined

            validate-on-match=false

            [standalone@localhost:9999 /]

             

             

            when i start the server i get the following

             

            Calling "C:\NASIR-BDC7B.4.141\servers\jboss-as-7.1.1.Final\bin\standalone.conf.b

            at"

            ===============================================================================

             

             

              JBoss Bootstrap Environment

             

             

              JBOSS_HOME: C:\NASIR-BDC7B.4.141\servers\jboss-as-7.1.1.Final

             

             

              JAVA: C:\Program Files\Java\jdk1.6.0_31\bin\java

             

             

              JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51

            2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se

            rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war

            ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c

            onfig=standalone.xml

             

             

            ===============================================================================

             

             

            13:34:30,713 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

            13:34:31,019 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

            13:34:31,070 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" sta

            rting

            13:34:32,761 INFO  [org.xnio] XNIO Version 3.0.3.GA

            13:34:32,779 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

            13:34:32,789 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

            13:34:32,765 INFO  [org.jboss.as.server] JBAS015888: Creating http management se

            rvice using socket-binding (management-http)

            13:34:32,940 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log han

            dlers

            13:34:33,217 INFO  [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: St

            arting Naming Service

            13:34:33,259 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011

            940: Activating OSGi Subsystem

            13:34:33,266 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013100:

            Current PicketBox version=4.0.7.Final

            13:34:33,264 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Po

            ol -- 31) JBAS010280: Activating Infinispan subsystem.

            13:34:33,279 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48)

            JBAS015537: Activating WebServices Extension

            13:34:33,563 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerServic

            e Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Dr

            iver (version 1.3)

            13:34:34,007 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS01

            5400: Bound mail session [java:jboss/mail/Default]

            13:34:34,018 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408:

            Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

            13:34:34,421 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC se

            rvice thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

            13:34:34,580 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread

            1-4) JBAS015012: Started FileSystemDeploymentService for directory C:\NASIR-BDC7

            B.4.141\servers\jboss-as-7.1.1.Final\standalone\deployments

            13:34:34,730 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread

            1-4) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

            13:34:34,963 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100:

            Listening on /127.0.0.1:9999

            13:34:35,011 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100:

            Listening on /127.0.0.1:4447

            13:34:35,340 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774

            : Service status report

            JBAS014775:    New missing/unsatisfied dependencies:

                  service jboss.jdbc-driver.com_mysql (missing) dependents: [service jboss.d

            ata-source.java:/refapp-dev]

             

             

            13:34:35,383 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBA

            S015876: Starting deployment of "ref-app-admin-web.war"

            • 33. Re: can not deploy war file in JBOSS-as-7.0.1
              nasircloud

              i started everything from scratch now the database is also bounded

               

              17:12:00,402 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

              17:12:00,480 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

              17:12:01,089 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

              17:12:01,344 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

              17:12:01,390 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]

              17:12:01,576 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA

              17:12:02,069 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

              17:12:02,159 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/refapp-dev]

              17:12:02,160 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

              17:12:02,380 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory C:\NASIR-BDC7B.4.141\servers\jboss-as-7.1.1.Final\standalone\deployments

              17:12:02,458 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447

              17:12:02,458 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999

              17:12:02,692 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "ref-app-admin-web.war"

               

               

              My persistence.xml file contains

               

              <persistence-unit name="WebArchJRA-IBP" transaction-type="RESOURCE_LOCAL">

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

                        <jta-data-source>java:/refapp-dev</jta-data-source>

                        <properties>

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

                                                      </properties>

                        <mapping-file>META-INF/ProductModification.ORM.xml</mapping-file>

                          <exclude-unlisted-classes>true</exclude-unlisted-classes>

                </persistence-unit>

              </persistence>

               

               

              on running the CLI in another shell window i got the following :-

               

              You are disconnected at the moment. Type 'connect' to connect to the server or '

              help' for the list of supported commands.

              [disconnected /] connect

              [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=

              h2      mysql

              [standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=mysql

              [standalone@localhost:9999 /] ls subsystem=datasources/data-source=

              ExampleDS    refapp-dev

              [standalone@localhost:9999 /] ls subsystem=datasources/data-source=refapp-dev

              connection-properties

              statistics

              allocation-retry=undefined

              allocation-retry-wait-millis=undefined

              background-validation=undefined

              background-validation-millis=undefined

              blocking-timeout-wait-millis=undefined

              check-valid-connection-sql=undefined

              connection-url=jdbc:mysql://localhost:3306/refapp-dev

              datasource-class=undefined

              driver-class=undefined

              driver-name=mysql

              enabled=true

              exception-sorter-class-name=undefined

              exception-sorter-properties=undefined

              flush-strategy=undefined

              idle-timeout-minutes=undefined

              jndi-name=java:/refapp-dev

              jta=true

              max-pool-size=undefined

              min-pool-size=undefined

              new-connection-sql=undefined

              password=admin

              pool-prefill=undefined

              pool-use-strict-min=undefined

              prepared-statements-cache-size=100

              query-timeout=undefined

              reauth-plugin-class-name=undefined

              reauth-plugin-properties=undefined

              security-domain=undefined

              set-tx-query-timeout=false

              share-prepared-statements=true

              spy=false

              stale-connection-checker-class-name=undefined

              stale-connection-checker-properties=undefined

              track-statements="NOWARN"

              transaction-isolation=undefined

              url-delimiter=undefined

              url-selector-strategy-class-name=undefined

              use-ccm=true

              use-fast-fail=false

              use-java-context=true

              use-try-lock=undefined

              user-name=root

              valid-connection-checker-class-name=undefined

              valid-connection-checker-properties=undefined

              validate-on-match=false

              [standalone@localhost:9999 /]

               

               

              In integration-dao.context.xml file  ihave defined database connection as follows :-

               

              <!-- Create Data source -->

              <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">

                        <property name="driverClassName" value="com.mysql.jdbc.Driver" />

                        <property name="url" value="jdbc:mysql://localhost:3306/refapp-dev?zeroDateTimeBehavior=convertToNull" />

                        <property name="username" value="root" />

                        <property name="password" value="admin" />

              </bean>

               

               

              <!-- Create entity manager for Application -->

              <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

                   <property name="dataSource" ref="dataSource" />

                         <property name="persistenceUnitName" value="WebArchJRA-IBP" />

                   <property name="jpaVendorAdapter">

                                             <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">

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

                                                <property name="showSql" value="true"/>

                                                <property name="generateDdl" value="false"/>

                                    </bean>

                          </property>

              </bean>

               

               

               

              I am not able to understand where i have gone wrong ??/ still its not able to connect to the database??


               


              • 34. Re: can not deploy war file in JBOSS-as-7.0.1
                sfcoy

                What exactly is the exception stack trace in the logs?

                • 35. Re: can not deploy war file in JBOSS-as-7.0.1
                  nasircloud

                  there is no exception in the logs..

                  • 36. Re: can not deploy war file in JBOSS-as-7.0.1
                    nasircloud

                    when i m trying to login in the application its failing

                    • 37. Re: can not deploy war file in JBOSS-as-7.0.1
                      sfcoy

                      You need to read http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/orm.html#orm-jpa-setup.

                       

                      Additionally, your persistence.xml contains:

                       

                      {code:xml}<exclude-unlisted-classes>true</exclude-unlisted-classes>{code}

                       

                      and you have not listed any classes.

                      • 38. Re: can not deploy war file in JBOSS-as-7.0.1
                        nasircloud

                        this works fine with tomcat-6 but when running on jboss-as7.1 spring security is failing ?

                         

                        Does Jboss have have some restrictions or limitations for spring security

                         

                         

                        my application has following spring security jars..--

                         

                        org.springframework.security-2.0.4.A.jar

                        spring-security-web-3.0.6.RELEASE.jar

                        spring-security-taglibs-3.0.6.RELEASE.jar

                        spring-security-core-tiger-2.0.4.jar

                        spring-security-core-3.0.6.RELEASE.jar

                        spring-security-config-3.0.6.RELEASE.jar

                        spring-security-acl-3.0.6.RELEASE.jar

                         

                         

                        I tried  omitting

                        <exclude-unlisted-classes>true</exclude-unlisted-classes>

                        and running the application still its not not able to connect as j_spring_security_check is failing .

                        • 39. Re: can not deploy war file in JBOSS-as-7.0.1
                          sfcoy

                          You should start a new discussion for this. I think your generic deployment problems have been resolved.

                          • 40. Re: can not deploy war file in JBOSS-as-7.0.1
                            nasircloud

                            ok thanks a lot for helping me resolving deployment problems

                            1 2 3 Previous Next