11 Replies Latest reply on Aug 6, 2012 2:44 AM by nasir naseem siddiqui

    cannot connect to mysql database in jboss-as7.1

    nasir naseem siddiqui Newbie

      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>

            

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

        • 1. Re: cannot connect to mysql database in jboss-as7.1
          nasir naseem siddiqui Newbie

          Layout of my application

           

          Layout of my application

          META-INF/

          META-INF/MANIFEST.MF

          images/

          js/

          styles/

          WEB-INF/

          WEB-INF/classes/

          WEB-INF/classes/com/

          WEB-INF/classes/com/refappadmin/

          WEB-INF/classes/com/refappadmin/constants/

          WEB-INF/classes/com/refappadmin/controllers/

          WEB-INF/classes/com/refappadmin/interceptor/

          WEB-INF/classes/com/refappadmin/view/

          WEB-INF/config/

          WEB-INF/decorators/

          WEB-INF/lib/

          WEB-INF/pages/

          WEB-INF/pages/error/

          WEB-INF/pages/public/ WEB-INF/styles/

          WEB-INF/tld/

          accessDenied.jsp

          images/addtocart_default.png

          images/addtocart_hover.png

          images/calender.png

          images/checkout.png

          images/checkout_hover.png

          images/confirm_default.png

          images/confirm_hover.png

          images/continue_to_shop.png

          images/continue_to_shop_hover.png

          images/footer.gif

          images/go.png

          images/go_hover.png

          images/header.png

          images/login_button.png

          images/login_button_hover.png

          images/next_default.png

          images/next_hover.png

          images/previous_default.png

          images/previous_hover.png

          images/register_default.png

          images/register_hover.png

          images/search_bg.png

          images/shop_catg_hover.gif

          images/shop_cat_default.gif

          images/top_header.png

          images/update.png

          images/update_hover.png

          images/utility_bar_background.png

          images/view_cart_button.png

          images/view_cart_hover.png index.jsp

          js/prototype.js

          js/refapp.js

          js/skyway-internal.js

          js/skyway.js

          styles/calendar.css

          styles/global.css

          styles/refapp.css

          styles/refapp_es.css

          WEB-INF/classes/action-servlet.xml

          WEB-INF/classes/audit_logger.xml

          WEB-INF/classes/CategoryDescriptionCodesDecodeTable.xml

          WEB-INF/classes/CodesTableServiceCodeDecode.xml

          WEB-INF/classes/com/refappadmin/constants/Constants.class

          WEB-INF/classes/com/refappadmin/controllers/HomePageController.class

          WEB-INF/classes/com/refappadmin/controllers/LoginController.class

          WEB-INF/classes/com/refappadmin/controllers/ProductModificationController.class

          WEB-INF/classes/com/refappadmin/controllers/ProductsListController.class

          WEB-INF/classes/com/refappadmin/interceptor/LocaleInterceptor.class

          WEB-INF/classes/com/refappadmin/view/ProductModificationBean.class

          WEB-INF/classes/displaytag.properties

          WEB-INF/classes/displaytag_es.properties

          WEB-INF/classes/ehcache.xml

          WEB-INF/classes/errormessages.properties

          WEB-INF/classes/errormessages_es.properties

          WEB-INF/classes/exceptionMappings.properties

          WEB-INF/classes/exceptionMessages.properties

          WEB-INF/classes/exceptionMessages_es.properties

          WEB-INF/classes/log4j.properties

          WEB-INF/classes/refapp.properties

          WEB-INF/classes/securityContext.xml

          WEB-INF/classes/sitetext.properties

          WEB-INF/classes/sitetext_es.properties WEB-INF/config/action-servlet.xml

          WEB-INF/config/audit_logger.xml


          WEB-INF/config/dwr-config.xml

          WEB-INF/config/securityContext.xml

          WEB-INF/config/web-application-config.xml

          WEB-INF/config/webmvc-config.xml

          WEB-INF/decorators/refapp-footer.jsp

          WEB-INF/decorators/refapp-header.jsp

          WEB-INF/decorators/refapp-leftmenu.jsp

          WEB-INF/decorators/refapp-main.jsp

          WEB-INF/decorators.xml


          WEB-INF/lib/acegi-security-1.0.6.jar WEB-INF/lib/activation-1.1.jar WEB-INF/lib/ant-1.7.0.jar WEB-INF/lib/ant-launcher-1.7.0.jar WEB-INF/lib/antlr-2.7.6.jar WEB-INF/lib/aopalliance-1.0.jar WEB-INF/lib/asm-2.2.3.jar WEB-INF/lib/asm-attrs-1.5.3.jar WEB-INF/lib/aspectjrt-1.5.4.jar WEB-INF/lib/aspectjtools-1.6.5.jar WEB-INF/lib/aspectjweaver-1.5.4.jar WEB-INF/lib/avalon-framework-4.1.3.jar WEB-INF/lib/backport-util-concurrent-3.1.jar WEB-INF/lib/cglib-nodep-2.1_3.jar WEB-INF/lib/common-3.1.0.jar WEB-INF/lib/commons-beanutils-1.7.0.jar WEB-INF/lib/commons-beanutils-bean-collections-1.7.0.jar WEB-INF/lib/commons-beanutils-core-1.7.0.jar WEB-INF/lib/commons-chain-1.1.jar WEB-INF/lib/commons-codec-1.3.jar WEB-INF/lib/commons-collections-3.2.jar WEB-INF/lib/commons-configuration-1.5.jar WEB-INF/lib/commons-dbcp-1.2.1.jar WEB-INF/lib/commons-digester-1.7.jar WEB-INF/lib/commons-el-1.0.jar WEB-INF/lib/commons-fileupload-1.2.1.jar WEB-INF/lib/commons-io-1.2.jar WEB-INF/lib/commons-lang-2.3.jar WEB-INF/lib/commons-logging-1.1.jar WEB-INF/lib/commons-pool-1.2.jar WEB-INF/lib/commons-validator-1.1.4.jar WEB-INF/lib/displaytag-1.2.jar WEB-INF/lib/dom4j-1.6.1.jar WEB-INF/lib/easymock-2.5.1.jar WEB-INF/lib/ehcache-1.4.1.jar WEB-INF/lib/ejb3-persistence-1.0.1.GA.jar WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar WEB-INF/lib/groovy-all-1.5.6.jar WEB-INF/lib/hibernate-3.2.6.ga.jar WEB-INF/lib/hibernate-annotations-3.3.1.GA.jar WEB-INF/lib/hibernate-commons-annotations-3.3.0.ga.jar WEB-INF/lib/hibernate-entitymanager-3.3.2.GA.jar WEB-INF/lib/hibernate-search-3.0.0.GA.jar WEB-INF/lib/hibernate-validator-3.0.0.ga.jar WEB-INF/lib/hsqldb-1.8.0.7.jar WEB-INF/lib/icu4j-2.6.1.jar WEB-INF/lib/itext-1.3.jar WEB-INF/lib/javahelp-2.0.02.jar WEB-INF/lib/javassist-3.4.ga.jar WEB-INF/lib/jaxb-api-2.1.jar WEB-INF/lib/jaxb-impl-2.1.6.jar WEB-INF/lib/jaxen-1.1.1.jar WEB-INF/lib/jboss-archive-browsing-5.0.0alpha-200607201-119.jar WEB-INF/lib/jboss-common-4.0.2.jar WEB-INF/lib/jcl104-over-slf4j-1.4.2.jar WEB-INF/lib/jdom-1.0.jar WEB-INF/lib/jettison-1.0.jar WEB-INF/lib/jline-0.9.94.jar WEB-INF/lib/joda-time-1.6.jar WEB-INF/lib/js-1.6R2.jar WEB-INF/lib/jsr107cache-1.0.jar WEB-INF/lib/jsr250-api-1.0.jar WEB-INF/lib/jstl-1.1.2.jar WEB-INF/lib/jta-1.1.jar WEB-INF/lib/liquibase-core-1.9.3.jar WEB-INF/lib/log4j-1.2.13.jar WEB-INF/lib/logkit-1.0.1.jar WEB-INF/lib/lucene-core-2.3.0.jar WEB-INF/lib/mail-1.4.1.jar WEB-INF/lib/myfaces-api-1.1.0.jar WEB-INF/lib/mysql-connector-java-5.1.6.jar WEB-INF/lib/ognl-2.6.9.jar WEB-INF/lib/org.springframework.binding-2.0.5.RELEASE.jar WEB-INF/lib/org.springframework.js-2.0.5.RELEASE.jar WEB-INF/lib/org.springframework.webflow-2.0.5.RELEASE.jar WEB-INF/lib/oro-2.0.8.jar WEB-INF/lib/persistence-api-1.0.jar WEB-INF/lib/portlet-api-1.0.jar WEB-INF/lib/ref-app-admin-dao-1.1.0.jar WEB-INF/lib/ref-app-admin-domain-1.1.0.jar WEB-INF/lib/ref-app-admin-service-1.1.0.jar WEB-INF/lib/ref-app-domain-1.5.0.jar WEB-INF/lib/sitemesh-2.2.1.jar WEB-INF/lib/slf4j-api-1.4.3.jar WEB-INF/lib/slf4j-log4j12-1.5.2.jar WEB-INF/lib/spring-aop-3.0.6.RELEASE.jar WEB-INF/lib/spring-asm-3.0.6.RELEASE.jar WEB-INF/lib/spring-aspects-3.0.6.RELEASE.jar WEB-INF/lib/spring-beans-3.0.6.RELEASE.jar WEB-INF/lib/spring-context-3.0.6.RELEASE.jar WEB-INF/lib/spring-context-support-3.0.6.RELEASE.jar WEB-INF/lib/spring-core-3.0.6.RELEASE.jar WEB-INF/lib/spring-expression-3.0.6.RELEASE.jar WEB-INF/lib/spring-jdbc-3.0.6..RELEASE.jar WEB-INF/lib/spring-modules-jakarta-commons-0.6.jar WEB-INF/lib/spring-orm-3.0.2.RELEASE.jar WEB-INF/lib/spring-remoting-1.2.9.jar WEB-INF/lib/spring-security-acl-3.0.6.jar WEB-INF/lib/spring-security-core-3.0.6.jar WEB-INF/lib/spring-security-core-tiger-3.0.6.jar WEB-INF/lib/spring-security-taglibs-3.0.6.jar WEB-INF/lib/spring-support-1.2.9.jar WEB-INF/lib/spring-tx-3.0.2.RELEASE.jar WEB-INF/lib/spring-web-3.0.6.RELEASE.jar WEB-INF/lib/spring-webmvc-3.0.6.RELEASE.jar WEB-INF/lib/standard-1.1.2.jar WEB-INF/lib/stax-api-1.0-2.jar WEB-INF/lib/stax-api-1.0.1.jar WEB-INF/lib/struts-menu-2.4.3.jar WEB-INF/lib/velocity-1.4.jar WEB-INF/lib/velocity-dep-1.4.jar WEB-INF/lib/velocity-tools-view-1.0.jar WEB-INF/lib/web-3.1.0.jar WEB-INF/lib/webdavlib-2.0.jar WEB-INF/lib/xalan-2.6.0.jar WEB-INF/lib/xercesImpl-2.8.1.jar WEB-INF/lib/xml-apis-1.3.02.jar WEB-INF/lib/xml-resolver-1.1.jar WEB-INF/lib/xmlParserAPIs-2.6.2.jar WEB-INF/lib/XmlSchema-1.4.2.jar WEB-INF/lib/xom-1.0.jar

          WEB-INF/pages/applicationError.jsp WEB-INF/pages/defaultErrorViewForLRH.jsp WEB-INF/pages/error/accessDenied.jsp WEB-INF/pages/error/applicationErrorPage.jsp WEB-INF/pages/error/errorPage.jsp WEB-INF/pages/error/errorPageLRH.jsp WEB-INF/pages/error.jsp WEB-INF/pages/includeHome.jsp WEB-INF/pages/includes.jsp WEB-INF/pages/public/authorityDetails.jsp WEB-INF/pages/public/login.jsp WEB-INF/pages/public/logout.jsp WEB-INF/pages/public/modifyProduct.jsp WEB-INF/pages/public/modifyProductConfirmation.jsp WEB-INF/pages/public/viewHome.jsp WEB-INF/pages/public/viewProductDetail.jsp WEB-INF/pages/public/viewProductList.jsp WEB-INF/pages/welcome.jsp


          WEB-INF/sitemesh.xml WEB-INF/styles/calendar.css WEB-INF/styles/global.css WEB-INF/styles/refapp.css WEB-INF/styles/refapp_es.css


          WEB-INF/tld/CodeDecode.tld WEB-INF/tld/jhlib.tld

          WEB-INF/web.xml


          META-INF/maven/ META-INF/maven/com/ META-INF/maven/com/ref-app-admin-web/ META-INF/maven/com/ref-app-admin-web/pom.xml META-INF/maven/com/ref-app-admin-web/pom.properties

           


          integration-dao.xml file in ref-app-admin-dao-1.1.0.jar contains the database configuration


          <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://127.6.233.1:3306/refapp-dev?zeroDateTimeBehavior=convertToNull" /> <property name="username" value="admin" /> <property name="password" value="*******" /> </bean>


          Persistence.xml file contains

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

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

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

          </persistence>

          • 2. Re: cannot connect to mysql database in jboss-as7.1
            Stephen Coy Master

            Did you read the link I gave you in the other discussion?

            • 3. Re: cannot connect to mysql database in jboss-as7.1
              nasir naseem siddiqui Newbie

              Yes, but i am not able to understand my  prblem

              • 4. Re: cannot connect to mysql database in jboss-as7.1
                Stephen Coy Master

                The first thing I would do is change your persistence.xml file to:

                 

                {code:xml}<persistence-unit name="WebArchJRA-IBP" transaction-type="JTA">

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

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

                  </persistence-unit>

                </persistence>{code}

                 

                Additionally, change the name of this file to (say) spring-persistence.xml. This prevents JBoss and Spring from disagreeing over who is managing the JPA configuration.

                 

                Next, change your Spring datasource configuration to:

                 

                {code:xml}

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

                <beans xmlns="http://www.springframework.org/schema/beans"

                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                       xmlns:jee="http://www.springframework.org/schema/jee"

                       xsi:schemaLocation="

                               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

                               http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">

                   ...

                <!-- Create Data source -->

                  <jee:jndi-lookup id="dataSource" jndi-name="java:/refapp-dev"/>

                   ...{code}

                 

                and finally change the configuration of your org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean to account for the name change in your persistence.xml file:

                 

                {code:xml}<!-- 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="persistenceXmlLocation"  value="META-INF/spring-persistence.xml"/>

                     <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>{code}

                • 5. Re: cannot connect to mysql database in jboss-as7.1
                  nasir naseem siddiqui Newbie

                  making all these changes  now i got the following error

                   

                  ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-2) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [integration-dao-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [integration-dao-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from ServletContext resource [/META-INF/spring-persistence.xml]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710) [spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410) [spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

                            at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

                            at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

                  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [integration-dao-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from ServletContext resource [/META-INF/spring-persistence.xml]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:400) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:99) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1439) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1408) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]

                            ... 18 more

                  • 6. Re: cannot connect to mysql database in jboss-as7.1
                    Stephen Coy Master

                    Sorry, my persistence.xml file had the header chopped off:

                     

                    {code:xml}<?xml version="1.0" encoding="UTF-8"?>

                    <persistence version="2.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_2_0.xsd">

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

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

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

                              </persistence-unit>

                    </persistence>{code}

                     

                     

                    Hopefully, you noticed that..

                    • 7. Re: cannot connect to mysql database in jboss-as7.1
                      nasir naseem siddiqui Newbie

                      yes ,i noticed it  and its same as

                       

                      <?xml version="1.0" encoding="UTF-8"?>
                      <persistence version="2.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_2_0.xsd">

                                <persistence-unit name="WebArchJRA-IBP" transaction-type="JTA">
                                          <jta-data-source>java:/refapp-dev</jta-data-source>
                                          <mapping-file>META-INF/ProductModification.ORM.xml</mapping-file>
                                </persistence-unit>
                      </persistence>

                      • 8. Re: cannot connect to mysql database in jboss-as7.1
                        Stephen Coy Master

                        Where is the spring-persistence.xml file deployed?

                         

                        You possibly need to change the entityManagerFactory configuration to

                         

                        {code:xml}<property name="persistenceXmlLocation"  value="classpath:META-INF/spring-persistence.xml"/>{code}

                        • 9. Re: cannot connect to mysql database in jboss-as7.1
                          nasir naseem siddiqui Newbie

                          Again the application is getting deployed but its not connecting to database:-

                           

                          CONSOLE OUTPUT :-

                           

                           

                          14:20:19,023 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

                          14:20:19,413 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

                          14:20:19,492 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

                          14:20:20,677 INFO  [org.xnio] XNIO Version 3.0.3.GA

                          14:20:20,677 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

                          14:20:20,693 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

                          14:20:20,709 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

                          14:20:20,756 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

                          14:20:20,803 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)

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

                          14:20:20,866 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

                          14:20:20,912 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

                          14:20:20,959 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

                          14:20:20,975 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

                          14:20:21,022 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

                          14:20:21,209 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

                          14:20:21,240 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

                          14:20:21,427 INFO  [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service

                          14:20:21,427 INFO  [org.jboss.as.security] (MSC service thread 1-4) JBAS013100: Current PicketBox version=4.0.7.Final

                          14:20:21,474 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

                          14:20:21,708 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

                          14:20:21,969 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080

                          14:20:22,234 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory C:\servers\jboss-as-7.1.1.Final\standalone\deployments

                          14:20:22,359 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

                          14:20:22,359 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:/refapp-dev]

                          14:20:22,375 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999

                          14:20:22,421 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on localhost/127.0.0.1:4447

                          14:20:22,499 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

                          14:20:22,499 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3835ms - Started 137 of 213 services (74 services are passive or on-demand)

                          14:20:23,014 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found ref-app-admin-web.war in deployment directory. To trigger deployment create a file called ref-app-admin-web.war.dodeploy

                          14:20:23,046 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "ref-app-admin-web.war"

                          14:20:29,536 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015852: Could not index class com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class at /servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/icu4j-2.6.1.jar: java.lang.IllegalStateException: Unknown tag! pos=40 poolCount = 47

                                    at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:606) [jandex-1.0.3.Final.jar:1.0.3.Final]

                                    at org.jboss.jandex.Indexer.index(Indexer.java:640) [jandex-1.0.3.Final.jar:1.0.3.Final]

                                    at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:77) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    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]

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

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

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

                           

                           

                          14:20:31,269 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb-api.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/jaxb-impl-2.1.6.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,269 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/C/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/jaxb-impl-2.1.6.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,269 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jsr173_1.0_api.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/jaxb-impl-2.1.6.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,284 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry jaxb1-impl.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/jaxb-impl-2.1.6.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,284 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xbean.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/js-1.6R2.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,284 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/mail-1.4.1.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,301 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xercesImpl.jar in "/C:/servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/xalan-2.6.0.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,301 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xml-apis.jar in "/C:servers/jboss-as-7.1.1.Final/standalone/deployments/ref-app-admin-web.war/WEB-INF/lib/xalan-2.6.0.jar"  does not point to a valid jar for a Class-Path reference.

                          14:20:31,675 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for WebArchJRA

                          14:20:32,752 INFO  [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)

                          14:20:32,815 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'ref-app-admin-web.war#WebArchJRA'

                          14:20:33,013 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

                          14:20:33,022 INFO  [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}

                          14:20:33,025 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000206: hibernate.properties not found

                          14:20:33,028 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000021: Bytecode provider name : javassist

                          14:20:33,238 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [

                                    name: WebArchJRA

                                    ...]

                          14:20:33,616 WARN  [org.hibernate.internal.util.xml.DTDEntityResolver] (MSC service thread 1-4) HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

                          14:20:34,050 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

                          14:20:34,332 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-4) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

                          14:20:34,379 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-4) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory

                          14:20:34,379 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-4) HHH000397: Using ASTQueryTranslatorFactory

                          14:20:34,535 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-4) Hibernate Validator 4.2.0.Final

                          14:20:35,252 WARN  [org.hibernate.internal.SessionFactoryImpl] (MSC service thread 1-4) HHH000008: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()

                          14:20:35,836 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ref-app-admin-web]] (MSC service thread 1-3) Initializing Spring root WebApplicationContext

                          14:20:35,836 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-3) Root WebApplicationContext: initialization started

                          14:20:35,868 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Refreshing Root WebApplicationContext: startup date [Mon Jul 23 14:20:35 IST 2012]; root of context hierarchy

                          14:20:35,899 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from ServletContext resource [/WEB-INF/config/web-application-config.xml]

                          14:20:36,055 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from ServletContext resource [/WEB-INF/config/webmvc-config.xml]

                          14:20:36,086 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [integration-dao-context.xml]

                          14:20:36,180 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [business-service-context.xml]

                          14:20:36,226 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [action-servlet.xml]

                          14:20:36,273 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-3) JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

                          14:20:36,273 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-3) JSR-330 'javax.inject.Named' annotation found and supported for component scanning

                          14:20:36,320 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [codes-decodes-required-context.xml]

                          14:20:36,460 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [securityContext.xml]

                          14:20:36,741 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [dwr-config.xml]

                          14:20:39,394 INFO  [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] (MSC service thread 1-3) Loading properties file from class path resource [refapp.properties]

                          14:20:39,410 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (MSC service thread 1-3) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

                          14:20:39,457 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'dataSource' of type [class org.springframework.jndi.JndiObjectFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:39,472 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'dataSource' of type [class org.jboss.jca.adapters.jdbc.WrapperDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:39,472 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter#195d4f45' of type [class org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:39,514 INFO  [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] (MSC service thread 1-3) Building JPA container EntityManagerFactory for persistence unit 'WebArchJRA-IBP'

                          14:20:39,516 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-3) HHH000204: Processing PersistenceUnitInfo [

                                    name: WebArchJRA-IBP

                                    ...]

                          14:20:39,819 WARN  [org.hibernate.cfg.annotations.reflection.JPAOverridenAnnotationReader] (MSC service thread 1-3) HHH000207: Property com.app.domain.Product.serialVersionUID not found in class but described in <mapping-file/> (possible typo error)

                          14:20:39,850 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-3) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

                          14:20:39,866 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-3) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

                          14:20:39,866 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-3) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

                          14:20:39,882 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-3) HHH000397: Using ASTQueryTranslatorFactory

                          14:20:39,928 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'entityManagerFactory' of type [class org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:39,944 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0' of type [class org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:39,960 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean '(inner bean)' of type [class org.springframework.security.annotation.SecuredMethodDefinitionSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:40,131 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean '_delegatingMethodDefinitionSource' of type [class org.springframework.security.intercept.method.DelegatingMethodDefinitionSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:40,147 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean '_methodDefinitionSourceAdvisor' of type [class org.springframework.security.intercept.method.aopalliance.MethodDefinitionSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:40,147 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0' of type [class org.springframework.transaction.annotation.AnnotationTransactionAttributeSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:40,162 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Bean 'org.springframework.transaction.config.internalTransactionAdvisor' of type [class org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

                          14:20:40,194 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-3) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@737f3202: defining beans [dwrUrlMapping,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping#0,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,urlFilenameViewController,viewResolver,viewFactoryCreator,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager,dataSource,entityManagerFactory,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,productModificationDao,txAdvice,serviceOperation,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,productModificationService,messageSource,localeChangeInterceptor,refappLocaleInterceptor,localeResolver,exceptionResolver,languageBasedPropertiesRepository,exceptionResolverLRH,homePageController,loginController,cacheManagerFactory,cache,keyGenerator,codeRecordDao,codeType,cacheMap,codeService,codeServiceFactory,codeTableConfigurationClasspaths,databaseConfiguration,_authenticationManager,_filterChainProxy,_httpSessionContextIntegrationFilter,_filterChainProxyPostProcessor,_filterChainList,_securityContextHolderAwareRequestFilter,_portMapper,_exceptionTranslationFilter,_filterSecurityInterceptor,_sessionFixationProtectionFilter,_anonymousAuthenticationProvider,_anonymousProcessingFilter,_rememberMeServices,_rememberMeAuthenticationProvider,_rememberMeFilter,_rememberMeServicesInjectionBeanPostProcessor,_logoutFilter,_basicAuthenticationEntryPoint,_basicAuthenticationFilter,_formLoginFilter,_formLoginEntryPoint,_entryPointInjectionBeanPostProcessor,_userServiceInjectionPostProcessor,accessDecisionManager,userDetailsManager,_delegatingMethodDefinitionSource,_methodSecurityInterceptor,_methodSecurityInterceptorPostProcessor,_methodDefinitionSourceAdvisor,userCache,__dwrConfiguration,__ProductModificationServiceFacade,productServiceFacade,dwrController,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,propertiesFileConfiguration,CommonsConfigurationFactoryBean,PropertyPlaceholderConfigurer]; root of factory hierarchy

                          14:20:40,303 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-3) Mapped URL path [/viewHome.html] onto handler 'homePageController'

                          14:20:40,318 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-3) Mapped URL path [/login.html] onto handler 'loginController'

                          14:20:40,318 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-3) Mapped URL path [/logout.html] onto handler 'loginController'

                          14:20:40,318 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-3) Mapped URL path [/loginSuccess.html] onto handler 'loginController'

                          14:20:40,334 INFO  [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] (MSC service thread 1-3) Mapped URL path [/authorityDetails.html] onto handler 'loginController'

                          14:20:40,584 INFO  [org.springframework.cache.ehcache.EhCacheManagerFactoryBean] (MSC service thread 1-3) Initializing EHCache CacheManager

                          14:20:40,663 WARNING [net.sf.ehcache.CacheManager] (MSC service thread 1-3) Creating a new instance of CacheManager using the diskStorePath "C:\Windows\TEMP\" which is already used by an existing CacheManager.

                          The source of the configuration was classpath.

                          The diskStore path for this CacheManager will be set to C:\Windows\TEMP\\ehcache_auto_created_1343033440663.

                          To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.

                          14:20:41,349 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Marshalling tbe codes table configuration file: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CodesTableServiceCodeDecode.xml

                          14:20:41,864 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Codes Table Configuration initialized from: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CodesTableServiceCodeDecode.xml

                          14:20:42,520 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Marshalling tbe codes table configuration file: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CategoryDescriptionCodesDecodeTable.xml

                          14:20:42,536 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Codes Table Configuration initialized from: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CategoryDescriptionCodesDecodeTable.xml

                          14:20:42,629 INFO  [org.springframework.security.config.EntryPointInjectionBeanPostProcessor] (MSC service thread 1-3) Selecting AuthenticationEntryPoint for use in ExceptionTranslationFilter

                          14:20:42,645 INFO  [org.springframework.security.config.EntryPointInjectionBeanPostProcessor] (MSC service thread 1-3) Using main configured AuthenticationEntryPoint.

                          14:20:42,645 INFO  [org.springframework.security.config.EntryPointInjectionBeanPostProcessor] (MSC service thread 1-3) Using bean 'org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint@43259ee0' as the entry point.

                          14:20:42,723 INFO  [org.springframework.security.intercept.AbstractSecurityInterceptor] (MSC service thread 1-3) Validated configuration attributes

                          14:20:42,816 INFO  [org.springframework.security.config.RememberMeServicesInjectionBeanPostProcessor] (MSC service thread 1-3) Setting RememberMeServices on bean _basicAuthenticationFilter

                          14:20:42,832 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) Checking sorted filter chain: [org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], org.springframework.security.ui.logout.LogoutFilter[ order=300; ], org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ], org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ], org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@37ecb28e]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) Filter chain...

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [0] - org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [1] - org.springframework.security.ui.logout.LogoutFilter[ order=300; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [2] - org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [3] - org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [4] - org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [5] - org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [6] - org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [7] - org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ]

                          14:20:42,848 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [8] - org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ]

                          14:20:42,863 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) [9] - org.springframework.security.intercept.web.FilterSecurityInterceptor@37ecb28e

                          14:20:42,863 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) Checking whether login URL '/login.html' is accessible with your configuration

                          14:20:42,863 INFO  [org.springframework.security.config.FilterChainProxyPostProcessor] (MSC service thread 1-3) FilterChainProxy: FilterChainProxy[ UrlMatcher = org.springframework.security.util.AntUrlPathMatcher[requiresLowerCase='true']; Filter Chains: {/**=[org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], org.springframework.security.ui.logout.LogoutFilter[ order=300; ], org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ], org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ], org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@37ecb28e]}]

                          14:20:42,879 INFO  [org.springframework.security.intercept.AbstractSecurityInterceptor] (MSC service thread 1-3) Validated configuration attributes

                          14:20:43,005 WARN  [org.directwebremoting.impl.DTDEntityResolver] (MSC service thread 1-3) Deprecated public id in dwr.xml. Use: <!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr//dwr30.dtd">

                          14:20:43,083 INFO  [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (MSC service thread 1-3) Mapped URL path [/dwr/**/*] onto handler 'dwrController'

                          14:20:43,083 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-3) Root WebApplicationContext: initialization completed in 7247 ms

                          14:20:43,129 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-3) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/ref-app-admin-web'

                          14:20:46,359 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ref-app-admin-web]] (MSC service thread 1-3) Initializing Spring FrameworkServlet 'action'

                          14:20:46,359 INFO  [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-3) FrameworkServlet 'action': initialization started

                          14:20:46,359 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-3) Refreshing WebApplicationContext for namespace '/classes/action-servlet': startup date [Mon Jul 23 14:20:46 IST 2012]; parent: Root WebApplicationContext

                          14:20:46,359 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from ServletContext resource [/WEB-INF//classes/action-servlet.xml]

                          14:20:46,427 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-3) JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning

                          14:20:46,429 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-3) JSR-330 'javax.inject.Named' annotation found and supported for component scanning

                          14:20:46,435 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-3) Loading XML bean definitions from class path resource [codes-decodes-required-context.xml]

                          14:20:46,500 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (MSC service thread 1-3) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring

                          14:20:46,515 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-3) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4e88151c: defining beans [messageSource,localeChangeInterceptor,refappLocaleInterceptor,localeResolver,exceptionResolver,languageBasedPropertiesRepository,exceptionResolverLRH,homePageController,loginController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,cacheManagerFactory,cache,keyGenerator,codeRecordDao,codeType,cacheMap,codeService,codeServiceFactory,codeTableConfigurationClasspaths,databaseConfiguration]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@737f3202

                          14:20:46,562 INFO  [org.springframework.cache.ehcache.EhCacheManagerFactoryBean] (MSC service thread 1-3) Initializing EHCache CacheManager

                          14:20:46,578 WARNING [net.sf.ehcache.CacheManager] (MSC service thread 1-3) Creating a new instance of CacheManager using the diskStorePath "C:\Windows\TEMP\" which is already used by an existing CacheManager.

                          The source of the configuration was InputStream java.io.FileInputStream@4822098b.

                          The diskStore path for this CacheManager will be set to C:\Windows\TEMP\\ehcache_auto_created_1343033446578.

                          To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.

                          14:20:46,609 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Marshalling tbe codes table configuration file: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CodesTableServiceCodeDecode.xml

                          14:20:46,843 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Codes Table Configuration initialized from: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CodesTableServiceCodeDecode.xml

                          14:20:47,108 INFO  [com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Marshalling tbe codes table configuration file: C:[com.foundation.common.codetable.database.configuration.CodesTableConfiguationReader] (MSC service thread 1-3) Codes Table Configuration initialized from: C:\servers\jboss-as-7.1.1.Final\standalone\deployments\ref-app-admin-web.war\WEB-INF\classes\CategoryDescriptionCodesDecodeTable.xml

                          14:20:47,436 INFO  [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-3) FrameworkServlet 'action': initialization completed in 1077 ms

                          14:20:47,483 INFO  [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /ref-app-admin-web

                          14:20:47,686 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ref-app-admin-web.war"

                          • 10. Re: cannot connect to mysql database in jboss-as7.1
                            Marco Rietveld Novice

                            This is happening because there's a corrupt file ( com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class ) in the icu jar you're using.

                             

                            See these stackoverflow posts:

                            http://stackoverflow.com/questions/3026956/javassist-failure-in-hibernate-invalid-constant-type-60

                             

                            One way around this is modifying the local jar you're using (see the stackoverflow post). Another would be to upgrade the version of icu dependency that you're using.

                            • 11. Re: cannot connect to mysql database in jboss-as7.1
                              nasir naseem siddiqui Newbie

                              still not able to connect even after upgrading the icu dependency jar