AsyncSupportListenerAdapter primefaces exception - jsf

I am new at jsf , and i am trying to do some examples usinf primefaces and when i try to run this one ,
http://www.primefaces.org/showcase-labs/push/chat.jsf
i am getting an exception like this.
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/primefaces] threw exception [org/atmosphere/cpr/AsyncSupportListenerAdapter] with root cause
java.lang.ClassNotFoundException: org.atmosphere.cpr.AsyncSupportListenerAdapter
I think i have to have an atmosphere jar file but i am not sure. Any suggestions woulde be very helpful.

This one helps me to solve my problem.
https://github.com/Atmosphere/atmosphere/wiki/Structure-of-an-Atmosphere%27s-Application

Related

WebSphere 9.0.5.3 and MyFaces 2.2 with CACHE_EL_EXPRESSIONS

When org.apache.myfaces.CACHE_EL_EXPRESSIONS with value alwaysRecompile is in web.xml, WAR starts but when trying to go to any JSF view, this exception is thrown:
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
Any ideas? WebSphere 9 is using MyFaces 2.2. Are there some limitations as compared to "usual" MyFaces 2.2 implementation?
I tested on 9.0.5.6 and also encountered the same error.
java.lang.NoSuchMethodException: org.apache.myfaces.view.facelets.AbstractFaceletCache.setMemberFactories(javax.faces.view.facelets.FaceletCache$MemberFactory, javax.faces.view.facelets.FaceletCache$MemberFactory)
at java.lang.Class.newNoSuchMethodException(Class.java:567)
at java.lang.Class.throwExceptionOrReturnNull(Class.java:1222)
at java.lang.Class.getMethodHelper(Class.java:1308)
at java.lang.Class.getDeclaredMethod(Class.java:936)
at org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.<init>(DefaultFaceletFactory.java:166)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createFaceletFactory(FaceletViewDeclarationLanguage.java:2233)
I see the code is trying to retrieve the setMemberFactories method with 2 args rather than 3 (as the exception indicates, too).
I'll create an issue and have this issue resolve in the next WAS 9 release cycle. Thanks for discovering this!

java.io.NotSerializableException using Primefaces and Weblogic

I'm using Primefaces 6.1 running on a clustered WebLogic Server (Mojarra 2.2.8) Version: 12.2.1.3.0 and during the session replication i'm getting the following exception:
<Jan 30, 2018 4:08:08,727 PM CET> <Error> <Cluster> <BEA-003144> <All session objects should be serializable to replicate. Check the objects in the session. Failed to replicate a non-serializable object in context /app.
java.rmi.MarshalException: failed to marshal create(Lweblogic.rmi.spi.HostID;ILweblogic.cluster.replication.ROID;Ljava.io.Serializable;); nested exception is:
java.io.NotSerializableException: org.primefaces.model.SortMeta
at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:100)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:297)
at weblogic.cluster.replication.RemoteReplicationServicesInternalImpl_12213_WLStub.create(Unknown Source)
at sun.reflect.GeneratedMethodAccessor1191.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Truncated. see log file for complete stacktrace
Caused By: java.io.NotSerializableException: org.primefaces.model.SortMeta
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
at java.util.ArrayList.writeObject(ArrayList.java:766)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Truncated. see log file for complete stacktrace
JSF component binding is never used in the application. Looking at the Primefaces source I can see that the model SortMeta (does not implements Serializable) is only used in the DataTable component.
The view state saving method has to be server side.
How to solve or avoid this exception?
EDIT:
Problem was caused by the "new" datatable attribute multiViewState.
https://forum.primefaces.org/viewtopic.php?f=3&t=54138&p=164132
Class SortMeta is now Serializable:
https://github.com/primefaces/primefaces/issues/3272

java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor

I am getting the following exception when trying to deploy the :mancenter-3.1.3.war in to my Weblogic 12.
The fullstacktrace is :
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementCenterContext' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'centralManager' while setting bean property 'centralManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1007)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hazelcast.webmonitor.service.CentralManager]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
Truncated. see log file for complete stacktrace
Caused By: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at com.google.common.cache.LocalCache.<clinit>(LocalCache.java:155)
at com.google.common.cache.LocalCache$LocalManualCache.<init>(LocalCache.java:4750)
at com.google.common.cache.LocalCache$LocalManualCache.<init>(LocalCache.java:4745)
at com.google.common.cache.CacheBuilder.build(CacheBuilder.java:757)
at com.hazelcast.webmonitor.service.CentralManager.<init>(CentralManager.java:63)
Truncated. see log file for complete stacktrace
Any help is highly appreciated.
Thanks.
Check your classpath and see what version of guava is being used by your WAR. The error suggests that the version of guava jar being found at runtime does not match the version that was used at compile time.
Sounds very similar to:
Are Guava-11.0.2.jar conflicting with com.google.common_1.0.0.0_0-6.jar?
Weblogic Guava issue when deploying application

WebSphereApplication NoClassDefFoundError while unmarshalling XML with JAXB

I´ve deployed an EAR on a Websphere Application Server 7. In my code there is a part where I try to unmarshall a XML file into an object. I get this error when trying to do that:
java.lang.NoClassDefFoundError: com.ibm.xtq.bcel.util.SyntheticRepository (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at com.ibm.xtq.bcel.classfile.JavaClass.<init>(JavaClass.java:109)
at com.ibm.xtq.bcel.classfile.JavaClass.<init>(JavaClass.java:228)
at com.ibm.xtq.bcel.generic.ClassGen.getJavaClass(ClassGen.java:174)
at com.ibm.fcg.bcel.FcgClassGenBCEL.dump2(Unknown Source)
at com.ibm.fcg.bcel.FcgClassGenBCEL.dump(Unknown Source)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.fcg.FCGDeserializationStubGenerator.generate(FCGDeserializationStubGenerator.java:249)
at com.ibm.xml.xlxp2.jaxb.codegen.AbstractGeneratedStubFactory.generateByteCode(AbstractGeneratedStubFactory.java:96)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.fcg.FCGStubFactory.generateStubByteCode(FCGStubFactory.java:46)
at com.ibm.xml.xlxp2.jaxb.codegen.AbstractGeneratedStubFactory.getStubClassConstructor(AbstractGeneratedStubFactory.java:154)
at com.ibm.xml.xlxp2.jaxb.unmarshal.codegen.AbstractGeneratedDeserializationStubFactory.createStub(AbstractGeneratedDeserializationStubFactory.java:58)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.startComplexType(DeserializationContext.java:662)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.DeserializationContext.handleRootElementEvent(DeserializationContext.java:303)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.produceRootElementEvent(JAXBDocumentScanner.java:186)
at com.ibm.xml.xlxp2.scan.DocumentScanner.scanRootElement(DocumentScanner.java:2234)
at com.ibm.xml.xlxp2.scan.DocumentScanner.scanProlog(DocumentScanner.java:1726)
at com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1316)
at com.ibm.xml.xlxp2.scan.DocumentScanner.parseDocumentEntity(DocumentScanner.java:1168)
at com.ibm.xml.xlxp2.jaxb.unmarshal.impl.JAXBDocumentScanner.unmarshal(JAXBDocumentScanner.java:125)
at com.ibm.xml.xlxp2.jaxb.unmarshal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:120)
at com.inditex.lois.core.ws.utilidades.services.impl.AdaptadorServiceImpl.transformarXMLenObjeto(AdaptadorServiceImpl.java:137)
As far as I know that class is part of IBM JDK and cannot be found in runtime. Is there anything I have to modify in my ear or, as I guess, its all about configuring/modifiying WAS configuration (or even applying a patch if this is a bug).
Any help? Thanks a lot.
(Sorry for my english :) )
This exception means that the class com.ibm.xtq.bcel.util.SyntheticRepository is found, but failed static initialization. If there is no other message in the log about this, then this is the time to open a PMR with IBM. Static initializers in internal WebSphere code should never fail during normal usage course.
Same here, there is an APAR:
http://www-01.ibm.com/support/docview.wss?uid=swg1IV41639
Problem conclusion
This defect will be fixed in:
6.0.0 SR14
6.0.1 SR6
7.0.0 SR5
.
The fix resolved the AccessControlException. SyntheticRepository
class can be initialized properly, hence NoClassDefFoundError
does not occur.

"incomplete dynamic bit lengths tree" exception is happened on H2Database

Our product use H2DB to share our product information for all clients.
These days one client report that they can't use our system with below error message.
I move that file to other server, and it work fine.
Is anyone know this issue ?
05/02/2011 16:17:27,581 WARN [JDBCExceptionReporter] SQL Error: 90031, SQLState: 90031
05/02/2011 16:17:27,581 ERROR [JDBCExceptionReporter] IO Exception: java.util.zip.ZipException: incomplete dynamic bit lengths tree; zip:/home/ads/RealMedia/ads/OpenAd/RMFoundry/H2DB/OasRM_H2.zip!/OasRM.data.db [90031-72]
05/02/2011 16:17:27,582 INFO [STDOUT] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [XXXXXXX(It is SQL )]; SQL state [90031]; error code [90031]; IO Exception: java.util.zip.ZipException: incomplete dynamic bit lengths tree; zip:YYYYY/H2DB/Database.zip!/Data1.data.db [90031-72]; nested exception is org.h2.jdbc.JdbcSQLException: IO Exception: java.util.zip.ZipException: incomplete dynamic bit lengths tree; zip:YYYYY/H2DB/Database.zip!/Data1.data.db [90031-72]
05/02/2011 16:17:27,585 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
05/02/2011 16:17:27,586 ERROR [[action]] Servlet.service() for servlet action threw exception
05/02/2011 16:17:27,587 ERROR [[action]] Servlet.service() for servlet action threw exception
05/02/2011 16:21:02,367 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
05/02/2011 16:21:55,580 ERROR [[action]] Servlet.service() for servlet action threw exception
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
If it works on one computer but not the other, it might be a problem of the JVM. See also this issue report for the Sun JVM.
By the way, you are using H2 version 1.0.72 (the build number is included in the error code, [90031-72]) which is quite old. Did you consider upgrading to a more recent version of H2?
I find a reason of it.
Actually we update database file regularly , and after that we reestablish JDBC connection to new file.
Unfortunately , error happened during reestablish JDBC connection, so JDBC connection isn't refreshed.
That is main reason of it.
Thanks Thomas to answer my question.
It is very helpful for us to find a reason.

Resources