NoClassDefFoundError

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

NoClassDefFoundError

Postby william.t.dark@nasa.gov » Sat Apr 01, 2017 4:25 pm

Hi,

I wrote a plugin that connects to a web service using ClientBuilder.

Everything works fine inside of Eclipse, but when I export my plugin and start it with Magic Draw, I get the error listed below when I try to connect to my web service.

[ERROR] [Inside Magic Draw]
java.lang.NoClassDefFoundError: javax/ws/rs/client/ClientBuilder

The library/jar (javax.ws.rs API) is included with the other Maven dependencies on the build-path, but Magic Draw still produces the above error.

Thanks,
william.t.dark@nasa.gov
Forum Beginner
Forum Beginner
 
Posts: 53
Posts Rating:0
Joined: Mon Mar 23, 2015 11:31 am

Re: NoClassDefFoundError

Postby marlel » Tue Apr 04, 2017 7:15 am

Hello,

Have you included library jar in the plugin.xml file of the MagicDraw plugin?
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 388
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: NoClassDefFoundError

Postby william.t.dark@nasa.gov » Tue Apr 04, 2017 12:38 pm

Hi,

Yes, I added it, but it may have been added incorrectly.

<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="mdServicePlugin"
name="Magic Draw Service Plugin"
version="1.0"
provider-name="com.nasa.grc.scenic.gov"
class="com.nasa.grc.scenic.gov.main.main">
<requires>
<api version="1.2"/>
<required-plugin name="SysML" id="com.nomagic.magicdraw.plugins.impl.sysml"/>

</requires>
<runtime>
<library name="mdServicePlugin.jar"/>
<library name="javax.ws.rs-api-2.0.1.jar"/>
</runtime>
</plugin>


Is this the proper way to add it? If this is the correct way, I am still getting the same results when I export and test.

Thanks!
william.t.dark@nasa.gov
Forum Beginner
Forum Beginner
 
Posts: 53
Posts Rating:0
Joined: Mon Mar 23, 2015 11:31 am

Re: NoClassDefFoundError

Postby marlel » Wed Apr 05, 2017 4:25 am

Hi,

Can we get your plugin build to test?
Best regards,
Martynas
marlel
No Magic
No Magic
 
Posts: 388
Posts Rating:25
Joined: Wed Jul 11, 2012 2:31 am

Re: NoClassDefFoundError

Postby william.t.dark@nasa.gov » Wed Apr 05, 2017 7:28 am

Hi,

Sure. Do I start a separate support-ticket, or is there a way to attach my project privately?

Thanks,
william.t.dark@nasa.gov
Forum Beginner
Forum Beginner
 
Posts: 53
Posts Rating:0
Joined: Mon Mar 23, 2015 11:31 am

Re: NoClassDefFoundError

Postby ieva.n » Wed Apr 05, 2017 7:46 am

Hello,

There is no way to limit privacy level in our community forum. If you want to keep the plugin private, please create a private ticket in our customer support system https://knowledgebase.nomagic.com and attach it there.

Sincerely,
No Magic, Inc. Customer Support
ieva.n
No Magic
No Magic
 
Posts: 369
Posts Rating:37
Joined: Thu Aug 02, 2012 5:02 am
Full name: Ieva

Re: NoClassDefFoundError

Postby william.t.dark@nasa.gov » Wed Apr 05, 2017 8:28 am

Hi,

That link isn't working for me. I did send a support email, though.

I have tried everything from adding the build path to my advance system settings, to adding it directly
to the magicdraw project in eclipse that my plugin is also dependent on, but still nothing.

Thanks!
william.t.dark@nasa.gov
Forum Beginner
Forum Beginner
 
Posts: 53
Posts Rating:0
Joined: Mon Mar 23, 2015 11:31 am

Re: NoClassDefFoundError

Postby ieva.n » Wed Apr 05, 2017 9:01 am

Hello,

I apologize, the link is http, not https (http://knowledgebase.nomagic.com).

Sincerely,
No Magic, Inc. Customer Support
ieva.n
No Magic
No Magic
 
Posts: 369
Posts Rating:37
Joined: Thu Aug 02, 2012 5:02 am
Full name: Ieva

Re: NoClassDefFoundError

Postby juarezcooper9903137@gmail.com » Wed May 18, 2022 1:56 am

I have successfully accessed super mario bros
juarezcooper9903137@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Wed Apr 20, 2022 3:40 am


Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 2 guests