Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » DataTypeMapping synchronization issue
DataTypeMapping synchronization issue [message #589286] Tue, 11 December 2007 00:52
Eric is currently offline EricFriend
Messages: 77
Registered: July 2009
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 driver's configurations.
The ODA driver plugin.xml has an invalid odaScalarDataType value (String)
in the <dataTypeMapping> (String). Cannot process the driver's configurations.
The ODA driver plugin.xml has an invalid odaScalarDataType value (String)
in the <dataTypeMapping> (String).
at xception(
at anifest(
at ceExtensionConfig
at ensionConfig(
at Config(
at per
at iverHelper(
at penConnection(
at on(
at ataSource
at ce(
at tion(
at ecute(
at ecute(
at ry.populatePreparedQuery
at ry.populatePreparedQuery( 72)
at ry.access$2
at ry$JointDataSetQueryExecutor.createOdiQuery(PreparedJointDat
at tion
at ecute(
at ecute(
at createReport(
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.processBIRTRequest(AbstractRTBlotterDataExtr
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.processBatch
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.fastQASLoad(AbstractRTBlotterDataExtractor.j ava:164)
net.appl.jrisk.rtblotter.model.dataextractor.AbstractRTBlott erDataExtractor.extractReportData
Caused by: org.eclipse.datatools.connectivity.oda.OdaException : The ODA
driver plugin.xml has an invalid odaScalarDataType value (String) in the
<dataTypeMapping> (String).
org.eclipse.datatools.connectivity.oda.util.manifest.DataTyp eMapping.sanityCheckOdaScalarType(
org.eclipse.datatools.connectivity.oda.util.manifest.DataTyp eMapping. <init>(
org.eclipse.datatools.connectivity.oda.util.manifest.DataSet Type.init
org.eclipse.datatools.connectivity.oda.util.manifest.DataSet Type. <init>(
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getDataSetElements
org.eclipse.datatools.connectivity.oda.util.manifest.Extensi onManifest.init(
org.eclipse.datatools.connectivity.oda.util.manifest.Extensi onManifest
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest(
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest
org.eclipse.datatools.connectivity.oda.util.manifest.Manifes tExplorer.getExtensionManifest(
at anifest
... 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?
Previous Topic:DB2 zSeries
Next Topic:Eclipse Data Tools
Goto Forum:

Current Time: Sat Dec 05 13:23:02 GMT 2020

Powered by FUDForum. Page generated in 0.05576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top