-
15. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 13, 2012 9:38 AM (in response to gioppoluca)I've created the jdbc datasources in sandalone-teiid.xml following info on as 7.1.1 deployment of datasources (chose the simplest approach for me that was to write down the xml file)
The datasource works fine and connects as the admin-console states, but the vdb placed in the standalone/deployments folder does not get deployed with the error reported in the "name.vdb.failed" file.
Does this mean that there is something wrong in the vdb or that it doesn't find all that he expected (maybe a JNDI stuff that does always gives me headaches?)
Thanks
L
-
16. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 13, 2012 10:47 AM (in response to gioppoluca)This is the error on the shell:
16:37:19,515 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deploym
ent.unit."libri.vdb".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."libri.vdb".PARSE: Fai
led to process phase PARSE of deployment "libri.vdb"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-a
s-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-ms
c-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.G
A.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_04]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_04]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_04]
Caused by: java.lang.IllegalArgumentException: No enum const class org.teiid.adminapi.Model$Type.TYPE
at java.lang.Enum.valueOf(Enum.java:192) [rt.jar:1.6.0_04]
at org.teiid.adminapi.Model$Type.valueOf(Model.java:35)
at org.teiid.adminapi.impl.VDBMetadataParser.parseModel(VDBMetadataParser.java:222)
at org.teiid.adminapi.impl.VDBMetadataParser.parseVDB(VDBMetadataParser.java:85)
at org.teiid.adminapi.impl.VDBMetadataParser.unmarshell(VDBMetadataParser.java:64)
at org.teiid.jboss.VDBParserDeployer.parseVDBXML(VDBParserDeployer.java:107)
at org.teiid.jboss.VDBParserDeployer.scanVDB(VDBParserDeployer.java:84)
at org.teiid.jboss.VDBParserDeployer.scanVDB(VDBParserDeployer.java:79)
at org.teiid.jboss.VDBParserDeployer.deploy(VDBParserDeployer.java:68)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-a
s-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
It seems it's missing something maybe the fact that I'm deploying a VDB that contain XML model or something similar?
I believe that the xsd are carried with the VDB (at least they are checked in the VDB)
-
17. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 13, 2012 10:51 AM (in response to gioppoluca)I've opened the VBD (since is a zip file) and looked around ... in the vdb.xml i read the following
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb version="1" name="libri">
<property value="false" name="preview"/>
<model visible="true" type="PHYSICAL" name="local_book" path="/books/local_book.xmi">
<property value="1841187605" name="checksum"/>
<property value="false" name="builtIn"/>
<property value="440299790.INDEX" name="indexName"/>
<source translator-name="mysql5" connection-jndi-name="java:/local_book" name="local_book"/>
</model>
<model visible="true" type="TYPE" name="Books" path="/books/Books.xsd">
<property value="2392354248" name="checksum"/>
<property value="false" name="builtIn"/>
<property value="4008441630.INDEX" name="indexName"/>
<property value="/books/BookDatatypes.xsd" name="imports"/>
</model>
<model visible="true" type="TYPE" name="BookDatatypes" path="/books/BookDatatypes.xsd">
<property value="3412846293" name="checksum"/>
<property value="false" name="builtIn"/>
<property value="3680615365.INDEX" name="indexName"/>
</model>
<model visible="true" type="VIRTUAL" name="libro" path="/books/libro.xmi">
<property value="1493944231" name="checksum"/>
<property value="false" name="builtIn"/>
<property value="2863148665.INDEX" name="indexName"/>
<property value="/books/Books.xsd" name="imports"/>
<property value="/books/BookDatatypes.xsd" name="imports"/>
<property value="/books/local_book.xmi" name="imports"/>
<validation-error path="bookListingDocument/bookListing/sequence/book/type" severity="WARNING">The XML Schema component type for "type" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/isbn" severity="WARNING">The XML Schema component type for "isbn" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/Mapping Class Set Container/Mapping Classes/book" severity="WARNING">Possible cross-join: Group/s '[local_book.aria.books, local_book.aria.publishers]' are not joined either directly or transitively to other groups through a join criteria. Check all queries in the transformation.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/edition" severity="WARNING">"edition" has a fixed or default value and should not be mapped. (See validation Preferences)</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/title" severity="WARNING">The XML Schema component type for "title" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/edition" severity="WARNING">The XML Schema component type for "edition" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/publishDate" severity="WARNING">The XML Schema component type for "publishDate" must be marked as an enterprise datatype to be used in this model.</validation-error>
</model>
</vdb>
Could the type= TYPE be the problem?
maybe the designer missed the correct TYPE to assign to the xsd files included in the VDB?
Which could be the correct value?
-
18. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 13, 2012 10:54 AM (in response to gioppoluca)BTW also the validation-error tags gives me worries (but they are warnings), not so much descriptive in any way if I may say.
-
19. Re: From relational to XML (conforming to xschema)
rareddy Apr 13, 2012 11:18 AM (in response to gioppoluca)Luca,
That is a bug (type=TYPE), you open a TeiidDesinger JIRA for it.
Edit the vdb.xml and convert it to type=OTHER, and save the file back in the vdb archive then try to deploy.
Ramesh..
-
20. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 26, 2012 4:27 AM (in response to rareddy)OK now with TEIID 8.CR2 the VBD gets deployed (I had to fix the TYPE by hand).
But another problem occurs:
I connect to the VBD using squirrelSQL.
The MySQL tables are seen correctly and I can query them.
The XML document gives this error in squirrelsql:
Error: Error Code:TEIID30494 Message:Remote org.teiid.api.exception.query.QueryPlannerException: Error Code:TEIID30494 Message:TEIID30494 Unknown query metadata exception while registering query: pgISCnB5O6iW.16.
SQLState: TEIID30494
ErrorCode: 0
And the corresponding in TEIID:
10:20:23,078 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue29) TEIID30020 Processing exception 'Error Code:TEI
ID30494 Message:TEIID30494 Unknown query metadata exception while registering query: pgISCnB5O6iW.16.' for request pgISC
nB5O6iW.16. Exception type org.teiid.api.exception.query.QueryPlannerException thrown from org.teiid.query.metadata.Tra
nsformationMetadata.getXMLSchemas(TransformationMetadata.java:833). Enable more detailed logging to see the entire stack
trace.
Any hint ... this XML tranformation is getting painful
Thanks Luca
-
21. Re: From relational to XML (conforming to xschema)
rareddy Apr 26, 2012 8:45 AM (in response to gioppoluca)Luca,
I agree, XML transformation is one of advanced features in the Teiid, and it has not been revised lately to make any improvements. We got to take that as task in one of the upcoming releases.
For your issue, the error is indicating that there is no XML document model transformation in your VDB. Can you clean and rebuild your VDB and deploy.
Ramesh..
-
22. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 26, 2012 9:28 AM (in response to rareddy)Can these validation-errors (severity warning) affect the result?
<validation-error path="bookListingDocument/bookListing/sequence/book/isbn" severity="WARNING">The XML Schema component type for "isbn" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/edition" severity="WARNING">"edition" has a fixed or default value and should not be mapped. (See validation Preferences)</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/type" severity="WARNING">The XML Schema component type for "type" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/publishDate" severity="WARNING">The XML Schema component type for "publishDate" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/edition" severity="WARNING">The XML Schema component type for "edition" must be marked as an enterprise datatype to be used in this model.</validation-error>
<validation-error path="bookListingDocument/bookListing/sequence/book/sequence/title" severity="WARNING">The XML Schema component type for "title" must be marked as an enterprise datatype to be used in this model.</validation-error>
Made a clean and rebuild (vdb is bigger than before) but same error
Error: Error Code:TEIID30494 Message:Remote org.teiid.api.exception.query.QueryPlannerException: Error Code:TEIID30494 Message:TEIID30494 Unknown query metadata exception while registering query: Lc7iDiaOPlsQ.7.
SQLState: TEIID30494
ErrorCode: 0
15:26:58,000 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue12) TEIID30020 Processing exception 'Error Code:TEI
ID30494 Message:TEIID30494 Unknown query metadata exception while registering query: Lc7iDiaOPlsQ.7.' for request Lc7iDi
aOPlsQ.7. Exception type org.teiid.api.exception.query.QueryPlannerException thrown from org.teiid.query.metadata.Trans
formationMetadata.getXMLSchemas(TransformationMetadata.java:833). Enable more detailed logging to see the entire stacktr
ace.
-
23. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 26, 2012 9:32 AM (in response to gioppoluca)BTW when will be fixed the TYPE vs. OTHER model type bug?
-
24. Re: From relational to XML (conforming to xschema)
shawkins Apr 26, 2012 11:33 AM (in response to gioppoluca)Luca,
https://issues.jboss.org/browse/TEIID-2017 addresses TEIIDDES-1317 on the Teiid side and will be in the final release. As for the underlying exception. What OS are you on? Can you show the contents of the VDB? In particular the path in the vdb to the .xmi file representing the document model (presumably this would be /books/libro.xmi) and then the pathes of the associated schemas (presumably at /books/*.xsd). Also can you show the modelImports/@modelLocation attribute values from the libro.xmi (presumably they should be /books/Books.xsd, etc.).
Thanks,
Steve
-
25. Re: From relational to XML (conforming to xschema)
gioppoluca Apr 27, 2012 3:42 AM (in response to shawkins)I attach the VDB so you can see it.
Is based on the book example from Ramesh using the xsd given in a previous post of this forum (I'm trying to reproduce the how-to written by Ramesh, just renamed the vdb and few stuff using irtalian words).
I expected to go smoothly and understand the relational to XML, but ... we know IT
I can query the mysql DB from squirrelsql so I presume that the VDB works correctly (at least I remember how to create a VDB), but when I try to query the document as in pg. 8 of Ramesh's PDF I get the error reported.
I must say that I DID NOT deployed any xsd in teiid server, just deployed the VDB and created the mysql data source.
So data source is correct and model of DB works.
It seems it cannot find mappings.
Hope that having VDB can help.
Could you use of the zip of the eclipse project?
I attach also that just in case.
Thanks
Luca
-
books.zip 41.2 KB
-
libri.vdb.zip 30.3 KB
-
-
26. Re: From relational to XML (conforming to xschema)
rareddy Apr 27, 2012 9:15 AM (in response to gioppoluca)Luca,
Looks like there are couple regressions with 8.0 metadata loading procedures, thus deployment issues. Steve logged https://issues.jboss.org/browse/TEIID-2018 will have fix shortly.
Thanks
Ramesh..
-
27. Re: From relational to XML (conforming to xschema)
gioppoluca May 2, 2012 6:35 AM (in response to rareddy)On which version will the fix be available?
Thanks
Luca
-
28. Re: From relational to XML (conforming to xschema)
rareddy May 2, 2012 8:43 AM (in response to gioppoluca)We are currently working on 8.0-final today, it will be in there.
-
29. Re: From relational to XML (conforming to xschema)
gioppoluca May 4, 2012 10:19 AM (in response to rareddy)Still not getting results or at least not the expected ones:
This is the output od squirrelsql
<Unknown(2,009)>
Nothing else the query is:
select * from libro.bookListingDocument;
Any idea.
Is the problem on squirrelsql side or there are other problems around?
Thanks
Luca