You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2016/09/27 12:37:21 UTC

[jira] [Commented] (TOMEE-1947) Using Class within sqltool-2.3.2.jar results in ClassNotFoundException

    [ https://issues.apache.org/jira/browse/TOMEE-1947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15525988#comment-15525988 ] 

Romain Manni-Bucau commented on TOMEE-1947:
-------------------------------------------

Hi Marco

you can set openejb.classloader.forced-load = org.hsqldb in conf/system.properties to fix it

(side note the value can be a list of packages/classes like org.hsqldb.cmdline,org.hsqldb.SqlToolWhateverClass,...)

> Using Class within sqltool-2.3.2.jar results in ClassNotFoundException
> ----------------------------------------------------------------------
>
>                 Key: TOMEE-1947
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1947
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>            Reporter: Marco Dubacher
>
> We want to use sqltool-2.3.2.jar which is provided by the hsqldb guys inorder to pump some sql-scripts into the hsqldb.
> Deploying the sqltool-2.3.2.jar as part of our war-file results in a ClassNotFoundException for the Class "org.hsqldb.cmdline.SqlFile" which is stored within the sqltool-2.3.2.jar.
> The ClassNotFoundException is caused by the following code-lines which are part of the shouldSkip()-Method within the Class URLClassLoaderFirst.
> {code:title=URLClassLoaderFirst.java|borderStyle=solid}
> ...
> if ((org.startsWith("hsqldb.")) && (SKIP_HSQLDB)) {
>     return true;
> } 
> ...
> {code}
> The problem is that the sqltool-2.3.2.jar contains the same package hierarchy org.hsqldb... as the hsqldb.jar.
> Workarounds:
> # Remove hsqldb-2.3.2.jar from TomEE lib folder.
> # Set the property org.hsqldb.lib.HsqlTimer.skip = false



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)