The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Class Loading Problem----Illegal constant pool type & Illegal UTF8 string in constant pool

Posted by Tao Tao on April 29, 2000 at 4:31 PM

Hello,

I have a strange problem with my custom remote class loading in my Jini
project. I need to upload some classes to the http server, so the Jini
client can
retrieve those classes via a custom remote class loader.

The problem is:

Sometimes the classes are downloaded smoothly and the Jini client works
fine,
however, when I run a second time, "Illegal constant pool type" or
"Illegal UTF8
string in constant pool" will appear. Then I run a third time, fail in
the same way,
run a fourth time, fail in the same way, run a fifth time, everything is
fine!

Since this problem is so unstable that I have no idea if this is the
problem with
my class loader or this is a problem with file transmission.

Attached please find the original error messages.

Your help is going to be highly appreciated.

Tao


Loading from URL:
http://xxx.xxx.xxx.xxx/info/grads/tyt/classes/jatwing/Wrapper.class
The loaded class is instantiated successfully.
Loading from URL:
http://xxx.xxx.xxx.xxx/info/grads/tyt/classes/cruiser2/Cruiser.class
java.lang.ClassFormatError: cruiser2/Cruiser (Illegal constant pool
type)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled
Code)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled
Code)
at ...

Loading from URL:
http://xxx.xxx.xxx.xxx/info/grads/tyt/classes/jatwing/Wrapper.class
The loaded class is instantiated successfully.
Loading from URL:
http://xxx.xxx.xxx.xxx/info/grads/tyt/classes/cruiser1/Cruiser.class
java.lang.ClassFormatError: cruiser1/Cruiser (Illegal UTF8 string in
constant pool)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled
Code)
at java.lang.ClassLoader.defineClass(ClassLoader.java, Compiled
Code)
at ....



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us