1 2 Previous Next 15 Replies Latest reply: Nov 2, 2012 12:49 PM by 817264 RSS

    jdk1.7_u7 not packaging on OSX

    Celer
      All when packaging using JDK1.7U07 we see this error


      Create jar file celertech-orderrouting-jfx-client-0.19.0-SNAPSHOT.jar Dir build/classes/main
      [ant:deploy] java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build4975411250886784237.fxbundler/macosx/CelerTrader-dmg-setup.scpt] in unspecified directory
      [ant:deploy]      at com.sun.javafx.tools.packager.bundlers.IOUtils.exec(IOUtils.java:131)
      [ant:deploy]      at com.sun.javafx.tools.packager.bundlers.IOUtils.exec(IOUtils.java:107)
      [ant:deploy]      at com.sun.javafx.tools.packager.bundlers.IOUtils.exec(IOUtils.java:101)
      [ant:deploy]      at com.sun.javafx.tools.packager.bundlers.MacDMGBundler.buildDMG(MacDMGBundler.java:356)
      [ant:deploy]      at com.sun.javafx.tools.packager.bundlers.MacDMGBundler.bundle(MacDMGBundler.java:80)
      [ant:deploy]      at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:522)
      [ant:deploy]      at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:505)
      [ant:deploy]      at com.sun.javafx.tools.ant.DeployFXTask.execute(DeployFXTask.java:215)
        • 1. Re: jdk1.7_u7 not packaging on OSX
          Celer
          Any idea on this.
          • 2. Re: jdk1.7_u7 not packaging on OSX
            817264
            Packaging tools in 7u7 are identical to 7u6. Did 7u6 work?

            At first glance this might be happening if you trying to use Mac system remotely. Make sure SAME user is logged on desktop. AppleScript Finder does not work if it can not secure connection to desktop.
            • 3. Re: jdk1.7_u7 not packaging on OSX
              Celer
              Hi Igor

              I am logged on locally to my mac. This only happened when we changed down to u07 from u10. I can try u06.
              • 4. Re: jdk1.7_u7 not packaging on OSX
                817264
                Try running "ant -v" to validate setup and see if you get anything else.

                Then build with environment variable JAVAFX_ANT_DEBUG set to true.
                This will save intermediate files. You can then try to run same command from command line and see if it helps to understand why osascript fails.

                If you can reliably reproduce it and if it is the problem with 7u10 builds too then it certainly make sense to report this to JIRA.
                • 5. Re: jdk1.7_u7 not packaging on OSX
                  Celer
                  HI Igor

                  Thanks for the help. We have switched from ant to gradle so the build output does not look the same. But you can see the information. I can't see anything that we have changed since it was working. The only thing that has changed is the drop in version to u07 because we thought that this was the stable release of JavaFX.

                  Sorry had to truncate the log. Don't want to raise a JIRA for not reason but happy to [put all of this in.



                  [code]
                  19:19:39.485 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class com.sun.javafx.tools.packager.bundlers.LinuxDebBundler loaded from ant loader (parentFirst)
                  19:19:39.487 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Looking for bundlers for type=ALL format=any
                  19:19:39.487 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [Windows Application Bundler] as not supporting current platform
                  19:19:39.487 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.util.jar.JarFile loaded from parent loader (parentFirst)
                  19:19:39.489 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [MSI Bundler (WiX based)] as not supporting current platform
                  19:19:39.489 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [Exe Bundler (based on Inno Setup)] as not supporting current platform
                  19:19:39.489 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [Linux Application Bundler] as not supporting current platform
                  19:19:39.490 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [RPM bundler] as not supporting current platform
                  19:19:39.490 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Skip [DEB bundler] as not supporting current platform
                  19:19:39.490 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Preparing Info.plist: /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/Info.plist
                  19:19:39.491 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource package/macosx/Info.plist
                  19:19:39.491 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource com/sun/javafx/tools/resource/mac/Info.plist.template loaded from ant loader
                  19:19:39.491 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using default package resource [Bundle config file] (add package/macosx/Info.plist to the class path to customize)
                  19:19:39.491 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.net.URL loaded from parent loader (parentFirst)
                  19:19:39.492 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.util.Map$Entry loaded from parent loader (parentFirst)
                  19:19:39.493 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource package/macosx/CelerTrader.icns loaded from ant loader
                  19:19:39.494 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using custom package resource [icon] (loaded from package/macosx/CelerTrader.icns on class path)
                  19:19:39.496 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Creating app bundle: /Users/bencuthbert/dev/code/celertech-framework-trunk/celertech-orderrouting-jfx-client/build/tmp/jfx_package/bundles/CelerTrader.app
                  19:19:39.497 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource com/sun/javafx/tools/resource/mac/JavaAppLauncher loaded from ant loader
                  19:19:39.499 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.nio.channels.FileChannel loaded from parent loader (parentFirst)
                  19:19:42.958 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.util.Arrays loaded from parent loader (parentFirst)
                  19:19:42.958 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Running [ln, -s, ../Home/jre/lib/jli/libjli.dylib, .] in /Users/bencuthbert/dev/code/celertech-framework-trunk/celertech-orderrouting-jfx-client/build/tmp/jfx_package/bundles/CelerTrader.app/Contents/PlugIns/jdk1.7.0_07.jdk/Contents/MacOS
                  19:19:42.977 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.lang.Process loaded from parent loader (parentFirst)
                  19:19:42.978 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Class java.io.BufferedReader loaded from parent loader (parentFirst)
                  19:19:43.042 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Config files are saved to /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx. Use them to customize package.
                  19:19:43.042 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Building DMG package for CelerTrader
                  19:19:43.043 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Preparing Info.plist: /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/Info.plist
                  19:19:43.043 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource package/macosx/Info.plist
                  19:19:43.043 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource com/sun/javafx/tools/resource/mac/Info.plist.template loaded from ant loader
                  19:19:43.044 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using default package resource [Bundle config file] (add package/macosx/Info.plist to the class path to customize)
                  19:19:43.045 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource package/macosx/CelerTrader.icns loaded from ant loader
                  19:19:43.045 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using custom package resource [icon] (loaded from package/macosx/CelerTrader.icns on class path)
                  19:19:43.047 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource com/sun/javafx/tools/resource/mac/JavaAppLauncher loaded from ant loader
                  19:19:44.990 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Running [ln, -s, ../Home/jre/lib/jli/libjli.dylib, .] in /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images/dmg.image/CelerTrader.app/Contents/PlugIns/jdk1.7.0_07.jdk/Contents/MacOS
                  19:19:45.076 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Config files are saved to /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx. Use them to customize package.
                  19:19:45.076 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource package/macosx/CelerTrader-background.png loaded from ant loader
                  19:19:45.076 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using custom package resource [dmg background] (loaded from package/macosx/CelerTrader-background.png on class path)
                  19:19:45.077 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource package/macosx/CelerTrader-volume.icns loaded from ant loader
                  19:19:45.077 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using custom package resource [volume icon] (loaded from package/macosx/CelerTrader-volume.icns on class path)
                  19:19:45.078 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource package/macosx/CelerTrader-post-image.sh
                  19:19:45.078 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using default package resource [script to run after application image is populated] (add package/macosx/CelerTrader-post-image.sh to the class path to customize)
                  19:19:45.078 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Preparing dmg setup: /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/CelerTrader-dmg-setup.scpt
                  19:19:45.079 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Couldn't load Resource package/macosx/CelerTrader-dmg-setup.scpt
                  19:19:45.079 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Resource com/sun/javafx/tools/resource/mac/DMGsetup.scpt loaded from ant loader
                  19:19:45.079 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Using default package resource [DMG setup script] (add package/macosx/CelerTrader-dmg-setup.scpt to the class path to customize)
                  19:19:45.080 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Creating DMG file: /Users/bencuthbert/dev/code/celertech-framework-trunk/celertech-orderrouting-jfx-client/build/tmp/jfx_package/bundles/CelerTrader.dmg
                  19:19:45.080 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Running [usr/bin/hdiutil, create, -quiet, -srcfolder, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images/dmg.image, -volname, CelerTrader, -ov, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images/CelerTrader-tmp.dmg, -format, UDRW]
                  19:19:55.114 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Running [usr/bin/hdiutil, attach, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images/CelerTrader-tmp.dmg, -quiet, -mountroot, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images]
                  19:19:56.371 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Running [osascript, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/CelerTrader-dmg-setup.scpt]
                  19:21:57.174 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/CelerTrader-dmg-setup.scpt:815:854: execution error: Finder got an error: AppleEvent timed out. (-1712)
                  19:21:57.175 [WARN] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:deploy] java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/CelerTrader-dmg-setup.scpt] in unspecified directory

                  19:21:57.192 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [DEBUG] Intermediate application bundle image: /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/images/dmg.image
                  19:21:57.193 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Config files are saved to /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx. Use them to customize package.


                  • 6. Re: jdk1.7_u7 not packaging on OSX
                    Celer
                    And the script looks like. I hate to say it was all working :)
                    tell application "Finder"
                      tell disk "CelerTrader"
                        open
                        set current view of container window to icon view
                        set toolbar visible of container window to false
                        set statusbar visible of container window to false
                        set the bounds of container window to {400, 100, 917, 370}
                        set theViewOptions to the icon view options of container window
                        set arrangement of theViewOptions to not arranged
                        set icon size of theViewOptions to 128
                        set background picture of theViewOptions to file ".background:background.png"
                        make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
                        set position of item "CelerTrader" of container window to {120, 135}
                        set position of item "Applications" of container window to {390, 135}
                        close
                        open
                        update without registering applications
                        delay 5
                      end tell
                    end tell
                    Running the script after the build I get
                    theabyss:JetTekFIX_Tester bencuthbert$ osascript -e /var/folders/4x/zjcgnrwd08j5pd073sdc0k5c0000gp/T/build1423428664719564176.fxbundler/macosx/CelerTrader-dmg-setup.scpt
                    0:1: syntax error: A “/” can’t go here. (-2740)
                    theabyss:JetTekFIX_Tester bencuthbert$ 
                    • 7. Re: jdk1.7_u7 not packaging on OSX
                      Celer
                      If i debug the script and take out the update. It looks to run. Otherwise just hangs
                      tell application "Finder"
                           tell disk "CelerTrader"
                                open
                                set current view of container window to icon view
                                set toolbar visible of container window to false
                                set statusbar visible of container window to false
                                set the bounds of container window to {400, 100, 917, 370}
                                set theViewOptions to the icon view options of container window
                                set arrangement of theViewOptions to not arranged
                                set icon size of theViewOptions to 128
                                set background picture of theViewOptions to file ".background:background.png"
                                set position of item "CelerTrader" of container window to {120, 135}
                                set position of item "Applications" of container window to {390, 135}
                                close
                           end tell
                      end tell
                      • 8. Re: jdk1.7_u7 not packaging on OSX
                        Celer
                        I have narrowed it down to the line in the script that is causing it to hang
                        update without registering applications
                        The error that I get from this (after a lapse of 2 minutes)
                        "Finder got an error: AppleEvent timed out." number -1712
                        Any ideas on what may be causing this to timeout?
                        • 9. Re: jdk1.7_u7 not packaging on OSX
                          817264
                          Thanks for the analysis. At the moment i have no good ideas and can not reproduce it myself.

                          One possible approach for you to play with is to try to increase timeout to very large value (30 mins) and see if it helps.
                          See http://books.gigatux.nl/mirror/applescriptdefinitiveguide/applescpttdg2-CHP-19-SECT-5.html

                          It could be one of following - finder will fail to execute "update" command regardless of timeout value.
                          Or it just takes longer than 2 minutes to execute it.

                          In later case it could be something special to your system. I am not 100% clear what finder tries to update for this command.
                          May be it is trying to do too much (e.g. because there could be too much stuff from previous builds?). Although we are running continuous builds for some test apps
                          and i never seen this before.

                          Anyway, this is the only next step i can think of right now.
                          • 10. Re: jdk1.7_u7 not packaging on OSX
                            Celer
                            Are you running the CI on Mountain Lion?
                            • 11. Re: jdk1.7_u7 not packaging on OSX
                              Celer
                              Our CI is running on 10.7.4 and has the same issue. The JDK is 1.7.0_u7
                              • 12. Re: jdk1.7_u7 not packaging on OSX
                                Celer
                                Does anyone else have this issue?
                                • 13. Re: jdk1.7_u7 not packaging on OSX
                                  shemnon
                                  Looks to be a mac finder bug. This stackoverflow question helped:

                                  http://stackoverflow.com/a/12098958/8020

                                  To summarize, execute these two lines in a terminal window:
                                  defaults write com.apple.Finder AppleShowAllFiles TRUE && killall Finder
                                  <Wait 60-90 seconds>
                                  defaults write com.apple.Finder AppleShowAllFiles FALSE && killall Finder
                                  Edited by: shemnon on Nov 2, 2012 10:10 AM

                                  Edited by: shemnon on Nov 2, 2012 10:12 AM
                                  • 14. Re: jdk1.7_u7 not packaging on OSX
                                    Celer
                                    That looked to work. I also put in a custom script and removed some of the features from the ant-javafx default.

                                    Thanks for the help?
                                    1 2 Previous Next