Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 error

 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like eror message attachment mission ......

console error message is as in attachment

console.JPG
[Thumbnail for console.JPG]
Console Error Message
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
ValidationError.JPG
[Thumbnail for ValidationError.JPG]
Error
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post text.
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the currently-deployed libraries.
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. I have following jars within lib directory within webcontent/web-inf in the RAD
JARS.JPG
[Thumbnail for JARS.JPG]
Jars
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please stop posting screenshots.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have removed all duplicate jars and clean and built still has similar issues. Please advise
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like XWork is being deployed twice.
 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic