DataTypeMapping synchronization issue [message #39739] |
Mon, 10 December 2007 19:52  |
Eclipse User |
|
|
|
Originally posted by: edeshayes.gmail.com
Hi,
I have a strange issue with an ODA plugin.
Basically, it looks like a synchronization issue as it works well when I
have only one query at a time.
When my project starts with two queries, I have an exception:
<Dec 10, 2007 01:47:46 PM> <SEVERE> <Joe> Cannot process the
net.appl.jrisk.report.oda.multiplepntmarketdata driver's configurations.
The ODA driver plugin.xml has an invalid odaScalarDataType value (String)
in the <dataTypeMapping> (String).
org.eclipse.birt.data.engine.core.DataException: Cannot process the
net.appl.jrisk.report.oda.multiplepntmarketdata driver's configurations.
The ODA driver plugin.xml has an invalid odaScalarDataType value (String)
in the <dataTypeMapping> (String).
at
org.eclipse.birt.data.engine.odaconsumer.Driver.throwConfigE xception(Driver.java:176)
at
org.eclipse.birt.data.engine.odaconsumer.Driver.doGetDriverM anifest(Driver.java:165)
at
org.eclipse.birt.data.engine.odaconsumer.Driver.findDataSour ceExtensionConfig
(Driver.java:123)
at
org.eclipse.birt.data.engine.odaconsumer.Driver.getDriverExt ensionConfig(Driver.java:78)
at
org.eclipse.birt.data.engine.odaconsumer.Driver.getExtension Config(Driver.java:60)
at org.eclipse.birt.data.engine.odaconsumer.Driver.getDriverHel per
(Driver.java:93)
at
org.eclipse.birt.data.engine.odaconsumer.DriverManager.getDr iverHelper(DriverManager.java:87)
at
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.o penConnection(ConnectionManager.java
:132)
at
org.eclipse.birt.data.engine.executor.DataSource.newConnecti on(DataSource.java:134)
at
org.eclipse.birt.data.engine.executor.DataSource.open(DataSo urce.java:121)
at
org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiD ataSource
(DataSourceRuntime.java:214)
at
org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSour ce(QueryExecutor.java:265)
at
org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion(QueryExecutor.java:210)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:500)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:161)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute
(PreparedOdaDSQuery.java:142)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:141)
at
org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQue ry.populatePreparedQuery
(PreparedJointDataSourceQuery.java:512)
at
org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQue ry.populatePreparedQuery(PreparedJointDataSourceQuery.java:4 72)
at
org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQue ry.access$2
(PreparedJointDataSourceQuery.java:469)
at
org.eclipse.birt.data.engine.impl.PreparedJointDataSourceQue ry$JointDataSetQueryExecutor.createOdiQuery(PreparedJointDat aSourceQuery.java:555)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion
(QueryExecutor.java:217)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:500)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java
:161)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:141)
at
net.appl.jrisk.report.extractor.AbstractBIRTReportExtractor. createReport(AbstractBIRTReportExtractor.java
:112)
at
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.processBIRTRequest(AbstractRTBlotterDataExtr actor.java:216)
at
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.processBatch
(AbstractRTBlotterDataExtractor.java:171)
at
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.fastQASLoad(AbstractRTBlotterDataExtractor.j ava:164)
at
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.extractReportData
(AbstractRTBlotterDataExtractor.java:296)
at
net.appl.jrisk.report.extractor.AbstractReportDataExtractor$ DataExtractor.run(AbstractReportDataExtractor.java:156)
Caused by: org.eclipse.datatools.connectivity.oda.OdaException : The ODA
driver plugin.xml has an invalid odaScalarDataType value (String) in the
<dataTypeMapping> (String).
at
org.eclipse.datatools.connectivity.oda.util.manifest.DataTyp eMapping.sanityCheckOdaScalarType(
DataTypeMapping.java:100)
at
org.eclipse.datatools.connectivity.oda.util.manifest.DataTyp eMapping. <init>(DataTypeMapping.java:66)
at
org.eclipse.datatools.connectivity.oda.util.manifest.DataSet Type.init
(DataSetType.java:71)
at
org.eclipse.datatools.connectivity.oda.util.manifest.DataSet Type. <init>(DataSetType.java:45)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getDataSetElements
(ManifestExplorer.java:520)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Extensi onManifest.init(ExtensionManifest.java:106)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Extensi onManifest
<init>(ExtensionManifest.java:55)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest(ManifestExplorer.java:239)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest
(ManifestExplorer.java:205)
at
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest(ManifestExplorer.java:157)
at org.eclipse.birt.data.engine.odaconsumer.Driver.doGetDriverM anifest
(Driver.java:147)
... 29 more
I looked into the code and I suspect that class
org.eclipse.datatools.connectivity.oda.util.manifest.DataTyp eMapping to
be the source of my issue, in the static private method:
/**
* Returns the cached table that maps each ODA data type name
* to its corresponding data type code.
* The data type name serves as the key in the cached table.
*/
private static Hashtable getOdaTypeCodes()
{
if( sm_odaTypeCodes == null )
{
sm_odaTypeCodes = new Hashtable( 10 );
sm_odaTypeCodes.put( toOdaTypeKey( "String" ), //$NON-NLS-1$
new Integer( Types.CHAR ));
sm_odaTypeCodes.put( toOdaTypeKey( "Integer" ), //$NON-NLS-1$
new Integer( Types.INTEGER ));
sm_odaTypeCodes.put( toOdaTypeKey( "Double" ), //$NON-NLS-1$
new Integer( Types.DOUBLE ));
sm_odaTypeCodes.put( toOdaTypeKey( "Decimal" ), //$NON-NLS-1$
new Integer( Types.DECIMAL ));
sm_odaTypeCodes.put( toOdaTypeKey( "Date" ), //$NON-NLS-1$
new Integer( Types.DATE ));
sm_odaTypeCodes.put( toOdaTypeKey( "Time" ), //$NON-NLS-1$
new Integer( Types.TIME ));
sm_odaTypeCodes.put( toOdaTypeKey( "Timestamp" ), //$NON-NLS-1$
new Integer( Types.TIMESTAMP ));
sm_odaTypeCodes.put( toOdaTypeKey( "Blob" ), //$NON-NLS-1$
new Integer( Types.BLOB ));
sm_odaTypeCodes.put( toOdaTypeKey( "Clob" ), //$NON-NLS-1$
new Integer( Types.CLOB ));
sm_odaTypeCodes.put( toOdaTypeKey( "Boolean" ), //$NON-NLS-1$
new Integer( Types.BOOLEAN ));
}
return sm_odaTypeCodes;
}
I suspect that it may happen that two thread are going to access that
static method at the same time.
The first one is going to instantiate an empty hashmap that the second
will get before the first thread starts popluating it.
The second thread will not see any entry for the String datatype and I
have my exception.
Does that make sense or am I missing something?
Eric
|
|
|
|
Re: DataTypeMapping synchronization issue [message #39830 is a reply to message #39770] |
Tue, 11 December 2007 14:35  |
Eclipse User |
|
|
|
Originally posted by: edeshayes.gmail.com
Hi Lisa,
sorry for not having mentioned that earlier.
I ma using BIRT 2.2.1 that comes with DTP 1.5.1.
The bug you sent me seems to be the one I've noticed!
Thanks for your help!
Eric
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03120 seconds