-
1. Re: Multiple versions of same application
barakka Feb 17, 2009 10:36 AM (in response to vincent.crepin)Hi,
I managed to have two seam (almost identical) applications running on the same jboss. On top of what you have said, I had to take care not to use the same entity factory name in the persistence.xml otherwise the first application deployed was not working. However, your problem seems not to be related with persistence, but rather with (I guess) with the seam servlet. Maybe by posting some part of the jboss bootstrap log we can understand better what is going on...
Best,
Riccardo. -
2. Re: Multiple versions of same application
vincent.crepin Feb 17, 2009 6:46 PM (in response to vincent.crepin)Thank you Riccardo for this fast answer.
There are quite a few lines like that in the console output:
Thanks again for your help.
12:17:29,280 INFO [Initialization] reading /WEB-INF/components.xml 12:17:29,327 INFO [Initialization] reading properties from: /seam.properties 12:17:29,342 INFO [Initialization] reading properties from: /jndi.properties 12:17:29,342 INFO [Initialization] initializing Seam 12:17:29,452 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.expressions 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.userPrincipal 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.resourceLoader 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.parameters 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.manager 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.transaction.synchronizations 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.core.locale 12:17:29,468 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.web.isUserInRole 12:17:29,499 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init 12:17:29,577 INFO [Initialization] Installing components... 12:17:29,624 INFO [Component] Component: authenticator, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.tm.mfx.ts.session.AuthenticatorImpl, JNDI: TicketingServices_14_0_0_2/AuthenticatorImpl/local 12:17:29,671 INFO [Component] Component: com_tm_mfx_ts_common_json_services_JSONService, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.tm.mfx.ts.common.json.services.JSONServiceImpl, JNDI: TicketingServices_14_0_0_2/JSONServiceImpl/local
If you need other output lines, let me know please.
-
3. Re: Multiple versions of same application
barakka Feb 17, 2009 8:10 PM (in response to vincent.crepin)Hi,
these look normal. You should try to focus on any message given by the SeamPhaseListener (something like
There should only be one Seam phase listener per application
might be a spoiler that the classloaders are not actually different).Maybe also the error stacktrace, just to check when exactly the code is trying to access the application context.
I'm also guessing that no @In injection works, failing with the same error?
R.
-
4. Re: Multiple versions of same application
vincent.crepin Feb 17, 2009 11:09 PM (in response to vincent.crepin)Hi, the word SeamPhaseListener appears nowhere in the console output. In server.log, I see exactly twice the following (2 ears are deployed):
2009-02-17 12:17:23,796 DEBUG [javax.enterprise.resource.webcontainer.jsf.config] Adding PhaseListener 'org.jboss.seam.jsf.SeamPhaseListener' to lifecycle 'org.jboss.seam.jsf.SeamPhaseListener} 2009-02-17 12:17:23,796 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] addPhaseListener(ANY 0,org.jboss.seam.jsf.SeamPhaseListener)
but no warning or error relative to it.
The code fails at first attempt of Component.getInstance();
I'm confused because everything seems fine.
In my application, I use servlets as external services that access internal service session ejbs. In the case of a servlet, the seam context is declared with :
<web:context-filter url-pattern="*.php" />
in components.xml.
In the console, I see that twice:
Component: org.jboss.seam.web.contextFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.ContextFilter 2009-02-17 12:17:30,233 DEBUG [org.jboss.seam.Component] org.jboss.seam.web.contextFilter.urlPattern=*.php
The 2 urlPatterns are the same. I left it like that in the 2 ears because they have a different context root as defined in application.xml
in ear 1:
<module> <web> <web-uri>TicketingServices.war</web-uri> <context-root>/TicketingServices_14_0_0_2</context-root> </web> </module>
in ear 2:
<module> <web> <web-uri>TicketingServices.war</web-uri> <context-root>/TicketingServices_14_0_0_3</context-root> </web> </module>
Do they need to have different web-uri ?