RE: Class Loader Problem?

2001-05-11 Thread Wildeboer, Tonnis

Ted,

Thanks for your reply. My responses below...

--Tonnis

> -Original Message-
> From: Ted Neward [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 11, 2001 1:35 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Class Loader Problem?
> 
> 
> I think it's fairly safe to postulate what 
> happened--somewhere along the
> line, the VALookup.class file was either truncated, copied 
> over, or somehow
> "mangled" (through actions that may have had nothing to do with
> compilation--maybe some random cosmic ray passed through the case and
> flipped a bit on the disk or something) such that the VM 
> couldn't recognize
> the .class file as kosher any more.

I rebuilt the class, modified and rebuilt the class, renamed the class,
removed the class, searched everywhere I could think of for VCALookup*
including the Tomcat and related jar files and could not find anything
anywhere except my WEB-INF/classes directory. (Which was a symbolic link to
the real classes directory, if that's any clue.)

> 
> BTW, one thing you said you did was take a known good .class 
> file (your
> servlet) and rename it to VALookup.class to see if that would 
> work--it will
> never work. Java has a definite link between the name of the 
> .class file and
> the class it contains. (The name is embedded as an attribute 
> inside the
> .class file format.)
> 

Yes, I figured that. That's the reason I did it, to try to get some other
Exception besides the "Truncated class file". When I did that and STILL got
the same Exception, that's when I realized I'd better create a whole new
checkout. (And yes, I did restart Tomcat each time, eventhough I had the
reaload option set to false.)

> Usually 99% of all ClassFormatErrors are due to this same 
> kind of "the file
> got munged" strangeness--my first inclination on a CFE is to 
> do a complete
> rebuild and redeploy. (The other 1% is reserved for guys who 
> are building
> .class files by hand. :) )
> 
> Ted Neward
> {.NET||Java} Instructor, DevelopMentor  (http://www.develop.com)
> http://www.javageeks.com/~tneward/index.html
> 
> > -Original Message-
> > From: Wildeboer, Tonnis [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 08, 2001 5:47 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: Class Loader Problem?
> >
> >
> > Well, I considered all those things and finally, I did the 
> only thing you
> > can do when things get this weird:
> > I did a completely clean checkout and rebuild of everything and
> > of course...
> > problem solved. Guess I'll never know what was really 
> happening, but the
> > experience (and solution) is a lesson in itself...
> >
> > Thanks for your reply.
> >
> > --Tonnis
> >
> > -Original Message-
> > From: Bip Thelin [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 08, 2001 4:48 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Class Loader Problem?
> >
> >
> > "Wildeboer, Tonnis" wrote:
> > >
> > > [...]
> > >
> > > I have gone so far as completely removing VCALookup.class from
> > my classes
> > > directory and I still get the same Exception.
> > > I also tried instantiating the class from a different file
> > (first line of
> > my
> > > doGet()) and still get the same Exception.
> > > I copied a known good class (my servlet class), renamed it to
> > > VCALookup.class, same Exception.
> >
> > Ok, this is what the Javadocs say about java.lang.ClassFormatError.
> >
> > 
> > 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.
> > 
> >
> > I interpret this as that the classloader are _finding_ the 
> class but has
> > problems
> > loading it.
> > What is this file/class? Something you copied from 
> somewhere? Could it be
> > that
> > you are missing an inline class for VCALookup? i.e.
> > VCALookup$.class
> > I would think that there's something wrong with the 
> VCALookup class, if it
> > couldn't
> > find the file you wou'd have gotten a 
> ClassNotFoundException. Is VCALookup
> > refering
> > to any other classed that you've missed to bring to your Tomcat env?
> >
> > > 2001-05-01 04:19:15 - Ctx(  ): Exception in: R(  + /csp + 
> /+cfi/login) -
> > > java.lang.ClassFormatError: VCALookup (Truncated
> > >  class file)
> > > at java.lang.ClassLoader.

RE: Any known issues with Tomcat 3.2.1 and class loading ?

2001-05-09 Thread Wildeboer, Tonnis
Title: Any known issues with Tomcat 3.2.1 and class loading ?



If 
they are .zip files you'll have to add them to the CLASSPATH 
yourself.
 
--Tonnis
-Original Message-From: Hawkins, Keith (Keith) 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, May 09, 2001 8:24 
AMTo: [EMAIL PROTECTED]Subject: Any known 
issues with Tomcat 3.2.1 and class loading ?
Dear Developers: 
Are there any known issues with class loading under 
Tomcat 3.2.1? 
My situation is that classes in jar files that reside 
in the WEB-INF/lib directory for my servlet fail to load when accessed under 
Tomcat.  Yet the classes load fine when accessed via test programs that use 
the very same jar files and call the same servlet methods.
Seems like Tomcat is not working as advertised 
with respect to automatically adding jar files from  
/WEB-INF/lib to the classpath.
Can anyone confirm whether this is a known 
issue? 
Thanks, Keith 


RE: Class Loader Problem?

2001-05-08 Thread Wildeboer, Tonnis

Well, I considered all those things and finally, I did the only thing you
can do when things get this weird:
I did a completely clean checkout and rebuild of everything and of course...
problem solved. Guess I'll never know what was really happening, but the
experience (and solution) is a lesson in itself...

Thanks for your reply.

--Tonnis

-Original Message-
From: Bip Thelin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 4:48 PM
To: [EMAIL PROTECTED]
Subject: Re: Class Loader Problem?


"Wildeboer, Tonnis" wrote:
> 
> [...]
>
> I have gone so far as completely removing VCALookup.class from my classes
> directory and I still get the same Exception.
> I also tried instantiating the class from a different file (first line of
my
> doGet()) and still get the same Exception.
> I copied a known good class (my servlet class), renamed it to
> VCALookup.class, same Exception.

Ok, this is what the Javadocs say about java.lang.ClassFormatError.


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.


I interpret this as that the classloader are _finding_ the class but has
problems
loading it.
What is this file/class? Something you copied from somewhere? Could it be
that
you are missing an inline class for VCALookup? i.e.
VCALookup$.class
I would think that there's something wrong with the VCALookup class, if it
couldn't
find the file you wou'd have gotten a ClassNotFoundException. Is VCALookup
refering
to any other classed that you've missed to bring to your Tomcat env?

> 2001-05-01 04:19:15 - Ctx(  ): Exception in: R(  + /csp + /+cfi/login) -
> java.lang.ClassFormatError: VCALookup (Truncated
>  class file)
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass0(Compiled Code)
> at java.lang.ClassLoader.defineClass(Compiled Code)
> at java.security.SecureClassLoader.defineClass(Compiled Code)
> at java.net.URLClassLoader.defineClass(Compiled Code)
> at java.net.URLClassLoader.access$1(Compiled Code)
> at java.net.URLClassLoader$1.run(Compiled Code)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.security.AccessController.doPrivileged(Compiled Code)
> at java.net.URLClassLoader.findClass(Compiled Code)
> at java.lang.ClassLoader.loadClass(Compiled Code)
> at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code)
> at java.lang.ClassLoader.loadClass(Compiled Code)
> at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Compiled
> Code)
> at java.lang.ClassLoader.loadClass(Compiled Code)
> at java.lang.ClassLoader.loadClassInternal(Compiled Code)
> at MediatorAgent.printTemplateResponse(Compiled Code)
> at MediatorAgent.printResponse(MediatorAgent.java:606)
> at MainVCAServlet.doGeneral(Compiled Code)
> at MainVCAServlet.doGet(MainVCAServlet.java:196)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> at org.apache.tomcat.core.Handler.service(Handler.java:286)
> at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
> at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
> at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
> Code)
> at java.lang.Thread.run(Compiled Code)


Sorry I can't help you more.

..bip



RE: Class Loader Problem?

2001-05-08 Thread Wildeboer, Tonnis

Hello,

I still have not figured this out, but have some more information. If anyone
can give me some tips on what to look into, I would be very grateful.

OS: Solaris 2.6
JDK: 1.3.0

I have gone so far as completely removing VCALookup.class from my classes
directory and I still get the same Exception. 
I also tried instantiating the class from a different file (first line of my
doGet()) and still get the same Exception.
I copied a known good class (my servlet class), renamed it to
VCALookup.class, same Exception.

So, it's not the class's problem. Any ideas?

TIA

--Tonnis

-Original Message-----
From: Wildeboer, Tonnis 
Sent: Tuesday, May 01, 2001 7:20 PM
To: '[EMAIL PROTECTED]'
Subject: Class Loader Problem?


I am using Tomcat 3.2.1 and getting the Exception printed below for a class
file (VCALookup.class) that I KNOW is not malformed (since the class loads
and runs fine under Weblogic 4.0.4). The Exception appears to occur during
the loading of another class (VCATemplate) that in turn accesses VCALookup.
The loading of that class (VCATemplate) is happening when one of its static
methods is being called by MediatorAgent.printTemplateResponse(). 

All my classes were compiled with the -g flag. Also, Tomcat is being run
without any security manager or policy and auto-reloading has been turned
off. The Weblogic deployment is using security -- would that matter...?
(I'll work on using security next...)

Any help would be greatly appreciated.

--Tonnis
__
Tonnis Wildeboer
[EMAIL PROTECTED]

Stack print follows:

2001-05-01 04:19:15 - Ctx(  ): Exception in: R(  + /csp + /+cfi/login) -
java.lang.ClassFormatError: VCALookup (Truncated
 class file)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass0(Compiled Code)
at java.lang.ClassLoader.defineClass(Compiled Code)
at java.security.SecureClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.access$1(Compiled Code)
at java.net.URLClassLoader$1.run(Compiled Code)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Compiled Code)
at java.net.URLClassLoader.findClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Compiled
Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClassInternal(Compiled Code)
at MediatorAgent.printTemplateResponse(Compiled Code)
at MediatorAgent.printResponse(MediatorAgent.java:606)
at MainVCAServlet.doGeneral(Compiled Code)
at MainVCAServlet.doGet(MainVCAServlet.java:196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
Code)
at java.lang.Thread.run(Compiled Code)

 



Class Loader Problem?

2001-05-01 Thread Wildeboer, Tonnis

I am using Tomcat 3.2.1 and getting the Exception printed below for a class
file (VCALookup.class) that I KNOW is not malformed (since the class loads
and runs fine under Weblogic 4.0.4). The Exception appears to occur during
the loading of another class (VCATemplate) that in turn accesses VCALookup.
The loading of that class (VCATemplate) is happening when one of its static
methods is being called by MediatorAgent.printTemplateResponse(). 

All my classes were compiled with the -g flag. Also, Tomcat is being run
without any security manager or policy and auto-reloading has been turned
off. The Weblogic deployment is using security -- would that matter...?
(I'll work on using security next...)

Any help would be greatly appreciated.

--Tonnis
__
Tonnis Wildeboer
[EMAIL PROTECTED]

Stack print follows:

2001-05-01 04:19:15 - Ctx(  ): Exception in: R(  + /csp + /+cfi/login) -
java.lang.ClassFormatError: VCALookup (Truncated
 class file)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass0(Compiled Code)
at java.lang.ClassLoader.defineClass(Compiled Code)
at java.security.SecureClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.defineClass(Compiled Code)
at java.net.URLClassLoader.access$1(Compiled Code)
at java.net.URLClassLoader$1.run(Compiled Code)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Compiled Code)
at java.net.URLClassLoader.findClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(Compiled
Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClassInternal(Compiled Code)
at MediatorAgent.printTemplateResponse(Compiled Code)
at MediatorAgent.printResponse(MediatorAgent.java:606)
at MainVCAServlet.doGeneral(Compiled Code)
at MainVCAServlet.doGet(MainVCAServlet.java:196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
Code)
at java.lang.Thread.run(Compiled Code)