Re: java.lang.ClassFormatError out of the Blue
This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response) void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
Re: java.lang.ClassFormatError out of the Blue
Jason Thanks for the response. The absence of scripts in binary mode clearly justifies the exception. Iam trying to run it in my own Test Environment. And moreover, the .class files are in the repository. Even if I export them, they seem to get exported in corrupted format. Iam trying to export .Java files, delete project from workspace/repository, and import all the java files again. Hoping that would work. Regards hemant - Original Message - From: Jason Koeninger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:56 PM Subject: Re: java.lang.ClassFormatError out of the Blue This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant --- - root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servl et.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void
RE: java.lang.ClassFormatError out of the Blue
Are you saying that the .class files are in a source control repository? If they are stored in CVS, make sure you check them out with the binary flag set. (-kb) If you don't do this your .class will probably be corrupted. --Jay Gardner -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:07 PM To: Tomcat Users List; Jason Koeninger Subject: Re: java.lang.ClassFormatError out of the Blue Jason Thanks for the response. The absence of scripts in binary mode clearly justifies the exception. Iam trying to run it in my own Test Environment. And moreover, the .class files are in the repository. Even if I export them, they seem to get exported in corrupted format. Iam trying to export .Java files, delete project from workspace/repository, and import all the java files again. Hoping that would work. Regards hemant - Original Message - From: Jason Koeninger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:56 PM Subject: Re: java.lang.ClassFormatError out of the Blue This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant --- - root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service
Re: java.lang.ClassFormatError out of the Blue
Jay I think I was not clear, I meant Visual Age Repository. Thanks for your response. Regards hemant - Original Message - From: Jay Gardner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:32 PM Subject: RE: java.lang.ClassFormatError out of the Blue Are you saying that the .class files are in a source control repository? If they are stored in CVS, make sure you check them out with the binary flag set. (-kb) If you don't do this your .class will probably be corrupted. --Jay Gardner -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:07 PM To: Tomcat Users List; Jason Koeninger Subject: Re: java.lang.ClassFormatError out of the Blue Jason Thanks for the response. The absence of scripts in binary mode clearly justifies the exception. Iam trying to run it in my own Test Environment. And moreover, the .class files are in the repository. Even if I export them, they seem to get exported in corrupted format. Iam trying to export .Java files, delete project from workspace/repository, and import all the java files again. Hoping that would work. Regards hemant - Original Message - From: Jason Koeninger [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 4:56 PM Subject: Re: java.lang.ClassFormatError out of the Blue This may not be the what you're having problems with, but the only time I've seen this was when I was deploying via FTP and forgot to set my scripts to use binary mode. Best Regards, Jason Koeninger JJ Computer Consulting http://www.jjcc.com On Tue, 9 Apr 2002 15:55:05 -0400, hemant wrote: I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant --- - root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm
RE: java.lang.ClassFormatError out of the Blue
Hi hemant I got that same error and i discovered IDE (metrowerks) was creating that problem when it was preparing jar file. I generated the class files using IDE and jarred them using command line then the problem was solved. my advice is to create jar file by command line and try your problem will be solved. hope this helps umamaheswar -Original Message- From: hemant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 12:55 PM To: Tomcat Users List; struts Subject: java.lang.ClassFormatError out of the Blue I Use Tomcat 4.0.2 and Struts 1.0.2 with VA 3.5.3 Everything was perfect until, one inauspicious moment in the afternoon when I suddenly got this exception from nowhere. I have no clue as to why and how. But I do see that this is a ClassFormatException so, I moved the application related code (not struts) onto another machine where I previously deployed my app. The app was fine on this box earlier.Now, I get the same ClassFormatError there too so, It has to do with the code I moved. The Java API says that it is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file. So .class file is corrupt/malformed. But which? I am trying to force a recompile on classes by adding a space, etc. any ideas on what sould be done next if my attempt fails? here is the exception Thank You for your time hemant root cause java.lang.ClassFormatError java.lang.Throwable() java.lang.Error() java.lang.LinkageError() java.lang.ClassFormatError() java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int, java.security.ProtectionDomain) java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte [], int, int) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String, boolean) java.lang.Class org.apache.jasper.servlet.JasperLoader.loadClass(java.lang.String) boolean org.apache.jasper.servlet.JspServlet.loadJSP(java.lang.String, java.lang.String, boolean, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(javax .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpS ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletR equest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.invoke(javax.servlet.ServletR equest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.doForward(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationDispatcher.forward(javax.servlet.Servlet Request, javax.servlet.ServletResponse) void org.apache.struts.action.ActionServlet.processActionForward(org.apache.strut s.action.ActionForward, org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServlet Request, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servl et.ServletRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.Servl etRequest, javax.servlet.ServletResponse) void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Req uest, org.apache.catalina.Response, org.apache.catalina.ValveContext) void org.apache.catalina.core.StandardPipeline.invokeNext(org.apache.catalina.Req uest, org.apache.catalina.Response) void