Hi Werner,

I think i have found the problem... it's a bug of jdk 1.6 ... (here the example is with an array of String but it's the same
with any array) :

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434149


================================================================================
Bug ID:        6434149
Votes     45
Synopsis     (cl) ClassLoader.loadClass() throws java.lang.ClassNotFoundException: [Ljava.lang.String; in JDK 6.0
Category     java:classes_lang
Reported Against    
Release Fixed    
State     In progress, bug
Related Bugs     6446627 , 6466061 , 6500212 , 6516909 , 6518862
Submit Date     05-JUN-2006
Description    

Consider this simple test program:

  public class test {

      public static void main(String[] args) throws Exception {

          String[] s = new String[] { "123" };
          String clName = s.getClass().getName();
          test.class.getClassLoader().loadClass(clName);
      }
  }

This runs fine on JDK 1.5, but throws this exception on JDK 6.0:

Exception in thread "main" java.lang.ClassNotFoundException: [Ljava.lang.String;
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at test.main(test.java:7)
Posted Date : 2006-06-05 21:54:58.0
 

Submitted On 08-MAY-2007
Sean.Ho

This bug is very severe. We need it to be fixed ASAP.

Submitted On 10-MAY-2007

Fix it soon...........
================================================================================

Strangely the bug was posted in June 2006 ... one year ago !
Thanks for the help

Chris

PS: I'm looking for a workaround until the bug is fixed by Sun. I'll let you know what i have found.

Werner Guttmann wrote:

Not really, to be honest, ut maybe somebody else can provide his (historical) views. Personally, I would be very surprised to find Java-specific notations in an xsi:type attribute ….. what surprises me is that it seems to work.

 

Werner

 


Von: Christophe Assemat [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 10. Mai 2007 12:34
An: [email protected]
Betreff: Re: AW: [castor-user] [XML] unable to instantiate [I; java.lang.ClassNotFoundException: [I

 

Hi Werner,

I'm indeed using a mapping file (i can extract from it mapping information related to the xml showned in my email). But first, could you tell
me if the 'xsi:type="java:[I"' notation found in the xml is (seems) correct ?

Thanks,

Chris

Werner Guttmann wrote:

That's truly an odd one .. ;-). A few random questions, just to establish a context for me. Are you using a mapping file ? If not, is this discussion based upon Java classes that have been generated from an XML schema ? Or are you using Castor XML without a mapping file, relying on default introspection ? 
 
Werner
 
  
-----Ursprüngliche Nachricht-----
Von: Christophe Assemat [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 10. Mai 2007 11:34
An: [email protected]
Betreff: [castor-user] [XML] unable to instantiate [I;
java.lang.ClassNotFoundException: [I
 
Hi,
 
I have an application running perfectly with jre 1.5.xx but which fails
when i try to use
jre 1.6. While trying to 'unmarshal' an xml previously marshalled
object, it fails :
 
unable to instantiate [I; java.lang.ClassNotFoundException: [I
...
 
Part of the xml concerned looks like :
 
<targetmap internalkey="33">
<range xsi:type="java:[I">
 <integer>12345</integer>
 <integer>34567</integer>
</range>
<range ...>
...
</range>
...
</targetmap>
 
I'm still using 'castor-1.0.2' version and i'm planning to move to
'castor-1.1.1' but anyhow i would like to understand why
this problem arises.
 
Cheers
 
C.ASSEMAT
GenomeQuest Inc.
 
 
 
---------------------------------------------------------------------
To unsubscribe from this list please visit:
 
    http://xircles.codehaus.org/manage_email
    
 
 
---------------------------------------------------------------------
To unsubscribe from this list please visit:
 
    http://xircles.codehaus.org/manage_email
 
 
  

 

--------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



Reply via email to