有關JBPM3配置時一個無法找到ORACLE JDBC DRIVER的異常,請高手進來幫忙一下!

kentest發表於2005-07-01
我在ECLIPSE裡面對org.jbpm.db.DbTests.java用JUNIT進行DEBUG時,輸出資訊如下:
12:09:18,125 DEBUG JbpmConfiguration : jbpm.create.tables=only-if-not-present
12:09:18,140 DEBUG JbpmConfiguration : hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
12:09:18,140 DEBUG JbpmConfiguration : jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance
12:09:18,140 DEBUG JbpmConfiguration : hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect
12:09:18,140 DEBUG JbpmConfiguration : jbpm.id.generator=default
12:09:18,140 DEBUG JbpmConfiguration : hibernate.query.substitutions=true 1, false 0
12:09:18,140 DEBUG JbpmConfiguration : hibernate.connection.username=JBPM
12:09:18,140 DEBUG JbpmConfiguration : jbpm.create.tables.log=false
12:09:18,140 DEBUG JbpmConfiguration : hibernate.connection.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
12:09:18,140 DEBUG JbpmConfiguration : jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
12:09:18,140 DEBUG JbpmConfiguration : hibernate.show_sql=true
12:09:18,140 DEBUG JbpmConfiguration : hibernate.connection.password=JBPM
12:09:18,140 DEBUG JbpmConfiguration : jbpm.file.mgr=database
12:09:18,421 DEBUG JbpmSessionFactory : using the default hibernate configuration file: hibernate.cfg.xml
12:09:21,921 DEBUG AbstractDbTestCase : creating the default jbpm database schema...
12:09:22,125 FATAL C3P0ConnectionProvider : JDBC Driver class not found: oracle.jdbc.driver.OracleDriver
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:65)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
at org.jbpm.db.JbpmSchema.createConnection(JbpmSchema.java:251)
at org.jbpm.db.JbpmSchema.execute(JbpmSchema.java:216)
at org.jbpm.db.JbpmSchema.createSchema(JbpmSchema.java:150)
at org.jbpm.db.AbstractDbTestCase.getJbpmSessionFactory(AbstractDbTestCase.java:28)
at org.jbpm.db.AbstractDbTestCase.beginSessionTransaction(AbstractDbTestCase.java:79)
at org.jbpm.db.AbstractDbTestCase.setUp(AbstractDbTestCase.java:70)
at junit.framework.TestCase.runBare(TestCase.java:125)
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.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)

它提示無法找到JDBC Driver class not found: oracle.jdbc.driver.OracleDriver

我已經在C:\jbpm.3\lib\目錄下新建了oracle目錄,並且已經把classes12.jar檔案放到裡面了。不過我不清楚JbpmSessionFactory.java是如何找到這些jar檔案的。

我的c:\jbpm.3\src\org\jbpm\目錄下的jbpm.properties檔案內容如下:

jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance


# uncomment the next line to use the file system instead of the database for
# storing files related to a process definition
# jbpm.files.dir=c:/jbpm.data

# resource path to a properties file that will overwrite all the hibernate
# properties. For database specific builds in db project there is a different
# hibernate.properties file on the classpath for each database. You could change
# the default database for any testing runs by uncommenting the next line and
# adding a hibernate.properties file in the basedir.
jbpm.hibernate.properties=hibernate.properties
jbpm.hibernate.cfg.xml=c:/jbpm.3/src/resources/hibernate.cfg.xml

hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL
hibernate.connection.username=JBPM
hibernate.connection.password=JBPM
jbpm.create.tables=only-if-not-present
jbpm.create.tables.log=false
jbpm.file.mgr=database
jbpm.id.generator=default
hibernate.show_sql=true
hibernate.query.substitutions=true 1, false 0


請高手幫幫我吧,我急死了!

相關文章