db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: MetadataException for nested fields
Date Fri, 09 May 2003 17:58:00 GMT
The Problem is that "." will be interpreted by the SQL Generator to use 
a JOIN statement. So we really need something different from ".".

Of course "->" is not nice. But at least ex C++ developers will 
understand it ;-)

cheers,
Thomas

Rice Yeh wrote:
> Hi,
>   I found the error. It is because the xml key char
> ">" is used as part of the path separator. Hence it
> seems not a good decision to use "->" as path
> separator. Why not use "." as separator? Dot symbol
> seems giving more intuition to developer here?
> 
> Regards,
> Rice
> 
> 
> --- Rice Yeh <riceyeh@yahoo.com> wrote:
> 
>>Hi,
>>  I have a nested field
>>"poster->principal->service->name" in
>>repository.xml.
>>But  there is MetadataException exception for such
>>nested fields. The following is the stack trace.
>>From
>>this stack trace, error happens when repository.xml
>>is
>> paresed by xml reader, so it should has nothing to
>>do
>>with java files. Right? Any clue?
>>
>>Regards,
>>Rice
>>
>>.E
>>Time: 4.547
>>There was 1 error:
>>1)
>>
> 
> testPersistenceBroker(com.tradevan.retail.persistence.test.ojb.OJBTest)java.lang.ExceptionInInitializerError:
> 
>>org.apache.ojb.broker.metadata.MetadataException:
>>Error creating PersistentField:
>>com.tradevan.retail.bulletin.Bulletin,
>>poster->principal->service->name
>>        at
>>
> 
> weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:980)
> 
>>        at
>>
> 
> weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
> 
>>        at
>>
> 
> weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
> 
>>        at
>>
> 
> weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:137)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:296)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(RepositoryPersistor.java:207)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:85)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.<init>(MetadataManager.java:76)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.<clinit>(MetadataManager.java:67)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(PersistenceBrokerFactoryDefaultImpl.java:139)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(PersistenceBrokerFactoryDefaultImpl.java:110)
> 
>>        at java.lang.Class.newInstance0(Native
>>Method)
>>        at
>>java.lang.Class.newInstance(Class.java:237)
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(PersistenceBrokerFactoryFactory.java:94)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(PersistenceBrokerFactoryFactory.java:71)
> 
>>        at
>>
> 
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:102)
> 
>>        at
>>
> 
> com.tradevan.retail.persistence.test.ojb.OJBTest.testPersistenceBroker(OJBTest.java:46)
> 
>>        at
>>
> 
> org.apache.cactus.AbstractWebServerTestCase.runServerTest(AbstractWebServerTestCase.java:168)
> 
>>        at
>>
> 
> org.apache.cactus.AbstractWebServerTestCase.runBareServerTest(AbstractWebServerTestCase.java:126)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:155)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostAround7(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):130)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostAround7$ajcVoidWrapper(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):125)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10$ajcVoidWrapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6$ajcVoidWrapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 
>>        at
>>
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
> 
>>        at
>>
> 
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
> 
>>        at
>>
> 
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> 
>>        at
>>
> 
> weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> 
>>rethrown as
>>org.apache.ojb.broker.metadata.MetadataException:
>>Could not read repository class descriptor data,
>>using
>>repository: repository.xml: Error creating
>>PersistentField:
>>com.tradevan.retail.bulletin.Bulletin,
>>poster->principal->service->name
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:89)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.<init>(MetadataManager.java:76)
> 
>>        at
>>
> 
> org.apache.ojb.broker.metadata.MetadataManager.<clinit>(MetadataManager.java:67)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.buildDefaultKey(PersistenceBrokerFactoryDefaultImpl.java:139)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.<init>(PersistenceBrokerFactoryDefaultImpl.java:110)
> 
>>        at java.lang.Class.newInstance0(Native
>>Method)
>>        at
>>java.lang.Class.newInstance(Class.java:237)
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(PersistenceBrokerFactoryFactory.java:94)
> 
>>        at
>>
> 
> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(PersistenceBrokerFactoryFactory.java:71)
> 
>>        at
>>
> 
> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(PersistenceBrokerFactory.java:102)
> 
>>        at
>>
> 
> com.tradevan.retail.persistence.test.ojb.OJBTest.testPersistenceBroker(OJBTest.java:46)
> 
>>        at
>>
> 
> org.apache.cactus.AbstractWebServerTestCase.runServerTest(AbstractWebServerTestCase.java:168)
> 
>>        at
>>
> 
> org.apache.cactus.AbstractWebServerTestCase.runBareServerTest(AbstractWebServerTestCase.java:126)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:155)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostAround7(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):130)
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostAround7$ajcVoidWrapper(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):125)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10$ajcVoidWrapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6$ajcVoidWrapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k))
> 
>>        at
>>
> 
> org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):1145)
> 
>>        at
>>
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 
>>        at
>>
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
> 
>>        at
>>
> 
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
> 
>>        at
>>
> 
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
> 
>>        at
>>
> 
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> 
>>        at
>>
> 
> weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> 
>>FAILURES!!!
>>Tests run: 1,  Failures: 0,  Errors: 1
>>
>> 
>>
>>__________________________________
>>Do you Yahoo!?
>>The New Yahoo! Search - Faster. Easier. Bingo.
>>http://search.yahoo.com
>>
>>
> 
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail:
>>ojb-user-help@db.apache.org
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


Mime
View raw message