org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available - tomcat6

I have Tomcat 6 when I getting start my server error context start form
SEVERE: Exception processing JAR at resource path /usr/share/java/jakarta-commons-pool-1.3.jar in context
java.util.zip.ZipException: error in opening zip file
When I request to any site it displays an error
org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:73)
com.wvmagic.rf.filter.NoCacheFilter.doFilter(NoCacheFilter.java:73)
root cause
java.lang.IllegalStateException: No Java compiler available
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:229)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:581)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:73)
com.wvmagic.rf.filter.NoCacheFilter.doFilter(NoCacheFilter.java:73)
I have tried lot, but cannot resolve the issue.

Please check this file: jasper-jdt.jar. If it doesn't exist in your /lib directory, than you should get one.

Probably means exactly what it says, you don't have a Java compiler. You need to install a SDK so that it can compile JSPs . Check for Java SDK and don't forget to set JAVA_HOME .
See this discussion for troubleshooting your problem.

Related

Apache Flink Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Traversable

I have just started learning Apache Flink and found the guide link to start the development in EClipse IDE.
I followed the this to start off but getting the below error
00:20:26,993 INFO org.apache.flink.api.java.ExecutionEnvironment - The job has 0 registered types and 0 default Kryo serializers
Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Traversable
at java.lang.ClassLoader.defineClass1(Native Method)
Here I have place the Error log log File ... Please let me know if your require more details. Thanks, Nyamath
java.util.zip.ZipException: invalid LOC header (bad signature)
Your Scala jar file provided by Maven seems to be corrupted. Please update your Maven dependencies by executing this from your project folder on the command line:
mvn -U clean install
In Eclipse, right click on your project and click on Update - - > Maven dependencies.
If that does not work you'll need to delete the corrupted Jar file in the .m2/repositories/ folder.

java.lang.NoClassDefFoundError: com/google/common/collect/Maps - Selenium

Dear Selenium Experts,
I have come across the following run-time error from a JPA 2.0 program which appears to be related to Firefox Profile for some reason:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:56)
at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:79)
at model.DownloadCarDetail.getMercedezDetail(model.DownloadCarDetail:72)
at model.DownloadCarDetail.getMercedezDetail.main (model.DownloadCarDetail.getMercedezDetail.java:47)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
Java Result: 1
I have kept Firefox to version 15 so that it is supported by Selenium Webdriver but suspect that the issue is to do with not able to read profile directory.
Your assistance would be very much apprecaited.
Many thanks,
George
The problem you are seeing has nothing to do with your Firefox profile.
Actually, it is the JVM classloader that complains that it can't find the com.google.common.collect.Maps class.
This usually means that you don't have Guava (which is a dependency for Selenium) on your classpath. Clean and rebuild your project, check your classpath, check the various versions of libraries that might be there. If you're using some kind of dependency management system (Maven, Ivy etc.), check it's configured right.
Import the .jar file to Eclipse downloaded from here (depending on the current version).
open this link https://www.seleniumhq.org/download/ and download Java 3.11.0(current version) open zip file to desktop on netbeans or eclips click add jars/file in selenium-java-3.11.0\libs select all file also in selenium-java-3.11.0 select client-combined-3.11.0.jar you will be ok. dont remember to add System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe"); code. you can download chromedriver this link https://chromedriver.storage.googleapis.com/index.html?path=2.38/
In my case the Guava dependency was corrupt. Worked fine after I deleted the corrupt jars and rebuilt whole project.
Thank you for offerring your suggestion for a solution to this issue. I have found the exact answer from Selenium 2 WebDriver NoClassDefFoundErrorS which has resolved the underlying issue.
George
add below maven dependency and clean and compile your code.
<!-- https://mvnrepository.com/artifact/com.google.common/google-collect -->
<dependency>
<groupId>com.google.common</groupId>
<artifactId>google-collect</artifactId>
<version>0.5</version>
</dependency>

Exception Processing Mirror-Quickstart

I ran the mvn war:war in the command prompt, I then went to upload to appengine using appcfg update and I got this error. The app works on localhost. Aside from the path simply being wrong, there is no appengine-web.xml. Any help would be appreciated thankyou.
C:\appengine-java-sdk\bin>appcfg update C:\mirror-quickstart-java-master
Reading application configuration data...
Aug 31, 2013 7:10:33 AM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing C:/mirror-quickstart-java-master\WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate C:\mirror-quickstart-java-master\WEB-INF\appengine-web.xml
at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)
at com.google.apphosting.utils.config.AppEngineWebXmlReader.readAppEngineWebXml(AppEngineWebXmlReader.java:75)
at com.google.appengine.tools.admin.Application.<init>(Application.java:182)
at com.google.appengine.tools.admin.Application.readApplication(Application.java:319)
at com.google.appengine.tools.admin.AppCfg.readWar(AppCfg.java:279)
at com.google.appengine.tools.admin.AppCfg.readApplication(AppCfg.java:270)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:208)
at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:121)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:117)
Caused by: java.io.FileNotFoundException: C:\mirror-quickstart-java-master\WEB-INF\appengine-web.xml (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:137)
... 8 more
Bad configuration: Could not locate C:\mirror-quickstart-java-master\WEB-INF\appengine-web.xml
Caused by: C:\mirror-quickstart-java-master\WEB-INF\appengine-web.xml (The system cannot find the path specified)
Please see the logs [C:\Users\Hasan\AppData\Local\Temp\appcfg4724142030047376778.log] for further information.
The latest version of the mirror-quickstart-java that supports Google App Engine has been tagged with app-engine; you should use this specific release.

Error while creating web service using apache CXF wizard

I am creating a web service through the apache CXF. but while i proceed(before the wsdl gets created), i receive the following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/cxf/tools/java2wsdl/JavaToWSDL
This seems like the java2ws.bat file has some error.
The statement in the bat file is
"%JAVA_HOME%\bin\java" -Djava.endorsed.dirs="%CXF_HOME%\lib\endorsed" -cp "%CXF_JAR%;%TOOLS_JAR%;%CLASSPATH%" -Djava.util.logging.config.file="%CXF_HOME%\etc\logging.properties" org.apache.cxf.tools.java2ws.JavaToWS %*
It seems like at Run time,jvm is not able to find the CXF.jar.I added it in the classpath but still the same error
please help me to solve the issue
The problem arises while creating JVM. You can refer : Java Refuses to Start - Could not reserve enough space for object heap
It solved my problem.

NoClassDefFoundError MimeTypeException with PDF extraction

I am getting an exception trying to use update/extract with PDF files
My Set up is:-
Ubuntu Server 11.10
Tomcat 6
Solr 3.5.0.2011.11.22.15.54.38
I can browse to solr/admin OK
I have put all the contrib/extract and apache-solr-cell3.5.0.jar libraries into the tomcat folder webapps/solr/WEB-INF/lib
I am calling extract using:-
curl "http://localhost:8080/solr/update/extract?uprefix=attr_&fmap.content=attr_content&commit=true" -F "file=/path/to/my.pdf"
error is
java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:383)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:461)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:248)
at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:239)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372)
Would appreciate any pointers - the only time this error seems to come up elsewhere is with Nutch and cached results.
I have tried sending the mimetype in the querystring and also a *.doc file but got the same error.
According to the error message it is not a MimeTypeException exception you get: The problem is a NoClassDefFoundError, because Solr cannot load the class MimeTypeException.
Normally this class is present in tika-core.jar.
Make sure you actually have that file and also check if you have a lib statement in your solrconfig.xml pointing to the right directory.
This was due to the basic error of copying the necessary tika libraries (to tomcat6/webapps/solr/WEB-INF/lib) but leaving ownership of the jar files as ROOT instead of chown-ing them to TOMCAT6. After setting the right permission and restarting Tomcat it started working OK
Found the solution of this problem, I was using SolrJ to update my pdf indexing.
after deploy solr to tomcat, I didn't include the following libraries into the tomcat/webapp
and I get all the lazy loading problem, etc etc
I even try to get apache tika...
until I do this...
shutdown tomcat
\apache-solr-3.5.0\contrib\extraction
copy the libraries above to below
\apache-tomcat-7.0.26\webapps\solr\WEB-INF\lib
startup tomcat
cheers

Resources