开发者

Error filterStart on tomcat when using java 1.6

Let me start with what I use:

- ubuntu 11.04

- apache-tomcat-6.0.33

some details on my java:

adam@adam-1215N:~$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK Server VM (build 20.0-b11, mixed mode)

adam@adam-1215N:~$ ll /usr/lib/jvm
total 84
drwxr-xr-x   3 root root  4096 2011-08-28 10:09 ./
drwxr-xr-x 229 root root 69632 2011-08-28 13:13 ../
lrwxrwxrwx   1 root root    14 2011-08-27 21:03 default-java -> java-6-openjdk/
lrwxrwxrwx   1 root root    14 2011-08-27 21:03 java-1.6.0-openjdk -> java-6-openjdk/
drwxr-xr-x   7 root root  4096 2011-08-27 21:11 java-6-openjdk/
-rw-r--r--   1 root root  2164 2011-06-11 11:07 .java-6-openjdk.jinfo

How I deploy an application: I build it using mvn clean install. Then I extract the content of created .war file and copy it to my directory in webapps in tomcat. It worked initially.

Now, the meritum: Project that I try to deploy is quite simple. Everything worked until I wanted one method to return Set of objects. When building I got error that generics are not supported in java 1.3. I googled, and found that I need to add maven-compiler-plugin to my pom.xml pointing which java I want to use. So I added, pointing at 1.6. And here it comes:

Aug 28, 2011 6:25:50 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/myproject]
Aug 28, 2011 6:25:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Aug 28, 2011 6:25:50 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/myproject] startup failed due to previous errors

Now the bad news I tried to return to initial maven configuration, deleted generics that made me use java 1.6 and problem still exists... I was messing with jdk, installing and removing different versions, that is why I gave you same details on what I have in the beginning.

Tomcat also gives one more warning, I thought it is irrelevant but I didn't see it before (or didn't notice) so I'm putting it here:

Aug 28, 2011 6:15:13 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr开发者_开发技巧/lib/jvm/java-6-openjdk/jre/lib/i386/server:/usr/lib/jvm/java-6-openjdk/jre/lib/i386:/usr/lib/jvm/java-6-openjdk/jre/../lib/i386:/usr/java/packages/lib/i386:/usr/lib/i386-linux-gnu/jni:/lib/i386-linux-gnu:/usr/lib/i386-linux-gnu:/usr/lib/jni:/lib:/usr/lib

I'm confused and tired, after fighting with it almost 2 days. Any help appreciated.

Edit I have found reason: I have changed name of class that was referenced in web.xml and "Refactor" tool in Eclipse didn't change it.

Leaving it here in case someone find it useful :)


I have looked up in logs/localhost.2011-08-28.log and found java.lang.ClassNotFoundException which led me to web.xml containing reference to class that I had renamed


I was getting this error when deploying a spring mvc app from eclipse. The maven build included all the dependent jars for spring under WEB-INF/lib and that worked fine when deployed to Tomcat. The eclipse Indigo export-war functionality was not exporting the dependent spring jars presumably because of the maven directory structure, even though it was in the build path and all the jars were displayed under the Libraries tag.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜