Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

problem in Compiling servlets

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

When i tried compiling login.java,i got the below error.

But it is getting compiled fine if i set weblogic.jar in the classpath.

Can someone please tell me why it is not getting compiled with the servlets-api.jar.
[ October 07, 2008: Message edited by: ren_richard ]
 
Sheriff
Posts: 67732
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"ypren", please check your private messages for an important administrative matter.
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ypren welcome to Javaranch ,

Firstly use code tags for your code. Unformatted code is hard to read and results in less response for your post. You can add code tags by editing your post, to edit the post click the .

The reason you are experiencing the problem is the version incompatibility.
Which versions of Weblogic and Java are you using?
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amit for your valuable comments.

Weblogic version : 8.1
Java version : Tried using both JDK1.4 and 1.6
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"ren_richard" - first, please check your private messages again.

The following line in the error message that you get:

class file has wrong version 49.0, should be 48.0

Suggests that you are using classes that were compiled with JDK 5.0, and you are trying to use them with JDK 1.4. That will not work.

I see that you are using Tomcat 6.0. That version of Tomcat requires JDK 5.0 or newer. The JAR files in that version of Tomcat are compiled with JDK 5.0, so you will get into trouble if you try to use those JAR files on Java 1.4.

Use the JAR files that you get with Weblogic 8.1 to compile and run your application instead of those you get with Tomcat 6.0.
reply
    Bookmark Topic Watch Topic
  • New Topic