3 Replies Latest reply on Mar 6, 2009 5:38 AM by jjrs

    gwt-console datasource problems

      Hi

      I am having problems for using the GWT console. I am using the version that comes with the installer jbpm-installer-3.3.1.GA.jar. And deployed it to jboss-5.0.1.GA and jboss-4.2.3.GA facing in both cases the same problem. I am using Oracle for the jBPM database.

      Even if the console is connecting to the correct database ( I am sure of it, as I can see process definitions, tokens, etc...), the BIRT part of it seems to use a different datasource, as I am getting all the time the below exception (pay attention to the Null user or password not supported in THIN driver part):

      2009-03-03 15:01:36,394 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (http-127.0.0.1-8080-2) Destroying connection that could not be successfully matched: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1b159e5[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@bb53fd handles=0 lastUse=1236092495065 permit=false trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1d69e03 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1201158 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@d8fd10 txSync=null]
      2009-03-03 15:01:36,440 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (http-127.0.0.1-8080-2) Throwable while attempting to get a new connection: null
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Null user or password not supported in THIN driver)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
       at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
       at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:607)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
       at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:104)
       at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getDataSourceConnection(JndiDataSource.java:159)
       at org.eclipse.birt.report.data.oda.jdbc.JndiDataSource.getConnection(JndiDataSource.java:133)
       at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getJndiDSConnection(JDBCDriverManager.java:227)
       at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:184)
       at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:158)
       at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:158)
       at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:115)
       at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:235)
       at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:145)
       at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:134)
       at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:121)
       at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:214)
       at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:265)
       at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:210)
       at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:500)
       at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:161)
       at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:142)
       at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:445)
       at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:151)
       at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:117)
       at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:182)
       at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1685)
       at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:76)
       at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:61)
       at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42)
       at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45)
       at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:33)
       at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63)
       at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:85)
       at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:106)
       at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:140)
       at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:68)
       at org.jboss.balalaika.BirtService.render(BirtService.java:152)
       at org.jboss.balalaika.ReportFacade.viewReportHtml(ReportFacade.java:129)
       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.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:77)
       at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:197)
       at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:185)
       at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:123)
       at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:348)
       at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182)
       at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90)
       at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.sql.SQLException: Null user or password not supported in THIN driver
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:213)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:366)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:563)
       at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:207)
       ... 77 more




      Questions:

      How can I fix it ?

      There seem to be many functionalities depending on Birt so I can't do that much with this error.

      I have modified the file jboss-web.xml inside report-server.war and enabled the sections <class-loading> and <resource-ref> that were commented out, and seemed to reference the correct data source definition, JbpmDS, but it made no difference and still got the same error.

      Now the file report-server.war/jboss-web.xml has the next content :

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!DOCTYPE jboss-web PUBLIC
       "-//JBoss//DTD Web Application 2.4//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
      
      <jboss-web>
      
       <class-loading>
       <loader-repository>
       org.bpm.console.server:report-server.war
       </loader-repository>
       </class-loading>
      
       <security-domain>java:/jaas/jbpm-console</security-domain>
      
       <context-root>report-server</context-root>
      
       <resource-ref>
       <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
       <jndi-name>java:/JbpmDS</jndi-name>
       </resource-ref>
      
      
      </jboss-web>




        • 1. Re: gwt-console datasource problems
          bradsdavis

          I havent received this issue with 4.2.3GA, JBPM 3.3.1GA, and Oracle.

          What does your datasource look like? What do you have for your conf/login-config.xml?

          What version of the Oracle thin driver are you using? What version of Oracle?

          • 2. Re: gwt-console datasource problems

            My datasource is in [Jboss.4.2.3.GA]\server\default\deploy\jbpm and the content is ...


            <datasources>
             <local-tx-datasource>
             <jndi-name>JbpmDS</jndi-name>
             <connection-url>jdbc:oracle:thin:@dbServer:1521:dbInstance</connection-url>
            
             <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
             <user-name>user</user-name>
             <password>passwd</password>
            
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
            
             <metadata>
             <type-mapping>Oracle9i</type-mapping>
             </metadata>
             </local-tx-datasource>
            
            </datasources>



            In login-config.xml I added the next section...


             <!-- New jBPM config -->
             <application-policy name = "jbpm">
             <authentication>
             <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
             flag="required">
             <module-option name="dsJndiName">java:/JbpmDS</module-option>
             <module-option name="principalsQuery">
             SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
             </module-option>
             <module-option name="rolesQuery">
             SELECT g.NAME_ ,'Roles'
             FROM JBPM_ID_USER u,
             JBPM_ID_MEMBERSHIP m,
             JBPM_ID_GROUP g
             WHERE g.TYPE_='security-role'
             AND m.GROUP_ = g.ID_
             AND m.USER_ = u.ID_
             AND u.NAME_=?
             </module-option>
             </login-module>
             </authentication>
             </application-policy>
            



            The oracle driver and the oracle version should be fine, otherwise I wouldn't be able to see any result, and I am having problems only with the Reports part of the gwt-console. With my current settings the jbpm-console is working fine, but the gwt-console, always complains about not being able to get a connection to the database.

            Any other idea ? Do I have to modify the contents of any of the war files ? There are several parts in thejboss-web.xml files where the datasource is referenced, although this settings are commeted in the config files. If I enable that configuration the system complains saying ....


            2009-03-04 12:04:40,662 DEBUG [org.jboss.web.tomcat.service.JBossWeb] Problem in init
            org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: resource-ref jdbc/JbpmDataSource found in jboss-web.xml but not in web.xml)
             at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:768)
             at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:356)
             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)
            


            Any other suggestion ?



            • 3. Re: gwt-console datasource problems

              Hi,

              I was finally able to discover what the problem was.

              All the birt reports included in the gwt-console, are pointing to a external datasource, so they need to be checked and modify in case it's needed to use the correct datasource...

              The reports are located in ... [JBOSS]\server\default\data\birt


              They are called XXXXXXX_report.rptdesign, and the section to modify in case it's needed is:

              <data-sources>
               <oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="MySQL Local" id="6">
               <property name="odaDriverClass">com.mysql.jdbc.Driver</property>
               <property name="odaURL">jdbc:mysql://localhost:3306/jbpmtest</property>
               <property name="odaUser">jbpmtest</property>
               <property name="odaJndiName">java:/JbpmDS</property>
               </oda-data-source>
               </data-sources>




              However after having all the reports referencing the correct datasource, they still don't work, but I will ask about them in another post as I consider this issue as a different topic.