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

error in struts program

 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am doing a project in tsruts problem is that sometimes it gives error



please tell me what this error can be
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the version of JDK that is trying to execute your code, It might be the unsupported version of the source code
 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@ deepak thanks for your reply

i am using java EE 5.0 during struts program &


jdk1.5.0_09
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aditi agarwal wrote:i am using java EE 5.0 during struts program &
jdk1.5.0_09


If you are using eclipse check the "Java Compiler Compliance level", check the version JDK libraries, Please make sure that JDK supports your source code, if any of the predefnied class files imported are not supported with JDK you use then you will get this error
 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using MyEclipse 8.5 please guide me for that

thnak you
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure for MyEclipse but in Eclipse i do this way,Right click on the project, select Properties,then select Java Compiler from the list shown , check the version the compiler uses. Then Click java build path, check whether the required JDK library is added.
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check whether all your predfined classes are supported by the current version you use.
 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@deepak thanks for your replie

i have checked the same way you have told in eclipse

my java compiler level is 1.4 &

in java build path all my J2EE 1.4 libraries are already added

now please tell me how to check that my all predefined classes are supported by current version that i use ?

thank you
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just change the compiler level to 1.5,Remove your j2ee 1.4 library and add JDK 1.5 , hope that might resolve the issue..

I am not sure whether a perfect tool exists to find out the JDK version of a class file but you can code for this

 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I think this is related to something like class being compiled with the JDK that has higher version(say 1.6) than the one you are trying to run the class on(say 1.5).
Backward compatibility is always there so class compiled using 1.4 as in your case should run fine on the Java EE 5.

What version of Struts you are using? I am not sure if Struts 2 can work with JDK 1.4 as I havent worked with it yet.

Regards,
amit
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Aditi Any improvement?
 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope deepak no improvement nothing can be done in this case tll now
 
Deepakkumar Devarajan
Ranch Hand
Posts: 54
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check the versions of your predefined classes? change java compiler level to 1.5 and add JDK 1.5 to build path, remove 1.4.
 
Aditi agarwal
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have done every possible change which i can try
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic