dev@glassfish.java.net

Re: embedded module compile error?

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Wed, 03 Sep 2008 21:33:18 -0700

file a bug and assign it to sahoo please.

thx, jerome

Vivek Pandey wrote:
> Thanks!
>
> Now there is NPE coming from
> CommonClassLoaderServiceImpl.createCommonClassLoader() line 96. I dont
> think we need to go this path for embedded case, there is no
> rootInstall for embedded case.
>
> Caused by: java.lang.NullPointerException
> at java.io.File.<init>(File.java:194)
> at
> com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl.createCommonClassLoader(CommonClassLoaderServiceImpl.java:96)
>
> at
> com.sun.enterprise.v3.server.CommonClassLoaderServiceImpl.postConstruct(CommonClassLoaderServiceImpl.java:88)
>
> at
> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:150)
> at
> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
> at
> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:75)
> at
> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>
> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
> at
> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>
> at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:567)
> at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:548)
> at
> com.sun.hk2.component.AbstractWombImpl$1.getValue(AbstractWombImpl.java:127)
>
> at
> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:79)
>
>
> -vivek.
> Jerome Dochez wrote:
>> Vivek Pandey wrote:
>>> There are two potential changes that is causing the compilation
>>> failure:
>>>
>>> ClassLoader parentCL = snifMan.createSnifferParentCL(null);
>>>
>>> SnifferManager.createSnifferParentCL(ClassLoader) method is removed
>>> from SnifferManager. Now for embedded case, which class loader it is
>>> supposed to use that would be equivalent to
>>> SnifferManager.createSnifferParentCL()?
>>>
>> in the emdedded case, the parent class loader can be the same one as
>> the non embedded case so I don't think you have anything to do
>> really. You can even use the Sniffer class loader if you want, since
>> it's all the same class loader
>>> Also since DeploymentContextImpl.setClassLoader(ClassLoader ) is
>>> removed, how do I use it?
>> now the class loaders are created by the DeploymentContextImpl in
>> createClassLoaders API. then you can access it by using either the
>> getClassLoader() and the finalGetClassLoader().
>>
>>
>>>
>>> The embedded API is pretty critical to be used for Grails
>>> RunAppGF.groovy script as well as for glassfish gem. I am ready to
>>> make the changes but with the changes mentioned above not sure how
>>> to proceed?
>>>
>>> -vivek.
>>>
>>> Jerome Dochez wrote:
>>>> there were some changes made to DeploymentContext, looks like we
>>>> need to enhance the embedded impl.
>>>>
>>>> jerome
>>>>
>>>> Nandini Ektare wrote:
>>>>> I hit this error on latest build... Anyone else sees it?
>>>>>
>>>>> [INFO] [compiler:compile]
>>>>> [INFO] Compiling 17 source files to
>>>>> /export/home/nandini/v3/embedded/api/target/classes
>>>>> [INFO]
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> [ERROR] BUILD FAILURE
>>>>> [INFO]
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> [INFO] Compilation failure
>>>>> /export/home/nandini/v3/embedded/api/src/main/java/org/glassfish/embed/AppServer.java:[534,25]
>>>>> cannot find symbol
>>>>> symbol : method setClassLoader(java.lang.ClassLoader)
>>>>> location: class org.glassfish.deployment.common.DeploymentContextImpl
>>>>>
>>>>> /export/home/nandini/v3/embedded/api/src/main/java/org/glassfish/embed/AppServer.java:[534,25]
>>>>> cannot find symbol
>>>>> symbol : method setClassLoader(java.lang.ClassLoader)
>>>>> location: class org.glassfish.deployment.common.DeploymentContextImpl
>>>>>
>>>>>
>>>>> [INFO]
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> [INFO] For more information, run Maven with the -e switch
>>>>> [INFO]
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>> [INFO] Total time: 2 minutes 44 seconds
>>>>> [INFO] Finished at: Tue Sep 02 16:13:52 PDT 2008
>>>>> [INFO] Final Memory: 26M/48M
>>>>> [INFO]
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> -Nandini
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>