[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-1553) ClassNotFouncException for Array Types when Running under JDK 1.6

Ming Jin (JIRA) jira-events at lists.jboss.org
Tue Apr 8 12:45:54 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1553?page=all ]

Ming Jin resolved JBRULES-1553.
-------------------------------

    Resolution: Done

Replaced classLoader.loadClass with Class.forName(className, true, classLoader) to avoid the ClassNotFoundException for loading array class types.

> ClassNotFouncException for Array Types when Running under JDK 1.6
> -----------------------------------------------------------------
>
>                 Key: JBRULES-1553
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1553
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.0.0-M1
>            Reporter: Ming Jin
>         Assigned To: Ming Jin
>            Priority: Minor
>             Fix For: 5.0.0-M1
>
>
> Running a test under JDK 1.6, a ClassNotFoundException would be thrown whenever a loadClass(className) was called while the className was the name of an array object, such as "[B" for byte array, etc.  This is definitely new in JDK 1.6.   The corresponding bug could be found at http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=2a9a78e4393c5e678a2c80f90c1?bug_id=6434149.
> There are two workaround available:
> 1.  setting an environment variable when starting VM: -Dsun.lang.ClassLoader.allowArraySyntax=true.
> 2.  using Class.forName(className, initializationFlag, classLoader) instead of classLoader.loadClass(className).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list