You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Lukáš Kolísko <lk...@gmail.com> on 2005/11/30 00:48:40 UTC

Problem with initializing Hivemind registry - java.lang.NoSuchMethodError

Hello,
I´m doing some refactoring in my publication system built on Tapestry 
3.0.3/Hibernate 3.1. I would like to use Hivemind. I initailize registry
using servlet context listener. I use modified version of ExampleUtils 
from hivemind examples pack.
But when I start application using Jetty or Tomcat I always get this error:

org.apache.hivemind.ApplicationRuntimeException: Unable to create class 
$Runnable_107de669874:

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Problem with initializing Hivemind registry - java.lang.NoSuchMethodError

Posted by Knut Wannheden <kn...@gmail.com>.
Lukáš,

On 11/30/05, Lukáš Kolísko <lk...@gmail.com> wrote:
> Hello, my first message had important parts cut off (Christmas is
> comming and strange things happen). So I am resending it again.
>

No problem.

>
> I´m doing some refactoring in my publication system built on Tapestry
> 3.0.3/Hibernate 3.1. I would like to use Hivemind. I initailize registry
> using servlet context listener. I use modified version of ExampleUtils
> from hivemind examples pack.
> But when I start application using Jetty or Tomcat I always get this error:
>
> org.apache.hivemind.ApplicationRuntimeException: Unable to create class
> $Runnable_107de669874:
> Caused by: java.lang.NoSuchMethodError:
> javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
>      at
> org.apache.hivemind.service.impl.HiveMindClassPool.toClass(HiveMindClassPool.java:75)
>      at
> org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource.java:84)
>      ... 21 more
>
> I was experimenting with different javaassist lib versions but it had
> no effect. I am able to build hivemind and examples and run all unit
> test with no problems.
>
> I think there is some class loader problem or I have missunderstood
> some basic Hivemind implementation requirements.
>

This definitely looks like HiveMind is picking up the wrong version of
Javassist from the classpath. Do you have multiple versions of
Javassist installed? Is it possible that you're using an incompatible
combination of Tapestry / HiveMind / Javassist versions?

Sorry if I can't provide any better help.

--knut

xpooled

Posted by John Coleman <jo...@ntlworld.com>.
Has anyone had a go at creating the "xpooled" service model I have read
about (on HiveTranse I believe)?

I think the idea is to limit the size of the pool, otherwise you end up with
as many entries as threads.

If not, can anyone tell me exactly how to create a new service/service
model? I think it would be nice to implement this by a change to the
existing code though. In which case this should be a feature request.

John





---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Problem with initializing Hivemind registry - java.lang.NoSuchMethodError

Posted by Lukáš Kolísko <lk...@gmail.com>.
Knut Wannheden napsal(a):
> Hi Lukáš,
> 
> In your subject you mention a java.lang.NoSuchMethodError which I
> assume is a nested exception. Can you please provide the entire stack
> trace?
> 
> Regards,
> 
> --knut
> 
> On 11/30/05, Lukáš Kolísko <lk...@gmail.com> wrote:
> 
>>Hello,
>>I´m doing some refactoring in my publication system built on Tapestry
>>3.0.3/Hibernate 3.1. I would like to use Hivemind. I initailize registry
>>using servlet context listener. I use modified version of ExampleUtils
>>from hivemind examples pack.
>>But when I start application using Jetty or Tomcat I always get this error:
>>
>>org.apache.hivemind.ApplicationRuntimeException: Unable to create class
>>$Runnable_107de669874:
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>>
>>
Hello, my first message had important parts cut off (Christmas is 
comming and strange things happen). So I am resending it again.

Lukáš

Hello,
I´m doing some refactoring in my publication system built on Tapestry 
3.0.3/Hibernate 3.1. I would like to use Hivemind. I initailize registry
using servlet context listener. I use modified version of ExampleUtils 
from hivemind examples pack.
But when I start application using Jetty or Tomcat I always get this error:

org.apache.hivemind.ApplicationRuntimeException: Unable to create class 
$Runnable_107de669874:
Caused by: java.lang.NoSuchMethodError: 
javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
     at 
org.apache.hivemind.service.impl.HiveMindClassPool.toClass(HiveMindClassPool.java:75)
     at 
org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource.java:84)
     ... 21 more

I was experimenting with different javaassist lib versions but it had
no effect. I am able to build hivemind and examples and run all unit
test with no problems.

I think there is some class loader problem or I have missunderstood
some basic Hivemind implementation requirements.

Sorry for silly question

Thanks for your help in advance

Lukáš Kolísko

Full stack trace may help more

00:41:08,093 ERROR ContextListener:31 - 
org.apache.hivemind.ApplicationRuntimeException: Unable to create class 
$Runnable_107de669874: 
javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
org.apache.hivemind.ApplicationRuntimeException: Unable to create class 
$Runnable_107de669874: 
javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
     at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:130)
     at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getService(SingletonServiceModel.java:57)
     at 
org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:209)
     at 
org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:222)
     at 
org.apache.hivemind.impl.RegistryInfrastructureImpl.getService(RegistryInfrastructureImpl.java:207)
     at 
org.apache.hivemind.impl.RegistryInfrastructureImpl.startup(RegistryInfrastructureImpl.java:434)
     at 
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:154)
     at 
org.apache.hivemind.impl.RegistryBuilder.constructDefaultRegistry(RegistryBuilder.java:196)
     at scs.util.hivemind.HiveUtil.buildRegistry(HiveUtil.java:35)
     at 
scs.controller.ContextListener.contextInitialized(ContextListener.java:29)
     at 
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:497)
     at 
org.mortbay.jetty.plus.PlusWebAppContext.doStart(PlusWebAppContext.java:149)
     at org.mortbay.util.Container.start(Container.java:72)
     at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
     at org.mortbay.jetty.plus.Server.doStart(Server.java:153)
     at org.mortbay.util.Container.start(Container.java:72)
     at 
com.iw.plugins.jettyrunner.PluginRunner.launchWithXML(PluginRunner.java:229)
     at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:91)
     at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to 
create class $Runnable_107de669874: 
javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
     at 
org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource.java:88)
     at 
org.apache.hivemind.service.impl.AbstractFab.createClass(AbstractFab.java:92)
     at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxyClass(SingletonServiceModel.java:185)
     at 
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:103)
     ... 18 more
Caused by: java.lang.NoSuchMethodError: 
javassist.CtClass.toClass(Ljava/lang/ClassLoader;)Ljava/lang/Class;
     at 
org.apache.hivemind.service.impl.HiveMindClassPool.toClass(HiveMindClassPool.java:75)
     at 
org.apache.hivemind.service.impl.CtClassSource.createClass(CtClassSource.java:84)
     ... 21 more


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Problem with initializing Hivemind registry - java.lang.NoSuchMethodError

Posted by Knut Wannheden <kn...@gmail.com>.
Hi Lukáš,

In your subject you mention a java.lang.NoSuchMethodError which I
assume is a nested exception. Can you please provide the entire stack
trace?

Regards,

--knut

On 11/30/05, Lukáš Kolísko <lk...@gmail.com> wrote:
> Hello,
> I´m doing some refactoring in my publication system built on Tapestry
> 3.0.3/Hibernate 3.1. I would like to use Hivemind. I initailize registry
> using servlet context listener. I use modified version of ExampleUtils
> from hivemind examples pack.
> But when I start application using Jetty or Tomcat I always get this error:
>
> org.apache.hivemind.ApplicationRuntimeException: Unable to create class
> $Runnable_107de669874:
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>