I have a problem with a Java EE project. I try to access my database but I get the following exception:
cannot Deploy SupinBank
Deployment Error for module: SupinBank:
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException:
javax.ejb.EJBTransactionRolledbackException. Please see server.log for more details.
Moreover, I don't have any persistence.xml created in my project. Is this normal ?
Tell me if you want more details of the server.log.
From your log file:
Caused by: java.lang.IllegalStateException: Unable to retrieve
EntityManagerFactory for unitName SupinBank-PU
If you use JPA you will need a persistence.xml file. The server log points out that it should have a persistence unit called SupinBank-PU. You need to provide this file in order to make you project running.
Related
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
I renamed endpoint class in my project, rebuilt, redeployed it on Wildfly, but when I try to enable it failed with this error :
Caused by: java.lang.RuntimeException: javax.websocket.DeploymentException: UT003023: Multiple endpoints with the same logical mapping PathTemplate
How to avoid this problem or clean deployments?
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.
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.
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