]
Andre Dietisheim commented on JBIDE-8522:
-----------------------------------------
you basically - afaik - skip the lowest part of EMF (the Resource class) and replaced it
by a smooks based workaround. This was chosen since EMF Resource does not offer
flexibility in matters of schema, it was not possible to map different schemes to the same
model. This flexibility was offered by a smooks based loader. I am not aware of all
details but the stacktrace tells both of us (me and tom) that the error occurs before emf
classes are involved.
test failure in
org.jboss.tools.smooks.templating.template.SmooksTemplatingTestSuite
------------------------------------------------------------------------------------
Key: JBIDE-8522
URL:
https://issues.jboss.org/browse/JBIDE-8522
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: smooks
Affects Versions: 3.2.1
Reporter: Nick Boldt
Assignee: Xue Peng
Priority: Blocker
Fix For: 3.2.1
Attachments: JBIDE-8522.patch, jbide8255-test.zip
Running org.jboss.tools.smooks.templating.template.SmooksTemplatingTestSuite
<#list people as person>
"${person.fname!?string}","${person.lname!?string}","${person.address.country!?string}"
</#list>
<#list people as person>
"${person.fname!?string}","${person.lname!?string}","${person.address.country!?string}"
</#list>
<?xml version="1.0" encoding="UTF-8"?>
<ns0:person
xmlns:ns0="http://www.example.org/simple-01/">
<name first="#required" last="#required">
<male>#required</male>
<female>#required</female>
</name>
<address>#required</address>
</ns0:person>
<ns0:smooks-resource-list default-selector="#optional"
default-selector-namespace="#optional"
default-target-profile="#optional"
xmlns:smk="http://www.jboss.org/xsd/tools/smooks"
smk:elementType="complex" smk:maxOccurs="1"
smk:minOccurs="1" smk:strict="true"
xmlns:ns0="http://www.milyn.org/xsd/smooks-1.0.xsd">
<ns0:profiles smk:elementType="complex" smk:maxOccurs="1"
smk:minOccurs="0">
<ns0:profile base-profile="#required"
smk:elementType="complex" smk:maxOccurs="-1"
smk:minOccurs="1" sub-profiles="#optional"/>
</ns0:profiles>
<ns0:import file="#required" smk:elementType="complex"
smk:maxOccurs="-1" smk:minOccurs="1"/>
<ns0:resource-config selector="#optional"
selector-namespace="#optional" smk:elementType="complex"
smk:maxOccurs="-1" smk:minOccurs="1"
target-profile="#optional">
<ns0:resource smk:elementType="complex" smk:maxOccurs="1"
smk:minOccurs="0" type="#optional"/>
<ns0:condition
evaluator="#optional=org.milyn.javabean.expression.BeanMapExpressionEvaluator"
smk:elementType="complex" smk:maxOccurs="1"
smk:minOccurs="0"/>
<ns0:param name="#required" smk:elementType="complex"
smk:maxOccurs="-1" smk:minOccurs="0" type="#optional"/>
</ns0:resource-config>
</ns0:smooks-resource-list>
<?xml version="1.0" encoding="UTF-8"?>
<ns0:OrderStatusResult
xmlns:ns0="rrn:org.xcbl:schemas/xcbl/v4_0/ordermanagement/v1_0/ordermanagement.xsd">
<ns0:OrderStatusResultHeader>
<ns0:OrderStatusID>#required</ns0:OrderStatusID>
<ns0:OrderStatusIssueDate>#required</ns0:OrderStatusIssueDate>
<ns0:BuyerParty>
<ns1:PartyID
xmlns:ns1="rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd">
<ns1:Ident>#required</ns1:Ident>
</ns1:PartyID>
</ns0:BuyerParty>
<ns0:SellerParty>
<ns1:PartyID
xmlns:ns1="rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd">
<ns1:Ident>#required</ns1:Ident>
</ns1:PartyID>
</ns0:SellerParty>
</ns0:OrderStatusResultHeader>
<ns0:ListOfOrderStatusResultDetail>
<ns0:OrderStatusResultDetail>
<ns0:OrderStatusResultReference>
<ns0:BuyerReferenceNumber>#required</ns0:BuyerReferenceNumber>
<ns0:SellerReferenceNumber>#required</ns0:SellerReferenceNumber>
<ns0:OrderDate>#required</ns0:OrderDate>
<ns0:OrderStatusDate>#required</ns0:OrderStatusDate>
<ns0:OrderStatus>
<ns1:StatusEvent
xmlns:ns1="rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd">
<ns1:StatusEventCoded>#required</ns1:StatusEventCoded>
</ns1:StatusEvent>
</ns0:OrderStatus>
</ns0:OrderStatusResultReference>
</ns0:OrderStatusResultDetail>
</ns0:ListOfOrderStatusResultDetail>
</ns0:OrderStatusResult>
Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.044 sec <<<
FAILURE!
testCreature01(org.jboss.tools.smooks.templating.template.xml.XSDXMLFreeMarkerTemplateBuilderTest)
Time elapsed: 0.107 sec <<< ERROR!
org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
'pref:myString' to a(n) 'type definition' component.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2537)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2528)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1396)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.findDTValidator(XSDSimpleTypeTraverser.java:421)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.getSimpleType(XSDSimpleTypeTraverser.java:262)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.traverseSimpleTypeDecl(XSDSimpleTypeTraverser.java:142)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.traverseGlobal(XSDSimpleTypeTraverser.java:102)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1267)
at
com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:579)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:519)
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
at
com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:210)
at
org.jboss.tools.smooks.templating.model.xml.XSDModelBuilder.validate(XSDModelBuilder.java:121)
at org.jboss.tools.smooks.templating.template.TestUtil.validate(TestUtil.java:73)
at
org.jboss.tools.smooks.templating.template.xml.XSDXMLFreeMarkerTemplateBuilderTest.testCreature01(XSDXMLFreeMarkerTemplateBuilderTest.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at
org.codehaus.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:75)
at
org.codehaus.tycho.surefire.osgibooter.AbstractUITestApplication$1.run(AbstractUITestApplication.java:25)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at
org.codehaus.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:21)
at
org.codehaus.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:109)
at
org.codehaus.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:27)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
http://hudson.qa.jboss.com/hudson/job/jbosstools-3.2_stable_branch.compon...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: