France
Joined: May 6, 2012
Post Count: 17
Status:
Offline
Problem using Ant, missing classes
Good evening,
I come to ask you a question once more, because I now have an issue building my application with Ant. The build is successful (I tried the jarExecutable and MacOsInstaller preselection with the good VM arguments) but when I launch my application all the functionnalities I added in two new files placed in com.eteks.sweethome3d.swing don't work. Nothing happens when I click on the button I added, when a new window should appear. I precise that appart from the part I added SweetHome is working well.
I checked and my classes are in build/classes. I don't understand why my functionnalities don't work, because Ant is set to pack "all workspace".
France
Joined: Nov 7, 2005
Post Count: 9141
Status:
Offline
Re: Problem using Ant, missing classes
What exception stack trace do you get in /Applications/Utilities/Console program?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: May 6, 2012
Post Count: 17
Status:
Offline
Re: Problem using Ant, missing classes
When I click on the button I added I get the error (I put what I found pertinent) :
.com.apple.JarLauncher: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.eteks.sweethome3d.swing.ControllerAction.actionPerformed(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Class com.lowagie.text.Element at com.eteks.sweethome3d.tools.ExtensionsClassLoader.findClass(Unknown Source)
France
Joined: Nov 7, 2005
Post Count: 9141
Status:
Offline
Re: Problem using Ant, missing classes
com.lowagie is the package base of iText library. Could you check the source code version you use? Because I remember that I fixed in version 3.5 an issue about iText version that was wrong in SweetHome3DBootstrap.java.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: May 6, 2012
Post Count: 17
Status:
Offline
Re: Problem using Ant, missing classes
Hello,
an idea where it can come from? Of why my panel is not showed?
The panel is printed thanks to values from a distant database. Could it be a problem of connexion? Are the supplementary sql packages automatically added by Ant?
France
Joined: Nov 7, 2005
Post Count: 9141
Status:
Offline
Re: Problem using Ant, missing classes
Without source code, it's impossible to be sure. You probably didn't pay enough attention to the encoding of the files that contain accented letters, and executed your plug-in on a different OS.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
France
Joined: May 6, 2012
Post Count: 17
Status:
Offline
Re: Problem using Ant, missing classes
Hello, I've juste read the post from Mitsaki and so I've added my packages to the SweetHome3DBootstrap, in the extensionJarsAndDlls array. And thanks to your link I know now that my .jar are included during the building, while they are in /lib.
Still the connection to the database doesn't work and I don't have any messages in the console.
Do you have any ideas of other things to do to make it work?
Please, I have 3 days left to fix it until my presentation...
France
Joined: Nov 7, 2005
Post Count: 9141
Status:
Offline
Re: Problem using Ant, missing classes
You may have to add the packages of your project in applicationPackages of SweetHome3DBootstrap too. If you have nothing in the console, run in a Terminal window your JAR executable file with command:
java -jar jarExecutableFile.jar
Without source code or a stack trace it will be difficult to help you further. I just can't guess what is wrong. I don't even know why you use a database and how!!!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer