[JBoss Portal] - Re: JBOSS Portal 2.6 + MyFaces within my application not wor
by chris.laprunï¼ jboss.com
The problem seems to be that you are loading JSF from two different spots resulting in java.lang.IllegalArgumentException: Class org.jboss.portal.faces.portlet
.JSFMetaBridgeViewHandlerImpl is no javax.faces.application.ViewHandler (in essence a ClassCastException) due to the fact that the classes being compared come from 2 different classloaders. I am not sure what the solution would be as, for it to work, you would need to somehow instruct Portal to use the JSF implementation bundled in your app.
Another option that might work would be to replace JBoss AS' JSF implementation by yours, remove the bundled version from your app and revert the org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL instruction. This should ensure that both your app and Portal use the same JSF implementation. Not sure if that's an option for you, though.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061479#4061479
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061479
18Â years, 9Â months
[JBoss Seam] - ClassCastException: java.lang.Long when viewing home page.
by garypinkham
ok. Apologizes early if I don't post the right info... I checked the forums and the Jira and don't see this issue so I'm betting it's me.. but here goes..
I used Seam generate-entities to create a bunch of crud pages.. all went well. I have tried this again with the same DB several different times with no luck. It seems to generate the entities just fine, deploys and starts up but when I try to view the home page I'm presented with a "java.lang.ClassCastException: java.lang.Long" I've tried it with both 1.3Alpha (which worked the 1st time) and with 2.0Beta1. I'm using SQL Server 2005 and the SprintA TDS driver.
Since there is so much code I didn't create I'm really not sure where to look for the issue. So any suggestions would be greatly appreciated. Also note that I had this error on a different entity.. I removed it from the included DB tables.. regenerated and now the next entity has the same issue so I know it wasn't a particular entity.
Here is the Stack Trace:
| java.lang.ClassCastException: java.lang.Long
| at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrVal
| ueBinding(ManagedPersistenceContext.java:228)
| at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistence
| Context.java:79)
| at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceC
| ontext.java:107)
| 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:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
| at org.jboss.seam.Component.unwrap(Component.java:1983)
| at org.jboss.seam.Component.getInstance(Component.java:1770)
| at org.jboss.seam.Component.getInstance(Component.java:1723)
| at org.jboss.seam.Component.getInstance(Component.java:1717)
| at org.jboss.seam.framework.Controller.getComponentInstance(Controller.java:258)
| at org.jboss.seam.framework.PersistenceController.getPersistenceContext(PersistenceControlle
| r.java:20)
| at org.jboss.seam.framework.EntityQuery.getEntityManager(EntityQuery.java:120)
| at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:29)
| 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:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
| at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.jav
| a:32)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:4
| 2)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java
| :151)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
| at com.foo.bar.config.entities.AuthoritiesList_$$_javassist_32.validate(AuthoritiesList_$
| $_javassist_32.java)
| 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:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1957)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1880)
| at org.jboss.seam.Component.newInstance(Component.java:1859)
| at org.jboss.seam.Component.getInstance(Component.java:1756)
| at org.jboss.seam.Component.getInstance(Component.java:1723)
| at org.jboss.seam.Component.getInstance(Component.java:1717)
| at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:60)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
| at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
| at org.jboss.seam.navigation.Param.getValueFromModel(Param.java:127)
| at org.jboss.seam.navigation.Pages.getPageParameterValue(Pages.java:711)
| at org.jboss.seam.navigation.Pages.getConvertedParameters(Pages.java:687)
| at org.jboss.seam.ui.component.UISeamCommandBase.getUrl(UISeamCommandBase.java:50)
| at org.jboss.seam.ui.renderkit.LinkRendererBase.doEncodeBegin(LinkRendererBase.java:26)
| at org.jboss.seam.ui.util.cdk.RendererBase.encodeBegin(RendererBase.java:79)
| at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:785)
| at org.ajax4jsf.framework.renderer.RendererBase.renderChild(RendererBase.java:280)
| at org.richfaces.renderkit.html.ToolBarRendererBase.encodeChildren(ToolBarRendererBase.java:
| 81)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:577)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
| ava:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
| ava:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
| ava:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
|
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.
| 16:08:58,074 ERROR [STDERR] java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
| 156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja
| va:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061468#4061468
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061468
18Â years, 9Â months
[JBossCache] - Exception occured during transaction commit - JBoss tree Cac
by sesha.govindan
Hi,
Anyone faced this problem, please help me out. I am using Treecache and transaction is controled by Weblogic container through stateless bean.
I pass the value in config file for transaction as
com.csfb.opera.processLauncher.cache.TransactionManagerLookupImpl
and my class has implementaion to get Transaction Manager like below
public TransactionManager getTransactionManager() throws Exception {
Context ic = new InitialContext();
TransactionManager tm = (TransactionManager) ic.lookup("weblogic.transaction.TransactionManager");
return tm;
}
It dose everything very well but during commit I get following Exception.
I used Sleepycat org.jboss.cache.loader.bdbje.BdbjeCacheLoader as cacheloader and JBossCache1.4.1.SP3.
at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:504)
at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1154)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1216)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1990)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:275)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:246)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:299)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:140)
at com.csfb.opera.processLauncher.ejb.processLauncherSession_gxma9q_EOImpl.startByRegion(processLauncherSession_gxma9q_EOImpl.java:1863)
at com.csfb.opera.processLauncher.ejb.processLauncherSession_gxma9q_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061466#4061466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061466
18Â years, 9Â months