simple jsf application in myeclipse using jBoss - java

I want to run simple application of jsf but after configuring jBoss in my application I got the following error.
14:58:38,328 ERROR [[/web3demo]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
Source Document: jndi:/localhost/web3demo/WEB-INF/faces-config.xml
Cause: Class 'com.icesoft.faces.facelets.D2DFaceletViewHandler' is missing a runtime dependency: java.lang.NoClassDefFoundError: com/sun/facelets/impl/ResourceResolver
DEPLOYMENTS IN ERROR:
Deployment "vfsfile:/E:/ctn%20sodtware/jboss-5.0.1.GA/server/default/deploy/2832010.war/" is in error due to the following reason(s): org.xml.sax.SAXException: cvc-datatype-valid.1.2.1: '2832010' is not a valid value for 'NCName'. # vfsfile:/E:/ctn%20sodtware/jboss-5.0.1.GA/server/default/deploy/2832010.war/WEB-INF/web.xml[5,16]
Deployment "vfsfile:/E:/ctn%20sodtware/jboss-5.0.1.GA/server/default/deploy/web3demo.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/E:/ctn sodtware/jboss-5.0.1.GA/server/default/deploy/web3demo.war/ deployment failed
This is simple application where I simply run default index file without creating any other jsf file.

Looks like you are missing the facelets jar as evident from the missing class error java.lang.NoClassDefFoundError: com/sun/facelets/impl/ResourceResolver

Related

java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider""

I was upgrading spring 3.x to 5.3.x version in my project. Done some spring 5.3.x specific changes and deployed the build. Then following exception came:
Exception:"Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax.persistence.Converter"
Solution applied: added hibernate-jpa-2.1-api-1.0.0.Final as a solution.
Next following exception came:
"java.lang.ClassNotFoundException: org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter"
In spring docs, I could see ,OpenJpaVendorAdaptor is removed from spring5.x and jpa 2.1 compliant persistence provider is needed. when searching, could see using eclipselink is one of the solution instead of OpenJpa.
For which I have changed, org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter to org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter and in persistence.xml added org.eclipse.persistence.jpa.PersistenceProvider as provider tag.Then eclipselink-2.6.4 dependency added as gradle dependency.
could see jar is getting generated , but classes from jar is not picking up. getting following error on code compilation:
"Starting the enhancement task
[ant:openjpac] WARNING: Unable to load persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" due to "java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider""
Please help.

Moving Java web application from JBoss to Websphere - getting exceptions when building Maven errors

Resource annotations on the fields of the org.springframework.web.servlet.DispatcherServlet class will be ignored. The annotations could not be obtained because of the exception :
java.lang.NoClassDefFoundError: org.springframework.web.context.WebApplicationContext
I am also seeing some Maven dependency errors when I performed a Maven build, Can you please help how I can resolve these classpath errors
using spring-core-4.1.4.release.jar, spring-webmvc-4.1.4.RELEASE.jar
Error #2 - This is another error being displayed, which may be related to above error,
javax.servlet.UnavailableException: SRVE0203E: Servlet [appServlet]: org.springframework.web.servlet.DispatcherServlet was found, but is missing another required class.
SRVE0206E: This error typically implies that the servlet was originally compiled with classes which cannot be located by the server.
Your application clearly needs the Spring framework and can't find it. It either needs to be deployed as part of the EAR/WAR, or configured as a shared library in your server and mapped to your application.

Deploying spring application in wildfly 11 result in " Only one AsyncAnnotationBeanPostProcessor may exist within the context." error

We have a Java Spring 3.2 project, we are trying to migrate the project from jBoss 7 to wildFly 11
However, during the deployment the following error occurs:
Cannot upload deployment: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./faultmanager" =>
"java.lang.RuntimeException: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Only one AsyncAnnotationBeanPostProcessor may exist within the context. Offending resource:
\"/D:/wildfly-11.0.0.Final/wildfly-11.0.0.Final/bin/content/xxxx.war/WEB-INF/classes/META-INF/spring/applicationContext.xml\"
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Only one AsyncAnnotationBeanPostProcessor may exist within the context. Offending resource:
\"/D:/wildfly-11.0.0.Final/wildfly-11.0.0.Final/bin/content/xxxxxx.war/WEB-INF/classes/META-INF/spring/applicationContext.xml\"
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Only one AsyncAnnotationBeanPostProcessor may exist within the context. Offending resource:
\"/D:/wildfly-11.0.0.Final/wildfly-11.0.0.Final/bin/content/xxxxxx.war/WEB-INF/classes/META-INF/spring/applicationContext.xml\""}}
With our attempts and our searches, we got that the exception could be throwed by some causes:
Some bean in applicationContext.xml is defined twice
The applicationContext.xml is imported twice
Some bean defined in applcationContext.xml is defined again in a different file
This may be caused by a tag defined in applicationElement.xml, but trying to remove it will cause a illegalArgumentException during the deploy (don't know why), interestingly this doesn't appear to be used anywhere
This may be caused by another contextl (we have an applicationContext-security) but even removing it the same error above will persist
Others fun facts:
The error is never throwned during the build, only during the deploy throught wildFly
The same project have worked for year in jboss without this kind of problem
What could be the cause?
this will happens only ,
1)may be you are import both applicationContext-root.xml and applicationContext-where-annotation-driven-is-specififed.xml in your WEB.xml in section.
2)make applicationContext-root.xml in WEB.xml.
2)This is happenning because you are initializ The application context twice but org.springframework.scheduling.config.AnnotationDrivenBeanDefinitionParser fails registering bean ASYNC_ANNOTATION_PROCESSOR_BEAN_NAME second time.
3)and spring parses the <task:annotation-driven/> text twice in a config XML.
may be one of the resons is that #ContextConfiguration("/path/to/applicationContext.xml") are both the parent test class and child test class

weblogic.application.AnnotationProcessingException in Eclipse IDE

I am trying to build a EAR file which contains my EJB modules. The project build works perfectly but when I try to deploy publish and deploy it in server I always get the following exception. Can anyone let me know if this an eclipse IDE issue. Is there any setting to be changed to make this work. All my other team mates were able to get this running but I couldn't.
Error processing annotations: ."
weblogic.application.ModuleException: Exception preparing module: EJBModule(AdvanceSearch.jar)
An error occurred while reading the deployment descriptor. The error was:
Error processing annotations: .
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:447)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:188)
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:83)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
Truncated. see log file for complete stacktrace
Caused By: weblogic.application.AnnotationProcessingException: [EJB:015002]Unable to load class services.AdvanceSearchBean in Jar D:\LISModel\AdvanceSearch\build\classes : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'services.AdvanceSearchBean'
at weblogic.ejb.spi.EJBJarUtils.getIdentityAnnotatedClasses(EJBJarUtils.java:129)
at weblogic.ejb.container.deployer.ModuleExtensionContextImpl.getAnnotatedClasses(ModuleExtensionContextImpl.java:64)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptor(EjbDescriptorReaderImpl.java:352)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptor(EjbDescriptorFactory.java:78)
at weblogic.ejb.container.deployer.EJBMetadataHandler.loadDescriptors(EJBMetadataHandler.java:150)
Truncated. see log file for complete stacktrace
It looks like there is a mismatch in class services.AdvanceSearchBean and how this is referenced in the deployment descriptor of module AdvanceSearch.jar. Maybe check consistency of referenced packages.

Netbeans generated WAR doesn't work in Glassfish Server 3.1

I've tried to deploy a Netbeans WAR webservice into Glassfish several times, but it returns this error:
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException:
javax.servlet.ServletException:
com.sun.xml.ws.transport.http.servlet.WSServletException:
WSSERVLET11: failed to parse
runtime descriptor: java.lang.RuntimeException: MASM0015: Class [
com.sun.xml.ws.tx.runtime.TxTubeFactory ] does not implement [
com.sun.xml.ws.assembler.dev.TubeFactory ] interface.
Please see server.log for more details.
Whatever WAR I generate in Eclipse works in Glassfish, but I tried importing from Netbeans this project, and it didn't work. Glassfish also returns this same error. The log doesn't extend the information of the possible problem.
By the way, in the embedded Glassfish for Netbeans, the webservice works like a charm, but importing this, results in an error in the Glassfish server (which is another computer)
Any suggestions? Is there any configuration I need to change in the Glassfish server?
Thank you all for your ideas and solutions.
Cristina
Extract from Server .LOG
[#|2012-05-31T10:16:59.951-
0430|INFO|glassfish3.1|com.sun.xml.ws.wstx|_ThreadID=40;_ThreadName=Thread-1;|[failed
to localize] HOST_AND_PORT_LOOKUP_FAILURE_2015(https://192.168.2.43:8080)
java.lang.ClassNotFoundException: com.sun.enterprise.webservice.WsTxUtils
[#|2012-05-31T10:16:59.990-
0430|SEVERE|glassfish3.1|com.sun.xml.ws.wspolicy.jaxws.PolicyWSDLParserExtension|_ThreadID= 40;_ThreadName=Thread-1;|WSP1007: Policy exception occured when finishing WSDL parsing.
com.sun.xml.ws.policy.PolicyException: [failed to localize]
WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(http://schemas.xmlsoap.org/ws/2004/08/addressing, com.sun.xml.ws.security.addressing.impl.policy.AddressingPolicyAssertionCreator, com.sun.xml.ws.addressing.impl.policy.AddressingPolicyAssertionCreator)
Caused by: com.sun.xml.ws.policy.PolicyException: [failed to localize] WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(http://schemas.xmlsoap.org/ws/2004 /08/addressing, com.sun.xml.ws.security.addressing.impl.policy.AddressingPolicyAssertionCreator, com.sun.xml.ws.addressing.impl.policy.AddressingPolicyAssertionCreator)
[#|2012-05-31T10:16:59.990- 0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre adID=143;_ThreadName=Thread- 1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could not set field tm to null in class com.sun.xml.ws.tx.at.ATCoordinator
java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.tx.at.ATCoordinator
[#|2012-05-31T10:16:59.990- 0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre adID=143;_ThreadName=Thread- 1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could not set field wsatCoordinatorService to null in class com.sun.xml.ws.tx.at.ATCoordinator
java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.tx.at.ATCoordinator
[#|2012-05-31T10:16:59.990- 0430|FINE|glassfish3.1|javax.enterprise.system.container.web.org.glassfish.web.loader|_Thre adID=143;_ThreadName=Thread- 1;ClassName=org.glassfish.web.loader.WebappClassLoader;MethodName=clearReferences;|Could not set field wsatCoordinatorService to null in class com.sun.xml.ws.tx.at.ATCoordinator
java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.tx.at.ATCoordinator
Something similar happened to me recently. What happened was that initially I was going to deploy the application to Tomcat7, so Netbeans included some Metro jars in my library section. I then decided to deploy to Glassfish instead, however those Metro jars are what are apparently causing the problem you are seeing. I just deleted the Metro jars from my libraries section in Netbeans, redeployed, and everything was ok.
Here is a link that talks a little bit more about what is happening: https://java.net/jira/browse/WSIT-1636.

Categories

Resources