• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Version problem with com.opensymphony.xwork2 49

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
Its my 4th day i am speding for this problem and i need a solution for it. I am new to struts actaully. when i compile my class file i am getting an error message says that [jar file version is xwork-2.0.1]


error: Invalid class file format: C:\Program Files\Java\jdk1.6.0\lib\com\opensym
phony\xwork2\ActionSupport.class, wrong version: 49, expected 45
userLogin.java:2: Class com.opensymphony.xwork2.ActionSupport not found in impor
t.
import com.opensymphony.xwork2.ActionSupport;
^
userLogin.java:4: Superclass com.opensymphony.xwork2.ActionSupport of class user
Login not found.
public class userLogin extends ActionSupport{
^




Hope a fast replay..
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, the XWork library almost certainly shouldn't be in the JDK library directory: it should be with your application.

Secondly, you're most likely having an issue with the JDK version used to compile something, either XWork or your code--although 45 is JDK 1.1, which I find... unlikely. 49 is JSE 5.
 
biny panackal
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i had plased my jar files in lib directory of jdk1.6.0 and i am compiling it using the same.i had mention below as my classpath.I had no refrence to jdk 1.1 in my machine

CLASSPATH=
___________
C:\Program Files\Java\jdk1.6.0\lib;C:\Program Files\Java\jdk1.6.0\lib\xwork-2.0.1.jar;E:\jboss-4.2.2.GA\server\default\deploy\strBLG.war\WEB-INF\classes\bean;C:\Program Files\Java\jdk1.6.0\lib\struts2-core-2.0.6


Hope you can find a solution
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm telling you not to put the XWork libraries in your JDK lib directory. You *can*, but you'd be the first person I've heard of ever doing that. When you deploy the app you have to deploy the libraries--so keep them in the application.

You're also missing the other libraries S2 depends on (off the top of my head there's OGNL, FreeMarker, commons-logging, and one or two more).

You're also using a relatively older version of S2--I'd highly recommend using a more recent version--there are changes between such an early version and what's being distributed now; it'd be easier if you just used a recent version.

Try putting the libraries in a reasonable location and using all the required libraries first, then take it from there. You might also want to post your webapp directory layout just to make sure it's correct.
 
biny panackal
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sory for the vary later replay. i got it working. there was reference to jdk117. it cam alogn witht the sybase installation. When i removed it form class path it worked fine. Thank you
reply
    Bookmark Topic Watch Topic
  • New Topic