ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory

Mikhail_Kopylov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2015

JIRA v6.3.4, v6.3.8

Need to read an XML config using JAXB on plugin v2 startup - in the bean that implements InitializingBean interface.

But when running JAXBContext.newInstance I'm catching ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory.

Found a solution: add to maven-jira-plugin configuration 

<systemProperties>
<property>
<name>atlassian.org.osgi.framework.bootdelegation</name>
<value>sun.*,com.sun.*</value>
</property>
</systemProperties>

And now it works in developer instance, when running JIRA with atlas-debug.

But the same plugin still throws ClassNotFoundException when is installed in a standard JIRA.

What to do now?

 

P. S. When reading the XML config in some Servlet handler, all works fine. The trouble is only with plugin startup.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Akeles
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2015

You tried adding the the statement in setenv.sh or setenv.bat

set JVM_SUPPORT_RECOMMENDED_ARGS=-Datlassian.org.osgi.framework.bootdelegation=sun.*,com.sun.*
Mikhail_Kopylov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2015

@Akeles , do I need similar configuration in my pom.xml in this case?

Mikhail_Kopylov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2015

And why it works in the atlas-debug version without this statement in jvm args?

Akeles
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 22, 2015

atlas-run will reference the settings in pom.xml during startup. The standalone JIRA does not use that setting during the startup. So have to add it separately again in different format.

TAGS
AUG Leaders

Atlassian Community Events