[JBoss Seam] - erros when starting JBOSS ... seam
by shaminda
Hi all,
I am getting this error log when starting JBoss.. my application uses Seam.
Thanks in advance for any help/feedback
13:10:16,890 INFO [Lifecycle] starting up: org.jboss.seam.ioc.spring.springELResolver
13:10:16,921 INFO [STDOUT] 13:10:16,921 ERROR [[/company]] Exception sending context initialized event to listener insta
nce of class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: exception invoking: initialize
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:133)
at org.jboss.seam.Component.callComponentMethod (Component.java:1834)
at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
at org.jboss.seam.Component.newInstance(Component.java:1746)
at org.jboss.seam.contexts.Lifecycle.startup (Lifecycle.java:175)
at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
at org.jboss.seam.init.Initialization.init(Initialization.java:504)
at org.jboss.seam.servlet.SeamListener.contextInitialized (SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild (StandardHost.java:553)
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)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke (RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
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)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java :164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy (TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService (WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke( Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke (ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy45.start(Unknown Source)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
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)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java :97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java
:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java :95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy46.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java :782)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke (Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke (AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java :659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java :421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java :26
3)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java :289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.j
13:10:17,046 INFO [STDOUT] boss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java :25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java :94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java :782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java :210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot (Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
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)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
... 143 more
Caused by: java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl
at org.jboss.seam.ioc.spring.SpringELResolver.initialize(SpringELResolver.java:45)
... 149 more
13:10:17,156 INFO [STDOUT] 13:10:17,156 INFO [[/company]] Initializing Spring root WebApplicationContext
13:10:17,156 INFO [STDOUT] 13:10:17,156 INFO [ContextLoader] Root WebApplicationContext: initialization started
13:10:17,203 INFO [STDOUT] 13:10:17,203 INFO [XmlWebApplicationContext] Refreshing org.springframework.web.context.sup
port.XmlWebApplicationContext@16c3396: display name [Root WebApplicationContext]; startup date [Thu Oct 18 13:10:17 BST
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096539#4096539
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096539
18Â years, 9Â months
[JBoss Seam] - Re: Seam2 as portlet
by jarkkoï¼ jab.fi
Maybe in SeamPhaseListener.beforePortletPhase (in the very first phase, before anything else) we could do something similar to FacesLifecycle.beginRequest and kickstart seam?
public static void beginRequest(ExternalContext externalContext)
{
log.debug( ">>> Begin JSF request" );
Contexts.eventContext.set( new EventContext( externalContext.getRequestMap() ) );
Contexts.applicationContext.set( new ApplicationContext( externalContext.getApplicationMap() ) );
Contexts.sessionContext.set( new SessionContext( externalContext.getSessionMap() ) );
Session session = Session.getInstance();
if ( session!=null && session.isInvalidDueToNewScheme( Pages.getRequestScheme( FacesContext.getCurrentInstance() ) ) )
{
invalidateSession(externalContext);
}
Contexts.conversationContext.set(null); //in case endRequest() was never called
//Events.instance(); //TODO: only for now, until we have a way to do EL outside of JSF!
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096538#4096538
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096538
18Â years, 9Â months
[JBoss Seam] - Seam2 as portlet
by jarkkoï¼ jab.fi
Hello,
Previously we have had a fully working aplication which consist of JSR-168 portlets implemented with Seam 1.2, Facelets. The portal we're using is Liferay.
Now, we're planning to move with the flow and upgrade versions of different things. As with most cases you just cannot upgrade one component to a new version but you'll have to upgrade the depencies also.
Currently, we're using Seam 1.2-custom (for portlets,see below), JBoss 4.0.5.GA (patched almost to a breaking point), Liferay 4.2.2 (2 patches). And now we see Seam 2 coming out of the oven we'll be upgrading everything in one big effort. So Seam for 2.0, JBoss AS for 4.2.1, Liferay to 4.3.3. Every major component is more or less different than their previous version.
We've identified couple of critical changes, one is the change JSF implementation from MyFaces to Sun's RI (this is where some of the black magic happens ;).
Previously we had a heavily customized MyFacesGenericPortlet with all sorts of tricks for various bugs/things/ related to MyFaces, Facelets. Now this portlet is empty and simply extending com.sun.faces.portlet.FacesPortlet.
For facelets we've (always had) custom FaceletPortletViewHandler which used to extend SeamFaceletViewHandler. Now it just extends com.sun.facelets.FaceletViewHandler. So, we managed to get rid some of the hacks, but it seems we need some new ones ;)
Also, we had a customized org.jboss.seam.portlet.PortletSessionImpl which used PortletSession.APPLICATION_SCOPE rather than PortletSession.PORTLET_SCOPE to access the portlet session.
Now PortletSessionImpl has been removed from Seam and I'm trying to figure it ouf if this hack is still needed.
So can you point me what structure replaced the servlet/portal/SessionImpl way of doing things?
Is org.jboss.seam.contexts.SessionContext part of this new way?
So, what we currently have is a JBoss 4.2.1, Liferay 4.3.3, Seam2 and our applocation which is deploying just nicely! So we've managed to fix some of the integration issues.
However, when actually using the portlet you get an exception ( http://pastebin.com/f6da360a9 ) telling there's no active application context (one was created on deploy), and from debugger I can tell that's true, there's no active application context.
anonymous wrote :
| 15:42:13,954 ERROR [STDERR] 18.10.2007 15:42:13 com.sun.faces.portlet.LifecycleImpl phase
| INFO: PS_CSFP0032
| java.lang.IllegalStateException: No active application scope
| at org.jboss.seam.core.Init.instance(Init.java:75)
| at org.jboss.seam.navigation.Pages.isDebugPage(Pages.java:1508)
| at org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:36)
| at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:308)
| at com.sun.faces.portlet.LifecycleImpl.render(LifecycleImpl.java:266)
| at com.sun.faces.portlet.FacesPortlet.renderFaces(FacesPortlet.java:352)
| at com.sun.faces.portlet.FacesPortlet.doView(FacesPortlet.java:280)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
| at fi.jab.jsf.MyFacesGenericPortlet.doDispatch(MyFacesGenericPortlet.java:49)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
| at fi.jab.jsf.MyFacesGenericPortlet.render(MyFacesGenericPortlet.java:56)
| at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:107)
|
So, my reasoning is that somehow Seam is not being "kicked in" because of the different lifecycle you've on portlets. Not even the JSF phase listener has a change to do it's magic and active seam for the current request.
So maybe we still need some magic in the Portlet class or either in the FaceletViewHandler. I found couple of nice candicates for kickstarting Seam request, one from ServletLifecycle and the other from FacesLifecycle. I guess the FacesLifecycle should be called from SeamPhaseListener but it's doesn't get called early(?) enough for things to work.
SeamPhaseListener has some support for portlets because there're methods like afterPortletRequest but simply having your portlet class (extending) FacesPortlet doesn't seem to be enough to get it up and running.
Let's see if we can get this any further.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096536#4096536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096536
18Â years, 9Â months
[JBoss Seam] - Problem with SEAM + CMT Transaction + JBossCache
by JohnBat26
Hello all !
I have the problem with update JBossCache, after commit changes from SEAM application.
----------------------------------------
My environments:
1. OS: Gentoo Linux x86
2. JDK: 1.6 SUN and BEA JRockIt
3. IDE: Eclipse-3.2.2
4. AS: JBoss-4.2.1.GA
5. ORM : Hibernate-3.2.5.GA
6. JBoss SEAM 1.2.1.GA and 2.0.RC2
7. JBoss Cache 1.4.1.SP4
-----------------------------------------
I have EAR with 2 ejb-jars and 2 wars.
First ejb-jar has all entities of application.
----------------------------------------------
persistence.xml (from first ejb-jar):
<?xml version="1.0" encoding="UTF-8"?>
<persistence-unit name="mydb_pu" transaction-type="JTA">
<jta-data-source>java:/jdbc/mydb</jta-data-source>
true
</persistence-unit>
----------------------------------------------
Second ejb-jar consists of seam managed beans.
pertistence.xml (from second ejb-jar):
-------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="mydb_pu" transaction-type="JTA">
<jta-data-source>java:/jdbc/mydb</jta-data-source>
</persistence-unit>
-------------------------------
Web application from first war, use SEAM!! (1.2.1.GA or 2.0.RC2)
Web application from second war don't use SEAM and invoke EJB session beans from first jar (which has entities and session beans).
JBoss Cache enable how mbean!
If I do commit (insert/update) from second web application (without SEAM), then transactional cache update dirty data successful (across invoke ejb3 session beans )!
But If I do commit from SEAM web application (bypass EJB3 session beans), then JBoss Cache don't see that data is OLD yet !!!
I know, that JTS is responsible for report to JBoss cache about all transactions.
-----------------------------------------------
In components.xml I have next:
....
<persistence:managed-persistence-context name="entityManager"
auto-create="true"
persistence-unit-jndi-name="java:/mydbEntityManagerFactory" />
<transaction:ejb-transaction/>
....
-----------------------------------------------
But it don't force update cache !!!!
All commits (insert/update) work OK, but JBoss Cache don't see its changes !!!
I have read reference documentation about SEAM, but it don't help !
1. How SEAM work with CMT transaction ?
2. How SEAM work with jBoss Cache ?
3. How I may update old data ?
May anybody help me !!!
Thanks in advance !
P.S. JBoss cache work OK. All regions works. Cache hits exists !:)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096530#4096530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096530
18Â years, 9Â months