First servlet attempt in J2EE

Hi
A very very simple question for you. I'm using the deployment tool, I've created a new application, created a new WAR and added my servlet. I'm trying to get it working locally (Win98), and the server is running.
When I click deploy, the first thing it wants is an existing Deployment Settings File Name, which it proposes as D:\progs\j2sdkee1.4\public_html\test5\test5.ear.xml
But test5.ear.xml doesn't exist. So what should I do? Have I missed a step? I'm getting all kinds of deployment errors as a result.
Another thread suggested (to another enquirer) they should choose File, Deployment Settings, Create New File, but whenever I try that I get Suns J2EE Reference Implementation in the left hand tree display, but my ear and war are greyed and I can't deploy any more.
Cheers
J

I got it fixed. I ended up getting lots of Corba errors, and I closed the whole thing down, brought it up again, and it worked. Halleluyah :-)
J

Similar Messages

  • Help required in First Servlet

    Hey Guys.....I have read the above thread all posts and as this is also my first Servlet so I am also getting
    java.lang.ClassNotFoundException: servlets.HelloWorldServlet
    Now in my Apache tomcat folder C:\apache-tomcat-6.0.16\webapps\ServletExamples I have the WEB-INF folder.....which has the web.xml....
    Web.xml is something like this...
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
         <servlet>
              <servlet-name>HelloWorldServlet</servlet-name>
              <servlet-class>servlets.HelloWorldServlet</servlet-class>
         </servlet>
         <servlet>
              <servlet-name>LoginServlet</servlet-name>
              <servlet-class>servlets.LoginServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>HelloWorldServlet</servlet-name>
              <url-pattern>/HelloWorldServlet</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>LoginServlet</servlet-name>
              <url-pattern>/LoginServlet</url-pattern>
         </servlet-mapping>
    </web-app>The HelloWorldServlet.java is
    package servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class HelloWorldServlet extends HttpServlet{
         public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
              PrintWriter pw = response.getWriter();
              pw.println("<html>");
              pw.println("<head>");
              pw.println("</head>");
              pw.println("<body>");
              pw.println("<h3>Hello World as a Servlet</h3>");
              pw.println("</body>");
              pw.println("</html>");
    }and this is what I am writing on the url......
    http://localhost:8080/ServletExamples/HelloWorldServlet
    and I am assuming that the problem is coming in the <servlet-class> in the fully qualified name....
    So I decided to make a classes folder in the WEB-INF folder and copy all my .class files and .java files in it.....
    after this I am still getting the same error....
    java.lang.ClassNotFoundException: servlets.HelloWorldServlet
    and when I refresh it again it gives me a different error....which is
    type Status report
    message Servlet HelloWorldServlet is not available
    description The requested resource (Servlet HelloWorldServlet is not available) is not available.
    So how can anybody help me out in starting my carrier in the servlets...
    Thanks in advance
    Regards
    ISI

    Please can anyone suggest any good tutorials which can help me in this.....I am following this one but I am unable to overcome this error...
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    Regards
    ISI

  • So, I have just about had it. For nine days now,  I have valiantly tried to move my library to an external drive. At first, I attempted to move it to my 2TB Time capsule, iTunes didn't like its new home though and moved home without telling me.

    So, I have just about had it. For nine days now,  I have valiantly tried to move my library to an external drive. At first, I attempted to move it to my 2TB Time capsule. iTunes didn't like its new home though and moved home without telling me. So then there were two libraries. I meshed them back together reluctantly and iTunes in a silent revolt, absolutely refused to use its own 'Keep Library Organized' criteria and may as well have thrown my music against the wall. Seriously, my 5 year old nephew has his computer files better managed. Then I bought a 3TB Time Capsule and you may ask yourself why??? Well, iTunes doubled in size- although when I ran apps that are designed to find duplicate iTunes files, it deleted the music I actually bought from iTunes. So then I watched as iTunes got it back. How you ask; I run a MacBook Air, iMac and Mac mini in my house - as soon as one powered up it hit the net like a sailor on leave and re-downloaded it all without abandon. I tried to keep the libraries separate, no success there. I tried to keep them unified; iTunes response was to ask me if I wanted to join iTunes Match every time I logged on to my computer and on any computer - my iTunes match song number has been as high as 24,367 and as low as 11,112. And I can't simply refuse iTunes. No one refuses iTunes. Refusal to allow iTunes Match to run through all 24000 songs again was to revoke my rights to the songs that were once part of my library. If I took a long time to decide or was visibly impatient while iTunes did its little 3 hour scan it would arbitrarily decide that music I bought from iTunes was ineligible for iTunes Match. How could that possibly be??? I am missing music, or at least iTunes tells me so by showing me that lovely exclamation point. I have tried backing up my computer to do a full system restore and start all over. Time Capsule claims I have 979 GB of data and takes its sweet time to even back up one gig (about 18 minutes) even though I can transfer files to my Time Capsule at about 1 GB every 40 seconds. I guess though performing back-ups are somewhat like government jobs; it will get done, when it gets done. The back up requirement of 979 GB is surprising though, my Mac claims that I currently occupy just about 25% of my 2TB drive. The discrepancy, who knows, but I think the solution lies somewhere in iTunes. But maybe iPhoto. But that is for another time.

    After admittedly only a quick read the one thing you don't say is how you are trying to make this move.  Most people with moving library issues do it the wrong way.  Plenty of web sites tell you how to do it the wrong way.
    If the iTunes application is started before the drive with the library is fully mounted and awake iTunes will revert back to the internal drive.

  • Passivation Tables (PS_TXN) Not Created on First Passivation Attempt

    Fusion Middleware Version: 11.1.1.5
    WebLogic: 10.3.5.0
    JDeveloper Build: Build JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
    Project: Custom WebCenter Portal Application integrated with custom ADF task flows.
    Hi
    We are trying to use the jbo.server.internal_connection property in the Business Components layer to change the database to which passivated application module data is written (PS_TXN table).
    We have set the property to a valid data source using the JNDI name. The entry in the bc4j.xcfg file is as follows:
    <Database jbo.locking.mode="optimistic" jbo.server.internal_connection="jdbc/mds/CustomPortalDS"/>
    After making the change, when I run the application through my integrated WLS instance within JDeveloper, the first instance to passivate its data results in the necessary passivation database objects being created in the target instance (PS_TXN, PS_TXN_SEQ & PCOLL_CONTROL).
    If however we then remove those objects from the target instance and run the application on our standalong WebLogic server we get an error accessing the application because the BC framework cannot find the PS_TXN table to write to. The following error appears in the log files:
    Caused by: oracle.jbo.PCollException: JBO-28030: Could not insert row into table PS_TXN, collection id 10, persistent id 1
         at oracle.jbo.PCollException.throwException(PCollException.java:36)
         at oracle.jbo.pcoll.OraclePersistManager.insert(OraclePersistManager.java:1901)
         at oracle.jbo.pcoll.PCollNode.passivateElem(PCollNode.java:564)
         at oracle.jbo.pcoll.PCollNode.passivate(PCollNode.java:688)
         at oracle.jbo.pcoll.PCollNode.passivateBranch(PCollNode.java:647)
         at oracle.jbo.pcoll.PCollection.passivate(PCollection.java:465)
         at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:294)
         at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:267)
         at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:5975)
         at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5835)
         at oracle.jbo.server.ApplicationModuleImpl.passivateStateForUndo(ApplicationModuleImpl.java:8857)
         at oracle.adf.model.bc4j.DCJboDataControl.createSavepoint(DCJboDataControl.java:3180)
         at oracle.adf.model.dcframe.LocalTransactionHandler.createSavepoint(LocalTransactionHandler.java:75)
         at oracle.adf.model.dcframe.DataControlFrameImpl.createSavepoint(DataControlFrameImpl.java:797)
         at oracle.adfinternal.controller.util.model.DCFrameImpl.createSavepoint(DCFrameImpl.java:31)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.initializeModel(TaskFlowCallActivityLogic.java:1015)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.enterTaskFlow(TaskFlowCallActivityLogic.java:615)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.invokeLocalTaskFlow(TaskFlowCallActivityLogic.java:337)
         at oracle.adfinternal.controller.activity.TaskFlowCallActivityLogic.invokeTaskFlow(TaskFlowCallActivityLogic.java:229)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.invokeTaskFlow(ControlFlowEngine.java:217)
         at oracle.adfinternal.controller.state.ChildViewPortContextImpl.invokeTaskFlow(ChildViewPortContextImpl.java:104)
         at oracle.adfinternal.controller.state.ControllerState.createChildViewPort(ControllerState.java:1380)
         at oracle.adfinternal.controller.ControllerContextImpl.createChildViewPort(ControllerContextImpl.java:78)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.createRegionViewPortContext(DCTaskFlowBinding.java:440)
         at oracle.adf.controller.internal.binding.DCTaskFlowBinding.getViewPort(DCTaskFlowBinding.java:358)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.doProcessBeginRegion(TaskFlowRegionModel.java:164)
         at oracle.adf.controller.internal.binding.TaskFlowRegionModel.processBeginRegion(TaskFlowRegionModel.java:112)
         at oracle.adf.view.rich.component.fragment.UIXRegion$RegionContextChange.doChangeImpl(UIXRegion.java:1199)
         at oracle.adf.view.rich.context.DoableContextChange.doChange(DoableContextChange.java:91)
         at oracle.adf.view.rich.component.fragment.UIXRegion._beginInterruptibleRegion(UIXRegion.java:693)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:498)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:422)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         ... 122 more
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
         at oracle.jbo.pcoll.OraclePersistManager.insert(OraclePersistManager.java:1887)
         ... 184 more
    My understanding is that it is the adfbc_create_statesnapshottables.sql script that creates these database objects. The description in the file is as follows:
    "By default, BC4J will create these objects in the schema of the internal database user the first time that the application makes a passivation request. This script is intended for advanced users who require more control over the creation and naming of these objects."
    My question then is why is this not happening when the application is run on the standalone WebLogic server but is happening when run on the integrated JDevelopers WLS?
    Any help greatly appreciated.

    Hi
    Thanks for your reply.
    We have already considered the points in the referenced links.
    The correct privileges exist for the schema used by the data source and we don't see any messages other than ORA-00942.
    We have run a 'Finest' trace on package oracle.jbo.* and there is no further information. I have pasted the diagnostic output from the first passivation attempt below:
    [SRC_METHOD: passivate] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.Serializer] <AM MomVer="0">[[
    <<PASSIVATION DATA FOLLOWS NOT PASTED INTO THREAD>>
    </AM>
    [SRC_METHOD: insert] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.pcoll.OraclePersistManager] [2226] **insert** id=1, parid=-1, collid=10, keyArr.len=-1, cont.len=981
    [SRC_METHOD: insert] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.pcoll.OraclePersistManager] [2227] stmt: insert into "PS_TXN" values (:1, :2, :3, :4, sysdate)
    [SRC_METHOD: getInternalConnection] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.DBTransactionImpl] [2228] Getting a connection for internal use...
    [SRC_METHOD: getInternalConnection] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.DBTransactionImpl] [2229] Creating internal connection...
    [ADF_MESSAGE_ACTION_NAME: Establish database connection] [APP: XXJLPPartnerLinkApp#V2.0] [ADF_MESSAGE_STATUS: begin] [ADF_MESSAGE_ACTION_DESC: ] [URI: /jlpportal/faces/home] [ADF_MESSAGE_CONTEXT_DATA: Is datasource?=true;#;Connection identifier=weblogic.jdbc.common.internal.RmiDataSource@2b002b00] Establish database connection
    [SRC_METHOD: establishNewConnection] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.DBTransactionImpl] [2230] Trying connection: DataSource='weblogic.jdbc.common.internal.RmiDataSource@2b002b00'...
    [ADF_MESSAGE_ACTION_NAME: Establish database connection] [APP: XXJLPPartnerLinkApp#V2.0] [ADF_MESSAGE_STATUS: add_context_data] [URI: /jlpportal/faces/home] [ADF_MESSAGE_CONTEXT_DATA: Success?=true] Establish database connection
    [SRC_METHOD: establishNewConnection] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.DBTransactionImpl] [2231] Before getNativeJdbcConnection='weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection
    [SRC_METHOD: establishNewConnection] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.server.DBTransactionImpl] [2232] After getNativeJdbcConnection='weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection
    [SRC_METHOD: insert] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.pcoll.OraclePersistManager] [2233] **insert** error, sqlStmt=null
    [SRC_METHOD: insert] [URI: /jlpportal/faces/home] [SRC_CLASS: oracle.jbo.pcoll.OraclePersistManager] [2234] java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

  • First call attempt fails with 12000; reason="Routes available for this request but no available gateway at this point"

    We've installed a new Audiocodes Mediant 1000B gateway for our customer.  They only have about 6 users enabled for Enterprise voice and using Lync for all calls.  They have an intermittent problem whereby the first call attempt to a number on the
    PSTN fails with 12000; reason="Routes available for this request but no available gateway at this point".  There is only one PSTN gateway installed.  All routes point to this gateway.  What I found initially is that the calls
    were failing after 10 seconds which is the default "failovertimeout" in the OutboundRouting.exe.config.  I found this post http://voipnorm.blogspot.co.uk/2012/06/lync-2010-gateway-timeout-call-failures.html and
    changed the value to 20 seconds.  Subsequent failures failed after 20 seconds (the new value).  The interesting thing is that the second attempt even a couple of seconds later succeeds.  My Lync server event log has 46046 "A call to a PSTN
    number failed due to non availability of gateways." for the failed call and 46047 "A PBX gateway is now responding to requests after some failures." for the successful call moments later.
    My environment is Lync 2010.  A single enterprise edition Front End with collocated mediation.  The server is virtual and in a different physical location to the gateway.  The two sites are connected via a LES1000.  The RTT between the
    sites is very low so it isn't necessarily networking.
    In the Syslog output on the Audiocodes we don't see the call even reach the gateway.  It's likely that Lync has simply marked the gateway as down and doesn't route the first call.  Then it wakes up and marks it as up and routes the next call.
    Update wise I'm on 4.0.7577.183, 199 and 217 for those that are up to date and the only components that are behind say that 223 is available.  Those being Core Components, Lync Server, Conferencing Server and Web Components.
    As I said, this is intermittent, apparently doesn't happen for every user (which I don't buy), but is easily replicated on request.
    I definitely think changing the failovertimeout value has reduced the number of failures.  But realistically I don't want users sitting there for 20 seconds before their call fails.  Or 19 seconds for the call to route.
    I've found a few posts on this and similar issues.  I don't get the 25051 or 25052 errors.
    Any help gratefully appreciated.
    Regards
    Randy Chapman
    Best Regards Randy Chapman

    Try to change the value of Failovertimeout to 1000.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Problem with first servlet

    Hi
    I am trying to run my first servlet HelloWorld
    I have my servlet in the directory
    Tomcat 4.1/webapps/test/web-inf/classes/HelloWorld.class
    and my web.xml file in the directory
    Tomcat 4.1/webapps/test/web-inf/web.xml
    contains the following lines
    <web-app>
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>HelloWorld</servlet-name>
    <url-pattern>/HelloWorld</url-pattern>
    </web-app>
    I also have changed the conf/server.xml file for the context as follows
         <Context path="/test" docBase="test" debug="0"
    reloadable="true" crossContext="true">
    and now when I try http://localhost:8080/test/servlet/HelloWorld
    Still I am getting the error status 404 The requested resource /test/servlet/HelloWorld not found.
    What am I doing wrong ????
    When I put my HelloWorld.class file in the webapps/examples directory it runs fine.WHy is it so ?
    Also for the above I have not started my tomcat server since I tried to run my HelloWorld from examples using http://localhost:8080/examples/servlet/HelloWorld it works perfect so I think I do not need to start server.
    Please reply me

    Try fully qualifying your servlet-class so that it reads something like this: <servlet-class>examples.servlet.HelloWorld</servlet-class>

  • My First servlet error-HTTP Status 500

    Recently Installed apache-tomcat-5.5.27 ,I followed one documentation when i googled for a while like is here [http://linux-sxs.org/internet_serving/c292.html]
    when i try to access from web-browser ,it came up with errors like
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    root cause
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.Here is the directory structure
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/classes
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/libI placed web.xml file in WEB-INF directory and HelloWorld.class in WEB-INF/classes and MyFirst.xml in /opt/apache-tomcat-5.5.27/conf/Catalina/localhost/
    the files typically contains
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
            <servlet-name>HelloWorld</servlet-name>
            <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
            <servlet-name>HelloWorld</servlet-name>
            <url-pattern>/HelloWorld</url-pattern>
    </servlet-mapping>
    </web-app>
    HelloWorld.java
    // Filename : HelloWorld.java                                                                                                                               
    // Description : This servlet merely says hello!                                                                                                            
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
        public void doGet ( HttpServletRequest request, HttpServletResponse response )
            throws ServletException, IOException    {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>Hello, Cruel World!</title></head>");
            out.println("<body>");
            out.println("<h1>Hello, Cruel World !</h1>");
            out.println("This is my first servlet.");
            out.println("</body>");
        }// end doGet                                                                                                                                           
    }///:~
    MyFirst.xml
    <!-- MyFirst Context -->
    <Context path="/MyFirst" docBase="MyFirst" debug="0" reloadable="true"/>anybody have idea about this error...

    miriyalasrinivas wrote:
    java.lang.UnsupportedClassVersionError: Bad version number in .class fileThe class is compiled with a JDK version which is newer than the JRE version used to run the class. To solve this, just clean up your Java environment and align the versions. You can get version information of the Java compiler using javac -version and of the Java runtime using java -version.
    That said, this problem is actually not related to servlets. You didn't get a root exception of javax.servlet package. You just got a root exception of java.lang package, which basically makes it a Java SE problem. Questions related to those actually belongs in the 'New to Java' forum.

  • Running my first Servlet on TOMCAT - 10 duke dollars

    I am very new to Servlets. I am not creating a seperate context on Tomcat root to load the Servlet.
    I did the automatic installation of Tomcat 4.0.3 on windows NT available on <jakarta.apache.org/tomcat>
    I am going to load my servlet class in c:\<Tomcat Home>\Web Apps\Root\Web-inf\Classes
    But under my <Root\Web-inf> there is NO <Classes> subdirectory. So I created one and copied my class file there.
    Then on the browser, I typed
    http://127.0.0.1:8080/servlet/myFirstServlet
    Then I am getting the 404 Http Not found error.
    Error in detail is "/servlet/myFirstServlet" not found
    Can someone PLEASE help me ASAP.

    NOTE: I already sent this message under different heading.. I am sending this message under this for Mr/Mrs w234 ....
    Please let me know....
    I wrote my first Servlet with Forms, for a registration system. I have my input HTML file first.html and my java class (first.java) which processes the form and spits out the same information thru' the servlet.
    I added the line below in my server.xml in /conf directory, Forms is the subdirectory under webapps
    <Context path="/Forms" docBase="Forms" debug="0"
    reloadable="true" crossContext="true" />
    I created the web.xml as follows in c:<Tomcat home>\webapps\Forms\web-inf\web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>first</servlet-name>
    <servlet-class>first</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>first</servlet-name>
    <url-pattern>/first</url-pattern>
    </servlet-mapping>
    </web-app>
    Note : My HTML file name and class files name both are same.. Also can someone tell me how to change web.xml for different HTML file name and class name ? Or do we have to include HTML file here in web.xml ?
    I am confused !!
    Then in the browser I typed
    http://127.0.0.1:8080/Forms/servlet/first.html
    I am getting this error
    Apache Tomcat/4.0.3 - HTTP Status 404 - /first.html
    type Status report
    message /first.html
    description The requested resource (/first.html) is not available.
    Can you please HELP ...
    Still I have not figure out how to give a couple of Duke s ? Please help me ...

  • Can't compile my first servlet program

    hi guys,
    there are some problems with compiling the first servlet program(helloservlet).
    the error is following
    C:\SERVLET-CODE\hello1>javac HelloServlet.java
    HelloServlet.java:4: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    HelloServlet.java:5: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    HelloServlet.java:15: cannot resolve symbol
    symbol : class HttpServlet
    location: class HelloServlet
    public class HelloServlet extends HttpServlet {
    ^
    HelloServlet.java:16: cannot resolve symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    ^
    HelloServlet.java:17: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    ^
    HelloServlet.java:18: cannot resolve symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    ^
    6 errors
    i don't know why it can not find the import java.*
    and i already set up the classpath
    and my code is
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    /** Simple servlet used to test server.
    * <P>
    * Taken from More Servlets and JavaServer Pages
    * from Prentice Hall and Sun Microsystems Press,
    * http://www.moreservlets.com/.
    * &copy; 2002 Marty Hall; may be freely used or adapted.
    public class HelloServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1>Hello</H1>\n" +
    "</BODY></HTML>");
    please help me out of it...
    thank you all...

    hi man,
    thanks for the classpath, and i already did it in system environment.
    but it can not work either...
    do i really have to download the API, so where i have to put it after i download it...

  • Fail to run my first Servlet with Sun ONE Studio 4 Update 1 (+ bi Tomcat)

    Hello !
    I failed to run my first Servlet with Sun ONE Studio 4 update 1 ( with built in Tomcat)
    I think that I followed most of the online instructions,
    so I successfully run a JSP file,
    but I failed with my first servlet:
    The error message is:
    "Standard Wrapper[:MyServlet]: Marking servlet MyServlet as unavailable
    javax.servlet.ServletException: Wrapper cannot find servlet class com.hemmerling.myservlet.MyServlet
    or a class it depends on
    So please don�t ask me for the code of the servlett ( simply taken from a book),
    but tell me why the one-and-only servlett was not found. what might I have done wrong, if I did everything I did to run the JSP file, too ?
    Of couse I copied the file into the "Classes" directory of the Webmodule ( WEB-INF ) and "processed" it, so that I was able to execute it.
    Any suggestions ?
    Tia
    Sincerely
    Rolf

    Tough to say, but try:
    1. Put the servlet in a package. If you're using the default package (class file in WEB-INF/classes directory, then Tomcat may not find it.
    2. Check out web.xml to ensure the <servlet> and <servlet-mapping> entries are correct.
    3. Make the servlet as simple as possible so you're sure that it is the servlet itself that cannot be found and not some other class that it uses.
    Good Luck

  • Trying to run my first servlet through Eclipse + XAMPP

    I'm trying to run my first servlet through eclipse, I'm using XAMPP + Tomcat add-on as my webserver. How do I even try and compile my servlet? I've added the external jar Servlet-api.jar to my project as stated in here, http://www.theserverside.com/discussions/thread.tss?thread_id=37924
    But eclipse wouldn't compile it, because there just isn't a main() in my servlet program..
    Do I need to install the WPT plugin for eclipse? I'm guessing I'm not setting my CLASSPATH correctly - Do I need to set it up manually?

    Nevermind, there were lots of Issues going the XAMPP way, so I just installed Tomcat separately and all is fine now.
    I used instructions from http://www.scribd.com/doc/495993/Installing-Apache-Tomcat-6-and-Using-It-With-Eclipse and it was a walk-in-the-park..

  • Need help getting first servlet to run in tomcat

    hi,
    i've complied my first servlet ok, using tomcat as server, problem is it can't find it. i up the class file under Web-inf/myApp under tomcat directory, typed:
    http://localhost:8080/myApp/TestingServlet
    in the url but it can't locate it. also i did start tomcat before going to url. can someone tell me what am i missing?
    Thank you.

    ok i got it to run but i had to create a classes dir under web-inf and had to use the url:
    http://localhost:8080/myApp/servlet/TestingServlet
    but why the servlet in the url, i don't have a servlet dir, does tomcat map classes dir to servlet dir?
    Thank you.

  • Servlet calling another servlet in diff J2EE app

    Hi.
    Can a servlet load another servlet in different J2EE application ?
    If so, could you show me how ?
    Code example would be much appreicated.
    Thanks.

    Call the other servlet's absolute url thro' urlconnection.
    URL url=new URL("http://server:port/servlet/otherservlet");
    InputStream in=url.openConnection();
    Other servlet will be loaded. Read response if you want to.

  • Ipad mini going disabled on first correct attempt at passcode. Has happened three times. had to restore with iTunes each time. Is this one a dud?

    ipad mini going disabled on first correct attempt at passcode. Has happened three times. had to restore with iTunes each time. Is this one a dud?

    Does the screen respond properly to your typing?  If it handles other typing correctly, leave the passcode off and see if it wakes and works properly.
    If it has problems with recognition of typing, take it to an Apple store genius bar and have the techs check it out.

  • Not able to run my first Servlet..... 404 error!!!

    Hi,
    I am new to Java.
    I am trying to create a small servlet application. I am using Tomcat 5.5 server and eclipse for this.
    I have first writtern a HTML form which on submission is redirected to a servlet that displays the information submitted. but i am not able to evn open the html file through browser, i am getting 404 error.
    My html codes and Servlet codes are inside the htmlform package...
    When i type http://localhost:8080/htmlform/form.html i am gettig 404 error... Also let me know if any thing is wrong with the codes...
    Here is my code...
    form.html
    <html>
    <head>
    <title> This is a HTML page </title>
    </head>
    <body>
    <p><h3>This page displays a submission form</h3></p>
    <form method="GET" action="/htmlform/LoginServlet">
    <p> USERNAME: <input type="text" name="username"/> </p>
    <p> PASSWORD: <input type="password" name="password" /> </p>
    <p> <input type="submit" value="Press Me" name="submit"/> </p>
    </form>
    </body>
    </html>
    LoginServlet.java
    package htmlform;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
         private static final long serialVersionUID = 1L;
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    pw.println("<html><head><title>This is the out put page</title></head");
    pw.println("<body><h2>If you can see this page then your form is cleanly processed</h2><br>");
    pw.println("<h2>Congratulations!!!</h2>");
    pw.println("<p>Your user name is: "+ username+ "</p>");
    pw.println("<p>Your password is: "+ password + "</p>");
    pw.println("<br></body></html>");
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"> -->
    <web-app>
    <servlet>
    <servlet-name>Login</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/login</url-pattern>
    </servlet-mapping>
    </web-app>
    Thanks in advance

    you might have other problems, but I think the action attribute in your HTML form is incorrect.
    You have:
    <form method="GET" action="/htmlform/LoginServlet">Your web.xml says:
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/login</url-pattern>
    </servlet-mapping>So I think you should change the action like this:
    <form method="GET" action="/htmlform/login">Your servlet's not in a package, and you might not be deploying it correctly (god forbid you added this to /ROOT), but try that first.
    %

Maybe you are looking for

  • ~messageline.dim always 1, even when more than 1 message generated in ABAP

    Can anyone help explain how the ITS ~messageline gets populated. In my transaction I am creating a number of warning messages. However, the ITS is only displaying 1 each time. I am using the following code, but ~messageline.dim is always 1. `repeat w

  • PSE 12: error code u44m1p7 downloading the camera raw 6.7 update [was:Walt]

    I just purchased pse 12 and I get a error code u44m1p7 when trying to download the camera raw 6.7 update Walt

  • Are there any plans to add rowing machine data to health app

    The health app is definitely good if your a runner or cyclist, however it doesn't seem to cover logging gym workout data. Does Apple have any plans to add metrics to the health app for these. In particular I use a rowing machine and it would be great

  • Help! Calendar for 8130

    I am trying to view an appointment on my calendar that is recurring to edit it, but when I click on it a pop up comes up that says "Appointment deleted externally.  changes will be lost and the viewer closed".  Then you hit OK. Does anyone know what

  • Windows 7 User Startup

    We have 2 PC's that need to run only one Web Site Link for all Students.  We have a default user name and login profile for the PC's, but we would like to perform the following: Bypass the Login and go directly to IE opening the Web Site Link and all