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

Hans Zeller commented on TRAFODION-2182:
----------------------------------------

David reminded me of this issue today - sorry for not paying enough attention. 
The issue is probably with the custom class loader that the Trafodion UDR 
mechanism uses. This class loader just looks in the jar that is the Trafodion 
library for the UDR. The class loader also has the ability to include the 
Trafodion class path in its search, but I'm not sure this is turned on and I'm 
also not sure whether this is a good idea from a security point of view. So, I 
think we may have the following options for the class path of a UDR:

* Search in the library jar (done currently)
* Also search the Trafodion class path (may or may not be done currently, 
probably ok for trusted UDRs but may not be ok for isolated UDRs)
* Add a directory like $TRAF_HOME/udr/external_libs and all the jars in that 
directory to the class path for UDRs. This would allow a user to install needed 
jars in a known location.
* In the long term I would also like to add a concept of a "UDR Environment". 
This would be created with a DDL statement and it would register a tar file. A 
library could specify the name of an environment, let's call it myenv. When we 
execute the UDR, we would untar the environment file into $TRAF_HOME/env/myenv 
and add all the jars in $TRAF_HOME/env/myenv/lib to the classpath of the custom 
class loader (TBD is how to define the order of the jars).

See also 
https://docs.oracle.com/cd/B19306_01/java.102/b14187/chtwo.htm#BABGJCAJ for how 
Oracle solves the class loading problems for UDRs. See also TRAFODION-2534.

> JVM exception for TMUDF
> -----------------------
>
>                 Key: TRAFODION-2182
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2182
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: foundation
>    Affects Versions: 2.1-incubating
>         Environment: TMUDF
>            Reporter: David Wong
>            Assignee: Hans Zeller
>             Fix For: 2.2-incubating
>
>
> This involved jar file containing Lucene components for TMUDF.  When run the 
> TMUDF, get...
> *** ERROR[11224] The Java virtual machine raised an exception. Details: 
> java.lang.IllegalArgumentException: An SPI class of type 
> org.apache.lucene.codecs.Codec with name 'Lucene60' does not exist.  You need 
> to add the corresponding JAR file supporting this SPI to your classpath.  The 
> current classpath supports the following names: [] [2016-08-23 16:56:47]
> Add jar to CLASSPATH in $MY_SQROOT/etc/ms.env is a workaround (didn't need to 
> bounce anything).  Exception does not occur.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to