You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Michael Bishop (Created) (JIRA)" <xm...@xml.apache.org> on 2012/01/13 19:16:39 UTC

[jira] [Created] (XMLBEANS-476) Loading XMLBeans resources across different class loaders.

Loading XMLBeans resources across different class loaders.
----------------------------------------------------------

                 Key: XMLBEANS-476
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-476
             Project: XMLBeans
          Issue Type: Improvement
          Components: Tools
    Affects Versions: unspecified
         Environment: Any operating system, NetBeans platform.
            Reporter: Michael Bishop
            Priority: Minor


In the NetBeans environment, each NetBeans module has its own class loader.  When you have multiple dependent schemas (i.e., Schema A depends on Schema B, thus A.jar will depend on B.jar), and place each schema JAR in its own module, NPEs are thrown because A cannot "load" classes from B.

See: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.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


[jira] [Assigned] (XMLBEANS-476) Loading XMLBeans resources across different class loaders.

Posted by "Jacob Danner (Assigned) (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacob Danner reassigned XMLBEANS-476:
-------------------------------------

    Assignee: Jacob Danner
    
> Loading XMLBeans resources across different class loaders.
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-476
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-476
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: unspecified
>         Environment: Any operating system, NetBeans platform.
>            Reporter: Michael Bishop
>            Assignee: Jacob Danner
>            Priority: Minor
>
> In the NetBeans environment, each NetBeans module has its own class loader.  When you have multiple dependent schemas (i.e., Schema A depends on Schema B, thus A.jar will depend on B.jar), and place each schema JAR in its own module, NPEs are thrown because A cannot "load" classes from B.
> See: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.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


[jira] [Commented] (XMLBEANS-476) Loading XMLBeans resources across different class loaders.

Posted by "Jacob Danner (Commented) (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185818#comment-13185818 ] 

Jacob Danner commented on XMLBEANS-476:
---------------------------------------

I think the general issue is to Add a flag to scomp that will add some OSGi manifest entries for proper classpath resolution in the container.
                
> Loading XMLBeans resources across different class loaders.
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-476
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-476
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: unspecified
>         Environment: Any operating system, NetBeans platform.
>            Reporter: Michael Bishop
>            Assignee: Jacob Danner
>            Priority: Minor
>
> In the NetBeans environment, each NetBeans module has its own class loader.  When you have multiple dependent schemas (i.e., Schema A depends on Schema B, thus A.jar will depend on B.jar), and place each schema JAR in its own module, NPEs are thrown because A cannot "load" classes from B.
> See: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.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


[jira] [Commented] (XMLBEANS-476) Loading XMLBeans resources across different class loaders.

Posted by "Matt Bishop (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409514#comment-13409514 ] 

Matt Bishop commented on XMLBEANS-476:
--------------------------------------

Any interest in generating these headers? I'd like to see them in built jars.
                
> Loading XMLBeans resources across different class loaders.
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-476
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-476
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: unspecified
>         Environment: Any operating system, NetBeans platform.
>            Reporter: Michael Bishop
>            Assignee: Jacob Danner
>            Priority: Minor
>
> In the NetBeans environment, each NetBeans module has its own class loader.  When you have multiple dependent schemas (i.e., Schema A depends on Schema B, thus A.jar will depend on B.jar), and place each schema JAR in its own module, NPEs are thrown because A cannot "load" classes from B.
> See: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.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


[jira] [Commented] (XMLBEANS-476) Loading XMLBeans resources across different class loaders.

Posted by "Michael Bishop (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409608#comment-13409608 ] 

Michael Bishop commented on XMLBEANS-476:
-----------------------------------------

This might work.  You can build NetBeans modules without using OSGi; we're not using it in our project.  Still, if that's the solution, we'd look into leveraging it.  Another thought (without being intimately familiar with XMLBeans' source) is to be able to "supply" the ClassLoader in the Factory methods or the call to scomp.  NetBeans has a "system" class loader that can access all modules.  This class loader can be referenced using their Lookup API:

ClassLoader syscl = Lookup.getDefault().lookup(ClassLoader.class);

If I did:

A.Factory.newInstance(sysCl), then I could assume every class loaded from my instance of A (including those in B) would use the supplied class loader.

Another idea is to have each JAR use its own classloader:

myA.addNewB() would leverage B's class loader instead of A's.
                
> Loading XMLBeans resources across different class loaders.
> ----------------------------------------------------------
>
>                 Key: XMLBEANS-476
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-476
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: unspecified
>         Environment: Any operating system, NetBeans platform.
>            Reporter: Michael Bishop
>            Assignee: Jacob Danner
>            Priority: Minor
>
> In the NetBeans environment, each NetBeans module has its own class loader.  When you have multiple dependent schemas (i.e., Schema A depends on Schema B, thus A.jar will depend on B.jar), and place each schema JAR in its own module, NPEs are thrown because A cannot "load" classes from B.
> See: http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.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