4

I get follwing Tomcat Error:

Sep 09, 2012 3:27:48 PM org.apache.catalina.core.AprLifecycleListener init
Information: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Products\jdk1.7.0_03\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Products/jdk1.7.0_03/jre/bin/client;C:/Products/jdk1.7.0_03/jre/bin;C:/Products/jdk1.7.0_03/jre/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Products\jdk1.7.0_03\jre\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Products\eclipse32;;.
Sep 09, 2012 3:27:48 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
Warnung: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:NAR_JDBC_DBO' did not find a matching property.
Sep 09, 2012 3:27:49 PM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["http-bio-80"]
Sep 09, 2012 3:27:49 PM org.apache.coyote.AbstractProtocol init
Information: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.Catalina load
Information: Initialization processed in 1359 ms
Sep 09, 2012 3:27:49 PM org.apache.catalina.core.StandardService startInternal
Information: Starting service Catalina
Sep 09, 2012 3:27:49 PM org.apache.catalina.core.StandardEngine startInternal
Information: Starting Servlet Engine: Apache Tomcat/7.0.27
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.TaglibUriRule body
Information: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.TaglibUriRule body
Information: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.TaglibUriRule body
Information: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.TaglibUriRule body
Information: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
Sep 09, 2012 3:27:49 PM org.apache.catalina.core.ApplicationContext log
Information: Marking servlet action as unavailable
Sep 09, 2012 3:27:49 PM org.apache.catalina.core.StandardContext loadOnStartup
Schwerwiegend: Servlet /NAR_JDBC_DBO threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
    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:722)

Sep 09, 2012 3:27:49 PM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["http-bio-80"]
Sep 09, 2012 3:27:49 PM org.apache.coyote.AbstractProtocol start
Information: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 09, 2012 3:27:49 PM org.apache.catalina.startup.Catalina start
Information: Server startup in 725 ms

And this is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
 xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 <display-name>NAR_JDBC_DBO</display-name>
 <servlet>
  <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
  <init-param>
   <param-name>validate</param-name>
   <param-value>true</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>*.do</url-pattern>
 </servlet-mapping>
 <welcome-file-list>
  <welcome-file>index.html</welcome-file>
  <welcome-file>index.htm</welcome-file>
  <welcome-file>index.jsp</welcome-file>
  <welcome-file>default.html</welcome-file>
  <welcome-file>default.htm</welcome-file>
  <welcome-file>default.jsp</welcome-file>
 </welcome-file-list>
 <jsp-config>
  <taglib>
   <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
   <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>
  <taglib>
   <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
   <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>
  <taglib>
   <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
   <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>
  <taglib>
   <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
   <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>
 </jsp-config>
</web-app>

Apparently there is a problem with Servlet Name 'Action' from org.apache.struts.action.ActionServlet. Unfurtunatley I don't know what am I doing wrong. Have you an idea? Many thx in advance. Olli

2
  • 1
    I would guess you're missing a jar file. Commented Sep 9, 2012 at 14:01
  • Make sure that you have enabled or checked the maven dependency in the build path. Commented Mar 6, 2018 at 5:12

9 Answers 9

14

This error occurred because your servlet-core jar is not on your run-time class-path. If you are using maven,

  1. Open your EAR/web project properties
  2. Click on "Deployment Assembly"
  3. Click on "Add..."
  4. Select on "Java Build Path Entries"
  5. Click on "Next"
  6. Select "Maven Dependencies"
  7. Click "Finish"

If not maven, make sure you have the lib folder where your jars are placed is on "Deployment Assembly".

Sign up to request clarification or add additional context in comments.

Comments

2

I think you should keep you jar files into /WEB_INF/Lib folder and this will work for you.

Comments

1

I got the same error while using Tomcat 7. I found the solution. Root cause is either struts jar version or jar configurations. Previsouly i used struts.jar, now i added struts-core-1.3.10.jar recommendable for Tomcat 7 and servlet-api jar shloud be available and make sure that jar configurations done properly or not.. Its better to delete current project and start freshly.

Comments

1

We need to add one additional jar: struts-extras-1.3.9.jar in WEB/lib. And rightly said it is org.apache.struts.actions.ForwardAction

Comments

0

i think the problem is due to jar file,please make sure of the jar files in lib folder.if you are using eclipse,then copy all the jar files to lib folder rather than confuguring build path

Comments

0

I had the same problem. Although I added the struts library to the project Build Path and marked to export, Eclipse did not include anything in WEB-INF/lib. So similar to what Vivek Kothari said you can make Eclipse to add them. But if you have already downloaded the jar files and added to the project build path (probably as a User Library), you can select your library in step 6.

Comments

0

This problem is due to missing Jars only... put all these jars into /WEB-INF/lib folder...

  1. antlr-2.7.2.jar
  2. commons-beanutils-1.8.0.jar
  3. commons-chain-1.2.jar
  4. commons-digester-1.8.jar
  5. commons-logging-1.0.4.jar
  6. commons-validator-1.3.1.jar
  7. oro-2.0.8.jar
  8. struts-core-1.3.10.jar
  9. struts-taglib-1.3.10.jar

if we use only struts-core.jar then we face this problem...because all other jars are also required.

1 Comment

Did exactly what you said and it worked, server started normally with out any errors. But not sure if all the above listed jars need to be moved to WEB-INF/lib apart from struts related jars. This is some thing I need to check when I have some time to do little R&D
0

To avoid this type issue put all struts jar in lib folder of web app .this will solve the problem

Comments

0

org.apache.struts.actions.ActionServlet not org.apache.struts.action.ActionServlet

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.