Java 使用ClientDataSource驱动程序创建Derby上下文感知函数时发生类未找到错误
我使用derby作为weblogic中的数据源,带有Java 使用ClientDataSource驱动程序创建Derby上下文感知函数时发生类未找到错误,java,derby,javadb,Java,Derby,Javadb,我使用derby作为weblogic中的数据源,带有org.apache.derby.jdbc.ClientDataSource驱动程序。我已经用${WL_HOME}/common/derby/bin/startNetworkServer.sh启动了derby数据库 数据源已正确创建,但在获取连接和创建上下文感知函数时,它抛出“未找到类”错误 Caused by: java.sql.SQLSyntaxErrorException: The class 'test.vti.VTITest' doe
org.apache.derby.jdbc.ClientDataSource
驱动程序。我已经用${WL_HOME}/common/derby/bin/startNetworkServer.sh启动了derby数据库
数据源已正确创建,但在获取连接和创建上下文感知函数时,它抛出“未找到类”错误
Caused by: java.sql.SQLSyntaxErrorException: The class 'test.vti.VTITest' does not exist or is inaccessible. This can happen if the class is not public.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
at weblogic.jdbc.wrapper.Statement.executeUpdate(Statement.java:530)
at oracle.essbase.ds.manager.DataSourceManager.createDSView(DataSourceManager.java:340)
at oracle.essbase.ds.manager.DataSourceManager.save(DataSourceManager.java:128)
at test.DSDBTestWS.createDBDS(DSDBTestWS.java:290)
at test.DSDBTestWS.saveDS(DSDBTestWS.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
如何在类路径中包含test.vti.VTITest
,以便ClientDataSource
驱动程序可以找到它?test.vti.VTITest已经是公共类如果这是您自己编写的类,并且希望在Derby网络服务器中可用,请参阅以下答案: