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

        It's possible (likely in fact) that the two JBoss jars are also messing things up. Try removing jboss-archive-browsing-5.0.0alpha-200607201-119.jar and jboss-common-4.0.2.jar as well.

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

          even now also the error is same . going back and forth like this consuming lot of time  , If possible can i have ur email id ? so that we can solve it quickly .

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

            Hi there,

             

            It looks like you're a victim of https://jira.springsource.org/browse/SPR-7197. I recommend that you upgrade to the latest Spring Framework 3.0.x jars. We are using 3.0.6 successfully with our application.

             

            With regard to my personal contact details, I'm sorry but I cannot do that. I answer questions on these forums in my spare time for my own personal enjoyment and self-education. It's not my job...

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

              changed all spring jars to 3.0.6 now again i m getting the old error?

               

               

              Failed to start service jboss.persistenceunit."ref-app-admin-web.war#WebArchJRA-IBP": org.jboss.msc.service.StartException in service jboss.persistenceunit."ref-app-admin-web.war#WebArchJRA-IBP": Failed to start service

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

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

              Caused by: javax.persistence.PersistenceException: [PersistenceUnit: WebArchJRA-IBP] Unable to build EntityManagerFactory

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)

                        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

                        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

                        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        ... 3 more

              Caused by: org.hibernate.AnnotationException: Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn: com.refapp.domain.Manufacturer.products

                        at org.hibernate.cfg.annotations.CollectionBinder.bind(CollectionBinder.java:484)

                        at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1929)

                        at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:765)

                        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:684)

                        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3406)

                        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3360)

                        at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1334)

                        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1724)

                        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

                        ... 9 more

               

               

              17:22:30,316 WARN  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

              17:22:30,356 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."ref-app-admin-web.war#WebArchJRA": org.jboss.msc.service.StartException in service jboss.persistenceunit."ref-app-admin-web.war#WebArchJRA": Failed to start service

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

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

              Caused by: javax.persistence.PersistenceException: [PersistenceUnit: WebArchJRA] Unable to build EntityManagerFactory

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)

                        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

                        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

                        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                        ... 3 more

              Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set

                        at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97)

                        at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67)

                        at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:176)

                        at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

                        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

                        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

                        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)

                        at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)

                        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)

                        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)

                        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

                        ... 9 more

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

                The first issue is a problem with your JPA annotations which you will need to address.

                 

                I think we need to see your persistence.xml for the second problem, but I'm guessing there is no datasource defined or it's not pointing at a valid datasource.

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

                  application is  running on jboss7.1but not able  to connect to mysql database .

                   

                  can anyone help me  how to configure mysql .

                   

                   

                  databse properties is defined in jpa.properties

                   

                  jpa.properties

                   

                  # Database dialect

                  jpa.dialect=org.hibernate.dialect.MySQL5Dialect

                  # Database driver class name

                  jpa.connection.driver_class=com.mysql.jdbc.Driver

                  # Database Connection URL

                  jpa.connection.url=jdbc:mysql://localhost:3306/refapp-dev?zeroDateTimeBehavior=convertToNull

                   

                   

                   

                  # Database username and password

                  jpa.connection.username=root

                  jpa.connection.password=admin

                   

                   

                  # When this property is set to true all SQL queries will be displayed

                  # on the console.

                  jpa.showSql=true

                   

                   

                  # When this option is set to true, DDLs (generated from entity mappings)

                  # will be executed against the database.

                   

                   

                  jpa.generateDdl=false

                   

                   

                  ---> in \jboss-as-7.1.1.Final\modules\com\mysql\main

                   

                  i have

                  mysql-connector-java-5.1.21-bin.jar and

                  module.xml

                   

                  module .xml

                   

                  <module xmlns="urn:jboss:module:1.1" name="mysql"> 

                   

                     <resources> 

                   

                       <resource-root path="mysql-connector-java-5.1.21-bin.jar"/> 

                   

                     </resources> 

                   

                     <dependencies> 

                   

                      <module name="javax.api"/> 

                   

                       <module name="javax.transaction.api"/> 

                   

                  </dependencies> 

                   

                    </module>

                   

                  standlalone.xml

                   

                                  <drivers>

                                      <driver name="h2" module="com.h2database.h2">

                                          <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                      </driver>

                                      <driver name="com.mysql" module="com.mysql">

                                          <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                                      </driver>

                                  </drivers>

                   

                  In persistence .xml

                   

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

                    <mapping-file>refapp-named-query.xml</mapping-file>

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

                    <jta-data-source>java:jboss/datasources/MySQLDS</jta-data-source>

                    <properties>

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

                    </properties>

                   

                    </persistence-unit>

                  </persistence>

                   

                   

                  I have also placed mysql-ds.xml  in \jboss-as-7.1.1.Final\standalone\deployments

                   

                  mysql-ds.xml

                   

                   

                  <?xml version="1.0" encoding="UTF-8"?> 

                   

                    <datasources> 

                   

                  <datasource jndi-name="java:jboss/datasources/MySQLDS" enabled="true" use-java-context="true" 

                   

                     pool-name="MySQLDS"> 

                   

                     <connection-url>jdbc:mysql://localhost:3306/refapp-dev</connection-url> 

                   

                    <driver>mysql</driver> 

                   

                     <security> 

                   

                  <user-name>root</user-name> 

                   

                    <password>admin</password> 

                   

                    </security> 

                   

                     </datasource> 

                   

                  </datasources> 


                   

                   

                   

                  I am getting the following Error:-

                   

                  17:21:07,972 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 40424ms - Started 324 of 554 services (151 services failed or missing dependencies, 78 services are passive or on-demand)

                  17:21:08,179 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "ref-app-admin-web.war" was rolled back with no failure message

                  17:21:08,195 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "mysql-ds.xml" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysqlMissing[jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysql]"]}

                  17:21:08,226 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Unbound data source [jboss/datasources/MySQLDS]

                  17:21:08,381 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment mysql-ds.xml in 173ms

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

                    Your standalone.xml has defined the driver with name com.mysql, but your mysql-ds.xml file is referring to it with the name mysql.

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

                      I have changed the driver name but  still the error is same

                       

                      [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

                      11:33:52,890 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "ref-app-admin-web.war" was rolled back with no failure message

                      11:33:52,897 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "mysql-ds.xml" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysqlMissing[jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysql]"]}

                      11:33:52,953 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010409: Unbound data source [jboss/datasources/MySQLDS]

                      11:33:52,968 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment mysql-ds.xml in 72ms

                       

                       

                      JBAS014775:    New missing/unsatisfied dependencies:

                            service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.jboss/datasources/MySQLDS]

                       

                       

                      11:34:10,690 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysqlMissing[jboss.data-source.jboss/datasources/MySQLDSjboss.jdbc-driver.mysql]"]}}}

                      11:34:10,699 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was rolled back

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

                        You changed the driver name where?

                         

                        If you edited standalone.xml while the server was running then your changes will not be picked up by the server. Furthermore the server will change it back to what it thinks it is when shutting down.

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

                          i have changed the driver name in standalone .xml and restarted the server again but still the error is same

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

                            i have now explicilty defined the database configuration in integration-dao.xml now its not referring from jpa.properties

                             

                            <!-- 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-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>

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

                              still the error is same .

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

                                Have you installed the driver as described in AS71 DataSource configuration?

                                 

                                You will find other information on setting up datasources in this article.

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

                                  I have done the same way u can check the configuration i have given above .

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

                                    Let's try something else.

                                     

                                    Start your server and then run the CLI in another shell window.

                                     

                                    {code}[steve@steves-mbpw jboss-as-7.1.1.Final]$ bin/jboss-cli.sh

                                    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 /]

                                    {code}

                                     

                                    and then show us the ouput of:

                                     

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

                                     

                                    Mine shows me:

                                     

                                    {code}h2             postgresql91{code}

                                    and then show:

                                     

                                    {code}[standalone@localhost:9999 /] ls subsystem=datasources/jdbc-driver=postgresql91{code}

                                    except use your driver name.

                                     

                                    And then, try this:

                                     

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

                                    followed by:

                                     

                                    {code}[standalone@localhost:9999 /] ls subsystem=datasources/data-source=<your datasource name>{code}

                                     

                                    That should show us what's going on.