views:

209

answers:

2

When trying to use GraphicsBuilder, I get a java.lang.NoClassDefFoundError for groovy.swing.factory.BindProxyFactory.

This is my environment:

% java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
% groovy --version
Groovy Version: 1.5.7 JVM: 1.6.0_10
% ls ~/.groovy/lib/graphicsbuilder*
graphicsbuilder-0.6.1.jar
...

And this is what I try to do:

 % groovysh
Groovy Shell (1.5.7, JVM: 1.6.0_10)
Type 'help' or '\h' for help.
-------------------------------------------------------------------------------
groovy:000> import groovy.swing.SwingBuilder
groovy:000> import groovy.swing.j2d.GraphicsBuilder  
groovy:000> import groovy.swing.j2d.GraphicsPanel
groovy:000> def gb = new GraphicsBuilder()  
ERROR java.lang.NoClassDefFoundError: groovy.swing.factory.BindProxyFactory
        at groovysh_evaluate.run (groovysh_evaluate:5)
        ...

Where is BindProxyFactoryBean?

+1  A: 

It's in the Groovy 1.6 builds, not the 1.5.7 builds. Apparently GfxBuilder 6.1 was built against the Groovy 1.6 codebase.

shemnon
A: 

Yes, that is correct. Groovy 1.6.x is required for GfxBuilder 6.1 and onwards.