You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jacob Danner (JIRA)" <xm...@xml.apache.org> on 2005/04/19 20:39:27 UTC

[jira] Closed: (XMLBEANS-116) SchemaTypeSystemImpl cannot be loaded in many classloaders

     [ http://issues.apache.org/jira/browse/XMLBEANS-116?page=all ]
     
Jacob Danner closed XMLBEANS-116:
---------------------------------

    Assign To:     (was: Cezar Andrei)

Fixed, please create a new issue is something similar arises

> SchemaTypeSystemImpl cannot be loaded in many classloaders
> ----------------------------------------------------------
>
>          Key: XMLBEANS-116
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-116
>      Project: XMLBeans
>         Type: Bug
>     Versions: Version 2 Beta 1
>  Environment: osx 10.3.8
> java version "1.4.2_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3)
> Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)
>     Reporter: David Jencks
>  Attachments: SchemaTypeSystemImpl.diff
>
> at line 141, SchemaTypeSystemImpl has this code:
>     public static String METADATA_PACKAGE_GEN = (
>         // next line should use String addition to avoid replacement by Repackager:  "org." + "apache." + "xmlbeans"
>         ("org." + "apache." + "xmlbeans").equals(SchemaTypeSystem.class.getPackage().getName())     ?
>         // This is the original org apache xmlbeans package, to maintain backwards compatibility resource pathes must remain the same
>         "" :
>         // This is the private package XMLBeans, all the metadata will end up in a specific/private resource path
>         SchemaTypeSystem.class.getPackage().getName().replaceAll("\\.", "_")
>         );
> From the javadoc for Class.getPackage():
> Gets the package for this class. The class loader of this class is used to find the package. If the class was loaded by the bootstrap class loader the set of packages loaded from CLASSPATH is searched to find the package of the class. Null is returned if no package object was created by the class loader of this class.
> Sure enough, I'm getting a NPE trying to load this class due to the package being null.  This prevents geronimo moving to v2.  Can you do the calculation based on the class name minus ".SchemaTypeSystem"?

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org