bsorrentino / swixml2

Project that extends the original swixml project providing integration with Swing Application Framework (JSR 296) and Beans Binding (JSR 295) to further simplifying the GUI creation & management
0 stars 0 forks source link

Distributed framework is missing required .jar #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am currently using swixml2 to refactor an existing Swing application. I've 
been unable to build swixml2 (looks like issue 51 addresses this), so for the 
time being I'm using:

swixml-2.5.20100414.jar

and the deps from swixml-2.5-20090909-distribution.zip 

When I build my project (JDK 1.6_10, Win XP) it compiles and gives no warnings 
or errors, however when I run the jar I get the following exception:

SwixML 2.5
Jul 18, 2010 11:00:27 PM org.swixml.SwingEngine mapMember
INFO: field [mattsMenuBar] mapped in class [tilem.TileMasterFrame]
Jul 18, 2010 11:00:27 PM org.swixml.SwingEngine mapMember
INFO: field [fileMenu] mapped in class [tilem.TileMasterFrame]
Jul 18, 2010 11:00:27 PM org.swixml.SwingEngine mapMember
INFO: field [newMenuItem] mapped in class [tilem.TileMasterFrame]
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/apple
/eawt/Application
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getDeclaredMethods(Unknown Source)
        at org.jdesktop.application.ApplicationActionMap.addAnnotationActions(Ap
plicationActionMap.java:139)
        at org.jdesktop.application.ApplicationActionMap.<init>(ApplicationActio
nMap.java:81)
        at org.jdesktop.application.ActionManager.createActionMapChain(ActionMan
ager.java:64)
        at org.jdesktop.application.ActionManager.getActionMap(ActionManager.jav
a:101)
        at org.jdesktop.application.ActionManager.getActionMap(ActionManager.jav
a:174)
        at org.jdesktop.application.ApplicationContext.getActionMap(ApplicationC
ontext.java:303)
        at org.swixml.XAction.<init>(XAction.java:83)
        at org.swixml.Parser.getMethodParamValue(Parser.java:765)
        at org.swixml.Parser.applyAttributes(Parser.java:921)
        at org.swixml.Parser.getSwing(Parser.java:613)
        at org.swixml.Parser.getSwing(Parser.java:709)
        at org.swixml.Parser.getSwing(Parser.java:709)
        at org.swixml.Parser.getSwing(Parser.java:709)
        at org.swixml.Parser.parse(Parser.java:327)
        at org.swixml.SwingEngine.render(SwingEngine.java:319)
        at org.swixml.SwingEngine.render(SwingEngine.java:298)
        at org.swixml.SwingEngine.render(SwingEngine.java:263)
        at org.swixml.jsr296.SwingApplication.render(SwingApplication.java:89)
        at tilem.TileMaster.startup(TileMaster.java:26)
        at org.jdesktop.application.Application$1.run(Application.java:252)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.apple.eawt.Application
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 43 more

In order to fix this problem I have to include the AppleJavaExtensions.jar
(http://developer.apple.com/mac/library/samplecode/AppleJavaExtensions/Introduct
ion/Intro.html) in my application. I would assume this would not be a problem 
when compiling under OS X, however for us Linux and Windows users you may want 
to include that .jar in the distribution.

Original issue reported on code.google.com by mjbeisser@gmail.com on 19 Jul 2010 at 3:15

GoogleCodeExporter commented 9 years ago
THX for feedbacks

I have downloaded a new distribution swixml-2.5-distribution-20100719.zip

let me know if it works 

however, if it is possible,  would be better to use maven start a new project

Original comment by bartolom...@gmail.com on 19 Jul 2010 at 10:35

GoogleCodeExporter commented 9 years ago
The new download fixed the problem. I wouldn't be opposed to using Maven but I 
can't find any good documentation as to how to begin using it.

Original comment by mjbeisser@gmail.com on 24 Jul 2010 at 3:09

GoogleCodeExporter commented 9 years ago

Original comment by bartolom...@gmail.com on 20 Apr 2011 at 10:08