Quantcast

java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass (embedding in Grails application)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass (embedding in Grails application)

psmith
Hi,

I'm trying out (for a little fun) embedding Mule as part of a Grails application. I'm using:

* Groovy 1.5.5
* Grails 1.0.2
* JDK 1.6.0_05 (Apple)
* Mule 2.0.1 (although I've tried 2.0.0 also)

I've added the listener to the web.xml descriptor, the Mule config stuff seems to kick in correctly, but then hits a NoSuchMethodError (I've embedded a snip of the stack trace that Jetty reports below). Running the example Mule webapp works fine (using mvn), but running

In short, initializeClass is called (source below) which then calls getClass... on my machine, opening the source in IntelliJ I get an error that getClass is being resolved to Object, which is both non-static and with a different signature. I can't see a ClassUtils.getClass method anywhere. I know I'm going crazy, but I've been messing with this for a few hours now... so please, any chance somebody might be able to point out the obvious to me! :)

-----snip-----
Mule config file(s): mule-config-main.xml
2008-05-30 00:09:03.954:/booking:WARN:  org.mule.util.ClassUtils.getClass(Ljava/lang/String;Z)Ljava/lang/Class;
java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass(Ljava/lang/String;Z)Ljava/lang/Class;
at org.mule.util.ClassUtils.initializeClass(ClassUtils.java:310)
at org.mule.lifecycle.NotificationLifecycleObject.<init>(NotificationLifecycleObject.java:45)
at org.mule.lifecycle.NotificationLifecycleObject.<init>(NotificationLifecycleObject.java:61)
at org.mule.lifecycle.phases.TransientRegistryDisposePhase.<init>(TransientRegistryDisposePhase.java:53)
at org.mule.lifecycle.phases.TransientRegistryDisposePhase.<init>(TransientRegistryDisposePhase.java:41)
at org.mule.registry.TransientRegistry.createLifecycleManager(TransientRegistry.java:98)
at org.mule.registry.AbstractRegistry.<init>(AbstractRegistry.java:80)
at org.mule.registry.TransientRegistry.<init>(TransientRegistry.java:63)
at org.mule.RegistryContext.getOrCreateRegistry(RegistryContext.java:45)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:187)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:94)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:55)
at org.mule.config.builders.MuleXmlBuilderContextListener.createManager(MuleXmlBuilderContextListener.java:108)
at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:74)
at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:56)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:220)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
-----snip-----


Thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass (embedding in Grails application)

Dirk Olmes-5
> In short, initializeClass is called (source below) which then calls
> getClass... on my machine, opening the source in IntelliJ I get an error
> that getClass is being resolved to Object, which is both non-static and
> with a different signature. I can't see a ClassUtils.getClass method
> anywhere.

It's there but you have to watch very closely to see it :-)

>  org.mule.util.ClassUtils.getClass(Ljava/lang/String;Z)Ljava/lang/Class;

This is misleading .... org.mule.util.ClassUtils inherits from
org.apache.commons.lang.ClassUtils which indeed does have a
getClass(String, boolean) method!

So I'd check if your grails project comes with a different commons-lang
(Mule uses v2.3) and make sure that this is the version that's actually
used.

-dirk

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass (embedding in Grails application)

mojava
In reply to this post by psmith
I am also getting the exact same error when attempting to deploy mule as a .rar or packaged as an .ear in Weblogic 10.0. Where you able to make progress or correct this issue? Any help or information would be very very useful.


psmith wrote
Hi,
I'm trying out (for a little fun) embedding Mule as part of a Grails
application. I'm using:

* Groovy 1.5.5
* Grails 1.0.2
* JDK 1.6.0_05 (Apple)
* Mule 2.0.1 (although I've tried 2.0.0 also)

I've added the listener to the web.xml descriptor, the Mule config stuff
seems to kick in correctly, but then hits a NoSuchMethodError (I've embedded
a snip of the stack trace that Jetty reports below). Running the example
Mule webapp works fine (using mvn), but running

In short, initializeClass is called (source below) which then calls
getClass... on my machine, opening the source in IntelliJ I get an error
that getClass is being resolved to Object, which is both non-static and with
a different signature. I can't see a ClassUtils.getClass method anywhere. I
know I'm going crazy, but I've been messing with this for a few hours now...
so please, any chance somebody might be able to point out the obvious to me!
:)

-----snip-----
Mule config file(s): mule-config-main.xml
2008-05-30 00:09:03.954:/booking:WARN:
 org.mule.util.ClassUtils.getClass(Ljava/lang/String;Z)Ljava/lang/Class;
java.lang.NoSuchMethodError:
org.mule.util.ClassUtils.getClass(Ljava/lang/String;Z)Ljava/lang/Class;
at org.mule.util.ClassUtils.initializeClass(ClassUtils.java:310)
at
org.mule.lifecycle.NotificationLifecycleObject.<init>(NotificationLifecycleObject.java:45)
at
org.mule.lifecycle.NotificationLifecycleObject.<init>(NotificationLifecycleObject.java:61)
at
org.mule.lifecycle.phases.TransientRegistryDisposePhase.<init>(TransientRegistryDisposePhase.java:53)
at
org.mule.lifecycle.phases.TransientRegistryDisposePhase.<init>(TransientRegistryDisposePhase.java:41)
at
org.mule.registry.TransientRegistry.createLifecycleManager(TransientRegistry.java:98)
at org.mule.registry.AbstractRegistry.<init>(AbstractRegistry.java:80)
at org.mule.registry.TransientRegistry.<init>(TransientRegistry.java:63)
at org.mule.RegistryContext.getOrCreateRegistry(RegistryContext.java:45)
at
org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:187)
at
org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:94)
at
org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:55)
at
org.mule.config.builders.MuleXmlBuilderContextListener.createManager(MuleXmlBuilderContextListener.java:108)
at
org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:74)
at
org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:56)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:220)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
-----snip-----


Thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: java.lang.NoSuchMethodError: org.mule.util.ClassUtils.getClass (embedding in Grails application)

Vineet Khilani
Make sure you are using commons-lang-2.3.jar
I was able to resolve this issue with this change.

Loading...