You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2009/07/22 08:25:14 UTC

[jira] Created: (FELIX-1398) Class.forName issue with XMLParserActivator

Class.forName issue with XMLParserActivator
-------------------------------------------

                 Key: FELIX-1398
                 URL: https://issues.apache.org/jira/browse/FELIX-1398
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-1.8.1
            Reporter: Thomas Diesler


An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix

Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)

This however works fine with the original org.osg.compendium-4.1.0 

More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1398) Class.forName issue with XMLParserActivator

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler updated FELIX-1398:
----------------------------------

    Attachment: osgi-compendium-4.1.0-manifest.mf
                apache-compendium-1.2.0-manifest.mf

Attached both manifests

> Class.forName issue with XMLParserActivator
> -------------------------------------------
>
>                 Key: FELIX-1398
>                 URL: https://issues.apache.org/jira/browse/FELIX-1398
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: Thomas Diesler
>         Attachments: apache-compendium-1.2.0-manifest.mf, osgi-compendium-4.1.0-manifest.mf
>
>
> An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix
> Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
> 	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
> 	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
> 	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
> 	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)
> This however works fine with the original org.osg.compendium-4.1.0 
> More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1398) Class.forName issue with XMLParserActivator

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734014#action_12734014 ] 

Thomas Diesler commented on FELIX-1398:
---------------------------------------

The associated test case is here: 

https://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/

> Class.forName issue with XMLParserActivator
> -------------------------------------------
>
>                 Key: FELIX-1398
>                 URL: https://issues.apache.org/jira/browse/FELIX-1398
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: Thomas Diesler
>         Attachments: apache-compendium-1.2.0-manifest.mf, osgi-compendium-4.1.0-manifest.mf
>
>
> An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix
> Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
> 	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
> 	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
> 	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
> 	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)
> This however works fine with the original org.osg.compendium-4.1.0 
> More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1398) Class.forName issue with XMLParserActivator

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall closed FELIX-1398.
----------------------------------

    Resolution: Won't Fix

I think this is fixed in trunk, because the generated manifest I see there is different. However, that is really moot since we have decided to no longer release versions of the official OSGi JAR files.

> Class.forName issue with XMLParserActivator
> -------------------------------------------
>
>                 Key: FELIX-1398
>                 URL: https://issues.apache.org/jira/browse/FELIX-1398
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: Thomas Diesler
>         Attachments: apache-compendium-1.2.0-manifest.mf, osgi-compendium-4.1.0-manifest.mf
>
>
> An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix
> Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
> 	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
> 	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
> 	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
> 	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)
> This however works fine with the original org.osg.compendium-4.1.0 
> More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1398) Class.forName issue with XMLParserActivator

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734013#action_12734013 ] 

Thomas Diesler commented on FELIX-1398:
---------------------------------------

A possible cause might be the manifest header

Ignore-Package: ...,org.osgi.util.xml,...

> Class.forName issue with XMLParserActivator
> -------------------------------------------
>
>                 Key: FELIX-1398
>                 URL: https://issues.apache.org/jira/browse/FELIX-1398
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: Thomas Diesler
>         Attachments: apache-compendium-1.2.0-manifest.mf, osgi-compendium-4.1.0-manifest.mf
>
>
> An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix
> Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
> 	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
> 	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
> 	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
> 	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)
> This however works fine with the original org.osg.compendium-4.1.0 
> More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (FELIX-1398) Class.forName issue with XMLParserActivator

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734135#action_12734135 ] 

Richard S. Hall edited comment on FELIX-1398 at 7/22/09 7:48 AM:
-----------------------------------------------------------------

I think this is fixed in trunk, because the generated manifest I see there is different. However, that is really moot since we have decided to no longer release versions of the official OSGi JAR files. Thanks for reporting the issue, though.

      was (Author: rickhall):
    I think this is fixed in trunk, because the generated manifest I see there is different. However, that is really moot since we have decided to no longer release versions of the official OSGi JAR files.
  
> Class.forName issue with XMLParserActivator
> -------------------------------------------
>
>                 Key: FELIX-1398
>                 URL: https://issues.apache.org/jira/browse/FELIX-1398
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.8.1
>            Reporter: Thomas Diesler
>         Attachments: apache-compendium-1.2.0-manifest.mf, osgi-compendium-4.1.0-manifest.mf
>
>
> An implementation of the XML parser service does not work with org.osgi.compendium-1.2.0 from Felix
> Caused by: javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: *** Class 'org.jboss.test.osgi.jbosgi92.bundleA.SAXParserFactoryImpl' was not found because bundle 1 does not import 'org.jboss.test.osgi.jbosgi92.bundleA' even though bundle 5 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'org.jboss.test.osgi.jbosgi92.bundleA' to bundle 1; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'org.jboss.test.osgi.jbosgi92.bundleA' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***
> 	at org.osgi.util.xml.XMLParserActivator.getFactory(XMLParserActivator.java:462)
> 	at org.osgi.util.xml.XMLParserActivator.registerSAXParsers(XMLParserActivator.java:240)
> 	at org.osgi.util.xml.XMLParserActivator.start(XMLParserActivator.java:147)
> 	at org.jboss.test.osgi.jbosgi92.bundleA.ActivatorBundleA.start(ActivatorBundleA.java:43)
> This however works fine with the original org.osg.compendium-4.1.0 
> More info on the issue: https://jira.jboss.org/jira/browse/JBOSGI-92

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.