sad error with plug-ins eclipse

This topic has been viewed 20257 times and has 18 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
white0demon
Posts: 13
Joined: Fri Aug 20, 2010 11:06 am

Re: error with plug-ins eclipse

Post by white0demon »

Just checking, what are all the properties for the jar export?
msk
Posts: 5
Joined: Tue Aug 19, 2014 3:48 pm

Re: error with plug-ins eclipse

Post by msk »

Have the same problem.

My plugin:

public class TestPlugin extends com.eteks.sweethome3d.plugin.Plugin {
@Override
public PluginAction[] getActions() {
return new PluginAction[]{new TestAction()};
}
}

Application output:

Invalid plug-in jar:file:/home/msk/.eteks/sweethome3d/plugins/sh3d_mirror_plugin.jar!/ApplicationPlugin.properties:
msk.test.TestPlugin not a subclass of com.eteks.sweethome3d.plugin.Plugin
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: error with plug-ins eclipse

Post by Puybaret »

How do you launch Sweet Home 3D?
Did you check that sh3d_mirror_plugin.jar is the only plug-in in /home/msk/.eteks/sweethome3d/plugins/ folder?
Did you check its date?
Emmanuel Puybaret, Sweet Home 3D creator
msk
Posts: 5
Joined: Tue Aug 19, 2014 3:48 pm

Re: error with plug-ins eclipse

Post by msk »

Yes it is.

I tried to check if it is not a JDK version mismatch problem so I completely removed JDK7, installed JDK6, so my generated class is the same version as (for example) class from "Advanced Editing Plugin" - 32 hex = jdk 1.6.

Plugin still rejected, both on linux(64bit) and windows (64bit). Dunno what to do now ...
msk
Posts: 5
Joined: Tue Aug 19, 2014 3:48 pm

Re: error with plug-ins eclipse

Post by msk »

... I run it from within IDEA ide, using ...Bootstrap... main class, jar is copied manually into plugins folder.
msk
Posts: 5
Joined: Tue Aug 19, 2014 3:48 pm

Re: error with plug-ins eclipse

Post by msk »

OK, it should be a some weird problem within IDE, because I tried to start locally installed sh3d (using windows installer) and plugin was loaded (I see meny entry).

But what to do now. I need to debug the plugin :D ...
msk
Posts: 5
Joined: Tue Aug 19, 2014 3:48 pm

Re: error with plug-ins eclipse

Post by msk »

Yes, it's IDEA problem.

When IDEA is executing project (in debug mode), commandline looks like:

C:\Program Files\Java\jdk1.6.0_38\bin\java" -Dvisualvm.id=4187372098827 -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.6.0_38\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_38\jre\lib\ext\sunmscapi.jar;C:\Users\msk\tmp\untitled\out\production\untitled;C:\Users\msk\tmp\untitled\lib\SweetHome3D-4.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.eteks.sweethome3d.SweetHome3DBootstrap

When I removed all that additional jars and only sh3d.jar remained, plugin was loaded successfully.

I'll try to find which library will break it, maybe some custom classloaders are used there ...

Thx and sry for mistake.
rbversace
Posts: 1
Joined: Wed Aug 02, 2017 11:16 am
Country: Italy

Re: error with plug-ins eclipse

Post by rbversace »

I have the same problem using the debugger for volume example project:
Invalid plug-in jar:file:/C:/Users/user/Application%20Data/eTeks/Sweet%20Home%203D/plugins/VolumePlugin.sh3p!/com%2Feteks%2Ftest%2FApplicationPlugin.properties:
com.eteks.test.VolumePlugin not a subclass of com.eteks.sweethome3d.plugin.Plugin

If copy the JAR on plugin folder the plugin work properly.

How can I resolve the problem and how can I use the dubegger?

Thanks
RV
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: error with plug-ins eclipse

Post by Puybaret »

Using the debugger is explained in the plug-in developer guide but I don't think you need it. The reported error suggests that you should check the super class of your com.eteks.test.VolumePlugin class.
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest