db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof N <yaz...@gmail.com>
Subject Re: Unable to use Table function due to java.lang.ClassNotFoundException while class is clearly reachable..
Date Tue, 31 Mar 2009 11:08:23 GMT


Hello Rick,
Thank you for fast response. Still have some issues though - I am using
trunk version, repeated installation of jars - same way as before.
Both scalar 'values' and table function call give ClassNotFoundException
originating from ReflectClassesJava2:loadClassNotInDatabaseJar now:

<log>
ERROR 42X51: The class 'gaia.cu7.dal.DerbyBlobTableFunction' does not exist
or is inaccessible. This can happen if the class is not public.
        at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:296)
        at
org.apache.derby.impl.sql.compile.QueryTreeNode.verifyClassExist(QueryTreeNode.java:1445)
        at
org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:256)
        at
org.apache.derby.impl.sql.compile.FromVTI.bindVTITables(FromVTI.java:541)
        at
org.apache.derby.impl.sql.compile.FromList.bindTables(FromList.java:322)
        at
org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(SelectNode.java:390)
        at
org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(DMLStatementNode.java:199)
        at
org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:137)
        at
org.apache.derby.impl.sql.compile.CursorNode.bindStatement(CursorNode.java:245)
        at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:316)
        at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
        at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:802)
        at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
        at
org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:152)
...
Caused by: java.lang.ClassNotFoundException:
gaia.cu7.dal.DerbyBlobTableFunction
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.derby.impl.services.reflect.ReflectClassesJava2.loadClassNotInDatabaseJar(ReflectClassesJava2.java:108)
        at
org.apache.derby.impl.services.reflect.DatabaseClasses.loadApplicationClass(DatabaseClasses.java:232)
        at
org.apache.derby.iapi.services.loader.ClassInspector.getClass(ClassInspector.java:832)
        at
org.apache.derby.iapi.services.loader.ClassInspector.accessible(ClassInspector.java:134)
        at
org.apache.derby.impl.sql.compile.QueryTreeNode.verifyClassExist(QueryTreeNode.java:1437)
        ... 17 more
============= begin nested exception, level (1) ===========
java.lang.ClassNotFoundException: gaia.cu7.dal.DerbyBlobTableFunction
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at
org.apache.derby.impl.services.reflect.ReflectClassesJava2.loadClassNotInDatabaseJar(ReflectClassesJava2.java:108)
        at
org.apache.derby.impl.services.reflect.DatabaseClasses.loadApplicationClass(DatabaseClasses.java:232)
        at
org.apache.derby.iapi.services.loader.ClassInspector.getClass(ClassInspector.java:832)
        at
org.apache.derby.iapi.services.loader.ClassInspector.accessible(ClassInspector.java:134)
        at
org.apache.derby.impl.sql.compile.QueryTreeNode.verifyClassExist(QueryTreeNode.java:1437)
        at
org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:256)
        at
org.apache.derby.impl.sql.compile.FromVTI.bindVTITables(FromVTI.java:541)
        at
org.apache.derby.impl.sql.compile.FromList.bindTables(FromList.java:322)
        at
org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(SelectNode.java:390)
        at
org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(DMLStatementNode.java:199)
        at
org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java:137)
        at
org.apache.derby.impl.sql.compile.CursorNode.bindStatement(CursorNode.java:245)
        at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:316)
        at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
        at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:802)
        at
org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:606)
        at
org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:152)
...
============= end nested exception, level (1) ===========
</log>

Seems internal classpath is set properly:

<log>
Executing prepared statement: CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY
('derby.database.classpath', 'APP.kn') :End prepared statement
Database Class Loader started - derby.database.classpath='APP.kn'
2009-03-31 11:03:39.148 GMT Thread[SQL Execution Thread 1,6,main] (XID =
194), (SESSIONID = 1), CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY
('derby.database.classpath', 'APP.kn') ******* null
</log>

Best regards,
Krzysztof
-- 
View this message in context: http://www.nabble.com/Uinable-to-use-Table-function-due-to-java.lang.ClassNotFoundException--while-class-is-clearly-reachable..-tp22478383p22802900.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message