I've a strange problem. I created the plain vanilla Greetings example with the webAppCreator of gwt. That means I created a project called Test and after that I did not modify it in any way. Then I created a war file with "ant war" and deployed this on my local tomcat 7. The server starts fine and the Grettings page is loaded properly. But, when clicking on the Send button I get the following error:
There a no error messages in the tomcat logs. However in the development mode the stuff works fine. I'm using gwt 2.5. Any idea what could cause this problem?
Edit: Maybee this gives some further insights:
I found a stack trace:
java.lang.UnsupportedClassVersionError: com/server/GreetingServiceImpl : Unsupported major.minor version 51.0 (unable to load class com.server.GreetingServiceImpl)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2908)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:680)
But what does it mean?
Okay, I found the problem.
The error UnsupportedClassVersionError means that I tried to run a compiled java file with an older runtime, i.e. I compiled the servlets with java 7 and tried to run them with java 6.
I repaired this by setting the correct JAVA_HOME path to my .bash_profiles file like this
export JAVA_HOME=/path/to/java_7/Home
That was it, now everything runs fine. Thanks for reading anyway.
This question already has answers here:
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
(2 answers)
Closed 7 years ago.
when I'm running my appication everything is ok to moment when I press the button and I'm redirecting to another xhtml page. Then eclipse console until I stop server display:
SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/ChatAzure] threw exception [javax/servlet/jsp/jstl/core/Config] with root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:345)
at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I use:
eclipse, jsf2-1-7, jstl-1.2.jar, Tomcat v0.7.
I don't know what's wrong, I need help.
The mentioned class is part of JSTL. This is normally already provided by a full fledged Java EE container, but not in Tomcat as being a barebones JSP/Servlet container. You'd need to supply JSTL yourself along with the web application. It has ultimately to be placed in the webapp's runtime classpath.
You correctly mentioned jstl-1.2.jar (I assume that it's exactly the one as you could find in our JSTL wiki page), but this problem indicates that it has apparently not been placed at the right place. You need to place it in /WEB-INF/lib folder of the web project. This folder is covered by webapp's default runtime classpath. Nothing more needs to be done. If you have ever fiddled in the project's Build Path properties in an attempt to solve it, you should undo all those attempts.
Unrelated to the concrete problem: why are you still using legacy JSP? It has been deprecated and succeeded by Facelets (XHTML) since JSF 2.0. Make sure that you're reading up to date JSF 2.x resources and not JSF 1.x ones while learning JSF.
I am trying to configure Tomcat 7 in Eclipse Indigo, i added the Tomcat plugin from http://www.eclipsetotale.com/tomcatPlugin.html#A3 into eclipse\plugins folder.
Now when i start tomcat i am getting the below error:
Feb 13, 2012 4:23:35 PM org.apache.catalina.startup.ContextConfig webConfig
SEVERE: Unable to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
at org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Feb 13, 2012 4:23:35 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
SEVERE: Unable to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
This is actually a bug in Tomcat 7.0.25 and fixed in Tomcat 7.0.26. See also issue 52511. Please note that you can just continue using your web application! This log is purely informal and does not block Tomcat from starting and functioning. It's caused by a change in the way how Tomcat scans annotated classes. This stacktrace will be printed when you don't have any classes in your Eclipse project and hence the /WEB-INF/classes remains empty.
Upgrading to Tomcat 7.0.26 will hide this log. You can also just ignore it altogether and continue using Tomcat as usual.
As per the comments,
i Installed Eclipse for Java EE, in that in the server tab i added the server , when i run the server and try to open the localhost:8080 in the browser, it did not give me the welcome page, therefore i added the plugin in the eclipse plugins, now it gives me the welcome page in browser but adding to that it gives above error in console.
What did it give instead? A server-specific 404 error page or a browser specific "Connection timeout" page? If 404, then the server runs perfectly fine, it's just the URL which did not point anything. Note that Eclipse does by default not deploy Tomcat's own homepage, simply because that's not useful at all while developing. It will only deploy Tomcat's own homepage when you configure Eclipse to take over Tomcat installation instead of using its engine:
You need to let the URL point to the real URL of the deployed web project. It defaults to the project name which is configureable in project's properties. If the project name is for example "Playground", then you need to open http://localhost:8080/Playground instead. If you want to have it on domain root, then you need to change the Context root in Web Project Settings to /:
Last but not least, I recommend to remove that Sysdeo plugin which you installed without any necessary reason. It is not in any way better than the Eclipse-builtin plugin.
See also:
Tomcat started in Eclipse but unable to connect to http://localhost:8085/
13-dic-2011 17.00.36 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/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib
13-dic-2011 17.00.36 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVVERTENZA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Preventivi' did not find a matching property.
13-dic-2011 17.00.36 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
13-dic-2011 17.00.36 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8443"]
13-dic-2011 17.00.37 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
13-dic-2011 17.00.37 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 983 ms
13-dic-2011 17.00.37 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
13-dic-2011 17.00.37 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
13-dic-2011 17.00.37 org.apache.catalina.core.StandardContext resourcesStart
GRAVE: Error starting static Resources
java.lang.IllegalArgumentException: Document base /home/claudio/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Preventivi does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4880)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5060)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
13-dic-2011 17.00.37 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error in resourceStart()
13-dic-2011 17.00.37 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error getConfigured
13-dic-2011 17.00.37 org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/Preventivi] startup failed due to previous errors
13-dic-2011 17.00.37 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
13-dic-2011 17.00.37 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8443"]
13-dic-2011 17.00.37 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
13-dic-2011 17.00.37 org.apache.catalina.startup.Catalina start
INFO: Server startup in 319 ms
I've run my webapp project in Eclipse, but today I received the message in console.
Tomcat return me a 404 page error. Maybe the problem is that the folder where I would write doesn't exist. Where is the trick?
The easiest solution (and what worked for me) was to delete my tomcat server from the "Servers" view in Eclipse, then create a new server and add all the appropriate modules to it.
Sometimes tomcat gets confused and the easiest/least time consuming way to resolve things is to start over.
i have the same error, just run this maven command repeatedly and solve the problem.
mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0
eclipse was not recognizing that this was a web project, so never deploy the application.
I had the same problem using Tomcat 7 & Eclipse Mars.
I solved it as follows:
stop Tomcat
open server.xml
Ctrl + Shift + R > type "server.xml" > Open
search for "<Context docBase"
Ctrl + F > type "<Context" > Find
remove all <Context .../> tags from here:
<?xml version="1.0" encoding="UTF-8"?>
...
<Server port="8005" shutdown="SHUTDOWN">
...
<Service name="Catalina">
...
<Engine defaultHost="localhost" name="Catalina">
...
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
...
<!-- Remove the following lines! -->
<Context docBase="App1" path="/App1" reloadable="true" source="org.eclipse.jst.j2ee.server:App1" />
<Context docBase="App2" path="/App2" reloadable="true" source="org.eclipse.jst.j2ee.server:App2" />
</Host>
</Engine>
</Service>
</Server>
probably at the end of the last line that has to be removed is </Host> (don't remove </Host>!)
Go to Servers tab > right click on the project(s) > Remove > OK
Right click on the project > Run As > Run on Server > Finish
Now it should work!
If you check the server.xml file, you'll see that a new correct "<Context ... />" line was generated.
This might be late but for the benefit of the those who might encounter the same problem in the future, I'll share what I experienced.
I got this problem after I deleted the WebContent folder of the Dynamic Web Project I just created in place of webapp folder which is the standard folder of my company. I found out that, in Project Properties > Deployment Assembly, WebContent folder is still used as the root of the web application (Deploy Path : "/"). Thus, Eclipse doesn't copy the project to .metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps because the root specified in Deployment Assembly does not exist anymore.
I fixed it by editing that entry then correcting it with the folder I am using in place of the default WebContent (the webapp folder)
If using Eclipse STS
open the server view
select the server that you're trying to publish to
right click -> clean
I had this problem come up a couple of times and this always seemed to fix it. I suppose the other solutions work too but they seem more complicated to me.
This could happen because "Tomcat\conf\Catalina" folder.
Please delete this folder.
Looking at the exception you get, this looks like a problem with publishing your WEB-App (eg. Eclipse WTP could mess something up). First things that come in my mind:
Check your Tomcat server settings: go to Servers - double click on your server. Get your 'Server Locations - Server Path' and check if it exists and check the user/group read/write permissions.
eg. ls -lh somepath/.medadata/.plugins/.org.eclipse.wst.server.core/tmp0
You must be owner or at least in same group for the folder.
Clean the eclipse workspace. (Project - clean all)
Clean/Republish your wep-app (right click on server, clean, publish).
Check if the application is published, there should be a folder named Preventini in /home/claudio/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/
Also check the permissions here again (see above).
Happened to me a couple of times.
Windows > Show view > Servers>
A List of servers will be displayed at bottom
Right click on it and delete.
Now while running your project, Manually re select the server from list of existing servers and run.
I got this problem when I imported a project and run it with Tomcat. I fixed it when I opened .project file and added some code:
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
I had to remove an offending project/module from the tomcat config view, under the modules tab.
i have solved this error by adding removing and adding again the jar files from WebContent/WEB-INF/lib folder. and i did the same in properties of project ie(Right click on project->Build Path->configure build Path) by selecting Add External Jar option.
Go to Tomcat Manager
Select web app -> undeploy it
Today I was working with some other project and getting some errors in starting server (tomcat7), so first I cleaned the server and tried but no luck, then I deleted the server and made new one.
The project on which I was working was started working fine, but another project started giving me the same exception, I again deleted the server and tried but the same case, even I was unable to hit the tomcat landing page i.e. localhost:8888/. I really don't know how and why all that happened.
I tried several things like clean,add/remove then I started searching SO.
After some research I thought to give one more chance then I started server again this time both of my projects started working fine but still getting 404 on tomcat page
As a trivial problem, the project that you're trying to start can be closed (this could be missable, if you have many projects into the workspace!). Just do right click -> Open Project, in this case.
I came across this problem today, then solve it by editing the server.xml in directory of %tomcat_home%\conf, just as below:
<Context docBase="E:\apache-tomcat-7.0.52\webapps\ROOT" path="/ROOT" reloadable="true" source="org.eclipse.jst.j2ee.server:pc-ui"/>
I don't know whether it is MyEclipse that have genarated the "Context" element in element of "Host", but I change it according to the error info diaplayed in IDE console.
I got this error a few times. I got it because my project wasn't building correctly after running the "mvn eclipse:eclipse" line. Make sure your project is being built correctly, then add and remove the project from the server.
This could happen if you execute maven to build a java project
mvn eclipse:eclipse
Instead of executing maven to build a web java project as:
mvn eclipse eclipse -Dwtpversion=2.0
You can look into tomcat\conf\Catalina\localhost,if you can see the xml file which its name matches your error message.You can just delete the xml file and restart your tomcat.
Try , right click tomcat --> Add / Remove , then in opened window , remove All projects in Configured side..
Then restart tomcat .
Before adopting any other solution, make sure that the project is open.
i always get the following error when trying to start Tomcat in eclipse (or also from the terminal with this specific war file)the build using ant is successful of course:
08.08.2011 08:21:02 org.apache.catalina.core.StandardContext loadOnStartup
SCHWERWIEGEND: Servlet threw load() exception
java.lang.ClassNotFoundException: dea.alo.aloWeb.spring.StxxDelegatingRequestProcessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.oroad.stxx.plugin.StxxPlugin.initRequestProcessorClass(StxxPlugin.java:153)
at com.oroad.stxx.plugin.StxxPlugin.init(StxxPlugin.java:102)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1216)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1135)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
It runs perfectly on a pc using linux and eclipse galileo, but not on my mac using eclipse indigo. the libraries are all in place..does anyone have an idea what the problem might be?
Looks like I syncyronisation problem I often have.
Refresh the Workspace
Project Build (most time not needed) - But make sure that there are no build errors
Then run the two tasks from the Servers/(tomcat) Context menu
Clean...
Clean Tomcat Working Directory
If this all does not help, then Remove the application from the Server, clean the Server and Deploy the application again to the server.
The class StxxDelegatingRequestProcessor is missing in your classpath -> "ClassNotFoundException: dea.alo.aloWeb.spring.StxxDelegatingRequestProcessor"
I think you copied the struts conf from a site but not the class :)