error using masterworker tim - 2.1.0 in multiple war project

View: New views
2 Messages — Rating Filter:   Alert me  

error using masterworker tim - 2.1.0 in multiple war project

by Artie Copeland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i am having an issue using tim-masterworker 2.1.0 with tc 3.1 and  
having multiple wars.  I currently have one war as the master and  
another war as the worker.  The master loads fine but when i try to  
load the worker i get this error:

Caused by: java.lang.ClassCastException: The field 'instance' with  
root name 'org.terracotta.message.topology.TopologyManager.instance'  
cannot be assigned to a variable of type org/terracotta/message/
topology/TopologyManager. This root has a type  
org.terracotta.message.topology.TopologyManager. Perhaps you have the  
same root name assigned more than once to variables of different types.
        at org.terracotta.message.topology.TopologyManager.__tc_setinstance
(TopologyManager.java)
        at org.terracotta.message.topology.TopologyManager.<clinit>
(TopologyManager.java:29)
        ... 52 more

when they are in the same tomcat instance  and this error:

com.tc.exception.TCClassNotFoundException:  
java.lang.ClassNotFoundException: No registered loader for  
description: %%Tomcat.Catalina:localhost:/master, trying to load  
org.terracotta.message.topology.TopologyManager

then they are in different tomcat instances.

is the intent to have one war with both the master and work in it then  
push that war to all the servers?  i did notice that there were a few  
master object roots.  is that normal?

please help

thanx

artie
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: error using masterworker tim - 2.1.0 in multiple war project

by Sergio Bossa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Artie.

> i am having an issue using tim-masterworker 2.1.0 with tc 3.1 and having
> multiple wars.  I currently have one war as the master and another war as
> the worker.  The master loads fine but when i try to load the worker i get
> this error:
>
> Caused by: java.lang.ClassCastException:

If you're sharing the same terracotta root (the topology instance)
between different web applications (the master and the worker), you
have to enable such a behavior in your terracotta configuration, just
take a look here:

http://www.terracotta.org/web/display/docs/Configuration+Guide+and+Reference#ConfigurationGuideandReference-appgroups

> when they are in the same tomcat instance  and this error:
>
> com.tc.exception.TCClassNotFoundException: java.lang.ClassNotFoundException:
> No registered loader for description: %%Tomcat.Catalina:localhost:/master,
> trying to load org.terracotta.message.topology.TopologyManager

Did you install the terracotta integration module for Tomcat?
Just issue the following command from inside the terracotta bin directory:

$ sh tim-get.sh install tim-tomcat-6.0

> is the intent to have one war with both the master and work in it then push
> that war to all the servers?

There's no restriction on your deployment type: you can deploy one war
containing the master + another war for the worker, as well as a
single war containing both master and worker.
You just have to properly configure your application by following the
instructions above.

Let us know.
Cheers,

Sergio B.

--
Sergio Bossa
Software Passionate and Open Source Enthusiast.
URL: http://www.linkedin.com/in/sergiob
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users