Uwe, Can you please attach all required files for this Junit test to
http://jira.codehaus.org/browse/CASTOR-1198 I'd like to be able to replay this problem. Thanks Werner > -----Original Message----- > From: Langbecker, Uwe [mailto:[EMAIL PROTECTED] > Sent: Donnerstag, 01. Februar 2007 09:46 > To: [email protected] > Subject: AW: [castor-user] Mapping broken in 1.1M3 - duplicate ID > > Hi Stephen, > > thanks for pointing me to that bug report. It basically > refers to the same situation. > However, I wonder why it used to work in all previous > versions of Castor. (1.0.5 and below) > > Is there an option to configure that the mapping shall not be > validated, either in the Castor properties file or otherwise? > > Best regards, > Uwe > -----Ursprüngliche Nachricht----- > Von: Stephen Bash [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 31. Januar 2007 19:45 > An: [email protected] > Betreff: Re: [castor-user] Mapping broken in 1.1M3 - duplicate ID > > > Uwe- > > This problem has previously been reported in issue 1198: > > http://jira.codehaus.org/browse/CASTOR-1198 > > Can you read through the issue and add any pertinent > information to it? I don't think anyone has worked on it > since it was reported, but it is an issue for parsing and > validation of the mapping file. > > Thanks, > Stephen > > > On 1/31/07, Langbecker, Uwe <[EMAIL PROTECTED]> wrote: > > Hi, > > > > there seems to be a problem with the new milestone M3 of > version 1.1. > > A mapping that worked fine with version 1.0.5 does not work > anymore. > > The problem is related to mapping a class in different > ways, dependend > > on the context. For example, the class "Point" shall be mapped > > differently, see the following mapping. > > > > <?xml version="1.0"?> > > <mapping xmlns:n="http://castor.exolab.org/"> > > > > <class name="sample.Point"> > > <map-to xml="Point" /> > > <field name="x" type="double"> > > <bind-xml name="x" node="attribute" /> > > </field> > > <field name="y" type="double"> > > <bind-xml name="y" node="attribute" /> > > </field> > > </class> > > > > <class name="sample.Location"> > > <map-to xml="Location" /> > > <field name="angles"> > > <bind-xml name="Angle" > > > <class name="sample.Point"> > > <field name="x" > type="double"> > > <bind-xml > name="alpha" > > node="attribute" /> > > </field> > > </class> > > </bind-xml> > > </field> > > <field name="origin.x" type="double"> > > <bind-xml name="x" node="attribute" /> > > </field> > > <field name="origin.y" type="double"> > > <bind-xml name="y" node="attribute" /> > > </field> > > </class> > > > > </mapping> > > > > The following XML structure needs to be unmarshalled: > > > > <Location x="5.0" y="3.0"> > > <Angle alpha="30.0"/> > > </Location>" > > > > However, the unmarshaller complains when loading the mapping file: > > > > Duplicate ID sample.Point encountered{File: [not > available]; line: 18; > > column: 32} > > at > > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:740) > > at > > > org.castor.mapping.MappingUnmarshaller.loadMappingInternal(MappingUnma > > rs > > haller.java:214) > > at > > > org.castor.mapping.MappingUnmarshaller.getMappingLoader(Mappin > gUnmarshal > > ler.java:124) > > at > > > org.castor.mapping.MappingUnmarshaller.getMappingLoader(Mappin > gUnmarshal > > ler.java:99) > > at > > org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:501) > > at > > org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:254) > > at > > > sample.CastorCompatibilityTest.testCompatibility(CastorCompati > bilityTest > > .java:28) > > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > > Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > 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 > > > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReferen > ce.run(JUn > > it3TestReference.java:128) > > at > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestEx > ecution.ja > > va:38) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest > s(RemoteTe > > stRunner.java:460) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest > s(RemoteTe > > stRunner.java:673) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(Rem > oteTestRun > > ner.java:386) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Re > moteTestRu > > nner.java:196) > > Caused by: ValidationException: Duplicate ID sample.Point > encountered > > at > > org.exolab.castor.xml.IDResolverImpl.bind(IDResolverImpl.java:41) > > at > > > org.exolab.castor.xml.UnmarshalHandler.processAttribute(Unmars > halHandler > > .java:2934) > > at > > > org.exolab.castor.xml.UnmarshalHandler.processAttributes(Unmar > shalHandle > > r.java:2667) > > at > > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalH > andler.jav > > a:2313) > > at > > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalH > andler.jav > > a:1362) > > at > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s > tartElemen > > t(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.s > > canStartElement(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl$F > > ragmentContentDispatcher.dispatch(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.s > > canDocument(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(Unkn > > own Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(Unkn > > own Source) > > at > > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown > > Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.p > arse(Unkno > > wn Source) > > at > > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:726) > > ... 24 more > > Caused by: ValidationException: Duplicate ID sample.Point > encountered > > at > > org.exolab.castor.xml.IDResolverImpl.bind(IDResolverImpl.java:41) > > at > > > org.exolab.castor.xml.UnmarshalHandler.processAttribute(Unmars > halHandler > > .java:2934) > > at > > > org.exolab.castor.xml.UnmarshalHandler.processAttributes(Unmar > shalHandle > > r.java:2667) > > at > > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalH > andler.jav > > a:2313) > > at > > > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalH > andler.jav > > a:1362) > > at > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s > tartElemen > > t(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.s > > canStartElement(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl$F > > ragmentContentDispatcher.dispatch(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca > nnerImpl.s > > canDocument(Unknown Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(Unkn > > own Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration. > parse(Unkn > > own Source) > > at > > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown > > Source) > > at > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.p > arse(Unkno > > wn Source) > > at > > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:726) > > at > > > org.castor.mapping.MappingUnmarshaller.loadMappingInternal(Map > pingUnmars > > haller.java:214) > > at > > > org.castor.mapping.MappingUnmarshaller.getMappingLoader(Mappin > gUnmarshal > > ler.java:124) > > at > > > org.castor.mapping.MappingUnmarshaller.getMappingLoader(Mappin > gUnmarshal > > ler.java:99) > > at > > org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:501) > > at > > org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:254) > > at > > > sample.CastorCompatibilityTest.testCompatibility(CastorCompati > bilityTest > > .java:28) > > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > > Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > 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 > > > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReferen > ce.run(JUn > > it3TestReference.java:128) > > at > > > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestEx > ecution.ja > > va:38) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest > s(RemoteTe > > stRunner.java:460) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest > s(RemoteTe > > stRunner.java:673) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(Rem > oteTestRun > > ner.java:386) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Re > moteTestRu > > nner.java:196) > > > > Best regards, > > > > Uwe > > > > > > > > This e-mail and any attachment thereto may contain confidential > > information and/or information protected by intellectual property > > rights for the exclusive attention of the intended addressees named > > above. Any access of third parties to this e-mail is > unauthorised. Any > > use of this e-mail by unintended recipients such as total > or partial > > copying, distribution, disclosure etc. is prohibited and may be > > unlawful. When addressed to our clients the content of this > e-mail is > > subject to the General Terms and Conditions of GL's Group > of Companies > > applicable at the date of this e-mail. > > > > If you have received this e-mail in error, please notify the sender > > either by telephone or by e-mail and delete the material from any > > computer. > > > > GL's Group of Companies does not warrant and/or guarantee that this > > message at the moment of receipt is authentic, correct and its > > communication free of errors, interruption etc. > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > > This e-mail and any attachment thereto may contain > confidential information and/or information protected by > intellectual property rights for the exclusive attention of > the intended addressees named above. Any access of third > parties to this e-mail is unauthorised. Any use of this > e-mail by unintended recipients such as total or partial > copying, distribution, disclosure etc. is prohibited and may > be unlawful. When addressed to our clients the content of > this e-mail is subject to the General Terms and Conditions of > GL's Group of Companies applicable at the date of this e-mail. > > If you have received this e-mail in error, please notify the > sender either by telephone or by e-mail and delete the > material from any computer. > > GL's Group of Companies does not warrant and/or guarantee > that this message at the moment of receipt is authentic, > correct and its communication free of errors, interruption etc. > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

