Cannot start Apache application after deployment on Windows - java

Trying to deploy Midpoint OpenSource IDM software on Windows server
Runing JAVA 9.0.1 and Tomcat Apache 8.5
Deployment of the WAR file seems to succeed but application does not start
On Tomcat Web Application Manager I get the error:
FAIL - Application at context path [/midpoint] could not be started
In the Catalina logs all I can see is:
SEVERE [http-nio-8080-exec-38] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
SEVERE [http-nio-8080-exec-38] org.apache.catalina.core.StandardContext.startInternal Context [/midpoint] startup failed due to previous errors

Related

Deploying war on linux

Hello I downloaded tomcat 8.5.4 when and I ve made some simple rest aplication with jersey. When I deploy war on tomcat on windows it works fine. When i copied whole directory to linux server(downloaded version is multiplatform) and I deploy application, Linux dont see my Rest Controller.
Same files of server, same war and windows working, linux not...
output from windows:
21-Aug-2016 19:12:52.370 INFO [localhost-startStop-2] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages:
com.test.rest
21-Aug-2016 19:12:52.414 INFO [localhost-startStop-2] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found:
class com.test.rest.RestController
21-Aug-2016 19:12:52.414 INFO [localhost-startStop-2] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found.
21-Aug-2016 19:12:52.568 INFO [localhost-startStop-2] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.18 11/22/2013 03:05 AM'
21-Aug-2016 19:12:53.773 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive D:\tomcat-8.5.4\webapps\RestServices.war has finished in 2,654 ms
output from linux
21-Aug-2016 19:17:01.343 INFO [localhost-startStop-1] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages:
com.test.rest
21-Aug-2016 19:17:01.398 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /home/tomcat-8.5.4/webapps/RestServices.war has fished in 3,342 ms
and when I call rests:
Servlet.init() for servlet jersey-serlvet threw exception
...
java.lang.IllegalAccessError: tried to access method com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoader()Ljava/lang/ClassLoader; from class com.sun.jersey.spi.scanning.AnnotationScannerListener
Any ideas?
Did you look here if any of the answers might cover your problem?
java.lang.IllegalAccessError while trying to test a jersey REST webservice deployed on TomEE

Tomcat not starting after modifying a xml file

I modified the web.xml file from a dynamic web project in Eclipse EE and now I can't start the Tomcat server.
Error shows:
Server Tomcat v8.0 Server at localhost failed to start.
and in the console:
SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
How can i fix this ?
The service is already running on port 8009. You should kill it and try tomcat restart.
Try this :
Terminate the tomcat, restart it from command prompt and then first undeploy and then redeploy your web application.

How does one shutdown embedded Tomcat in Spring Boot?

I'm using NetBeans IDE and Maven with Spring Boot. Whenever I run my app more than once, I get this error:
o.a.coyote.http11.Http11NioProtocol : Failed to start end point associated with ProtocolHandler ["http-nio-8080"]
java.net.BindException: Address already in use
spring boot java.lang.IllegalStateException: Tomcat connector in failed state
I'm assuming this means that Tomcat isn't getting shutdown. How can I properly shutdown the embedded Tomcat in Spring Boot (preferably from the IDE)?
I found a netbeans configuration that fixed my problem. See this screenshot: https://bugzilla-attachments-241321.netbeans.org/bugzilla/attachment.cgi?id=151222

Mysql-connector-java jar creates No TLDs error

I added a jar file mysql-connector-java-5.1.34-bin.jar to my $CATALINA_HOME/lib/ folder so I could use this library for connection pooling for mysql.
I running a dedicated server with Centos 6.6 X64 with Cpanel.
I installed jdk8 in /opt/jdk1.8.0_25 and installed tomcat 8 by untarring the download in the /home/username/ folder. I followed this tutorial:
http://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/
A simple "Hello World" servlet is running by deploying a .war file in the public_html folder
However now when I start up Tomcat (8.0.15) in the catalina.out file I see the error:
09-Dec-2014 17:45:49.152 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.15
09-Dec-2014 17:45:49.182 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /home/username/public_html/J.war
09-Dec-2014 17:45:49.592 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
09-Dec-2014 17:46:04.623 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [14,997] milliseconds.
09-Dec-2014 17:46:04.657 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /home/username/public_html/J.war has finished in 15,474 ms
And the connection pooling doesn't work. At my previous server the hosting company had setup tomcat with Cpanel and this worked just fine. I did not change the servlets so that cannot be the problem either.
My environment variables are:
CATALINA_HOME=/home/username/apache-tomcat-8.0.15
JRE_HOME=/opt/jdk1.8.0_25/jre
JAVA_PATH=/opt/jdk1.8.0_25/jre
PATH=/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr
/bin:/opt/jdk1.8.0_25/jre/bin:/opt/jdk1.8.0_25/bin:/usr/local/bin:/usr/X11R6/bin
:/root/bin:/opt/jdk1.8.0_25/bin
JAVA_HOME=/opt/jdk1.8.0_25
CLASSPATH=.:/usr/local/jdk/lib/classes.zip
The last CLASSPATH I do not understand because there is no file classes.zip on the server.
I also tried adding the jar file directly in the WEB-INF/lib folder of the deployed war file but this also did not work (the error in catalina.out was gone though).
Can somebody explain what I'm doing wrong with adding the library?
Thanks

Unable to run struts program

I developed one web applications using struts. Now when i tried to run in another machine I am getting the following error. Following is taken from glassfish server log
SEVERE: INFO [http-thread-pool-8080-(1)] (CommonsLogger.java:31) - Parsing configuration file [struts-default.xml]
SEVERE: INFO [http-thread-pool-8080-(1)] (CommonsLogger.java:31) - Unable to locate configuration files of the name struts-plugin.xml, skipping
SEVERE: INFO [http-thread-pool-8080-(1)] (CommonsLogger.java:31) - Parsing configuration file [struts-plugin.xml]
SEVERE: INFO [http-thread-pool-8080-(1)] (CommonsLogger.java:31) - Parsing configuration file [struts.xml]
SEVERE: INFO [http-thread-pool-8080-(1)] (CommonsLogger.java:31) - Loading global messages from ApplicationResources
Also in the browser I am getting java.lang.reflect.InvocationTargetExceptionthis message. Please tell me where the problem lies.
This seems to be a similar problem to what is described in this article:
http://www.java.net/node/705006
It appears to be a GlassFish bug to incorrectly put "SEVERE:" before the log message that actually starts with "INFO".
FYI I came across this with SL4J and Glassfish 3.1. The exact same code logging via the JUL logger works perfectly, and then you get the "SEVERE:" when you swap it out with a proper logger.
Sadly I have not been able to find a resolution, and will post it when I find it. It is equally possible that they re-fix the bug in the next version of GlassFish.

Categories