You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by "Morris, Sean [MV]" <sm...@mvhigh.net> on 2003/04/11 02:08:26 UTC
NullPointer Exception in save()
I have the exact same problem as the previous post. My stacktrace yields the same information but here is the log error:
ERROR - BasePeer.MapBuilder failed trying to instantiate: torque.map.AccountObjMapBuilder
java.lang.InstantiationException: Unknown JDBC driver: com.mysql.jdbc.Driver: Check your configuration file
at org.apache.torque.adapter.DBFactory.create(DBFactory.java:161)
at org.apache.torque.Torque.initDatabaseMap(Torque.java:792)
at org.apache.torque.Torque.getDatabaseMap(Torque.java:761)
at torque.map.AccountObjMapBuilder.doBuild(AccountObjMapBuilder.java:64)
at org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2061)
at torque.BaseAccountObjPeer.getMapBuilder(BaseAccountObjPeer.java:56)
at torque.BaseAccountObj.save(BaseAccountObj.java:892)
at torque.AccountObjTest.testSave(AccountObjTest.java:31)
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:324)
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 junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at junit.textui.TestRunner.main(TestRunner.java:138)
rethrown as
org.apache.torque.TorqueException: Unknown JDBC driver: com.mysql.jdbc.Driver: Check your configuration file
at org.apache.torque.Torque.initDatabaseMap(Torque.java:802)
at org.apache.torque.Torque.getDatabaseMap(Torque.java:761)
at torque.map.AccountObjMapBuilder.doBuild(AccountObjMapBuilder.java:64)
at org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2061)
at torque.BaseAccountObjPeer.getMapBuilder(BaseAccountObjPeer.java:56)
at torque.BaseAccountObj.save(BaseAccountObj.java:892)
at torque.AccountObjTest.testSave(AccountObjTest.java:31)
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:324)
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 junit.textui.TestRunner.doRun(TestRunner.java:116)
at junit.textui.TestRunner.start(TestRunner.java:172)
at junit.textui.TestRunner.main(TestRunner.java:138)
Caused by: java.lang.InstantiationException: Unknown JDBC driver: com.mysql.jdbc.Driver: Check your configuration file
at org.apache.torque.adapter.DBFactory.create(DBFactory.java:161)
at org.apache.torque.Torque.initDatabaseMap(Torque.java:792)
... 21 more
DEBUG - IDBroker thread was started.
Any ideas on why jdbc Driver might be wrong? I use this driver daily without problems. I am using MySQL with the com.mysql.jdbc.Driver 3.0.
Thanks,
Sean