This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I want to know where is the problem .. is there any setting that i hv missed?? on my local host i m using jdk 1.5 and on server its 1.6 .. is it bcoz of that??
Since it's small, can you post the code to the servlet, your web.xml file, and the exact URL that you're using when trying to access this servlet? Also, can you tell us exactly where you've placed the servlet's class file?
You're probably using a higher Java version on you dev machine than on your prod machine.
Ayanik Sil
Greenhorn
Joined: Sep 23, 2007
Posts: 27
posted
0
Here might be one solution... although i am also new to servlets. in the request dispatcher code,u gave the name of html file as index.fbml,not index.html Please check.
ava.lang.UnsupportedClassVersionError: facebook (Unsupported major.minor version 49.0)
This is probably it.
This error occurs when you compile one of your classes with a newer version of javac than the version of the JVM you are using at run time. Either recompile with the same version as the one on your public server or use the -source switch in javac to specify that this class is to be compatible with the version of the JVM on your server.
Poonam Gulve
Greenhorn
Joined: Aug 13, 2007
Posts: 16
posted
0
ok sir i'll check it.. right now my server is not getting connected.. But i compiled my java file in jdk 1.5 version and on server its jdk 1.6 .. so i think that shudnt give any problem.. but still i'll check it ..
Poonam Gulve
Greenhorn
Joined: Aug 13, 2007
Posts: 16
posted
0
Hello sir, its working now.. thanks a lot .. i recompiled the java file on server..
but i dont understand one thing that my colleague has written his own servlet, compiled in 1.5 jdk, uploaded it onthe same server with jdk 1.6 and running it just fine .. he didnt requir any recompiling of the files .. what might be the reason ??
anyways thanks a lot again ..
Mladen Grabowsky
Greenhorn
Joined: Sep 19, 2007
Posts: 29
posted
0
Originally posted by David O'Meara: "maki", Welcome to the JavaRanch.
We're a friendly group, but we do require members to have valid display names.
Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.
Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning
thanks, Dave
Hi Dave,
i changed my nick to my real name, sorry about that.
Regards,
Mladen
Akshay Kiran
Ranch Hand
Joined: Aug 18, 2005
Posts: 220
posted
0
Originally posted by Poonam Gulve: Hello sir, its working now.. thanks a lot .. i recompiled the java file on server..
but i dont understand one thing that my colleague has written his own servlet, compiled in 1.5 jdk, uploaded it onthe same server with jdk 1.6 and running it just fine .. he didnt requir any recompiling of the files .. what might be the reason ??
anyways thanks a lot again ..
I think you got it wrong. The target runtime (on the server) is a lower version than that of the compiler. You say it is 1.5 in dev and 1.6 in prod, but this cannot be possible as generated classfiles are always forward compatible. You must be missing something... As for the other question- assume you're working on jdk 1.5, but want to run it on a 1.4 jvm, all you need to do is
Note that this will essentially disallow you to use any features that are not available to the target runtime.
Originally posted by Ben Souther:
This is probably it.
This error occurs when you compile one of your classes with a newer version of javac than the version of the JVM you are using at run time. Either recompile with the same version as the one on your public server or use the -source switch in javac to specify that this class is to be compatible with the version of the JVM on your server.
Ben, I think the correct flag would be "-target" and not "-source"
regards, Akshay
"It's not enough that we do our best; sometimes we have to do<br />what's required."<br /> <br />-- Sir Winston Churchill