jakarta.activation must be open to at least com.sun.xml.bind
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 43
- Forks
- 34
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
When using SOAP to for example transport base64 encoded files I get the following error:
`com.sun.xml.ws.spi.db.DatabindingException: jakarta.xml.bind.JAXBException: Package jakarta.activation with class jakarta.activation.DataHandler defined in a module jakarta.activation must be open to at least com.sun.xml.bind module.`
Exception:
```java
com.sun.xml.ws.spi.db.DatabindingException: jakarta.xml.bind.JAXBException: Package jakarta.activation with class jakarta.activation.DataHandler defined in a module jakarta.activation must be open to at least com.sun.xml.bind module.
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext)(JAXBRIContextFactory.java:75)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.spi.db.BindingContextFactory.getBindingContextFromSpi](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.spi.db.BindingContextFactory.getBindingContextFromSpi)(BindingContextFactory.java:179)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.spi.db.BindingContextFactory.create](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.spi.db.BindingContextFactory.create)(BindingContextFactory.java:148)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl$1.run](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl$1.run)(AbstractSEIModelImpl.java:184)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl$1.run](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl$1.run)(AbstractSEIModelImpl.java:156)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext)(AbstractSEIModelImpl.java:156)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess)(AbstractSEIModelImpl.java:80)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel)(RuntimeModeler.java:289)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingImpl](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingImpl).(DatabindingImpl.java:70)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingProviderImpl.create](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingProviderImpl.create)(DatabindingProviderImpl.java:51)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingProviderImpl.create](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingProviderImpl.create)(DatabindingProviderImpl.java:28)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime)(DatabindingFactoryImpl.java:92)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.buildRuntimeModel](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.buildRuntimeModel)(WSServiceDelegate.java:867)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.createSEIPortInfo](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.createSEIPortInfo)(WSServiceDelegate.java:884)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.addSEI](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.addSEI)(WSServiceDelegate.java:847)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.getPort](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.getPort)(WSServiceDelegate.java:425)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.getPort](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.client.WSServiceDelegate.getPort)(WSServiceDelegate.java:392)
at [jakarta.xml.ws@4.0.2/jakarta.xml.ws.Service.getPort](mailto:jakarta.xml.ws@4.0.2/jakarta.xml.ws.Service.getPort)(Service.java:181)
at josy.db/de.finkonsens.ginster.beku.v1.BekanntgabeService.getBekanntgabeSoapPort(BekanntgabeService.java:84)
at josy.db/ofdh.staroffice.gibeku.v4.internal.GibekuClientBekanntgabe.getPort(GibekuClientBekanntgabe.java:391)
at josy.db/ofdh.staroffice.gibeku.v4.internal.GibekuClientBekanntgabe.sendRequest(GibekuClientBekanntgabe.java:440)
... 29 more
Caused by: jakarta.xml.bind.JAXBException: Package jakarta.activation with class jakarta.activation.DataHandler defined in a module jakarta.activation must be open to at least com.sun.xml.bind module.
at [com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.v2.MUtils.open](mailto:com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.v2.MUtils.open)(MUtils.java:58)
at [com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.v2.ContextFactory.createContext](mailto:com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.v2.ContextFactory.createContext)(ContextFactory.java:52)
at [com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.api.JAXBRIContext.newInstance](mailto:com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.api.JAXBRIContext.newInstance)(JAXBRIContext.java:132)
at [com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.api.JAXBRIContext.newInstance](mailto:com.sun.xml.bind@4.0.5/org.glassfish.jaxb.runtime.api.JAXBRIContext.newInstance)(JAXBRIContext.java:76)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext)(JAXBContextFactory.java:84)
at [com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext](mailto:com.sun.xml.ws@4.0.3/com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext)(JAXBRIContextFactory.java:64)
... 50 more
```
**Additional context**
A simple solution is to just add `opens jakarta.activation;` to the `module-info.java`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting module-info.java in the Jakarta Activation API project and compare its package declarations with the reported JAXB access error. Confirm the requested module openness is appropriate, then verify that the module declaration permits com.sun.xml.bind to access jakarta.activation as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100