When I run my project, I don't have errors.
But After login, when I try to enter in a form page the application give me the follow error:
GRAVE: Servlet.service() for servlet jsp threw exception
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(Unknown Source)
at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1381)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:772)
at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1251)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:779)
at org.apache.jasper.compiler.Node$UninterpretedTag.accept(Node.java:1251)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:895)
...
I think the problem is in the configuration of tomcat but I don't understand where.
I have tomcat7.0.52, use java version 1.7.0_60, idem for jdk.
At my colleague work all without problems, we have the same tomcat version, the only difference is that I have STS 3.6 RELEASE, and He have the 3.5.
EDIT:
I try to delete server, and recreate it, but the problem don't change.
I think that the problem is on wrong configuration server because any project I run give me the same error.
This is my catalina arguments:
-Dcatalina.base="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/base-instance"
-Dcatalina.home="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/tomcat-7.0.53.B.RELEASE"
-Dwtp.deploy="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/base-instance/wtpwebapps"
-Djava.endorsed.dirs="/home/paola/Documenti/sts-bundle/vfabric-tc-server-developer-2.9.6.RELEASE/tomcat-7.0.53.B.RELEASE/endorsed" -Xmx768m -Xss256k -XX:MaxPermSize=256m
-Dinsight.enabled=false -Dspring.profiles.active=dev
Any ideas?
Thank
It looks like the problem is with the version of Tomcat that tcServer is derived from.
This bug which is fixed in Tomcat 7.0.55 is looks like the cause.
I've done some testing and found that the bug is not present in Tomcat 7.0.50, which is used by tcServer Dev Edition 2.9.5.SR1.
So it's either 7.0.51 or 7.0.52 (as you discovered) which introduced the bug.
Related
I am new to jenkins, I upgraded a couple of plugins(don't remember which), after that I when I try java -jar jenkins.war I end up getting the following error.
jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading global config
java.io.IOException: Unable to read /home/.jenkins/config.xml
I went through several links which address this issue, but no luck yet. In this link which I found https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764711 it says some plugins are missing, and surprisingly, my /home/.jenkins/plugins/ is empty!!!
How do I restore the necessary plugins from my command line?
I am using CentOS release 6.8 (Final)
Thank you :)
I had encountered this issue somedays back,however after restarting jenkins service solved the issue.
The best you can do now is rename your config file. This way jenkins will load with the default startup.
I have created REST API for captcha - using JCaptcha in spring framework.
Everything works fine when i place the war file inside tomcat7 server present in windows OS environment.
For deployment, when i use same war file in tomcat7 web server which present in Ubuntu 14.04 the api suddenly start giving http 500 response code with following exception :
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.image.codec.JPEGImageEncoderImpl
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
com.televital.vitalware.services.CORSFilter.doFilterInternal(CORSFilter.java:29)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
I have reffered following link for the development of the API
https://jcaptcha.atlassian.net/wiki/display/general/JCaptcha+and+the+SpringFramework
Please help me.It alredy took my 2 days.
There are two possibilities.
sun.awt.image.codec.* is included in <JDK installation
folder>\jre\lib\rt.jar. So check this jar is already existed in your
Linux machine or not.
The second one is you need to turn on Headless mode in your Linux machine.Before you run tomcat startup script, you need to turn on Headless mode like this
JAVA_OPTS='-Djava.awt.headless=true'
From the stack trace its evident that on Ubuntu the application is not able to locate the sun.awt.image.codec.JPEGImageEncoderImpl class from <JDK installation>\jre\lib\rt.jar.
To resolve the error check below
JDK is installed correctly (if not re-install)
JAVA_HOME is configured correctly
If above two are correct then use headless mode by specifying -Djava.awt.headless=true
I have big problem to run activiti-explorer when i try access: http://localhost:8080/activiti-explorer/ tomcat shows me HTTP Status 404 - The requested resource is not available. I'm really don't have any idea why that dosen't work. Can you help me?
This what have I done on my PC:
I'm using 5.19.0 version of activiti-explorer
7.0.63 tomcat
JDK 1.8.0.77 (i think there is no point to downgrade java to previous versions (<=1.7) becouse my main application using this version)
I'm sure I have correctly configured environment variables (JAVA_HOME,JRE_HOME,PATH,CATALINA_HOME)
I configured data base connection (db.properties, context.xml) in activiti-explorer.war and i moved this file to tomcat/webapps
I don't have any errors about activiti during tomcat start
Check if activiti explorer is deployed to tomcat in manager.
http://{host}:{port}/manager/html
More info in https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html
Check the catalina.out log. There will be something in there that leads you to the solution.
Check Admin Console (cmd that runs behind) after hitting the link. most recent exception occurred will be displayed there.
Until a few days ago, my STS worked perfectly, but of a sudden, the Pivotal server does not start, throws me the following error message when you run an application:
SEVERE: Class loader creation threw exception
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
at java.io.WinNTFileSystem.canonicalize0 (Native Method)
at java.io.Win32FileSystem.canonicalize (Win32FileSystem.java: 414)
at java.io.File.getCanonicalPath (File.java: 618)
at java.io.File.getCanonicalFile (File.java: 643)
at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader (ClassLoaderFactory.java: 170)
at org.apache.catalina.startup.Bootstrap.createClassLoader (Bootstrap.java: 149)
at org.apache.catalina.startup.Bootstrap.initClassLoaders (Bootstrap.java: 90)
at org.apache.catalina.startup.Bootstrap.init (Bootstrap.java: 226)
at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 425)
They could help me with this problem?
From already, thank you very much for your attention and time.
Gustavo Echenique
I had the same error on Tomcat 6 (Pivotal 3.0, STS) and my problem was in catalina.properties. The "common.loader" property was incorrectly using Tomcat 8 style and it was as follows:
common.loader = \
\"${catalina.base}/lib\",\
\"${catalina.base}/lib/*.jar\",\
\"${catalina.home}/lib\",\
\"${catalina.home}/lib/*.jar\"
I have removed the double quotes and that fixed the problem. Correct definition:
common.loader = \
${catalina.base}/lib,\
${catalina.base}/lib/*.jar,\
${catalina.home}/lib,\
${catalina.home}/lib/*.jar
Also, STS has quietly added Tomcat 8 JARs (bootstrap.jar, etc) to my Tomcat 6 launch configuration. While I had these JARs on the classpath, everything worked fine. But once I discovered and removed them, Tomcat 6 started breaking with the error in the original post.
I started to have the same issue out of nothing as well. We are using Java 1.7 in our project, but I also have Java 8 installed on my machine for experimenting. Even though everything is still configured to use 1.7 (I never changed the configuration and it was working fine), I think after some Java 8 update I started to get this issue.
After trying several things, I decided to uninstall all Java 8 related updates and installations; and made a fresh installation of Spring STS 3.6.2 with a new workspace. It seems to be working fine right now. You can try this if you also have a similar environment.
I have a problem when I try to instantiate Hibernate and connect with a MySQL database (see error message below).
Curiously enough the connection works fine using the exact same hibernate.cfg.xml file when running Junit tests but it refuses to work when run from Tomcat...
I am starting to run out of ideas.
Any clues or tip where to look?
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.DynamicMapEntityTuplizer]
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:69)
at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:323)
at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at se.fmt.atlantism.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:16)
... 38 more
Caused by: java.lang.NullPointerException
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107)
... 47 more
I'm writing this for future Googlers and reference.
I've done some more research and the root source of the problem is still not known. However the following article throw me on the right track.
http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/
It seems like the Tomcat (version 6 at least) packages available in Ubuntu (and Debian) are not working correctly. Instead I installed Tomcat using the following guide:
http://www.ctrip.ufl.edu/tomcat6-debian-lenny-howto
While this might not be the premium choice of installation it seems necessary to get Tomcat version 6 running without problems on Ubuntu and/or Debian Lenny.
In my case, this error was resolved by switching the <dependency/> order in my pom.xml. When hibernate (3.2.7.ga) comes before hibernate-annotations (3.4.0.GA) this error occurs. The other way around, it works fine. This is the case even with scope=compile.
I would guess that you need to tweak your classpath, except that (assuming you've dropped both jars in WEB-INF/lib) it should alpha-sort in the correct order. But maybe this will give someone a hint on how to move forward.
In my case it was a simple mistake - the config file *.hbm.xml had a property that the mapped object didnt have! I also heard of cases of that error apearing when you misspell a get/set function - very similar to my case.
I was facing the same problem. It went away after I downloaded "javassist.jar" and put it in the classpath: http://www.java2s.com/Code/Jar/JKL/Downloadjavassistjar.htm
This is how the Tomcat daemon process looks:
root 2605 0.0 0.0 16584 376 ? Ss 15:39 0:00
/usr/bin/jsvc -user tomcat6
-cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar
-outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
-Djava.awt.headless=true -Xmx128M
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-temp -Djava.security.manager
-Djava.security.policy=/var/lib/tomcat6/work/catalina.policy
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
org.apache.catalina.startup.Bootstrap
This is how the Tomcat process looks when run from within Eclipse using the Sysdeo Tomcat launcher plugin:
(this one actually works)
jzaruba 2655 19.7 4.5 358304 46152 ? Sl 15:43 0:01
/usr/lib/jvm/java-6-sun-1.6.0.15/bin/java
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:37377
-Dcatalina.home=/usr/share/tomcat6
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Djava.io.tmpdir=/var/lib/tomcat6/temp
-Dfile.encoding=UTF-8 -classpath
/usr/share/tomcat6/bin/bootstrap.jar:/usr/lib/jvm/java-6-sun-1.6.0.15/lib/tools.jar
org.apache.catalina.startup.Bootstrap start
The working one (Eclipse launched) is run using java-6-sun-1.6.0.15, I'm Windows user so I don't know how to tell which JRE is used for /usr/lib/jsvc (looking at it though), but my guess would be it is some OpenJDK... Could this be the difference?
update: jsvc probably uses the same JRE Sysdeo Tomcat launcher does