• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bad Magic Number

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting a different error, when I run my jsp pages. I am using Jrun 3.0, jdk1.2.
This is the error I am getting.

500 Internal Server Error
/positive/structures.jsp:
javax.servlet.ServletException: jrun__positive__structures2ejsp18 (Bad magic number)
java.lang.ClassFormatError: jrun__positive__structures2ejsp18 (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at allaire.jrun.servlet.JSPClassLoader.loadClass(../servlet/JSPClassLoader.java:82)
at java.lang.ClassLoader.loadClass(Unknown Source)
at allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunServletLoader.java:221)
at allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunServletLoader.java:190)
at allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServletLoader.java:177)
at allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1267)
at allaire.jrun.jsp.JSPServlet.loadServlet(../jsp/JSPServlet.java:241)
at allaire.jrun.jsp.JSPServlet.loadPage(../jsp/JSPServlet.java:181)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:169)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:925)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:88)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:330)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:107)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

This doesnot happen frequently. If I save the same file into some other name, It works very well.
How can I avoid this error? Please help me.
Thanks in advance,
sampath kumar.
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ndsk,
JavaRanch has a Naming Policy Please read and change your display name.
Bad Magic number is usually caused by a bug in either the compiler or the classloader. Check with Allaire for an update that may address this problem. Basically every java class file needs to start with 0xCAFEBABE which is how the classloader knows that the file is indeed a Java class file. Additionally check to see what JDK is recommended. You probably should upgrade to 1.3.1.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I encounter the same situation when I copy the class compiled in unix system to a nt system which are both jdk 1.2.2.
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this TechNote.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"ricemouse"
Your name doesn't follow the javaranch guideliens on names. Please take a moment and change your "Publicly Displayed Name" by modifying your profile.
Thanks for your cooperation.
- madhav
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The compiled jsp have these bad "Magic Number" after recompiling jrun will not delete the jsp if no change was done in this file.
So try to delete the bad jrun class file.
these should sove your problem
 
No more fooling around. Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic