GeeCON Prague 2014*
The moose likes Struts and the fly likes Struts 2 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 error " Watch "Struts 2 error " New topic
Author

Struts 2 error

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Hi,

I was trying to run simple struts 2.0 example in RAD 7.0 with built in IBM websphere 6.1 server. This example has simple login page with simple validation and when user enters username, password it should give message like

"successfully logged in" message. When i run this example giving folowing error as in attachment (even after adding xworks 2 jar as well). Any suggestions, ideas, resources, links, sample code highly appreciated. Thanks in advance.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
looks like eror message attachment mission ......

console error message is as in attachment




[Thumbnail for console.JPG]

Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Hi,

I was researching on the issue and

I replaced ole struts core 2.0.11 jar with 2.0.14 jar as suggested in link

http://mail-archives.apache.org/mod_mbox/struts-user/200901.mbox/%3Cgjr7tg$hbo$1@ger.gmane.org%3E

by downloading jar from
apache site
http://struts.apache.org/download.cgi.

I still see the error in validation login page as in screenshot. Please advise how can i resolve this issue.



[Thumbnail for ValidationError.JPG]

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Post text.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
when i try to add console.txt i got mesage saying cannot add text file. That is reason i added screenshot.

I see there are only two xml files in this project.

a. struts.xml which looks fine to me
b. login.valication.xml which does not give any compilation error etc which looks like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
"-//OpenSymphony Group//XWork Validator 1.0.2//EN"
"http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

<validators>
<field name="username">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message>Login name is required</message>
</field-validator>
</field>
<field name="password">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message>Password is required</message>
</field-validator>
</field>
</validators>

I do not see any validation.xml at all.
I am not sure where the issue is or what it mean by
Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
Please advise
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Cut-and-paste. And please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please post the currently-deployed libraries.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Sure. I have following jars within lib directory within webcontent/web-inf in the RAD



[Thumbnail for JARS.JPG]

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please stop posting screenshots.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's hard to read, but it looks like you have two versions of XWork, and a struts.jar that shouldn't be there.

Make sure you're using the correct version of all the libraries before moving forward.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Hi,

i have removed all duplicate jars and clean and built still has similar issues. Please advise
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
Hi,

I resolved all those errors by re adjusting file location etc. And also filter issue i resolved by putting cleanupfilter at top of web.xml like





Now i am getting new error message like




like

xwork jar not there or something.
somewhere i read i need to put xalan and serilizer jar. I put them as well but no use.
Please advise on how to resolve it
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Looks like XWork is being deployed twice.
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
hi,

I removed all duplicate jars. Still same error is coming. Same application is working fine in tomcat 6.0 and does not run in RAD 7.0 (with built in ibm websphere 6.1 server). Please advise
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If it's the same error message, then there's still some duplicate jars.

Check your Java shared libs, anything on the server's classpath, and so on.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 error