Elicpse throw Notfoundexception Exception when new userlibrary import jar Package

Source: Internet
Author: User
Tags apache tomcat

Recently began to learn Struts2.0 framework. A sudden whim when importing jar packs. To facilitate the separation of the functionality of the jar package, I would like to create a new Struts folder in the Web-inf. lib directory for easy sorting.

Like this.

Look at the Web library again, then the problem comes. Using tomcat8.0, it should have been generated automatically here.

No, I'll create a new userlibrary called "Struts2". The steps are as follows: Project right-->build path-->configure build path-->libraries tab inside->add library-->user library--> Next-->user libraries...-->new-->add jars.

That's when it happens:

When I restarted the server, there were a lot of notfoundexception exceptions. (In fact, I wrote a few simple filters in front, so the error prompted the Strutsprepareandexecutefilter class can not find.)

May the, . 5: *: inpm Org.apache.catalina.core.AprLifecycleListener lifecycleevent Info: The APR based Apache Tomcat Native Library which a Llows Optimal PerformanceinchProduction environments was wasn't found on the Java.library.path:c:\program files\java\jre1.8.0_65\bin; C:\WINDOWS\Sun\Java\bin; C:\WINDOWS\system32; C:\WINDOWS; C:/Program Files/java/jre1.8.0_65/bin/server; C:/Program Files/java/jre1.8.0_65/bin; C:/Program Files/java/jre1.8.0_65/lib/amd64; C:\programdata\oracle\java\javapath;d:\clementine\bin\;D: \software\2013matlab\runtime\win64;d:\software\ 2013matlab\bin; C:\Program Files\java\jdk1.8.0_65\bin; C:\Program Files\java\jdk1.8.0_65\jre\bin;d:\hploadrunner\strawberry-perl\perl\bin; C:\Program Files (x86) \hp\nv\lib\thirdparty\safenet\ldk\7.0; C:\Program Files (x86) \HP\NV\LIB\SHUNRA\SNV; C:\ProgramData\Oracle\Java\javapath; C:\Program Files (x86) \nvidia Corporation\physx\common; C:\Program Files (x86) \intel\icls client\; C:\Program Files\intel\icls client\; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\WINDOWS\System32\WindowsPowerShell\v1.0\; C:\Program Files\intel\intel (R) Management Engine components\dal; C:\Program Files\intel\intel (R) Management Engine components\ipt; C:\Program Files (x86) \intel\intel (R) Management Engine components\dal; C:\Program Files (x86) \intel\intel (R) Management Engine components\ipt;d:\software\tortoisesvn\bin; C:\Program Files\microsoft\web Platform installer\; C:\Program Files (x86) \microsoft Asp.net\asp.net Web Pages\v1.0\; C:\Program Files (x86) \ Windows Kits\8.0\ Windows performance toolkit\; C:\Program Files\Microsoft SQL Server\ the\tools\binn\; C:\Program Files\Common Files\autodesk shared\; C:\Program Files (x86) \autodesk\backburner\; C:\Program Files\Microsoft SQL Server\ the\dts\binn\; C:\Program Files (x86) \microsoft SQL Server\ the\tools\binn\; C:\Program Files (x86) \microsoft SQL Server\ the\tools\binn\managementstudio\; C:\Program Files (x86) \microsoft Visual Studio10.0\common7\ide\privateassemblies\; C:\Program Files (x86) \microsoft SQL Server\ the\dts\binn\;D: \software\eclipse;;. May the, . 5: *: inpm Org.apache.coyote.AbstractProtocol init info: Initializing Protocolhandler ["http-nio-8080"] May the, . 5: *: inpm Org.apache.tomcat.util.net.NioSelectorPool getsharedselector Info: Using a shared selector forServlet write/Read May the, . 5: *: inpm Org.apache.coyote.AbstractProtocol init info: Initializing Protocolhandler ["ajp-nio-8009"] May the, . 5: *: inpm Org.apache.tomcat.util.net.NioSelectorPool getsharedselector Info: Using a shared selector forServlet write/Read May the, . 5: *: inpm Org.apache.catalina.startup.Catalina Load Info: initialization processedinch 867Ms May the, . 5: *: inpm Org.apache.catalina.core.StandardService startinternal Info: Starting service Catalina May the, . 5: *: inafternoon Org.apache.catalina.core.StandardEngine startinternal info: Starting Servlet engine:apache Tomcat/8.0. -May the, . 5: *: -pm Org.apache.jasper.servlet.TldScanner scanjars Info: At least one JAR is scanned forTLDs yet contained no TLDs. Enable Debug Logging for  ThisLogger forA complete list of JARs this were scanned but no TLDs were foundinchthem. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. May the, . 5: *: -pm Org.apache.catalina.core.StandardContext filterstart Serious: Exception starting Filter Strutsjava.lang.ClassNotFoundException:org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter at Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (Webappclassloaderbase.java:1305) at Org.apache.catalina.loader.WebappClassLoaderBase.loadClass (Webappclassloaderbase.java:1139) at Org.apache.catalina.core.DefaultInstanceManager.loadClass (Defaultinstancemanager.java:518) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged (Defaultinstancemanager.java: 499) at Org.apache.catalina.core.DefaultInstanceManager.newInstance (Defaultinstancemanager.java:118) at Org.apache.catalina.core.ApplicationFilterConfig.getFilter (Applicationfilterconfig.java:258) at Org.apache.catalina.core.ApplicationFilterConfig.<init> (Applicationfilterconfig.java: the) at Org.apache.catalina.core.StandardContext.filterStart (Standardcontext.java:4658) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5277) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java:147) at Org.apache.catalina.core.containerbase$startchild.call (Containerbase.java:1408) at Org.apache.catalina.core.containerbase$startchild.call (Containerbase.java:1398) at Java.util.concurrent.FutureTask.run (Unknown Source) at Java.util.concurrent.ThreadPoolExecutor.runWorker ( Unknown source) at Java.util.concurrent.threadpoolexecutor$worker.run (Unknown source) at Java.lang.Thread.run ( Unknown Source) May the, . 5: *: -pm Org.apache.catalina.core.StandardContext startinternal severity: One or more Filters failed to start. Full details would be foundinchThe appropriate container log file May the, . 5: *: -afternoon Org.apache.catalina.core.StandardContext startinternal serious: Context [/First ] startup failed due to previous errors May the, . 5: *: -pm Org.apache.coyote.AbstractProtocol Start Info: Starting Protocolhandler ["http-nio-8080"] May the, . 5: *: -pm Org.apache.coyote.AbstractProtocol Start Info: Starting Protocolhandler ["ajp-nio-8009"] May the, . 5: *: -pm Org.apache.catalina.startup.Catalina Start info: Server startupinch 782Ms

At this time I realized maybe the bag didn't lead in, so I daoteng a long, finally here, found the reason. This should be hooked up or not in.

You can modify this: Project Right--->properties-->deploment assembly-->add java build path entries-->next--> STRUTS2 (newly created user Library)-->finish.

OK, it's no problem to run again.

Tips:

In fact, modify the Class-path, the Web-inf Lib directory under the new folder also configured, so that Tomcat automatically help us to generate the jar package, this can also solve the problem.

Elicpse throw Notfoundexception Exception when new userlibrary import jar Package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.