Bug 780429 (SOA-2861)

Summary: When using Designer to import from ModeShape, the table nt_childNodeDefinition, is exposing 2 columns (jcr_name and jcr_name1) pointing to the same underlying sourced column of jcr:name
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Van Halbert <vhalbert>
Component: EDSAssignee: Van Halbert <vhalbert>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.1.0.ER8CC: vhalbert
Target Milestone: ---   
Target Release: 5.1.0.ER9   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-2861
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-04 20:00:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Van Halbert 2011-01-31 21:18:01 UTC
Workaround: Workaround Exists
Workaround Description: When using JBDS and using jdbc import to create the a ModeShape model, the duplicate columns should be removed from the following:

Duplicate Column jcr:path in table nt:address
Duplicate Column jcr:name in table nt:childNodeDefinition
Duplicate Column jcr:name in table nt:propertyDefinition
project_key: SOA

When using Designer to import from ModeShape, the table nt_childNodeDefinition, is exposing 2 columns (jcr_name and jcr_name1) pointing to the same underlying sourced column of jcr:name.   This causes an issue when using "Select *" cause is causes miss-alignment of the columns when processing the underlying ModeShape datasource.   And because the columns are not aligned, they don't match the modeshape underlying array's, and therefore, it gets into a situation where the Teiid translator is expecting one data type (i.e., long), but the ModeShape array contains a different one (i.e., String) and it throws this exception: 

Caused by: javax.jcr.ValueFormatException: Cannot convert String value to long
	at org.modeshape.jcr.JcrValue.createValueFormatException(JcrValue.java:100)
	at org.modeshape.jcr.JcrValue.getLong(JcrValue.java:200)
	at org.modeshape.jdbc.JcrResultSet.getValueObject(JcrResultSet.java:1282)
	... 19 more

The short term fix is to change the ModeShape.xmi model in the ModeShape.vdb to remove the jcr_name1 reference in the table.    But need to find out why ModeShape is exposing both columns for the nt_childNodeDefinition table.

Comment 1 Van Halbert 2011-01-31 21:27:05 UTC
I found the following duplicate columns:

Duplicate Column jcr:path in table nt:address
Duplicate Column jcr:name in table nt:childNodeDefinition
Duplicate Column jcr:name in table nt:propertyDefinition

Comment 2 Van Halbert 2011-01-31 21:50:04 UTC
Link: Added: This issue Cloned to SOA-2862


Comment 3 Van Halbert 2011-02-01 12:43:11 UTC
Workaround Description: Added: When using JBDS and using jdbc import to create the a ModeShape model, the duplicate columns should be removed from the following:

Duplicate Column jcr:path in table nt:address
Duplicate Column jcr:name in table nt:childNodeDefinition
Duplicate Column jcr:name in table nt:propertyDefinition
Workaround: Added: [Workaround Exists]


Comment 4 Van Halbert 2011-02-01 12:45:02 UTC
Link: Added: This issue related SOA-2859


Comment 5 Van Halbert 2011-02-02 15:58:19 UTC
Committed the change to the soa build-tools branch and the fix was in ER9.