Error occurred during deployment: Exception while loading the app : - java

Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.VerifyError: class org.apache.axiom.om.impl.dom.factory.OMDOMMetaFactory overrides final method createSOAPMessage.(Lorg/apache/axiom/om/OMXMLParserWrapper;)Lorg/apache/axiom/soap/SOAPMessage;. Please see server.log for more details.
How can I overcome this error?I use Java MVC and Tomcat server.

That error may occur if you mix JARs from different versions of Apache Axiom.

Related

java.lang.NoClassDefFoundError when deploying to Glassfish application server

I have created a simple demo rest service which queries Ethereum to get basic information. I am using the Web3j library version 5.0.0 https://mvnrepository.com/artifact/org.web3j/core/5.0.0
I have added the library to the project using Maven. Built the project which compiles successfully and trying to debug it. I am using GlassFish 6.2.51 for my application server.
Any ideas why I am getting the below error?
[2023-02-09 11:44:19,706] Artifact demoapi:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/web3j/protocol/Web3jService.

Application not deploying on Tomcat server

I am trying to run an application on tomcat server. The application was earlier running on Jboss EAP. All the configuration changes have been made in the tomcat context.xml and other application related configuration files like web.xml, etc. The only ERROR and SEVERE logs that I see when the application is being deployed are mentioned below:
[main] ERROR org.springframework.web.context.ContextLoader - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'redisCacheManager' defined in class path
resource [config/serviceContext.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.tcs.cdm.cache.CacheManager]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems: The type redis.clients.jedis.JedisPoolConfig cannot be
resolved. It is indirectly referenced from required .class files
. . .
SEVERE: Exception sending context initialized event to listener
instance of class
[org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'redisCacheManager' defined in class path
resource [config/serviceContext.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.tcs.cdm.cache.CacheManager]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems: The type redis.clients.jedis.JedisPoolConfig cannot be
resolved. It is indirectly referenced from required .class files
. . .
SEVERE: One or more listeners failed to start. Full details will be
found in the appropriate container log file
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/AppName] startup failed due to previous errors
I have gone through several threads but did not find any solution working for me. I have tried making version changes to jsf related jars in my pom.xml but that also doesn't help. I am currently using tomcat version 9.0.36 but have also tried TomEE 8.0.8 for the same but facing the same issue in both the cases. It would be great if someone could guide as to why this error is coming or a possible solution for the same.

FAIL - Encountered exception [org.apache.catalina.LifecycleException

I am deploying a web application and getting following exception when try to deploy through tomcat 9.
I am getting below exception in tomcat while deployment FAIL - Application at context path [/webCenter-EN-Entitlement] could not be started FAIL - Encountered exception [org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot#299321e2]]
In Tomcat Log files found following exception. Please help with any solution. Your help is appreciated in advance.
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot#2d1dee39]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4830)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4966)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
... 37 more
Caused by: java.lang.IllegalArgumentException: The main resource set specified [H:\XXXXXX] is not valid
at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:751)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:708)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 41 more
Issue is resolved. Folder which contains my web application was not have necessary permission to the account which was used to Run Tomcat Service.

Glassfish error during deployment of a project

Glassfish gave me the following error when trying to run a specific project.
Note: I am using:
glassfish server 3.1.2
Netbeans IDE 7.1.1
windows 32-bit JDK 6
WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException:
java.lang.StackOverflowError
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException:
java.lang.StackOverflowError
The glassfish goes through a loop and then stops leaving the following error:
The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 17 seconds)

javaURLContextFactory ClassNotFound

We are trying to get InitialContext using a listener in web.xml of our application and getting below error:
SEVERE: Unable to init UserDataCachejavax.naming.NoInitialContextException: Cannot instantiate class: org.apache.naming.java.javaURLContextFactory [Root exception is
java.lang.ClassNotFoundException: org.apache.naming.java.javaURLContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:17)
This class is present in catalina.jar.
Java version used is jdk1.6.0_02
Tomcat version is tomcat 7
Please let us know if any one has faced this error or is it related to security manager on server?

Categories