dev@glassfish.java.net

Re: Location of User JARs in GlassFish ?

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 27 Aug 2008 21:09:05 -0700

Ok, this is deploying a Rails application in v3.

I copied MySQL Connector/J jar in JRUBY_HOME/lib and so it can find
com.mysql.jdbc.Driver. But Felix throws the CNF exception as

Aug 27, 2008 9:04:16 PM com.sun.gjc.common.DataSourceObjectBuilder
getDataSourceObject
SEVERE: jdbc.exc_cnfe_ds
java.lang.ClassNotFoundException:
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
         at
org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:200)
         at
org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)
         at
org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

This class indeed exists in Connector/J jar. Where do you recommend this
JAR needs to be copied so that it can found at runtime ?

-Arun

Sahoo wrote:
> Don't expect an OSGi module to be able to load classes from domain/lib
> or lib. Only application class loaders have visibility to those libraries.
>
> Thanks,
> Sahoo
>
> Arun Gupta wrote:
>> With 8/24 nightly, dropping a JAR file in lib directory does not seem
>> to get picked up.
>>
>> 8/25: nightly not there
>> 8/26: Rails is broken
>> 8/27: Startup gives the error:
>>
>> -- cut here --
>> Aug 27, 2008 5:08:43 PM
>> SEVERE: com.sun.enterprise.module.ResolveError: Failed to start
>> org.glassfish.web.web-cli(Web module command line
>> interface):10.0.0.SNAPSHOT
>> Aug 27, 2008 5:08:43 PM
>> SEVERE: at
>> org.jvnet.hk2.osgiadapter.OSGiModuleImpl.resolve(OSGiModuleImpl.java:111)
>> Aug 27, 2008 5:08:43 PM
>> SEVERE: at
>> org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:120)
>> Aug 27, 2008 5:08:43 PM
>> SEVERE: at
>> org.jvnet.hk2.osgiadapter.OSGiModuleImpl$1$1.loadClass(OSGiModuleImpl.java:252)
>>
>> Aug 27, 2008 5:08:43 PM
>> -- cut here --
>>
>> Where can I drop a JAR file in GlassFish so that it gets picked up ?
>>
>> -Arun
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta