2 Replies Latest reply on Aug 26, 2006 10:12 PM by VRasputnis

    Help with DAOFlex/Builder/Eclipse errors

    kedward Level 1
      Hello,

      I installed Flex builder as a plugin to eclipse, and was trying the DAOFlex tutorial from the flex dev site, and I get the below errors when trying to run ant/build.xml, which seem to be indicating that I have a java5 JRE somewhere, BUT for the life of me I can't figure out where it is pulling in java5. I checked the windows-preferences->java->jre's but can't find java5 anywhere. I set the java-home, and path of the system to have the same adobe JRE as flexbuilder is using..... Any ideas what else to check? Or maybe the DAOflex classes were built with java5, but you would think adobe would check this before they publish a tutorial using 1.4?

      Thank for any help
      Ed

      ERROR:

      generate:
      [javadoc] Generating Javadoc
      [javadoc] Javadoc execution
      [javadoc] Loading source files for package com.theriabook.datasource...
      [javadoc] Constructing Javadoc information...
      [javadoc] CTI DaoFlex Code Generator 0.9.6
      [javadoc] Done. 0 errors, 0 warnings.
      [javadoc] javadoc: In doclet class com.theriabook.daoflex.AntDoclet, method start has thrown an exception java.lang.reflect.InvocationTargetException
      [javadoc] java.lang.UnsupportedClassVersionError: com/theriabook/daoflex/SqlCompiler (Unsupported major.minor version 49.0)
      [javadoc] at java.lang.ClassLoader.defineClass0(Native Method)
      [javadoc] at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
      [javadoc] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      [javadoc] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
      [javadoc] at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
      [javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
      [javadoc] at java.security.AccessController.doPrivileged(Native Method)
      [javadoc] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      [javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      [javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      [javadoc] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      [javadoc] at com.theriabook.daoflex.WebServiceCreator.<init>(WebServiceCreator.java:230)
      [javadoc] at com.theriabook.daoflex.AntDoclet.checkWsCreator(AntDoclet.java:146)
      [javadoc] at com.theriabook.daoflex.AntDoclet.generateDao(AntDoclet.java:383)
      [javadoc] at com.theriabook.daoflex.AntDoclet.processClass(AntDoclet.java:527)
      [javadoc] at com.theriabook.daoflex.DocletBase.processAllClasses(DocletBase.java:97)
      [javadoc] at com.theriabook.daoflex.DocletBase.startImpl(DocletBase.java:121)
      [javadoc] at com.theriabook.daoflex.AntDoclet.start(AntDoclet.java:544)
      [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [javadoc] 1 error
      [javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [javadoc] at java.lang.reflect.Method.invoke(Method.java:324)
      [javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:193)
      [javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:92)
      [javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:311)
      [javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:121)
      [javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:41)
      [javadoc] at com.sun.tools.javadoc.Main.main(Main.java:31)
      build-original:
      [javac] Compiling 2 source files to C:\IDE\workspace\DaoFlex-Examples\bin\original
      [jar] Building jar: C:\fds\jrun4\servers\default\theriabook\WEB-INF\lib\daoflex-examples.jar
        • 1. Re: Help with DAOFlex/Builder/Eclipse errors
          kedward Level 1
          well, I found the answer... the tutorial leaves out a few things as far as using jdk 4 vs 5.... basically the easiest solution is to use jdk5 and import the xerces jars to the project...
          • 2. Help with DAOFlex/Builder/Eclipse errors
            Hi,

            This happens often when your c:\...JDK is 1.5 and that is what Eclipse-Ant would pick up - please check Windows/Preferences/Ant/GlobalEntries. Meanwhile Flex Plugin enforces (as default) JDK1.4 as you noticed in Windows/Preferences/Java/InstalledJREs.

            You already found one good solution - to turn default JRE to 1.5. Another - to change Ant Global entries to 1.4.
            Otherwise we will have a confict or rt.jar versus tools.jar (:

            Kind Regards,
            Victor (vrasputnis@faratasystems.com)