You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2009/02/23 22:54:55 UTC

[2.2] java.lang.NoClassDefFoundError: org/mozilla/javascript/continuations/Continuation

Hi Cocooners,

apparently I broke something in my application. Unfortunately I can't 
recall what I changed that could have caused this issue. It looks like 
Rhino is not on the classpath. Maybe some classloader problem? All I can 
tell is that the sitemap + flowscript already worked.

I remember adding the Spring configurator namespace to some bean 
declaration files to enable placeholder processing, but I can't imagine 
that there is a relation …

java.lang.NoClassDefFoundError: 
org/mozilla/javascript/continuations/Continuation
	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.mozilla.javascript.FunctionObject.getMethodList(FunctionObject.java:268)
	at 
org.mozilla.javascript.ScriptableObject.defineClass(ScriptableObject.java:784)
	at 
org.mozilla.javascript.ScriptableObject.defineClass(ScriptableObject.java:747)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.init(FOM_Cocoon.java:210)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.initialize(FOM_JavaScriptInterpreter.java:184)
	at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
	at 
org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:256)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:238)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:238)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at 
org.apache.cocoon.core.container.spring.avalon.AvalonServiceManager.lookup(AvalonServiceManager.java:61)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.FlowNode.service(FlowNode.java:60)
	at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:166)
	at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:109)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.setupNode(SitemapLanguage.java:448)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.FlowNodeBuilder.buildNode(FlowNodeBuilder.java:53)

TIA for any hints!

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


[Solved] [2.2] java.lang.NoClassDefFoundError: org/mozilla/javascript/continuations/Continuation

Posted by Andreas Hartmann <an...@apache.org>.
Hi Grzegorz,

thanks for your reply!

Grzegorz Kossakowski schrieb:
> Andreas Hartmann pisze:
>> apparently I broke something in my application. Unfortunately I can't
>> recall what I changed that could have caused this issue. It looks like
>> Rhino is not on the classpath. Maybe some classloader problem? All I can
>> tell is that the sitemap + flowscript already worked.
>>
>> I remember adding the Spring configurator namespace to some bean
>> declaration files to enable placeholder processing, but I can't imagine
>> that there is a relation …
>>
>> java.lang.NoClassDefFoundError:
>> org/mozilla/javascript/continuations/Continuation
>>     at java.lang.Class.getDeclaredMethods0(Native Method)
>>     at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
>>     at java.lang.Class.getDeclaredMethods(Class.java:1763)
> 
> This looks like a classpath issue but quite strange one.
> 
> How do you start your Cocoon application? With mvn jetty:run?

Yes, I'm using jetty:run. But I have now found the source of the 
problem: The offending change was enabling a block in my application 
that had a dependency to cocoon-batik-impl. This module uses Rhino 
1.5R4.1, but the flowscript module needs 1.6R7. I guess the Continuation 
class didn't exist in 1.5R4.1 yet.

Anyway, after adding the exclusion declaration to the cocoon-batik-impl 
POM to avoid the transitive dependency, it works again:

     <dependency>
       <groupId>batik</groupId>
       <artifactId>batik-script</artifactId>
       <exclusions>
         <exclusion>
           <groupId>rhino</groupId>
           <artifactId>js</artifactId>
         </exclusion>
       </exclusions>
     </dependency>

Shall I commit this change?

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: [2.2] java.lang.NoClassDefFoundError: org/mozilla/javascript/continuations/Continuation

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Andreas Hartmann pisze:
> Hi Cocooners,
> 
> apparently I broke something in my application. Unfortunately I can't
> recall what I changed that could have caused this issue. It looks like
> Rhino is not on the classpath. Maybe some classloader problem? All I can
> tell is that the sitemap + flowscript already worked.
> 
> I remember adding the Spring configurator namespace to some bean
> declaration files to enable placeholder processing, but I can't imagine
> that there is a relation …
> 
> java.lang.NoClassDefFoundError:
> org/mozilla/javascript/continuations/Continuation
>     at java.lang.Class.getDeclaredMethods0(Native Method)
>     at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
>     at java.lang.Class.getDeclaredMethods(Class.java:1763)

This looks like a classpath issue but quite strange one.

How do you start your Cocoon application? With mvn jetty:run?

-- 
Best regards,
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org