-
1. Re: Upgrade from Seam 1.1 to 1.2.1
shane.bryzak Apr 17, 2007 6:13 PM (in response to m.alex)Make sure that jboss-app.xml has a unique classloader name for your application. If that doesn't fix it, please post your packaging structure.
-
2. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 18, 2007 9:18 AM (in response to m.alex)That didn't fix it.
Here goes:
EAR's jboss-app.xml:<jboss-app> <security-domain>....</security-domain> <loader-repository> seam.jboss.org:loader=loader-emp </loader-repository> </jboss-app>
component.xml in each JAR's META-INF contains:<components> <component class="org.jboss.seam.remoting.messaging.SubscriptionRegistry" install="true"> <property name="allowedTopics">clientNotificationTopic</property> </component> </components>
component.xml in each WAR's WEB-INF file contains:<components> <component class="org.jboss.seam.remoting.messaging.SubscriptionRegistry" install="true"> <property name="allowedTopics">clientNotificationTopic</property> </component> </components>
The Seam Resource Servlet declaration is included in each web.xml, as specified in the Seam Remoting doc. -
3. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 18, 2007 10:35 AM (in response to m.alex)There are no class loades defined in any jboss-web.xml either.
-
-
5. Re: Upgrade from Seam 1.1 to 1.2.1
shane.bryzak Apr 19, 2007 5:26 AM (in response to m.alex)"m.alex" wrote:
component.xml in each JAR's META-INF contains:<components> <component class="org.jboss.seam.remoting.messaging.SubscriptionRegistry" install="true"> <property name="allowedTopics">clientNotificationTopic</property> </component> </components>
So you have multiple jar files in your application with the same components.xml? That's the problem there, you're trying to create the SubscriptionRegistry twice. You only need one SubscriptionRegistry, so either remove it from all but one of your components.xml files, or remove all but one of the components.xml files. -
6. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 19, 2007 6:18 AM (in response to m.alex)I'm going to test that, but I had no problem deploying multiple jars with that components.xml included. It's only whan I have both jars and wars when problems start to appear. The same setup was working fine with Seam 1.1 and the documentation doesn't seem to indicate anything was changed with regard to deploying...
-
7. Re: Upgrade from Seam 1.1 to 1.2.1
pmuir Apr 19, 2007 6:19 AM (in response to m.alex)No, but there was a change which prevented you trying to deploy the same component twice ;)
-
8. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 19, 2007 6:35 AM (in response to m.alex)Ok, here goes.
I tried as advised (using this in a single components.xml):<components> <component class="org.jboss.seam.remoting.messaging.SubscriptionRegistry" install="true"> <property name="allowedTopics">clientNotificationTopic, inventoryNotifications</property> </component> </components>
and I got an error at deploy time:2007-04-19 13:33:51,439 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/emp-filter]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener java.lang.RuntimeException: Could not create Component: org.jboss.seam.remoting.messaging.subscriptionRegistry at org.jboss.seam.init.Initialization.addComponent(Initialization.java:865) at org.jboss.seam.init.Initialization.installComponents(Initialization.java:796) at org.jboss.seam.init.Initialization.init(Initialization.java:503) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763) ...
When using this in a single components.xml:<components> <component name="org.jboss.seam.remoting.messaging.subscriptionRegistry"> <property name="allowedTopics">clientNotificationTopic, inventoryNotifications</property> </component> </components>
I can deploy without error, but when I try to actually use remoting, I get:13:25:16,997 ERROR [Remoting] Error java.lang.IllegalStateException: No SubscriptionRegistry exists at org.jboss.seam.remoting.messaging.SubscriptionRegistry.instance(SubscriptionRegistry.java:65) at org.jboss.seam.remoting.messaging.SubscriptionRequest.subscribe(SubscriptionRequest.java:22) at org.jboss.seam.remoting.SubscriptionHandler.handle(SubscriptionHandler.java:78) at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110) at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68) at org.jboss.seam.servlet.ResourceServlet.doPost(ResourceServlet.java:77) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ...
Apparently I can't figure out which is the right place to insert that declaration... -
9. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 19, 2007 6:47 AM (in response to m.alex)Forgot about this. The first error is caused by:
Caused by: java.lang.IllegalArgumentException: no such setter method: org.jboss.seam.remoting.messaging.SubscriptionRegistry.install at org.jboss.seam.util.Reflections.getSetterMethod(Reflections.java:219) at org.jboss.seam.Component.initInitializers(Component.java:401) at org.jboss.seam.Component.<init>(Component.java:263) at org.jboss.seam.Component.<init>(Component.java:203) at org.jboss.seam.init.Initialization.addComponent(Initialization.java:851) ... 141 more
-
10. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 20, 2007 9:38 AM (in response to m.alex)Ok, some progress.
I left the subscription registry in a single JAR file and removed the install parameter (did not work wiht install=="true" or install="false"). The application deploys fine, seam remoting is working, but it is breaking when trying to subscribe to JMS topic:15:35:58,898 ERROR [Remoting] Error java.lang.IllegalArgumentException: Invalid token argument - token not found in Session Context. at org.jboss.seam.remoting.messaging.SubscriptionRegistry.getSubscription(SubscriptionRegistry.java:178) at org.jboss.seam.remoting.messaging.PollRequest.poll(PollRequest.java:43) at org.jboss.seam.remoting.PollHandler.handle(PollHandler.java:83) at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110) at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68) at org.jboss.seam.servlet.ResourceServlet.doPost(ResourceServlet.java:77) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
-
11. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 20, 2007 11:20 AM (in response to m.alex)Ok, some progress.
I left the subscription registry in a single JAR file and removed the install parameter (did not work wiht install=="true" or install="false"). The application deploys fine, seam remoting is working, but it is breaking when trying to subscribe to JMS topic:15:35:58,898 ERROR [Remoting] Error java.lang.IllegalArgumentException: Invalid token argument - token not found in Session Context. at org.jboss.seam.remoting.messaging.SubscriptionRegistry.getSubscription(SubscriptionRegistry.java:178) at org.jboss.seam.remoting.messaging.PollRequest.poll(PollRequest.java:43) at org.jboss.seam.remoting.PollHandler.handle(PollHandler.java:83) at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110) at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68) at org.jboss.seam.servlet.ResourceServlet.doPost(ResourceServlet.java:77) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
-
12. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 23, 2007 7:26 AM (in response to m.alex)Got it. The invalid token is "undefined".
When subcribing to the topics, two tokens are returned. However, upon the first poll the second one is being sent as "undefined". Subsequent polls use both tokens correctly. Looks like a typical uninitialized javascript variable somewhere on the Seam part. -
13. Re: Upgrade from Seam 1.1 to 1.2.1
shane.bryzak Apr 23, 2007 7:35 AM (in response to m.alex)Could you please raise this in JIRA and assign to me? I'll need enough information to reproduce the issue.
-
14. Re: Upgrade from Seam 1.1 to 1.2.1
m.alex Apr 23, 2007 8:07 AM (in response to m.alex)Done. JBSEAM-1229. I hope it's an easy fix.