Results 1 to 6 of 6
- 03-31-2011, 08:17 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 35
- Rep Power
- 0
error cannot access class com.opensymphony.xwork2.ActionContext, wrong version
Error(1,32): cannot access class com.opensymphony.xwork2.ActionContext; class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0
Java Code:import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionSupport; import java.util.Map; public class loginAction extends ActionSupport { private String userId; private String password; public String execute() throws Exception{ if ("admin".equals(userId) && "admin".equals(password)) { Map session = ActionContext.getContext().getSession(); session.put("logged-in","true"); return SUCCESS; } else{ return ERROR; } } public String logout() throws Exception { Map session = ActionContext.getContext().getSession(); session.remove("logged-in"); return SUCCESS; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } }
- 03-31-2011, 09:03 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
You have a version of opensymphony that was compiled with a later version of the JDK than the one you are using.
ETA: Sorry, meant JRE...which could still be your JDK.
48 is 1.4 (so you're waaay old).
49 is 1.5.
- 03-31-2011, 09:58 AM #3
Member
- Join Date
- Mar 2011
- Posts
- 35
- Rep Power
- 0
thank you sir..which version should i use.any download link if you can provide for that version, I have downloaded 2-3 more versions for that jar file but same error when i add them to library
thank youLast edited by gurpreet.singh; 03-31-2011 at 10:05 AM.
- 03-31-2011, 10:11 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
No idea.
My suggestion would be to upgrade your Java.
I wouldn't be surprised if open symphony didn't bother supporting pre 1.5 anymore.
- 03-31-2011, 12:15 PM #5
Member
- Join Date
- Mar 2011
- Posts
- 35
- Rep Power
- 0
I m having latest version of java ,i am using jdeveloper 10 G
- 03-31-2011, 12:17 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
unable to import class com.opensymphony.xwork2.ActionContext not found
By gurpreet.singh in forum Advanced JavaReplies: 2Last Post: 03-29-2011, 08:02 AM -
Class Version in Serialization
By Gunas in forum New To JavaReplies: 5Last Post: 02-04-2010, 04:01 AM -
Wrong version of javac/java
By amir650 in forum EclipseReplies: 0Last Post: 09-12-2008, 11:33 PM -
Error in version of JDK and compatibility of JDK issues
By Unni in forum EclipseReplies: 1Last Post: 08-09-2007, 07:32 PM -
Error: Cannot access protected member long getTimeInMillis() in class Calendar
By cachi in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 07:53 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks