Quantcast

GroovyFX, build failed

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

GroovyFX, build failed

citron
Hi,

I couldn't find a binary for GroovyFX to download so I tried building it my self, but its failing..

Any ideas what I am doing wrong here?

Thanks!


C:\Program Files (x86)\Groovy\groovyfx>ant
Buildfile: C:\Program Files (x86)\Groovy\groovyfx\build.xml

-pre-init:

-init-private:

-init-user:

-init-project:

-init-macrodef-property:

-do-init:

-post-init:

-init-check:

-init-ap-cmdline-properties:

-init-macrodef-javac-with-processors:

-init-macrodef-javac-without-processors:

-init-macrodef-javac:

-init-macrodef-junit:

-init-debug-args:

-init-macrodef-nbjpda:

-init-macrodef-debug:

-init-macrodef-java:

-init-presetdef-jar:

-init-ap-cmdline-supported:

-init-ap-cmdline:

init:

-deps-jar-init:
   [delete] Deleting: C:\Program Files (x86)\Groovy\groovyfx\build\built-jar.properties

deps-jar:

-warn-already-built-jar:
[propertyfile] Updating property file: C:\Program Files (x86)\Groovy\groovyfx\build\built-jar.properties

-check-automatic-build:

-clean-after-automatic-build:

-verify-automatic-build:

-groovy-init-macrodef-javac:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:force-recompile

-pre-pre-compile:

-pre-compile:

-copy-persistence-xml:

-compile-depend:

-do-compile:
  [groovyc] Compiling 1 source file to C:\Program Files (x86)\Groovy\groovyfx\build\classes
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] Compile error during compilation with javac.
  [groovyc] C:\Program Files (x86)\Groovy\groovyfx\src\main\groovy\groovyx\javafx\GroovyFX.java:45: cannot find symbol
  [groovyc] symbol  : method launch(java.lang.String)
  [groovyc] location: class javafx.application.Application
  [groovyc]          Application.launch((String)null);
  [groovyc]                     ^
  [groovyc] 1 error
  [groovyc]
  [groovyc]
  [groovyc] 1 error
  [groovyc]

BUILD FAILED
C:\Program Files (x86)\Groovy\groovyfx\nbproject\build-impl.xml:606: The following error occurred while executing this line:
C:\Program Files (x86)\Groovy\groovyfx\nbproject\groovy-build.xml:23: Forked groovyc returned error code: 1

Total time: 2 seconds

C:\Program Files (x86)\Groovy\groovyfx>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

Jim Clarke-3
Where did you get the GroovyFX source from?
Also, which version of JavaFX are you using?

This compiles ok with JavaFX 2.0.2 that defines "Application.launch(String …)".
Also the latest groovyFX develop version actually invokes "Application.launch()".

If you don't want to use the latest JavaFX, then try "Application.launch((String[])null)".

jim


On Dec 4, 2011, at 10:33 AM, citron wrote:

> Hi,
>
> I couldn't find a binary for GroovyFX to download so I tried building it my
> self, but its failing..
>
> Any ideas what I am doing wrong here?
>
> Thanks!
>
>
> C:\Program Files (x86)\Groovy\groovyfx>ant
> Buildfile: C:\Program Files (x86)\Groovy\groovyfx\build.xml
>
> -pre-init:
>
> -init-private:
>
> -init-user:
>
> -init-project:
>
> -init-macrodef-property:
>
> -do-init:
>
> -post-init:
>
> -init-check:
>
> -init-ap-cmdline-properties:
>
> -init-macrodef-javac-with-processors:
>
> -init-macrodef-javac-without-processors:
>
> -init-macrodef-javac:
>
> -init-macrodef-junit:
>
> -init-debug-args:
>
> -init-macrodef-nbjpda:
>
> -init-macrodef-debug:
>
> -init-macrodef-java:
>
> -init-presetdef-jar:
>
> -init-ap-cmdline-supported:
>
> -init-ap-cmdline:
>
> init:
>
> -deps-jar-init:
>   [delete] Deleting: C:\Program Files
> (x86)\Groovy\groovyfx\build\built-jar.properties
>
> deps-jar:
>
> -warn-already-built-jar:
> [propertyfile] Updating property file: C:\Program Files
> (x86)\Groovy\groovyfx\build\built-jar.properties
>
> -check-automatic-build:
>
> -clean-after-automatic-build:
>
> -verify-automatic-build:
>
> -groovy-init-macrodef-javac:
> Trying to override old definition of task
> http://www.netbeans.org/ns/j2se-project/3:javac
> Trying to override old definition of task
> http://www.netbeans.org/ns/j2se-project/3:force-recompile
>
> -pre-pre-compile:
>
> -pre-compile:
>
> -copy-persistence-xml:
>
> -compile-depend:
>
> -do-compile:
>  [groovyc] Compiling 1 source file to C:\Program Files
> (x86)\Groovy\groovyfx\build\classes
>  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException:
> startup failed:
>  [groovyc] Compile error during compilation with javac.
>  [groovyc] C:\Program Files
> (x86)\Groovy\groovyfx\src\main\groovy\groovyx\javafx\GroovyFX.java:45:
> cannot find symbol
>  [groovyc] symbol  : method launch(java.lang.String)
>  [groovyc] location: class javafx.application.Application
>  [groovyc]          Application.launch((String)null);
>  [groovyc]                     ^
>  [groovyc] 1 error
>  [groovyc]
>  [groovyc]
>  [groovyc] 1 error
>  [groovyc]
>
> BUILD FAILED
> C:\Program Files (x86)\Groovy\groovyfx\nbproject\build-impl.xml:606: The
> following error occurred while executing this line:
> C:\Program Files (x86)\Groovy\groovyfx\nbproject\groovy-build.xml:23: Forked
> groovyc returned error code: 1
>
> Total time: 2 seconds
>
> C:\Program Files (x86)\Groovy\groovyfx>
>
> -----
> Project pages  
> AndersTool    
> earBuddy
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/GroovyFX-build-failed-tp5046461p5046461.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

citron
Thanks Jim,

this is working:

Application.launch((String[])null);



About the versions I'm using,

java 1.7.0
groovy-1.8.2
javafx_sdk-2_0_1-windows-x64
apache-ant-1.8.2

GroovyFX, I can't find the version info being mentioned anywhere.. but downloaded it from here:
https://github.com/groovyfx-project/groovyfx/downloads
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

Jim Clarke-3
You might want the develop branch.

Sent from my iPhone

On Dec 4, 2011, at 2:41 PM, citron <[hidden email]> wrote:

> Thanks Jim,
>
> this is working:
>
> Application.launch((String[])null);
>
>
>
> About the versions I'm using,
>
> java 1.7.0
> groovy-1.8.2
> javafx_sdk-2_0_1-windows-x64
> apache-ant-1.8.2
>
> GroovyFX, I can't find the version info being mentioned anywhere.. but
> downloaded it from here:
> https://github.com/groovyfx-project/groovyfx/downloads
> https://github.com/groovyfx-project/groovyfx/downloads 
>
>
> -----
> Project pages  
> AndersTool    
> earBuddy
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/GroovyFX-build-failed-tp5046461p5046927.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

citron
I am trying out some of the examples found in groovyfx/src/demo/groovy.

I have to restart the groovy console between tests, or I get an exception.

Is this a bug fixed in a later version of GroovyFX or am I doing something fundamentally wrong?



java.lang.IllegalStateException: Application launch must not be called more than once

        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:75)

        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:56)

        at javafx.application.Application.launch(Application.java:184)

        at groovyx.javafx.GroovyFX.start(GroovyFX.java:45)

        at groovyx.javafx.GroovyFX$start.call(Unknown Source)

        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

        at ConsoleScript1.run(ConsoleScript1:32)

        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)

        at groovy.lang.GroovyShell.run(GroovyShell.java:517)

        at groovy.lang.GroovyShell.run(GroovyShell.java:172)

        at groovy.lang.GroovyShell$run.call(Unknown Source)

        at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy:924)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:883)

        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)

        at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:601)

        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:883)

        at groovy.lang.Closure.call(Closure.java:410)

        at groovy.lang.Closure.call(Closure.java:404)

        at groovy.lang.Closure.run(Closure.java:488)

        at java.lang.Thread.run(Thread.java:722)


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

Jim Clarke-3
I am not sure if we should handle that or not. Let us think about it.

Sent from my iPhone

On Dec 4, 2011, at 6:20 PM, citron <[hidden email]> wrote:

> I am trying out some of the examples found in groovyfx/src/demo/groovy.
>
> I have to restart the groovy console between tests, or I get an exception.
>
> Is this a bug fixed in a later version of GroovyFX or am I doing something
> fundamentally wrong?
>
>
>
> java.lang.IllegalStateException: Application launch must not be called more
> than once
>
>    at
> com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:75)
>
>    at
> com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:56)
>
>    at javafx.application.Application.launch(Application.java:184)
>
>    at groovyx.javafx.GroovyFX.start(GroovyFX.java:45)
>
>    at groovyx.javafx.GroovyFX$start.call(Unknown Source)
>
>    at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
>
>    at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>
>    at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>
>    at ConsoleScript1.run(ConsoleScript1:32)
>
>    at
> groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)
>
>    at groovy.lang.GroovyShell.run(GroovyShell.java:517)
>
>    at groovy.lang.GroovyShell.run(GroovyShell.java:172)
>
>    at groovy.lang.GroovyShell$run.call(Unknown Source)
>
>    at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy:924)
>
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>    at java.lang.reflect.Method.invoke(Method.java:601)
>
>    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>
>    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>
>    at
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
>
>    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:883)
>
>    at
> org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
>
>    at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
>
>    at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy)
>
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>    at java.lang.reflect.Method.invoke(Method.java:601)
>
>    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>
>    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>
>    at
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
>
>    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:883)
>
>    at groovy.lang.Closure.call(Closure.java:410)
>
>    at groovy.lang.Closure.call(Closure.java:404)
>
>    at groovy.lang.Closure.run(Closure.java:488)
>
>    at java.lang.Thread.run(Thread.java:722)
>
>
>
>
> -----
> Project pages  
> AndersTool    
> earBuddy
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/GroovyFX-build-failed-tp5046461p5047366.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

svenson_2703
I'm getting the same error:
Caught: java.lang.IllegalStateException: Application launch must not be called more than once
        at demo.groovy.ChartDemo.run(ChartDemo.groovy:32)
Line 32 is: GroovyFX.start {

After I called dozens of gfx examples via script through an GroovyServ instance successfully, I now get this error on every second call.

Closing my groovyserv instance (which holds the JVM instance for subsequent calls) helps.
I got this error the first time after I had an error with the 'PopupExamle' script (exchanging 'stage' with 'stage.getOwner()' to heal the Button click funtionality).

My impression is, it's sthg like a stateful class loaded with jfxrt.jar, which is never released.
Regards, Sven.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

Jim Clarke-3
This is a feature of JavaFX. 
The javafx.application.Application.launch() method can only be called once.

From http://docs.oracle.com/javafx/2.0/api/javafx/application/Application.html
"Launch a standalone application. This method is typically called from the main method(). It must not be called more than once or an exception will be thrown."

The GroovyFX class extends javafx.application.Application and it's start method takes a closure argument that invokes the Application.launch() method.
The proper thing to do is only call GroovyFX.start() once. If you need additional Stage's, then create those stages from the SceneGraphBuilder within the closure passed to GroovyFX.start().

If you want to run the demos, it is suggested that you use gradle from the command line.

gradle AccordionDemo
gradle AnalogClockDemo

gradle tasks (to list them all, just look under Demo tasks).

jim

On Dec 7, 2011, at 10:45 AM, svenson_2703 wrote:

I'm getting the same error:
Caught: java.lang.IllegalStateException: Application launch must not be
called more than once
       at demo.groovy.ChartDemo.run(ChartDemo.groovy:32)
Line 32 is: GroovyFX.start {

After I called dozens of gfx examples via script through an GroovyServ
instance successfully, I now get this error on every second call.

Closing my groovyserv instance (which holds the JVM instance for subsequent
calls) helps.
I got this error the first time after I had an error with the 'PopupExamle'
script (exchanging 'stage' with 'stage.getOwner()' to heal the Button click
funtionality).

My impression is, it's sthg like a stateful class loaded with jfxrt.jar,
which is never released.
Regards, Sven.

--
View this message in context: http://groovy.329449.n5.nabble.com/GroovyFX-build-failed-tp5046461p5056057.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

svenson_2703
Hm, I can't see that this behaviour is a feature.
What I do is calling a GroovyFX script, closing it and then calling another GFX script on the same JVM.
After I got an exception once it now fails when called a second time on the same JVM.
My workaround now is to invoke a new JVM for every script call, means that I don't let GroovyServ invoke the script for me (by shebanging "#!/usr/bin/env groovy) but executing it directly with the groovy command.
(Platform is Windows XP with cygwin)

I don't believe it's a GroovyFX rather than a JavaFX problem, because the ScalaFX guys have the same kind of problem, when they excute JFX stuff in the same JVM:
http://stackoverflow.com/questions/6954977/interruptedexception-thrown-when-running-javafx-2-0-beta-app-from-sbt-0-10-1

May be it's the SecurityManager, may be the JVM (or it's javafx.application.Application class) is in a way, yeah "polluted" by the former calls..

Regards, Sven.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: GroovyFX, build failed

Jim Clarke-3
You must only call GroovFX.start once.

After that you can use the SceneGraphBuilder.defer method

==========================
import groovyx.javafx.SceneGraphBuilder
import groovyx.javafx.GroovyFX

def sg = new SceneGraphBuilder();
Thread.startDaemon({ GroovyFX.start{} });
sg.defer {
def stage1 = sg.stage(primary: false, x:100, y: 100) {
scene(width: 100, height: 100, fill:groovyblue)
        }
stage1.show();
}

sg.defer {
def stage2 = sg.stage(primary: false, x: 100, y: 400) {
scene(width: 100, height: 100, fill:red)
        }
stage2.show()
}
============================

The exception you are seeing comes directly from javafx.scene.Application.launch(),
which can only be called once.

jim

On Dec 8, 2011, at 11:25 AM, svenson_2703 wrote:

Hm, I can't see that this behaviour is a feature.
What I do is calling a GroovyFX script, closing it and then calling another
GFX script on the same JVM.
After I got an exception once it now fails when called a second time on the
same JVM.
My workaround now is to invoke a new JVM for every script call, means that I
don't let GroovyServ invoke the script for me (by shebanging "#!/usr/bin/env
groovy) but executing it directly with the groovy command.
(Platform is Windows XP with cygwin)

I don't believe it's a GroovyFX rather than a JavaFX problem, because the
ScalaFX guys have the same kind of problem, when they excute JFX stuff in
the same JVM:
http://stackoverflow.com/questions/6954977/interruptedexception-thrown-when-running-javafx-2-0-beta-app-from-sbt-0-10-1
http://stackoverflow.com/questions/6954977/interruptedexception-thrown-when-running-javafx-2-0-beta-app-from-sbt-0-10-1  

May be it's the SecurityManager, may be the JVM (or it's
javafx.application.Application class) is in a way, yeah "polluted" by the
former calls..

Regards, Sven.

--
View this message in context: http://groovy.329449.n5.nabble.com/GroovyFX-build-failed-tp5046461p5059328.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Loading...