Results 1 to 2 of 2
  1. #1
    aks_1 is offline Member
    Join Date
    Apr 2010
    Posts
    16
    Rep Power
    0

    Default Error while deploying WAR file

    i am trying to deploy a .war file on my local server using sun microsystem's application server. the problem i am having is when i try to launch it in the address bar as:
    http://localhost:8080/HelloServlet/
    it shows the directory listing for/ text on the screen.
    but when i insert /hello ( "<url-pattern>/hello</url-pattern>") like this: http://localhost:8080/HelloServlet/hello,
    shows error---
    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.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:189)
    com.sun.enterprise.web.connector.grizzly.Processor Task.doProcess(ProcessorTask.java:604)
    com.sun.enterprise.web.connector.grizzly.Processor Task.process(ProcessorTask.java:475)
    com.sun.enterprise.web.connector.grizzly.ReadTask. executeProcessorTask(ReadTask.java:371)
    com.sun.enterprise.web.connector.grizzly.ReadTask. doTask(ReadTask.java:264)
    com.sun.enterprise.web.connector.grizzly.TaskBase. run(TaskBase.java:281)
    com.sun.enterprise.web.connector.grizzly.WorkerThr ead.run(WorkerThread.java:83)

    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(Secure ClassLoader.java:124)
    org.apache.catalina.loader.WebappClassLoader.findC lassInternal(WebappClassLoader.java:1798)
    org.apache.catalina.loader.WebappClassLoader.findC lass(WebappClassLoader.java:910)
    org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1375)
    org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1239)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:189)
    com.sun.enterprise.web.connector.grizzly.Processor Task.doProcess(ProcessorTask.java:604)
    com.sun.enterprise.web.connector.grizzly.Processor Task.process(ProcessorTask.java:475)
    com.sun.enterprise.web.connector.grizzly.ReadTask. executeProcessorTask(ReadTask.java:371)
    com.sun.enterprise.web.connector.grizzly.ReadTask. doTask(ReadTask.java:264)
    com.sun.enterprise.web.connector.grizzly.TaskBase. run(TaskBase.java:281)
    com.sun.enterprise.web.connector.grizzly.WorkerThr ead.run(WorkerThread.java:83)

    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
    ===============================================
    any help would be appreciated.
    Last edited by aks_1; 04-27-2010 at 12:24 PM.

  2. #2
    aks_1 is offline Member
    Join Date
    Apr 2010
    Posts
    16
    Rep Power
    0

    Default

    the problem is the version
    the jdk and jre version, if they are not same on the machine then java.lang.UnsupportedClassVersionError: Bad version number in .class file
    occurs.

Similar Threads

  1. ERROR DEPLOYING WEB APPLET......help needed urgent
    By bonjovi4u in forum Java Applets
    Replies: 1
    Last Post: 03-16-2010, 03:16 PM
  2. problem in deploying WAR file in server
    By pan in forum Advanced Java
    Replies: 8
    Last Post: 10-12-2009, 12:17 PM
  3. error deploying Enterprise application
    By mihael in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 01-30-2009, 10:46 AM
  4. Error deploying Entity Bean
    By RobertoWIN_MX in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 05-01-2008, 05:17 AM
  5. Error while deploying.war in WAS6.1(Plz help)
    By Shweta.pattankar in forum Advanced Java
    Replies: 1
    Last Post: 07-12-2007, 07:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •