cofactor
asked on
ClassNotFoundException error
I am deploying a web application in Eclipse IDE and Jboss 7 . I get this error in server console:
15:32:14,423 WARN [org.jboss.as.ee] (MSC service thread 1-6) JBAS011006: Not installing optional component org.apache.struts2.dispatc her.Filter Dispatcher due to exception: java.lang.ClassNotFoundExc eption: org.apache.struts2.dispatc her.Filter Dispatcher from [Module "deployment.SampleApp.war: main" from Service Module Loader]
at org.jboss.modules.ModuleCl assLoader. findClass( ModuleClas sLoader.ja va:190) [jboss-modules.jar:1.1.1.G A]
at org.jboss.modules.Concurre ntClassLoa der.perfor mLoadClass Unchecked( Concurrent ClassLoade r.java:468 ) [jboss-modules.jar:1.1.1.G A]
at org.
relevant web.xml entry:
<filter id="filterdispatcher">
<filter-name>Struts2</filt er-name>
<filter-class>org.apache.s truts2.dis patcher.Fi lterDispat cher</filt er-class>
<init-param>
<param-name>packages</para m-name>
<param-value>images</param -value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Struts2</filt er-name>
<url-pattern>/*</url-patte rn>
</filter-mapping>
I have already verified that web application's WEB-INF/lib folder has struts2-core-2.1.2.jar ...and there is org.apache.struts2.dispatc her.Filter Dispatcher present in this jar .
why this error then and how to fix this error ?
15:32:14,423 WARN [org.jboss.as.ee] (MSC service thread 1-6) JBAS011006: Not installing optional component org.apache.struts2.dispatc
at org.jboss.modules.ModuleCl
at org.jboss.modules.Concurre
at org.
relevant web.xml entry:
<filter id="filterdispatcher">
<filter-name>Struts2</filt
<filter-class>org.apache.s
<init-param>
<param-name>packages</para
<param-value>images</param
</init-param>
</filter>
<filter-mapping>
<filter-name>Struts2</filt
<url-pattern>/*</url-patte
</filter-mapping>
I have already verified that web application's WEB-INF/lib folder has struts2-core-2.1.2.jar ...and there is org.apache.struts2.dispatc
why this error then and how to fix this error ?
ASKER
yes..they are already there.
>>>i think xwork-2.1.1.ja is necccssary .
I have xwork-core-2.3.15.1.jar
>>>i think xwork-2.1.1.ja is necccssary .
I have xwork-core-2.3.15.1.jar
ASKER
>>>>i think FilterDispatcher is deprecated in struts2-core
This class is present in struts2-core-2.1.2.jar
error says java.lang.ClassNotFoundExc eption:org .apache.st ruts2.disp atcher.Fil terDispatc her
This class is present in struts2-core-2.1.2.jar
error says java.lang.ClassNotFoundExc
http://technojeeves.com/index.php/aliasjava1/7-jarsearch
Point the above at your WEB-INF/lib directory with parameter FilterDispatcher and tell us what you get
Point the above at your WEB-INF/lib directory with parameter FilterDispatcher and tell us what you get
ASKER
>>>I have xwork-core-2.3.15.1.jar
no, I have xwork-2.1.1.jar ..typo
no, I have xwork-2.1.1.jar ..typo
ASKER
>>>>http://technojeeves.com/index.php/aliasjava1/7-jarsearch
where is jarsearch.jar in that link ? there is no download link to download this utility in that page.
where is jarsearch.jar in that link ? there is no download link to download this utility in that page.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>>Point the above at your WEB-INF/lib directory with parameter FilterDispatcher and tell us what you get
I found the issue ....I had lib folder outside WEB-INF i.e SampleApp/lib
now I cut this lib folder and pasted into SampleApp/WEB-INF/lib ....then eclipse clean build
Now build error has come up in eclipse ...
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project SampleApp Unknown Java Problem
I found the issue ....I had lib folder outside WEB-INF i.e SampleApp/lib
now I cut this lib folder and pasted into SampleApp/WEB-INF/lib ....then eclipse clean build
Now build error has come up in eclipse ...
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project SampleApp Unknown Java Problem
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cannot find the class file for java.lang.Object.Make sure you have the jdk set correctly in the build path. Sounds like you might have removed something during your repair
ASKER
issue resolved.
it was a classpath issue.
it was a classpath issue.
1 ) struts2-core-2.1.2
2 ) xwork-2.1.1
3 ) freemarker-2.3.12
4 ) ognl-2.6.11
5 ) commons-collections-3.2
6 ) commons-logging-1.1
http://stumblingintojava.wordpress.com/2010/09/15/classnotfoundexception-filterdispatcher-struts2-in-eclipse/