Pivot
  1. Pivot
  2. PIVOT-101

Build on JDK1.5/Mac can cause issues

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: wtk
    • Labels:
      None
    • Environment:
      OSX 10.5.6, DesktopApplicationContext, JRE 1.6.0_07-b06-153
      Possibly others

      Description

      > java -cp lib/pivot-core.jar:lib/pivot-wtk.jar:lib/pivot-wtk.terra.jar:lib/pivot-tutorials.jar:wtk/lib/stax-api-1.0.jar:wtk/lib/stax-1.2.0.jar pivot.wtk.DesktopApplicationContext pivot.tutorials.Demo

      Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: pivot.wtk.content.ButtonDataRenderer.getStyles()Lpivot/collections/Dictionary;
      at pivot.wtk.RadioButton.<clinit>(RadioButton.java:30)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:414)
      at pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:167)
      at pivot.wtkx.WTKXSerializer.readObject(WTKXSerializer.java:158)
      at pivot.tutorials.Demo$RollupStateHandler.previewExpandedChange(Demo.java:99)
      at pivot.wtk.Rollup$RollupStateListenerList.previewExpandedChange(Rollup.java:53)
      at pivot.wtk.Rollup.setExpanded(Rollup.java:108)
      at pivot.tutorials.Demo$15.run(Demo.java:506)
      at pivot.wtk.ApplicationContext$ScheduledCallback$1.run(ApplicationContext.java:1114)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:300)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:210)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:200)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:195)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:187)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

        Activity

        Hide
        Todd Volkert added a comment -

        This seemed to be caused by building on JDK 1.5 in the Mac (though I don't know why). I added a note to the BUILD file and a check in the build.xml file to help the user towards avoiding this problem.

        Show
        Todd Volkert added a comment - This seemed to be caused by building on JDK 1.5 in the Mac (though I don't know why). I added a note to the BUILD file and a check in the build.xml file to help the user towards avoiding this problem.
        Hide
        Todd Volkert added a comment -

        This only happens to me on Mac OSX when building using JDK 1.5 (even if I launch using Java 6). I had set my Java preferences to use Java 6 by default, yet an echo of $

        {ant.java.version}

        in the build file showed that I was using 1.5 within the Ant build. I had to manually change the "CurrentJDK" symlink in /System/Library/Frameworks/JavaVM.framework/Versions to point to 1.6 to get Ant to pick that up. Once I did this and ran a clean build. The problem went away.

        I'm leaving this bug open so we can determine the best course of action. Do we spit out a warning in our build file if the developer is building against 1.5? Do we add any extra info to our BUILD file? Does anyone know a better way to switch the OSX JDK version than to mess with buried symlinks? Does anyone have a clue as to why this error would happen in the first place, even when built against 1.5?

        Show
        Todd Volkert added a comment - This only happens to me on Mac OSX when building using JDK 1.5 (even if I launch using Java 6). I had set my Java preferences to use Java 6 by default, yet an echo of $ {ant.java.version} in the build file showed that I was using 1.5 within the Ant build. I had to manually change the "CurrentJDK" symlink in /System/Library/Frameworks/JavaVM.framework/Versions to point to 1.6 to get Ant to pick that up. Once I did this and ran a clean build. The problem went away. I'm leaving this bug open so we can determine the best course of action. Do we spit out a warning in our build file if the developer is building against 1.5? Do we add any extra info to our BUILD file? Does anyone know a better way to switch the OSX JDK version than to mess with buried symlinks? Does anyone have a clue as to why this error would happen in the first place, even when built against 1.5?
        Hide
        Greg Brown added a comment -

        Specifically, from a command prompt in the root workspace directory:

        svn update
        ant clean
        ant deploy
        java -cp lib/pivot-core.jar:lib/pivot-wtk.jar:lib/pivot-wtk.terra.jar:lib/pivot-tutorials.jar:wtk/lib/stax-api-1.0.jar:wtk/lib/stax-1.2.0.jar pivot.wtk.DesktopApplicationContext pivot.tutorials.Demo

        Show
        Greg Brown added a comment - Specifically, from a command prompt in the root workspace directory: svn update ant clean ant deploy java -cp lib/pivot-core.jar:lib/pivot-wtk.jar:lib/pivot-wtk.terra.jar:lib/pivot-tutorials.jar:wtk/lib/stax-api-1.0.jar:wtk/lib/stax-1.2.0.jar pivot.wtk.DesktopApplicationContext pivot.tutorials.Demo
        Hide
        Greg Brown added a comment -

        > did you build and run from the command line (not from Eclipse)?

        Yes.

        Show
        Greg Brown added a comment - > did you build and run from the command line (not from Eclipse)? Yes.
        Hide
        Todd Volkert added a comment -

        The only real lead: this issue only goes away when I delete wtk/src/META-INF/services/javax.xml.stream.XMLInputFactory and run a clean build. Greg, when you tried to reproduce this, did you build and run from the command line (not from Eclipse)?

        Show
        Todd Volkert added a comment - The only real lead: this issue only goes away when I delete wtk/src/META-INF/services/javax.xml.stream.XMLInputFactory and run a clean build. Greg, when you tried to reproduce this, did you build and run from the command line (not from Eclipse)?
        Hide
        Todd Volkert added a comment -

        So this happens when the tutorial demo is trying to automatically expand the first rollup, meaning that the demo starts up but without the "Buttons" rollup expanded. And because of this error, RadioButton fails to load, and I can't expand that rollup henceforth in the demo (I then get NoClassDefFoundError because it didn't initialize the class).

        Further, if I comment out that automatic expansion and do it manually, I still get this issue! I can't expand any rollup in that demo that uses a button data renderer, 'cause I get a variant of this error.

        Show
        Todd Volkert added a comment - So this happens when the tutorial demo is trying to automatically expand the first rollup, meaning that the demo starts up but without the "Buttons" rollup expanded. And because of this error, RadioButton fails to load, and I can't expand that rollup henceforth in the demo (I then get NoClassDefFoundError because it didn't initialize the class). Further, if I comment out that automatic expansion and do it manually, I still get this issue! I can't expand any rollup in that demo that uses a button data renderer, 'cause I get a variant of this error.
        Hide
        Greg Brown added a comment -

        Need more info. I just did a clean build from trunk on both OSX 10.5.6/JDK 1.6.0 and Windows XP Professional SP3/JDK 1.6.0_12 and I can't reproduce this issue.

        Show
        Greg Brown added a comment - Need more info. I just did a clean build from trunk on both OSX 10.5.6/JDK 1.6.0 and Windows XP Professional SP3/JDK 1.6.0_12 and I can't reproduce this issue.
        Hide
        Todd Volkert added a comment -

        Removed "affects version 1.1" – I just downloaded 1.1-src, built it, ran the tutorial demo, and this issue does not occur. Sorry for the confusion.

        Show
        Todd Volkert added a comment - Removed "affects version 1.1" – I just downloaded 1.1-src, built it, ran the tutorial demo, and this issue does not occur. Sorry for the confusion.
        Hide
        Todd Volkert added a comment -

        I get this on the trunk (latest source code), and it happens as soon as I launch the tutorial demo. It does NOT happen in Linux, for whatever that's worth.

        Show
        Todd Volkert added a comment - I get this on the trunk (latest source code), and it happens as soon as I launch the tutorial demo. It does NOT happen in Linux, for whatever that's worth.
        Hide
        Greg Brown added a comment -

        Need a little more info. Did you get this using the 1.1 release? Anything else that might help track it?

        Show
        Greg Brown added a comment - Need a little more info. Did you get this using the 1.1 release? Anything else that might help track it?

          People

          • Assignee:
            Todd Volkert
            Reporter:
            Todd Volkert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development