7 Replies Latest reply on Oct 10, 2007 5:45 PM by Andi

    WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01004

    Ramana K Newbie

      Hi friends,

      I am posting my first topic/issue here in this great forum!!!

      I am using the JBoss AS 4.0.5.GA with portal 2.6.1 configured. I'm getting below error while starting the server.

      17:33:47,125 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: 01004
      17:33:47,125 ERROR [JDBCExceptionReporter] Data truncation: Data too long for column 'ACTIVE' at row
      1
      17:33:47,203 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.5.GA/server/de
      fault/deploy/jboss-portal.sar/portal-wsrp.sar/default-wsrp.xml
      org.jboss.deployment.DeploymentException: Failed to parse source: Couldn't create Consumer 'self'; -
      nested throwable: (org.jboss.xb.binding.JBossXBException: Failed to parse source: Couldn't create C
      onsumer 'self')
      at org.jboss.portal.wsrp.deployment.WSRPDeployer.init(WSRPDeployer.java:112)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
      ptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy189.deploy(Unknown Source)
      at org.jboss.portal.wsrp.deployment.WSRPDeployer.startService(WSRPDeployer.java:165)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at org.jboss.system.ServiceController.start(ServiceController.java:435)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
      ptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy173.start(Unknown Source)
      at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterce
      ptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeplo
      ymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentSca
      nner.java:336)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.start(Unknown Source)

      My portal-mysql-ds.xml file contains:

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

      <local-tx-datasource>
      <jndi-name>PortalDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=false&amp;jdbcCompliantTruncation=false</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>

      </local-tx-datasource>


      And I changed the my.ini file strict_mode to:

      # Set the SQL mode to strict
      sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

      This information I got from these sites topics only. Thanks a lot for this forum friends.

      Can you please help me out for this problem resolution? This problem is consuming my lot of time.

      Regards,
      Ramana

        • 2. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
          Peter Johnson Master

          Oops, I see you already have those settings. Which version of MySQL are you using? I have 5.0.11 and it works fine.

          Also, I suggest you use an account other than "root" for the database.

          • 3. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
            Peter Johnson Master

            Some more questions. Which storage engine are you using, MyISAM or InnoDB? What character set are you using?

            • 4. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
              Ramana K Newbie

              PeterJ,

              Thanks for your quick replies.

              Here are the details that you wanted:

              Which storage engine are you using, MyISAM or InnoDB? What character set are you using?
              - I use MySQL 5.0.24a-community-nt
              - default-character-set=latin1

              Also, I suggest you use an account other than "root" for the database.
              - I tried using "mysqluser" instead of "root" user with password" pwd.

              But the same problem is arising.

              Please help me out of this problem as this is eating my valuable time and efforts.

              Best Regards,
              Ramana

              • 5. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
                Ramana K Newbie

                Hi Peter,

                I tried with the another user 'sqlusr@localhost'. I gave all the privileges as below:

                mysql> GRANT ALL ON *.* TO 'sqlusr@localhost' IDENTIFIED BY 'pwd';
                Query OK, 0 rows affected (0.06 sec)

                But after this also, I am getting the below error at the jboss AS console:

                19:32:37,250 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceB
                inding,name=PortalDS' to JNDI name 'java:PortalDS'
                19:32:37,609 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection:
                null
                org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sq
                l.SQLException: Access denied for user 'sqlusr'@'localhost' (using password: YES))

                Please let me know if you have any solution for this.

                Thanks,
                Ramana

                • 6. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
                  Peter Johnson Master

                  The latest error you are getting is because the password in the *-ds.xml file does not match the password you used when creating the user.

                  Here are the statements I use to create the database user and database:

                  CREATE DATABASE portaldb;
                  GRANT ALL PRIVILEGES ON portaldb.* TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
                  


                  And the corresponding portal-ds.xml file contains:

                  <datasources>
                   <local-tx-datasource>
                   <jndi-name>PortalDS</jndi-name>
                   <connection-url>jdbc:mysql://localhost:3306/portaldb?useServerPrepStmts=false&jdbcCompliantTruncation=false</connection-url>
                   <driver-class>com.mysql.jdbc.Driver</driver-class>
                   <user-name>username</user-name>
                   <password>password</password>
                   <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
                   <metadata>
                   <type-mapping>mySQL</type-mapping>
                   </metadata>
                   </local-tx-datasource>
                  </datasources>
                  


                  For the first exception you posted, there should have been a "caused by" clause following it. I need to see that clause, and it's stack dump.


                  • 7. Re: WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: 01
                    Andi Newbie

                    I am getting the same problem using oracle 9i

                    the cuased by is:

                    Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Couldn't create Consumer 'MyProducer'
                    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:178)
                    at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:169)
                    at org.jboss.portal.wsrp.deployment.WSRPDeployer.init(WSRPDeployer.java:108)
                    ... 129 more
                    Caused by: org.jboss.portal.wsrp.consumer.ConsumerException: Couldn't create Consumer 'MyProducer'
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService.org$jboss$portal$wsrp$consumer$ConsumerRegistryService$createConsumer$aop(Consu
                    merRegistryService.java:99)
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService$createConsumer_N7833998178913983332.invokeNext(ConsumerRegistryService$createCo
                    nsumer_N7833998178913983332.java)
                    at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService$createConsumer_N7833998178913983332.invokeNext(ConsumerRegistryService$createCo
                    nsumer_N7833998178913983332.java)
                    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService$createConsumer_N7833998178913983332.invokeNext(ConsumerRegistryService$createCo
                    nsumer_N7833998178913983332.java)
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService.createConsumer(ConsumerRegistryService.java)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:585)
                    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                    at $Proxy83.createConsumer(Unknown Source)
                    at org.jboss.portal.wsrp.deployment.WSRPDeploymentFactory.newChild(WSRPDeploymentFactory.java:172)
                    at org.jboss.portal.wsrp.deployment.WSRPDeploymentFactory.newChild(WSRPDeploymentFactory.java:80)
                    at org.jboss.xb.binding.ObjectModelBuilder.startElement(ObjectModelBuilder.java:322)
                    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
                    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
                    at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
                    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
                    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
                    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:174)
                    ... 131 more
                    Caused by: org.hibernate.exception.SQLGrammarException: could not get next sequence value
                    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
                    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
                    at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:96)
                    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
                    at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
                    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
                    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
                    at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
                    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
                    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
                    at org.jboss.portal.wsrp.consumer.ConsumerRegistryService.org$jboss$portal$wsrp$consumer$ConsumerRegistryService$createConsumer$aop(Consu
                    merRegistryService.java:95)
                    ... 169 more