Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Log Entry Dialog Failure #2638

Closed
dxmaxwell opened this issue Feb 13, 2020 · 5 comments
Closed

Create Log Entry Dialog Failure #2638

dxmaxwell opened this issue Feb 13, 2020 · 5 comments

Comments

@dxmaxwell
Copy link
Contributor

When attempting to create a log entry with an attachment, the following error occurs:
CS Studio Create Log Entry Dialog with Error
CS Studio Create Log Entry Error Dialog

The stack trace is as follows:

javax.ws.rs.WebApplicationException: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
	at com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.readFrom(AbstractRootElementProvider.java:115)
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634)
	at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:586)
	at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
	at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
	at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)
	at edu.msu.nscl.olog.api.OlogClientImpl.add(OlogClientImpl.java:831)
	at org.csstudio.logbook.olog.OlogLogbookClient.addAttachment(OlogLogbookClient.java:203)
	at org.csstudio.logbook.olog.OlogLogbookClient.createLogEntry(OlogLogbookClient.java:162)
	at org.csstudio.logbook.ui.LogEntryBuilderDialog$1.run(LogEntryBuilderDialog.java:144)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
 - with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:397)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
	at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getStoredJAXBContext(AbstractJAXBProvider.java:196)
	at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getJAXBContext(AbstractJAXBProvider.java:188)
	at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getUnmarshaller(AbstractJAXBProvider.java:140)
	at com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider.getUnmarshaller(AbstractJAXBProvider.java:123)
	at com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider.readFrom(AbstractRootElementProvider.java:111)
	... 10 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:135)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
	at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276)
	... 18 
@dxmaxwell
Copy link
Contributor Author

Problem seems to be an oversight in the OLog client implementation that did not do the properly class loader wrangling when making a request to add attachments to a log entry.

See PR 80 in the CS Studio Thirdparty repo for details.

@shroffk
Copy link
Member

shroffk commented Jul 28, 2020

Thanks for fixing this

@shroffk
Copy link
Member

shroffk commented Jul 28, 2020

When I tested this we were able to successfully make log entries despite the error

@dxmaxwell
Copy link
Contributor Author

Yes, if I remember correctly the log entry is successfully created in olog, but the intended attachments were missing.

@shroffk
Copy link
Member

shroffk commented Jul 29, 2020

Oh, in the test I ran even the attachments were included....strange.
In any case could you approve the PR

shroffk added a commit that referenced this issue Jul 29, 2020
#2638 fixing the javax warning while adding attachments
@shroffk shroffk closed this as completed Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants