Stuck on JBoss datasource [message #240441] |
Wed, 30 May 2007 12:19  |
Eclipse User |
|
|
|
Originally posted by: behrens.offis.de
Hi everyone,
I am quite new to BIRT and am facing some probs getting up to speed. I
would like to integrate the BIRT engine to generate / view reports in a
EJB3 application. I followed the instructions (using the Runtime Release
Build 2.1.2) given at
http://www.eclipse.org/birt/phoenix/deploy/viewerSetup.php. I got the app
deployed allright, allthough I somehow do not get the testreport displayed
in the frameset (shows using run though).
I now would like to use a datasource within the testreport, just to slowly
get going. This is however where I am stuck... I would like to use a JNDI
datasource configured under JBoss (see below). The DS is allright because
our app uses it allright. I used the RCP designer to add a DS to it (see
below) and redeployed the report / complete app. Calling the report only
gives me the stacktrace below. I am obviously missing something but am
stuck because I can not find any further instructions. Any help / pointer
to a (working) tutorial would be great (I allready tried to eclipse
magazine 01-2007 article...)
TIA & cheers, Jan
java.lang.NullPointerException at
org.eclipse.birt.report.model.elements.OdaDataSource.setIntr insicProperty(OdaDataSource.java:201)
at
org.eclipse.birt.report.model.core.DesignElement.setProperty (DesignElement.java:1192)
at
org.eclipse.birt.report.model.core.DesignElement.setProperty (DesignElement.java:1162)
at
org.eclipse.birt.report.model.parser.DesignParseState.setPro perty(DesignParseState.java:99)
at
org.eclipse.birt.report.model.parser.OdaDataSourceState.pars eODADataSourceExtensionID(OdaDataSourceState.java:167)
at
org.eclipse.birt.report.model.parser.OdaDataSourceState.pars eAttrs(OdaDataSourceState.java:82)
at
org.eclipse.birt.report.model.parser.ModuleParserHandler.sta rtElement(ModuleParserHandler.java:145)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unk nown
Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSt artElement(Unknown
Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragme ntContentDispatcher.dispatch(Unknown
Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDo cument(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(Unk nown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at
org.eclipse.birt.report.model.parser.ModuleReader.readModule (ModuleReader.java:90)
at
org.eclipse.birt.report.model.parser.DesignReader.read(Desig nReader.java:90)
at
org.eclipse.birt.report.model.core.DesignSession.openDesign( DesignSession.java:278)
at
org.eclipse.birt.report.model.api.SessionHandle.openDesign(S essionHandle.java:291)
at
org.eclipse.birt.report.engine.parser.ReportParser.getDesign Handle(ReportParser.java:160)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:243)
at
org.eclipse.birt.report.engine.api.impl.ReportEngine.openRep ortDesign(ReportEngine.java:458)
at
org.eclipse.birt.report.service.ReportEngineService.openRepo rtDesign(Unknown
Source) at
org.eclipse.birt.report.context.ViewerAttributeBean.getDesig nHandle(Unknown
Source) at
org.eclipse.birt.report.context.ViewerAttributeBean.__initPa rameters(Unknown
Source) at
org.eclipse.birt.report.context.ViewerAttributeBean.__init(U nknown Source)
at org.eclipse.birt.report.context.BaseAttributeBean.init(Unkno wn Source)
at org.eclipse.birt.report.context.ViewerAttributeBean.(Unknown Source) at
org.eclipse.birt.report.context.BirtContext.__init(Unknown Source) at
org.eclipse.birt.report.context.BaseContext.(Unknown Source) at
org.eclipse.birt.report.context.BirtContext.(Unknown Source) at
org.eclipse.birt.report.servlet.ViewerServlet.__getContext(U nknown Source)
at
org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherSer vlet.doGet(Unknown
Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:697) at
org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(Repl yHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invok e(SecurityAssociationValve.java:175)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCo ntextValve.java:74)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(Maste rSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
JBoss DS
<datasources>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password></password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name>
<valid-connection-checker-class-name> org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionC hecker </valid-connection-checker-class-name>
<new-connection-sql>select (1*1)</new-connection-sql>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml
(optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
DS definition in report
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="28">
<property
name="odaDriverClass">com.mysql.jdbc.Driver</property>
<property
name="odaURL">jdbc:mysql://localhost:3306/jbossdb</property>
<property name="odaUser">root</property>
<property name="odaJndiName">java:MySqlDS</property>
</oda-data-source>
</data-sources>
|
|
|
|
|
|
|
|
|
|
|
Re: Stuck on JBoss datasource [message #243803 is a reply to message #243558] |
Thu, 21 June 2007 03:41  |
Eclipse User |
|
|
|
Originally posted by: behrens.offis.de
Jason
Thanks for the update. Will give it a try and report my observations. Hope
it will do the trick...
Jan
Jason Weathersby wrote:
> Jan,
> You may want to try 2.1.2 and see if the error exist.
> Jason
> Jan wrote:
>> Jason Weathersby wrote:
>>
>>> If you set logging to FINEST you should see pool messages in the log.
>>
>>
>> Hi Jason
>>
>> Thanks for the input. I think I got it working now but have a further
>> question regarding the behaviour I am seeing in the logs. I set the
>> report connection parameters URL and User to some garbage to ensure that
>> a connection could only be established via JNDI - and my reports show up
>> allright (see also log below). What troubles me is the fact that I see
>> MySQL (access denied) errors in the logs as well. They are logged at
>> INFO level in the BIRT logs but show up as full errors in the JBoss
>> logs. From what I see there, they seem to occur at the JNDI level - but
>> _only_ on BIRT accesses to the resource. Do you have an explanation for
>> this behaviour?
>> TIA, Jan
>>
>>
>>
>> 19.06.2007 17:13:55
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager getConnection
>> FEIN: Request JDBC Connection: driverClass=com.mysql.jdbc.Driver;
>> url=jdbc:mysql://none; jndi name url=java:MySqlDS
>> 19.06.2007 17:13:55
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
>> loadDriverExtensions
>> INFO: Found JDBC driverinfo extension:
>> driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
>> 19.06.2007 17:13:55
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
>> loadDriverExtensions
>> INFO: Found JDBC driverinfo extension:
>> driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver ,
>>
connectionFactory=org.eclipse.birt.report.data.oda.sampledb. SampleDBJDBCConnectionFactory
>>
>> 19.06.2007 17:13:55
>> org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager getJndiDSConnection
>> FEINER: Calling getJndiDSConnection: JNDI name url=java:MySqlDS
>> 19.06.2007 17:13:55 JndiDataSource getConnection
>> FEINER: ENTRY java:MySqlDS
>> 19.06.2007 17:13:55 org.eclipse.birt.report.data.oda.jdbc.JndiDataSource
>> getDriverJndiPropertyFile
>> KONFIG: getDriverJndiPropertyFile()
>>
D:programmingserverJBoss.4.0.4serverdefaulttmpdeploytmp11182 App-exp.warWEB-INFplatformpluginsorg.eclipse.birt.report.dat a.oda.jdbc_2.1.1.v20070205-1728driversjndi.properties
>> canReadFile = false
>> 19.06.2007 17:13:55 org.eclipse.birt.report.data.oda.jdbc.JndiDataSource
>> getDataSourceConnection
>> FEINER: getDataSourceConnection: using getConnection( username, password
>> ) from data source pool.
>> 19.06.2007 17:13:55 org.eclipse.birt.report.data.oda.jdbc.JndiDataSource
>> getDataSourceConnection
>> INFO: org.jboss.util.NestedSQLException: Could not create connection; -
>> nested throwable: (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
>> Access denied for user ''@'%' to database 'jbossdb'); - nested
>> throwable: (org.jboss.resource.JBossResourceException: Could not create
>> connection; - nested throwable:
>> (com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Access denied for
>> user ''@'%' to database 'jbossdb'))
>> 19.06.2007 17:13:55 org.eclipse.birt.report.data.oda.jdbc.JndiDataSource
>> getDataSourceConnection
>> FEINER: getDataSourceConnection: using getConnection() from data source
>> pool.
>> 19.06.2007 17:13:55 JndiDataSource getConnection
>> FEINER: RETURN org.jboss.resource.adapter.jdbc.WrappedConnection@1a49bfa
>> 19.06.2007 17:13:55 org.eclipse.birt.data.engine.odaconsumer.Connection
>> Connection
>> FEINER: ENTRY
>>
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaCo nnection @14a0b92
>> org.eclipse.birt.report.data.oda.jdbc
>> 19.06.2007 17:13:55 org.eclipse.birt.data.engine.odaconsumer.Connection
>> Connection
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04895 seconds