Openbravo.log: java.lang.OutOfMemoryError: PermGen space - java

I "ant install.source" Openbravo, then "ant war", put .war to the /opt/tomcat/webapps, restated tomcat service. "catalina.out" says:
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/examples
org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [9,302] milliseconds.
org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/examples has finished in 10,126 ms
org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/openbravo
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.
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
and nothing more, openbravo.out says this:
**Initializing in-memory model...
org.openbravo.base.model.ModelProvider - Building runtime model
org.openbravo.dal.core.DalLayerInitializer - Model read in-memory, generating mapping...
ERROR org.hibernate.proxy.pojo.BasicLazyInitializer - Javassist Enhancement failed: org.openbravo.model.common.order.Order
java.lang.RuntimeException: by java.lang.OutOfMemoryError: PermGen space**
Here are my CATALINA_OPTS in /etc/systemd/system/tomcat.service
CATALINA_OPTS="-Djava.awt.headless=true -Djava.library.path=/usr/lib/ -Xms384M -Xmx1536M -server -XX:MaxPermSize=1024M -XX:+DisableExplicitGC -XX:CompileCommand=exclude,net/sf/jasperreports/engine/export/JRGridLayout,horizontallyMergeEmptyCells"
What is wrong with it?

Solved.
Just start using java 1.8 instead 1.7

Related

Jasperserver FAIL - Application at context path [/jasperserver] could not be started

I can't run jasperserver. I have tried reinstall with bundle version (tomcat 8.5) and also with another (9.0) versions of tomcat. tomcatmanager screen . Services jasperreportsTomcat and jasperreportsPostrgreSQL are running services . run from browser Logs from tomcat local host and catalina:
27-Sep-2020 14:37:09.617 INFO [http-nio-8080-exec-46] org.apache.jasper.servlet.TldScanner.scanJars
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.
27-Sep-2020 14:37:23.252 SEVERE [http-nio-8080-exec-46]
org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full
details will be found in the appropriate container log file
27-Sep-2020 14:37:23.253 SEVERE [http-nio-8080-exec-46]
org.apache.catalina.core.StandardContext.startInternal Context [/jasperserver] startup failed due to
previous errors
27-Sep-2020 14:37:23.318 WARNING [http-nio-8080-exec-46]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application
[jasperserver] appears to have started a thread named [Thread-301] but has failed to stop it. This is
very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
com.jaspersoft.jasperserver.war.themes.ThemeCache$RefreshThread.run(ThemeCache.java:332)
27-Sep-2020 14:37:23.319 WARNING [http-nio-8080-exec-46]
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application
[jasperserver] appears to have started a thread named [pool-36-thread-1] but has failed to stop it.
This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await
(AbstractQueuedSynchronizer.java:2039)
java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:550)
jmxlogger.tools.JmxLogService$3.run(JmxLogService.java:214)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
Please help me. This is useful in my first project :-)
I solved this by installing Jasper Server version 7.5 and delete .jrsks and .jrsksp from C:/users/[username here] before intalation. I chose everythink bundled during installation.

Cannot start Apache application after deployment on Windows

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

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

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 deploy WAR file in Wildfly Server - Scan found incompletely copied file content for deployment

I'm trying to deploy a WAR file, which I made in grails with the grails warcommand (55 MB), to a Wildfly 8 server. I use the scp command scp schedulingAPI-0.1.war user#xx.xx.xx.xx:/home/user/wildfly-8.0.0.CR1/standalone/deployments/ whereafter the fileschedulingAPI-0.1.war.isdeployingis present on the server. After a few minutes, the fileschedulingAPI-0.1.war.failed` appears on the server.
This is an output of my log file:
2014-04-02 15:15:04,581 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015009: Scan found incompletely copied file content for deployment /home/user/wildfly-8.0.0.CR1/standalone/deployments/schedulingAPI-0.1.war. Deployment changes will not be processed until all content is complete.
2014-04-02 15:37:04,566 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015009: Scan found incompletely copied file content for deployment /home/user/wildfly-8.0.0.CR1/standalone/deployments/schedulingAPI-0.1.war. Deployment changes will not be processed until all content is complete.
2014-04-02 15:53:15,600 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015009: Scan found incompletely copied file content for deployment /home/user/wildfly-8.0.0.CR1/standalone/deployments/schedulingAPI-0.1.war. Deployment changes will not be processed until all content is complete.
I already tried the suggestion in this thread to add the attribute deployment-timeout="2400" to <deployment-scanner> in the /standalone/configuration/standalone.xml file but without success.
Are you sure timeout 2400 is enough?
Deployment should be started after upload of your war file.
Maybe try to execute this command after uploading schedulingAPI-0.1.war:
ssh user#xx.xx.xx.xx 'rm -fr /home/user/wildfly-8.0.0.CR1/standalone/deployments/schedulingAPI-0.1.war.failed'
BTW. you can update wildfly to final version :)
Error was apparently with the mysql configuration (tried with tomcat server which gave me more log information)
I have experience this before when i try to send the war file directly to deployment over the network. You will have to restart the service if this happens.
Try and avoid this if you have a slow network. If you must, don't worry, just restart the service afterwards
I have just come around this problem: file was too big to be completely transferred between deployment scanner polls and hence marked corrupt by Jboss.
My .war file jumped from 7.5M to 18M and this started happening.
In the end, increasing deployment scanner scan interval value from 5000ms to 15000ms helped, so I'd suggest that (please mind it is not deployment timeout)

Categories