dev@glassfish.java.net

Re: Trouble integrating Grizzly adapter with v3

From: Martin Grebac <Martin.Grebac_at_Sun.COM>
Date: Tue, 01 Apr 2008 11:35:56 +0200

Hi,
 I just re-checked the file, and the sources are there at the location
below. I read the error of course, but it's not clear to me at all
what's wrong with the Deployer.
   MartinG


Martin Grebac wrote:
> It shall be there under
> groovy-gf3/src/main/java/com/sun/enterprise/groovy/GroovyDeployer.java
> MartinG
>
> Vivek Pandey wrote:
>> groovy.zip does not have sources for GroovyDeployer. Can you send the
>> pointer for the sources to GroovyDeployer and GroovyApplication?
>>
>> It is LinkageError, the comment in HK2 InjectionManager tells:
>>
>> // reflection could trigger additional classloading and
>> resolution, so it can cause linkage error.
>> // report more information to assist diagnosis.
>> // can't trust component.toString() as the object could be
>> in an inconsistent state.
>> Class<?> cls = component.getClass();
>> LinkageError x = new LinkageError("Failed to inject " +
>> cls +" from "+cls.getClassLoader());
>> x.initCause(e);
>> throw x;
>>
>> Perhaps GroovyDeployer and other dependent classes have some
>> inconsistency.
>>
>> -vivek.
>> Martin Grebac wrote:
>>>
>>> Hi,
>>> I wrote a simple Groovy grizzly adapter which works fine in
>>> standalone mode. However, my attempt to hook it into v3 results in
>>> an exception below. It's not straightforward to me what is wrong -
>>> the class mentioned in the NCFE is apparently there, it's public,
>>> from public packages, ... . I'd appreciate any assistance with
>>> this. My sources/binaries are here:
>>> http://beetle.czech.sun.com/~mg116726/groovy/groovy.zip
>>>
>>> Thanks in advance,
>>> MartinG
>>>
>>>
>>> [#|2008-03-31T16:57:59.763+0200|INFO|GlassFish10.0|javax.enterprise.system.tools.deployment|_ThreadID=11;_ThreadName=Thread-4;|Deployment
>>> of BookLibrary-0.1 done is 1511 ms|#]
>>>
>>> [#|2008-03-31T16:57:59.769+0200|SEVERE|GlassFish10.0|javax.enterprise.system.tools.admin|_ThreadID=11;_ThreadName=Thread-4;|Exception
>>> in command execution : java.lang.LinkageError: Failed to inject
>>> class com.sun.enterprise.groovy.GroovyDeployer from
>>> ModuleClassLoader(name=org.glassfish.extras:gf-groovy-connector,
>>> parent=,URls[]=file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/gf-groovy-connector-0.1.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-1.7.0.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-launcher-1.7.0.jar,),init=true,URls[]=file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/gf-groovy-connector-0.1.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-1.7.0.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-launcher-1.7.0.jar,)
>>>
>>> java.lang.LinkageError: Failed to inject class
>>> com.sun.enterprise.groovy.GroovyDeployer from
>>> ModuleClassLoader(name=org.glassfish.extras:gf-groovy-connector,
>>> parent=,URls[]=file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/gf-groovy-connector-0.1.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-1.7.0.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-launcher-1.7.0.jar,),init=true,URls[]=file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/gf-groovy-connector-0.1.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-1.7.0.jar,file:/Users/snajper/work/builds/glassfish/v3-latest/glassfish/modules/ant-launcher-1.7.0.jar,)
>>>
>>> at
>>> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:142)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:64)
>>> at
>>> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:50)
>>>
>>> at
>>> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:39)
>>> at
>>> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:22)
>>>
>>> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:71)
>>> at
>>> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:24)
>>>
>>> at org.jvnet.hk2.component.Habitat.getBy(Habitat.java:478)
>>> at org.jvnet.hk2.component.Habitat.getByType(Habitat.java:459)
>>> at org.jvnet.hk2.component.Habitat.getComponent(Habitat.java:268)
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:765)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:425)
>>>
>>> at
>>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:275)
>>>
>>> at
>>> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:279)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:219)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:95)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:181)
>>>
>>> at
>>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:137)
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:605)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:536)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:785)
>>>
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:137)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.HttpProtocolFilter.execute(HttpProtocolFilter.java:110)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:124)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:75)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>
>>> at
>>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:179)
>>> Caused by: java.lang.NoClassDefFoundError:
>>> com/sun/enterprise/groovy/GroovyApplication
>>> at java.lang.Class.getDeclaredMethods0(Native Method)
>>> at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
>>> at java.lang.Class.getDeclaredMethods(Class.java:1763)
>>> at
>>> org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:94)
>>>
>>> ... 28 more
>>>
>>> MartinG
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>

-- 
Martin Grebac
Web Technologies & Standards
Sun Microsystems Czech
ICQ: 93478885