Compiling servet.error wrong version of servet-api.jar

hi,
I try to compile the following servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ServletTemplate extends HttpServlet
     public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
          PrintWriter out=response.getWriter();
But I got the follwing error.
D:\apache-tomcat-6.0.14\webapps\Raju\WEB-INF\classes>javac SevletTemplate.java
SevletTemplate.java:5: class ServletTemplate is public, should be declared in a
file named ServletTemplate.java
public class ServletTemplate extends HttpServlet
^
SevletTemplate.java:5: cannot access javax.servlet.http.HttpServlet
bad class file: D:\apache-tomcat-6.0.14\lib\servlet-api.jar(javax/servlet/http/H
ttpServlet.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
public class ServletTemplate extends HttpServlet
^
2 errors
I have set CLASSPATH with servelt-api.jar.
Please help me

rajuchinu wrote:
class file has wrong version 49.0, should be 48.0You have compiled it with a newer javac version than the JRE version with which you're running it.
Check java -version and javac -version and align them both out to the same version.

Similar Messages

  • Errors on wrong version during compiling

    I'm new in JAVA, please help.
    I am using "StringBuilder" class in my java program and I notited that it needs the JDK 1.5 compiler. AFter I installed the JDK 1.5.02 and I got this compilation error when I compile my program using JBuilder 5.
    "Lottery.java": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: class file has wrong version 49.0
    Anybody out there can help?

    You can't use 1.5.0 in JB5. I think you need JB2004 at least.

  • IHtml servet error

    I have created a table using some existinf fields in hyperion 9 BI, and tried to export it in excel, but it shows the servet error.
    * Request is still being processed.
    Recommended Action: Please wait a few seconds and click on the OK button to retrieve the results.
    Html.ok_button appears

    rajuchinu wrote:
    class file has wrong version 49.0, should be 48.0You have compiled it with a newer javac version than the JRE version with which you're running it.
    Check java -version and javac -version and align them both out to the same version.

  • Error while receivind a pdu - wrong version  grrr

    Hi,
    I work on Solaris 8.0 and I installed SDK toolkit. I wrote my own subagent starting with the demoAgent into the toolkit.
    I created X.acl and X.reg
    Also, I configured into snmpdx.acl my traps exactly like I did into my X.acl
    I started snmpdx in debug mode (-d 4) and from another window I started my subagent X
    I receive this error from snmpdx agent:
    error while receiving a pdu from hostname.164: The message has a wrong version (2)SESSIONS:
    Where hostname is the name of my hostname hehe.
    Any clues?
    Thanks
    Danielle

    Some playing with
    http://java.sun.com/j2se/1.5.0/docs/api/java/io/StringReader.html
    should get you want you want.

  • Error: invalid file 'java/lang/Object.class' (wrong version: 48, expected 4

    hi all
    ive installed jdk1.4.1 from jdk1.3 .
    When i try to compile a java file i get this error.
    Error: invalid file 'java/lang/Object.class' (wrong version: 48, expected 45)
    anyone has any idea abt this.
    im stuck :( pls help.
    thanks
    Jan

    Did you uninstall 1.3 completely? Completely in the sense both jdk and jre.
    You may get this error if you use javac of one version and the rt.jar of another version.
    Sudha

  • Initialization error : class file has wrong version 49.0, should be 45.3 or

    I have Jdeveloper Base installation and JDK 1.5..the classpath and JAVA_HOME environment variables are set to the respective JDK1.5\bin folders. Even then when i try to make a web application, with a simple JSP page i get the following error :
    Initialization error: class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0 on CLASSPATH ..(followed by a long list of paths)
    pls help,
    thanks

    i have windows XP. i have tried to unset the class path...i get the same error.
    i have JDeveloper 10g 10.1.2.
    i have changed the jdev.conf file to set the Java Home to the path that contains the JDK 1.5..

  • OIM 11g install error INST-07286 mw_home has wrong version weblogic

    Hi gurus,
    I have been trying to install OIM 11g from past few days
    1. I have installed Oracle 10.2.0.5
    2.I installed weblogic 10.3.3 by downloading from Oracle website , wls1033_dev.zip
    3.I ran Rcu utlity 11.1.1.3.3
    4. I installed SOA 11.1.1.2.0.
    I am trying to upgrade soa to 11.1.1.3.0 using ofm_soa_generic_11.1.1.3.0_disk1_1of1.zip
    It gives me error
    INST-07286 Specified Oracle Middle ware home does not contain weblogic version 10.3.3 , upgrade to crrect version and then retry
    It does not let me further.
    Can some one please help /advise ?
    Thanks,
    Pandu

    Hi Gurus,
    I think I found the answer.
    I downloaded wrong version of weblogic
    I had linux 32 , and wanted weblogic 10.3.3, So I went here ( row 3 , column 2)
    http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html
    file name = wls1033_dev.zip
    well I was wrong it was not 10.3.3 or something was wrong. SOA installer did not recognise it as 10.3.3.
    Who is to blame. I wasted 3 days I hope Oracle keeps right versions in its website for download.
    I got the right one from edelievry
    http://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=11493750
    and download =
    Download      Oracle WebLogic Server 11gR1 (10.3.3) for Linux x86      V21014-01      703M
    Hope this helps some one.
    Thanks!

  • Peoplecode compile error(wrong number of parameter)

    i am getting the below error when i click on "MAINTAIN ITEMS" under the navigation "ENTERPRISE LEARNING->CATALOG" in ELM.
    "PEOPLECODE COMPLIE ERROR(WRONG NUMBER OF PARAMETER(2,16)) FOR PROGRAM LECS.COMPONENTS.CATALOGITEMCOMMON.ONEXECUTE.(2,405). A PEOPLECODE PROGRAM FOR THE SPECIFIED REFERENCE FAILED TO COMPILE CORRECTLY FOR THE INDICATED REASON" .
    Let me know if anyone has any idea on this and how to fix this.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by SQLJ Development ([email protected]):
    Mmmh. This may be a bug in the way SQLJ resolves functions/stored procedures. Could you send me your infile/.sql/.sqlj files so that I can reproduce your problem? Thanks!
    In the meantime, if everything works at runtime, you may have to ignore the errors and do your final compile offline.<HR></BLOCKQUOTE>
    I haven't forgotten. We've got a lot of code, and will try to boil down to an illustrative example when we can.
    At the moment, an off-line compile seems to work - though you might want to check my other post today :-)
    null

  • Error: Could not find DI API version 8.8 PL17 or higher.

    Hello,
    I'm trying to install the integration component to SAP B1 8.8 PL 14, and halfway through it's giving me the following error,
    "Could not find DI API version 8.8 PL 17 or higher"
    I was wondering, how do I find the Patch Level 17 for the DI API?
    PS. I tried doing what it says in the installation guide, but it didn't help update me to the required version --> "To install the latest di api version, in the select components window of the sap b1 di api installshield wizard, deselect the di api previous versions checkbox"

    Thanks Eddy,
    I installed patch level SAP B1 PL18, and was able to get the version of DI API they were requesting. Now, when I'm in step 3/5 of the event sender, I get the following error when I click "test connection":
    "Servlet B1iXcellerator is not available"
    how do I go about correcting this?

  • USMT 4 Wrong version error - MDT 2012 update 1

    Hi,
    we are in process of Migrating XP to windows 7, i have prepared a media using MDT 2012 update 1 and WAIK,
    When i started deployment using the DVD i am getting the following error message
    " The USMT Files in e:\..\..\x86\USMT4 are the wrong version. failure 9701.
    When i checked in the above mentioned path i can see the USMT 4 folder with all required files inside it and i even compared the folder with USMT4 folder of c:\program files\WAIK instllation folder and i did not find any difference between them.
    When i tested the deployment from the share folder by accessing (\\itd-mig\deploymentshare$) i was able to migrate without any error.
    Can any one help me to find out what is the error about.
    Thanks in advance.
    D. Sendil Kumar

    Ugh...
    ValidateCaptureLocation is a function in the Deployment Wizard, the wscript object is *not* available from within the MSHTA environment, so be careful.
    Instead of:
    wscript.sleep 5000
    use this instead:
    outility.SafeSleep 5000
    Is your DHCP server slow?
    Keith Garner - keithga.wordpress.com

  • SSL "SSL3_GET_RECORD:wrong version number" error using Mail

    I have set up an SSL proxy and I am trying to send a message through it to my mail server.
    The proxy's log shows a "SSL3GETRECORD:wrong version number" error whenever Mail tries to send a SSL message.
    I have been told that this error means that the proxy's certificate is using SSL3 but Mail is using a different version of SSL.
    Does anyone know what version of SSL Mail uses, or how to change it to use version 3?
    Thanks,
    James.

    That's peculiar. Sounds like you're experiencing issues communicating over SSL somewhere.
    Can you share some details with me? Feel free to ping me at andrl {at} microsoft.com
    Some things that'll help troubleshoot:
    - When and where are you seeing the error? Please provide a stack trace if you have one.
    - Is your host behind a proxy that has https disabled? Is this running on Azure or somewhere else?
    - What version of openssl, node.js, and documentdb client are you running?
    * To find the version of openssl - run "openssl version" in a terminal.
    * To find the version of node.js - run "node -v" in a terminal.
    * To find the version of documentdb client - look inside the package.json for your project.

  • Class file has wrong version 51.0,should be 49.0

    Dear All,
    I have 2 jdk in my computer, one is 1.7 and another is 1.5. I got a eclipse from my co-worker, checkout project from svn, complied it successful. However, there is error : class file has wrong version 51.0,should be 49.0 when I run it in eclipse( this is google gwt project).
    One of my colleague said I should modify one cache file under the eclipse direcotry, but he forgot the loaction of this file.
    Anyone knows?

    After modified this file : org.eclipse.jdt.launching.prefs under : <project folder>\.metadata\.plugins\org.eclipse.core.runtime\.settings,
    this problem has been fixed.
    The modification is :
    add
    <libraryLocations>\r\n<libraryLocation
    jreJar\="D\:/Java/jdk7/jre/lib/resources.jar"
    jreJavadoc\="http\://docs.oracle.com/javase/7/docs/api/"
    jreSrc\="D\:/Java/jdk7/src.zip" pkgRoot\=""/>\r\n
    to it.
    eclipse is :
    Eclipse Java EE IDE for Web Developers.
    Version: Luna Release (4.4.0)
    Build id: 20140612-0600
    my questions are :
    1. what is this file used for?
    2. when use this file?
    3. why I have to add these information to it by hand rather than generate these automatically when I set jdk in eclipse preference?
    4. why this error occur if this file doesn't has <libraryLocations> when running project(the project compile success before running)?

  • Fpga compile worker error (file not found)

    Hi
    I try to get started with the FPGA functionality of cRIO and got stuck. This seems to be no issue of the cRIO(9014) but of the Xilinx software together with NI.
    I am running an English LV 2011 ( many previuos versions installed as well) on  a German Windows XP prof. 32 bit.
    I was setting up a little project and when it came to compiling ran into errors. First I asked a colleague than I checked the NI support web site. Next time I'll contact the NI local support, but maybe some of you guys hast a faster answer before.
    1. I want to run a local compile server. I can start it from start> programs>NI> FPGA. Up pops a  question whether I want to allow others to connect remotly. The answer seems to make no difference.
        I do not see any icon in the task bar or elsewhere. SHOULD I see a process running in the task manager ? 
    2. The NI Service locator seems to be running http:/localhost:3580/dump shows a table  like attached. SHOULD I see the server running here ?
    3. If I start the Compile Worker after some seconds I get a message saying something like file not found. I think, compile server error is only a followup.
    I have already re-installed the Xilinx-Tools from the down loaded iso. (that having started yesterday night ......) .
    I attach as well the log file. (would have liked, but three is the max)
    That whole system of compilation seems to be not very stable when I see all the posts, but I have not found these specific errors.
    So I still hope someone has an idea.
    Thanks in advance
    Gabi 
    7.1 -- 2013
    CLA
    Attachments:
    ServiceLocator.jpg ‏47 KB
    XilinkNotFound.jpg ‏101 KB
    FPGA Fehler.jpg ‏44 KB

    Gabi Tillmann wrote:
    Second thoughts:
    Is it really worth using that so highly promoted FPGA  on cRIO  ???? We'll see.
    This Question is technically wrong!
    Whenever you are using the C-Series IO-Modules of the cRIO you are using the FPGA, even in ScanMode where NI RIO loads pre-defined bitfiles onto the FPGA.
    The FPGA provides you ns Timing, it gives you nativly true parallelism, you are directly programming the bahaviour of FlipFlops, LUTs, Registers and so on.
    It gives you the ability to programm hardware without the need to understand complex HDL languages.
    The cRIO is besides PXI the most flexible and powerful (908x) platform NI offers. The decision to use an FPGA or to use a cRIO should not be "because it's there".
    The decision to use an FPGA-based Platform depends on the complexity of the application, just think about custome beahviour of IOs or custom triggering.
    Christian
    P.s.: Great that you solved your compiler issue.

  • APEX Error: Current version of data in database has changed since user init

    Hi:
    APEX 4.1
    I have a page with 2 regions. The first region is built with custom SQL using the APEX APIs. I have a process the can successfully update records.
    I built the second region with the tabular form wizard. This created the multi row update process.
    I created a region button and the two process respond to that button: process for first region, then process for the second region.
    When I add data to the second region and click the region button, I get the following error:
    Current version of data in database has changed since user initiated update process. current row version identifier = "A884FA378C851786DDFE3A33709CB23C" application row version identifier = "9ED06A0F09F80F054AB781CA24CC4CBF"
    I know it has something to do with these two types of regions being on the same page, because when I create a page of just the table form, the data is updated.
    Can anyone suggest what I might be doing wrong?
    Thanks.

    Hello
    If you try update the same data from 2 places you will got this message because:
    Apex forms have locking mechanism.
    1. During fetch data to form apex calculate checksum from every items on the forms.
    2. Before update process apex again fetch data from database (in background) and calculate checksum again if checksum from point 1 is the same like this checksum APEX realy update data with new item values. If no, You will got your error (apex secure You, You realy don't know what you update).
    According this if you change data which you use in the form between 1 and 2 point you will got this "error". You can check it for example if you change data from SQL/Plus or from other form.
    Probably you forget about this locking mechanism during designe your process from APEX API <- successfully update records (maybe successful but you don't know what you updated) : )
    If I helped You please check correct or helpful :)

  • Compiled byte code from version a and version b of some external library?

    Hi,
    We are having a bit of debate in our office about compiling code against to different external libraries.
    i reckon the compiled bytecode should be the same, but there are differences of opinion so i thought i would come here and see what people thought.
    lets say i am compiling my code using jar coollib1.0,
    lets also assume i use the jar in all possible ways, extends classes, implement its interfaces, use methods and so on...
    Now cool lib comes out with coollib1.2, and our code compiles using this new jar. Is the actual compiled bytecode the same or not?
    Thanks a Mill,
    Anthony

    yes, but that resolution is done runtime, notcompile
    time.No, resolution of overloaded methods is done at
    compile time. Resolution of overridden
    methods is done at run time.and that's part of the problem.
    You're compile time resolution will now cause a method to be picked up that is the wrong one (or may even be unavailable in the new class version or at another memory address).
    Or you may have a runtime resolution built into the compiled code that when compiled against the new version would change to a compile time resolution (and maybe cause a compiler error because of that).

Maybe you are looking for

  • Score loses formating when printing to pdf in Logic Pro

    Logic Pro 9.1.6 shows score ok in page view but when it prints to pdf the formatting goes weird with notes dropping off the stave. How do I fix this so I can print a score?

  • Reporting on the Attachment List

    Hi, I would like to know how we could access and report details about the attachment list in IQ03 transaction. Regards, RK

  • Nextup voices with Captivate 7

    Hello, I have just installed the neospeech voice pack, which includes only a few voices and those too in the accented British and American English. I researched and figured that Nextup offers some voices in the Indian English accent. http://nextup.co

  • @Xref with multiple variables (dimensions) doesn't work in EPMA

    Hi all, I have an @Xref function in a Script block within the calculation manager looking like: Period=@XREF(Source_DB,Period,Account). When validating this against planning and EPMA i get an error saying: Error in:"Jan"=@XREF(EA_SALES , "Intern Inva

  • Incremental Agg

    I have a compressed and partitioned cube on 10.2.0.4 (AWM 10.2.0.3 A). I have a basic measure QC which I would like to clear based on various criteria (custom) and then repopulate. So, I have written a DML program which using the custom criteria and