Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1.3
-
Fix Version/s: JiBX 1.1.3
-
Component/s: core, maven plugin
-
Labels:None
-
Environment:OS: Windows XP SP2, IDE: EasyEclipse IDE, BUILD TOOL: Maven 2, JiBX VERSION: 1.1.3 (for both BIND and RUN)
-
Testcase included:yes
-
Number of attachments :
Description
Ok, so here's the problem.
Assume I have an XML file like -
<a>
<b>
<d>some date</d>
<c>some value</c>
<e>some different value</e>
<d>some different date</d>
</c>
</b>
</a>
So, we have parent-child nodes <b> and <c> that share the same name for a node for keeping the creation dates for them respectively called <d>.
When I run the Bind utility, it is able to Validate and Load (using the maven JiBX plugin) the objects. But when I run the program for loading the object a into the corresponding Java object, it gives
No Marshaller for element
{"<<targetnamespace>>"}NodeName
Exception with the Stacktrace looking like something like this -
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.archinsurance.archparty.dao.SubmissionDaoTest
org.jibx.runtime.JiBXException: No unmarshaller for element "
Created_Ts" (line 41, col 16)
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2534)
at com.archinsurance.archparty.transformation.JiBX_MungeAdapter.JiBX_ArchLinkBinding_unmarshal_1_0()
at com.archinsurance.archparty.transformation.CoverageAgreementTransformation.JiBX_ArchLinkBinding_unmarshal_1_1(CoverageAgreementTransformation.java)
at com.archinsurance.archparty.transformation.JiBX_ArchLinkBindingCoverageAgreementTransformation_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
at com.archinsurance.archparty.transformation.JiBX_MungeAdapter.JiBX_ArchLinkBinding_unmarshal_1_0()
at com.archinsurance.archparty.transformation.SubmissionTransformation.JiBX_ArchLinkBinding_unmarshal_1_1(SubmissionTransformation.java)
at com.archinsurance.archparty.transformation.JiBX_ArchLinkBindingSubmissionTransformation_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
at com.archinsurance.archparty.transformation.JiBX_MungeAdapter.JiBX_ArchLinkBinding_unmarshal_1_0()
at com.archinsurance.archparty.transformation.SubmissionListTransformation.JiBX_ArchLinkBinding_unmarshal_1_2(SubmissionListTransformation.java)
at com.archinsurance.archparty.transformation.JiBX_ArchLinkBindingSubmissionListTransformation_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2537)
at com.archinsurance.archparty.transformation.jibx.BindingSelector.unmarshalVersioned(BindingSelector.java:191)
at com.archinsurance.archparty.transformation.factory.SubmissionListTransformationFactory.loadSubmissionTransformation(SubmissionListTransformationFactory.java:33)
at com.archinsurance.archparty.dao.SubmissionDaoTest.testSubmissionListTransformationFactory(SubmissionDaoTest.java:166)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
java.lang.NullPointerException
at com.archinsurance.archparty.transformation.factory.SubmissionListTransformationFactory.loadSubmissionTransformation(SubmissionListTransformationFactory.java:37)
at com.archinsurance.archparty.dao.SubmissionDaoTest.testSubmissionListTransformationFactory(SubmissionDaoTest.java:166)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
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:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
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:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.062 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19 seconds
[INFO] Finished at: Mon Jul 30 17:00:35 EDT 2007
[INFO] Final Memory: 6M/11M
[INFO] ------------------------------------------------------------------------
I am attaching the binding.xml file that have used for this project, Along with the classes and a sample XML file that will be passed as input.
You can also find the pom.xml file that I have used for this project. along with the src folder of this archive.
This is kind of strange. But I made minor changes to
Ran the project and without any error I got the entire object graph printed.
Can someone explain how different are the collection definitions used with static factories different from collections with strucure def defined as map-as.