File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes com.opensymphony.xwork2.util.logging.commons.CommonsLogger error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "com.opensymphony.xwork2.util.logging.commons.CommonsLogger error" Watch "com.opensymphony.xwork2.util.logging.commons.CommonsLogger error" New topic
Author

com.opensymphony.xwork2.util.logging.commons.CommonsLogger error

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 178
Hello Everyone
I am trying to implement a basic Struts2 application but i am unable to get through. Following is the error console :
The directory structure & jars in my application is given as an attachment.

web.xml file

struts.xml


[Download New Picture (24).bmp] Download

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 178
jar files are as follows :

asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
commons-beanutils-1.7.0.jar
commons-chain-1.2.jar
commons-collections-3.2.jar
commons-digester-2.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging-1.0.4.jar
commons-logging-api-1.1.jar
freemarker-2.3.15.jar
ognl-2.7.3.jar
struts2-core-2.3.15.1.jar
xwork-core-2.3.15.1.jar
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

It looks like the first error has to do with Tiles:


Are you trying to use Tiles?
I have the Struts 2.3.15.1 version handy and the list of dependencies in the example application is as follows:


I see a number of differences between this file list and the list that you specified.


[How To Ask Questions On JavaRanch]
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 178
Thanks for your reply. No i am not trying to use Tiles framework in my application. I am just making a simple application with implementation of interceptors.
I have tried using different combinations of jar files but nothing seems to be working. Currently i am getting this error in my console :

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

I have one more doubt. The tutorials available on the internet gives different directory structure. Some says that the struts.xml file should be in the source folder . Some says it should be in the classes folder ( classes folder is in the WEB-INF folder) . Which one is the right practice ? What is the difference between the two ?

Thanks Again!!!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

Tarun Oohri wrote:
I have tried using different combinations of jar files but nothing seems to be working.


There's so many variables in the dependencies, getting them right by trial and error is nearly impossible. Your best bet is copying the dependencies from the example application called "struts2-blank".

Tarun Oohri wrote:
I have one more doubt. The tutorials available on the internet gives different directory structure. Some says that the struts.xml file should be in the source folder .


It doesn't matter so long as your build puts the file in the right place (WEB-INF/classes). That said, the current convention is to put the struts.xml file in the source folder.
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 178
Ok thanks Joe... i will try doing as you said, If get stuck will get back here
Thanks Again!!!
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 178
Thanks i have tried making whole new application with your given jar files and it is working very fine. Thanks a ton, was trying to get through from past 2 days .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.opensymphony.xwork2.util.logging.commons.CommonsLogger error