Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Re: Using javax.xml.bind bundle in PDE

It looks like my issue was related to a checked "Plug-in Dependencies" in the "Order and Export" window on my failing project and a dependency between the two projects. Its not clear to me why this would cause an issue, but at least I am past the problem.

-Tom

Tom Ware wrote:
Hi,

I am not certain if this is the correct mailing list to ask for PDE support. If it is not, please redirect me to the appropriate list.

I am having an issue using the javax.xml.bind 2.1.9 library that is found in Orbit in PDE in JDK 1.5 (everything is fine in JDK 1.6 - likely because of the javax.xml.bind library's presence in the system bundle). I have tried on Eclipse 3.4.1 and on Galileo M6.

That bundle exports a package called javax.xml.bind

--
Export-Package: javax.xml.bind,
 javax.xml.bind.annotation,
 javax.xml.bind.annotation.adapters,
 javax.xml.bind.attachment,
 javax.xml.bind.helpers,
 javax.xml.bind.util
--

I have two PDE projects that want to make use of classes in javax.xml.bind.

First, I try using import package. e.g.:

--
Import-Package: commonj.sdo;version="2.1.1",
 commonj.sdo.helper;version="2.1.1",
 commonj.sdo.impl;version="2.1.1",
 javax.xml.bind
--

I try to use the javax.xml.bind.JAXBContext class from that bundle and I get an error that says:

"Access restriction: The type JAXBContext is not accessible due to restriction on required library javax.xml.bind 2.1.9 JAXBHelperContext.java org.eclipse.persistence.sdo/src/org/eclipse/persistence/sdo/helper/jaxb line 20 Java Problem"

JAXBContext is a public abstract class in the javax.xml.bind package. I get the same issue for non-abstract classes as well.

This occurs on both PDE projects that import javax.xml.bind

Next, I try Require-Bundle.  e.g.:

--
Require-Bundle: org.eclipse.persistence.asm;bundle-version="2.0.0",
 org.eclipse.persistence.core;bundle-version="2.0.0",
 org.eclipse.persistence.moxy;bundle-version="2.0.0",
 javax.xml.bind
--

I get very strange behavior. On of my PDE projects, the Require-Bundle makes everything compile properly. On the other one, the Require-Bundle continues to give me the "Access restriction" listed above.

What could I be doing wrong?

Thanks in advance,
Tom







Back to the top