Bug 780185 (SOA-2561) - Incorrect datatypes in ModeShape JDBC driver
Summary: Incorrect datatypes in ModeShape JDBC driver
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2561
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0.ER4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0 ER1
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-10 11:07 UTC by Jiri Pechanec
Modified: 2011-10-21 08:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-21 08:20:24 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker MODE-1011 0 None None None Never
Red Hat Issue Tracker SOA-2561 0 None None None Never

Description Jiri Pechanec 2010-11-10 11:07:41 UTC
project_key: SOA

Since ER4 there are new columns returned by ModeShape JDBC driver jcr:path, jcr:name, jcr:score, mode:localName, mode:depth.

When ModeShape.vdb is used then mode_depth is of type long and jcr_score of type double.
10:01:25,904 INFO  [STDOUT] jcr_name =  of type java.lang.String, 12
10:01:25,904 INFO  [STDOUT] jcr_path = / of type java.lang.String, 12
10:01:25,904 INFO  [STDOUT] jcr_primaryType = mode:root of type java.lang.String, 12
10:01:25,904 INFO  [STDOUT] jcr_score = 1.0 of type java.lang.Double, 8
10:01:25,904 INFO  [STDOUT] mode_depth = 0 of type java.lang.Long, -5
10:01:25,904 INFO  [STDOUT] mode_localName =  of type java.lang.String, 12

But when plain ModeShape JDBC driver is used then all columns are of type String even of non-string values
10:01:25,063 INFO  [STDOUT] jcr:primaryType = mode:root of type java.lang.String, 12
10:01:25,064 INFO  [STDOUT] jcr:path = / of type java.lang.String, 12
10:01:25,064 INFO  [STDOUT] jcr:name =  of type java.lang.String, 12
10:01:25,064 INFO  [STDOUT] jcr:score = 1.0 of type java.lang.String, 12
10:01:25,064 INFO  [STDOUT] mode:localName =  of type java.lang.String, 12
10:01:25,064 INFO  [STDOUT] mode:depth = 0 of type java.lang.String, 12

ModeShape JDBC driver should use sensible datatypes too.

Comment 1 Van Halbert 2010-11-10 15:49:54 UTC
Link: Added: This issue Cloned to SOA-2565


Comment 2 Van Halbert 2010-11-10 15:59:57 UTC
If this is related to resultset metadata, then this is a known issue for the 5.1 release and is to be done in a future release of ModeShape.     However, if this is based on the DataBaseMetadata, then this is an issue because this is what's relied upon when importing via Teiid Designer.    My guess is this is a resultset metadata, otherwise, the datatypes wouldn't be working when building the ModeShape.vdb.

Comment 3 Jiri Pechanec 2011-01-10 11:14:05 UTC
Just to add - the current situation is yet worse - originally MetaData reported String and returned - so it was ocnsistnent. Now the result set returns correct datatypes but incorrect metadata - so it is inconsistent - see
12:12:39,075 INFO  [STDOUT] jcr:score = 1.4054651260375977 of type java.lang.Double, 12
12:12:39,075 INFO  [STDOUT] mode:depth = 1 of type java.lang.Long, 12


Comment 5 David Le Sage 2011-09-27 03:46:37 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Writer: Added: dlesage
Release Notes Text: Added: https://issues.jboss.org/browse/SOA-2561

The Modeshape JBDC driver was reporting the wrong metadata for some of its columns: they were set as string, even when they were non-string types.  A code fix has bbeen applied so that the correct metadata types are now set for these columns.


Comment 6 Jiri Pechanec 2011-10-21 08:20:24 UTC
Verified in ER5


Note You need to log in before you can comment on or make changes to this bug.