Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81516 invoked from network); 1 Sep 2009 02:30:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Sep 2009 02:30:05 -0000 Received: (qmail 99847 invoked by uid 500); 1 Sep 2009 02:30:05 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 99766 invoked by uid 500); 1 Sep 2009 02:30:05 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 99757 invoked by uid 99); 1 Sep 2009 02:30:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 02:30:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 02:29:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B653C234C004 for ; Mon, 31 Aug 2009 19:29:32 -0700 (PDT) Message-ID: <1799846867.1251772172719.JavaMail.jira@brutus> Date: Mon, 31 Aug 2009 19:29:32 -0700 (PDT) From: "Francois Orsini (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4364) Cannot create an instance of generated class org.apache.derby.exe.acf81e0010x0123x6e25x38c2x00000616b5f80. In-Reply-To: <812791837.1251692132774.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749735#action_12749735 ] Francois Orsini commented on DERBY-4364: ---------------------------------------- You can store application logic (e.g. JAR files) in a Derby database and then set derby.database.classpath (database property) to let Derby's class loader know that classes that could not be loaded from the user's classpath, can be loaded from specific stored JARs in the database. Note that the application logic would have to be part of a SQL Function, procedure or table function... More information at: http://db.apache.org/derby/docs/dev/devguide/devguide-single.html#cdevdeploy30736 > Cannot create an instance of generated class org.apache.derby.exe.acf81e0010x0123x6e25x38c2x00000616b5f80. > ---------------------------------------------------------------------------------------------------------- > > Key: DERBY-4364 > URL: https://issues.apache.org/jira/browse/DERBY-4364 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.5.3.0 > Environment: The program run well in my local machine's tomcat server. but when I deployed into http://www.jhost.cn/, it failed. the env in jhost are: > Apache/2.2.11 mod_jk/1.2.25 > Tomcat Version 5.5.27 > JVM Version 1.5.0_11-b03 > PHP Version 5.2.8 > MySQL Ver 14.12 Distrib 5.0.67 > phpMyAdmin Version information: 3.1.1 > Reporter: LiuZhenKe > Priority: Critical > Original Estimate: 336h > Remaining Estimate: 336h > > This issue is quite like issue DERBY-4142, but I think the root cause is different. > The java code which raise this error is: > rs=stmt.executeQuery("SELECT ID FROM T_SYS_RS_PACKAGE_MASTER WHERE EXISTS (SELECT * FROM T_VC_MASTER MA WHERE MA.SUBCLASS_TABLE_NAME='T_SYS_RS_PACKAGE_MASTER' AND MA.SUBCLASS_TABLE_ID=T_SYS_RS_PACKAGE_MASTER.ID AND MA.NAME='"+PackageName+"')"); > The error message tells that create an instance of generated class acf81e0010x0123x6e25x38c2x00000616b5f80 fail caused by java.lang.NoClassDefFoundError: org/apache/derby/impl/sql/execute/GenericQualifier. But I see that this GenericQualifier.class is put in derby.jar, which is put in WEB-INF\lib folder. so I guess this issue may be caused by the classloader switch somewhere, may be in acf81e0010x0123x6e25x38c2x00000616b5f80. the new classloader may not able to find a class in WEB-INF\lib\derby.jar. Anyway, just a guess > error log is captured: > java.sql.SQLException: Cannot create an instance of generated class org.apache.derby.exe.acf81e0010x0123x6e25x38c2x00000616b5f80. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87) > at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:223) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:398) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346) > at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2201) > at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:614) > at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java:152) > at Concept.Resource.Server.derby.CCheckInResources.checkInResources(CCheckInResources.java:342) > at Concept.Resource.Server.derby.CCheckInResources.SubmitTransaction(CCheckInResources.java:223) > at Concept.Transaction.Server.CTransactionServer.doPost(CTransactionServer.java:722) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301) > at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283) > at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56) > at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189) > at java.security.AccessController.doPrivileged(Native Method) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) > at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) > at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) > at java.lang.Thread.run(Thread.java:595) > Caused by: java.sql.SQLException: Java exception: 'org/apache/derby/impl/sql/execute/GenericQualifier: java.lang.NoClassDefFoundError'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:87) > at org.apache.derby.impl.jdbc.Util.javaException(Util.java:244) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403) > ... 37 more > Caused by: java.lang.NoClassDefFoundError: org/apache/derby/impl/sql/execute/GenericQualifier > at org.apache.derby.impl.sql.execute.GenericExecutionFactory.getQualifier(GenericExecutionFactory.java:250) > at org.apache.derby.exe.acf81e0010x0123x6e25x38c2x00000616b5f80.postConstructor(Unknown Source) > at org.apache.derby.impl.services.reflect.LoadedGeneratedClass.newInstance(LoadedGeneratedClass.java:71) > at org.apache.derby.impl.services.reflect.ReflectGeneratedClass.newInstance(ReflectGeneratedClass.java:60) > at org.apache.derby.impl.sql.GenericActivationHolder.(GenericActivationHolder.java:129) > at org.apache.derby.impl.sql.GenericPreparedStatement.getActivation(GenericPreparedStatement.java:234) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:609) > ... 32 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.