[ojb-users] sample application with MYSQL
Brought to you by:
thma
From: <Mao...@in...> - 2002-05-29 07:34:00
|
I am a new user of OBJ. The sample examples run ok when I use the default HSQLDB. But when I switch to MQSQL (I've only changed the switch in build.properties file), I had the following exceptions, Does anyone know how do i fix it? Your help is very much appreciated. Qingwen C:\OpenSource\ojb-0.8.400>build run_broker_example Buildfile: build.xml init: prepare: main: prepare-tests: [copy] Copying 1 file to C:\OpenSource\ojb-0.8.400\target\src\test\setup tests: [echo] using switches: -HSQLDB, -ORACLE, -MS_ACCESS, -INSTANTDB, -DB2, -POS TGRESQL, +MYSQL, -INFORMIX, -MSSQLSERVER2000 [java] . [move] Moving 1 files to C:\OpenSource\ojb-0.8.400\target\src\test\setup [copy] Copying 1 file to C:\OpenSource\ojb-0.8.400\target\test\setup [delete] Deleting: C:\OpenSource\ojb-0.8.400\target\src\test\setup\database-s etup.sql [java] [BOOT] INFO: process db-setup.sql [java] [BOOT] INFO: DB url: jdbc:mysql://localhost:3306/ojb [java] [BOOT] INFO: Driver: Mark Matthews' MySQL Driver [java] [BOOT] INFO: Version: 2.0.10 run_broker_example: [junit] .[BOOT] INFO: OJB.properties: file:/C:/OpenSource/ojb-0.8.400/target /test/ojb/OJB.properties [junit] [BOOT] INFO: loading XML took 882 msecs [junit] F.F.null [junit] ojb.broker.PersistenceBrokerSQLException [junit] at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAcces s.java:352) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.getDBObject(Persist enceBrokerImpl.java:1062) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByIdentity (PersistenceBrokerImpl.java:1169) [junit] at ojb.broker.accesslayer.IndirectionHandler.materializeSubject( IndirectionHandler.java:202) [junit] at ojb.broker.accesslayer.IndirectionHandler.getRealSubject(Indi rectionHandler.java:187) [junit] at ojb.broker.VirtualProxy.getRealSubject(VirtualProxy.java:108) [junit] at test.ojb.broker.ProductGroupProxy.realSubject(ProductGroupPro xy.java:65) [junit] at test.ojb.broker.ProductGroupProxy.getName(ProductGroupProxy.j ava:53) [junit] at test.ojb.broker.Article.toString(Article.java:10) [junit] at java.lang.String.valueOf(String.java:1947) [junit] at java.lang.StringBuffer.append(StringBuffer.java:370) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.store(PersistenceBr okerImpl.java:278) [junit] at test.ojb.broker.BrokerExamples.testObjectCache(BrokerExamples .java:189) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:166) [junit] at junit.framework.TestCase.runBare(TestCase.java:140) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:131) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:173) [junit] at junit.framework.TestSuite.run(TestSuite.java:168) [junit] F.null [junit] at junit.textui.TestRunner.doRun(TestRunner.java:74) [junit] at junit.textui.TestRunner.start(TestRunner.java:234) [junit] at junit.textui.TestRunner.main(TestRunner.java:112) [junit] ojb.broker.PersistenceBrokerSQLException [junit] at ojb.broker.accesslayer.JdbcAccess.materializeObject(JdbcAcces s.java:352) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.getDBObject(Persist enceBrokerImpl.java:1062) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.getObjectByIdentity (PersistenceBrokerImpl.java:1169) [junit] at ojb.broker.accesslayer.IndirectionHandler.materializeSubject( IndirectionHandler.java:202) [junit] at ojb.broker.accesslayer.IndirectionHandler.getRealSubject(Indi rectionHandler.java:187) [junit] at ojb.broker.VirtualProxy.getRealSubject(VirtualProxy.java:108) [junit] at test.ojb.broker.ProductGroupProxy.realSubject(ProductGroupPro xy.java:65) [junit] at test.ojb.broker.ProductGroupProxy.getName(ProductGroupProxy.j ava:53) [junit] at test.ojb.broker.Article.toString(Article.java:10) [junit] at java.lang.String.valueOf(String.java:1947) [junit] at java.lang.StringBuffer.append(StringBuffer.java:370) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.store(PersistenceBr okerImpl.java:278) [junit] at test.ojb.broker.BrokerExamples.testShallowAndDeepRetrieval(Br okerExamples.java:252) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:166) [junit] at junit.framework.TestCase.runBare(TestCase.java:140) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:131) [junit] null [junit] at junit.framework.TestSuite.runTest(TestSuite.java:173) [junit] at junit.framework.TestSuite.run(TestSuite.java:168) [junit] at junit.textui.TestRunner.doRun(TestRunner.java:74) [junit] at junit.textui.TestRunner.start(TestRunner.java:234) [junit] at junit.textui.TestRunner.main(TestRunner.java:112) [junit] java.lang.NullPointerException [junit] at test.ojb.broker.ProductGroupProxy.getName(ProductGroupProxy.j ava:53) [junit] at test.ojb.broker.Article.toString(Article.java:10) [junit] at java.lang.String.valueOf(String.java:1947) [junit] at java.lang.StringBuffer.append(StringBuffer.java:370) [junit] at ojb.broker.singlevm.PersistenceBrokerImpl.store(PersistenceBr okerImpl.java:278) [junit] at test.ojb.broker.BrokerExamples.testShallowAndDeepRetrieval(Br okerExamples.java:252) [junit] at java.lang.reflect.Method.invoke(Native Method) [junit] at junit.framework.TestCase.runTest(TestCase.java:166) [junit] at junit.framework.TestCase.runBare(TestCase.java:140) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:131) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:173) [junit] F [junit] Time: 10.705 [junit] There were 4 failures: [junit] 1) testCollectionRetrieval(test.ojb.broker.BrokerExamples)junit.fram ework.AssertionFailedError [junit] at test.ojb.broker.BrokerExamples.testCollectionRetrieval(Broker Examples.java:128) [junit] at junit.framework.TestSuite.run(TestSuite.java:168) [junit] at junit.textui.TestRunner.doRun(TestRunner.java:74) [junit] at junit.textui.TestRunner.start(TestRunner.java:234) [junit] 2) testModifications(test.ojb.broker.BrokerExamples)junit.framework .AssertionFailedError [junit] at junit.textui.TestRunner.main(TestRunner.java:112) [junit] at test.ojb.broker.BrokerExamples.testModifications(BrokerExampl es.java:159) [junit] 3) testObjectCache(test.ojb.broker.BrokerExamples)junit.framework.As sertionFailedError [junit] at test.ojb.broker.BrokerExamples.testObjectCache(BrokerExamples .java:200) [junit] 4) testShallowAndDeepRetrieval(test.ojb.broker.BrokerExamples)junit. framework.AssertionFailedError [junit] at test.ojb.broker.BrokerExamples.testShallowAndDeepRetrieval(Br okerExamples.java:278) [junit] [junit] FAILURES!!! [junit] Tests run: 4, Failures: 4, Errors: 0 [junit] BUILD FAILED NOTICE The information contained in this electronic mail message is privileged and confidential, and is intended only for use of the addressee. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by reply transmission and delete the message without copying or disclosing it. |