Menu

jaxb.properties problem

Help
2002-11-06
2002-11-08
  • Bryce Fischer

    Bryce Fischer - 2002-11-06

    Hey. Saw the announcement on theserverside.com. Went to try out the package, as it sounds like exactly what I'm looking for.

    I'm currently building my ant build.xml file. When it runs the uml2ejb
    task, I get the following error message:

    BUILD FAILED
    file:D:/DOCUME~1/JAVAPR~1/build.xml:148: javax.xml.bind.JAXBException: Unable to
    locate jaxb.properties for package de.mbohlen.tools.uml2ejb.dbmapping

    My Target looks like this:
    <target name="genjava" depends="init" description="Uses UML2EJB to generate XDoclet Source">
      <taskdef  name="uml2ejb"
          classname="de.mbohlen.tools.uml2ejb.anttasks.Uml2EjbGenTask"
          classpathref="uml2ejb.path"
      />
           
      <unzip src="${src.resources.argo}/Test1.zargo" dest="${src.resources.unzipped}"/>
           
      <style    basedir="${src.resources.unzipped}"
        destdir="${src.resources.model}"
        extension=".xml"
        includes="*.xmi"
        style="${uml2ejb.home}/xmi-to-simpleOO.xsl"
      />
           
      <uml2ejb  basedir="${src.resources.model}"
          ejbDestDir="${build.generate.model}"
          includes="*.xml"
          lastModifiedCheck="true"
          templatePath="${uml2ejb.home}"
          useDefaultTemplateConfig="true"
          typeMappings="${uml2ejb.home}/TypeMapping.xml"
      >
      </uml2ejb>
    </target>

    and the classpath looks like this:
        <path id="xdoclet.path">
            <pathelement location="${xdoclet.lib}/xdoclet.jar" />
            <pathelement location="${jboss.client}/log4j.jar" />
        </path>
       
        <path id="uml2ejb.path">
            <path refid="xdoclet.path" />
            <pathelement location="${uml2ejb.home}/uml2ejb.jar" />
            <fileset dir="${uml2ejb.lib}" >
                <include name="**/*.jar"/>
            </fileset>
            <fileset dir="${jaxb.home}/lib">
                <include name="**/*.jar"/>
            </fileset>
        </path>

    I've tried to include all the jars, and I know the uml2ejb.jar is included (I've also browsed the jar file and seen the jaxb.properties file in there)

    TIA

     
    • Matthias Bohlen

      Matthias Bohlen - 2002-11-06

      Hi Bryce,

      glad you're calling.

      This problem has been reported by many users - it is called THE JAXB BUG in 1.0-beta. JAXB does not find jaxb.properties except when it is on the *system* classpath. SUN will fix this in the next release.

      UMl2EJB contains a workaround for this so that you can continue to work.

      The workaround is contained in the file called "sample/launchbuild.xml" that sets up a system classpath and launches build.xml. The file  jaxb.properties is included in the jaxbfix/ subdirectory of the new UML2EJB distribution. In build.properties, you have to include this path into "uml2ejb.libs" (see build.properties.sample).

      Finally, you start the build process with
         ant -f launchbuild.xml
      and everything builds OK.

      Cheers...
      Matthias Bohlen

       
    • Bryce Fischer

      Bryce Fischer - 2002-11-08

      Thanks Matthias.

      Worked like a charm. Excellent tool. Thanks again.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.