I have two Java SDKs installed. How do I find out which one Glassfishv3 is using? I am getting several Java EE errors when I try to deploy WAR files.
Below is an example of an error when I try deploying a WAR:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.spring.aop.ServiceBeanAutoProxyCreator#0' defined in class path resource [META-INF/base-spring.xml]:
Try putting this in your application somewhere, log (or otherwise get access to) the result:
System.out.println(System.getProperty("java.version"));
Related
I have installed tomcat-9.0.41
I build cas-overlay-template 6.3 and placed the cas.war in the webapps
started the server, everything works as it should.
I then build the cas-management-overlay 6.3 placed the cas-management.war in webapps but when I restart tomcat I get the following error when tomcat tries to load
firstly I dont understand what the exact problem is and how am I supposed to correct this "classpath" that the action is talking about.
any help would be appreciated!
2021-01-22 20:39:04,641 WARN [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory method 'formContentFilter' threw exception; nested exception is java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()'>
2021-01-22 20:39:04,666 ERROR [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] - <
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:175)
The following method did not exist:
'com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()'
The method's class, com.fasterxml.jackson.dataformat.xml.XmlMapper, is available from the following locations:
jar:file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-dataformat-xml-2.12.0.jar!/com/fasterxml/jackson/dataformat/xml/XmlMapper.class
The class hierarchy was loaded from the following locations:
com.fasterxml.jackson.dataformat.xml.XmlMapper: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-dataformat-xml-2.12.0.jar
com.fasterxml.jackson.databind.ObjectMapper: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-databind-2.11.3.jar
com.fasterxml.jackson.core.ObjectCodec: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-core-2.11.3.jar
com.fasterxml.jackson.core.TreeCodec: file:/opt/cas/tomcat-9.0.41/webapps/cas-management/WEB-INF/lib/jackson-core-2.11.3.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.fasterxml.jackson.dataformat.xml.XmlMapper
I downloaded the latest versions, reinstalled everything into two different tomcat servers with different domains. Which was not needed after all
I used as suggested
./gradlew clean copyCasConfiguration build
The error persisted.
So I took the jar files from the cas installation in
/opt/cas/apache-tomcat-9.0.41/cas/ROOT/WEB-INF/lib/jackson-*
and coppied them into
/opt/casmgmt/apache-tomcat-9.0.41/casmgmt/ROOT/WEB-INF/lib/
and the casmgmt server server app started successfully. apparently the people who wrote the source of the overlays either they don't have enough documentation as to what libs and versions should be used and when, or they have some sort of misconfigurations as to what the dependencies are and all
please help, this is very confusing, I can't deploy my war file in glassfish (where previously it could) with an error message like this
"https://localhost:4848/management/domain/applications/application/myApp"
created successfully. Warning: Command _deploy did not complete
successfully on server instance instance1: remote failure: Failed to
load the application on instance instance1. The application will not
run properly. Please fix your application and redeploy. Exception
while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
java.lang.NoClassDefFoundError: Could not initialize class
org.springframework.beans.factory.BeanCreationException. Please see
server.log for more details. Warning: Command _deploy did not complete
successfully on server instance instance1: remote failure: Failed to
load the application on instance instance1. The application will not
run properly. Please fix your application and redeploy. Exception
while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.Lifecycle ....
msg.seeServerLog
glassfish : 4.1
java version : 1.7.0_121
os : ubuntu server 12
I also could not find meaningful information in the server.log
but my war file can work well on my local tomcat
I'm sure there is no duplicates lib, because it was previously running well and indeed there was no change in my lib
I've been trying to deploy a webapp on a docker container image, I'm using tutum/tomcat. After I run the container and try to deploy the war file using /manager/html it shows me the following error message:
FAIL - Application at context path /1.0 could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/1.0]]
Also by using docker logs [container-id]:
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error in opening zip file
I have upgraded my web application from java6 to java7. I have deployed web tier, ejb tier and web service tier on weblogic 10.3 successfully. Everything works fine except stateful ejb. During these ejb invocation , I get following exception on server logs.
java.rmi.UnmarshalException: cannot unmarshaling return; nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.rmi.server.ExportException: Failed to export class SearchAccountSessionBean_qa86w0_EOImpl problem with rmi descriptor signature getFilterCount([Lcom.abc.SearchResultFilterName;)RemoteMethodSet=[setPrimaryKey(Ljava.lang.Object;), ......
Can anyone advice what may be the root cause. my ejb version is 2.0.
Sometimes the EJBCompilerCache in weblogic will have the old bean details resulting in the above said error.
Just clean the weblogic application server tmp and cache folders and try again.
I made a Java web project using Tomcat server.Now I am opening the same project in another PC where only Glassfish is installed(Due to some reasons I don't wanna run the project using Tomcat anymore).But it gives this exception now.
Exception during lifecycle processing
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unable to add listener of type: com.chat.listeners.ChatAppListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces
Is there any warning when you opening the project in netbeans.Right click on the project , select resolve server missing problem.Choose Glassfish server.Run once again.
You have apache specific relations in your web.xml file (like file handler servlets).
That is why glassfish can't start your application.