Menu

Sample with jwsdp-1.1 & final JAXB-1.0

Help
2003-03-05
2003-04-05
  • Roland Ettema

    Roland Ettema - 2003-03-05

    Hi all the new JWSDP-1.1 contains the final JAXB-1.0.

    I had to make changes in my build.properties file for the sample of uml2ejb.

    1. -> qname.libs=C://jwsdp-1.1/jwsdp-shared/lib/jax-qname.jar
    2.-> add to classpath like this: build.classpath=${uml2ejb.libs}:${jaxb.libs}:${qname.libs}:${velocity.libs}:${xdoclet.libs}:${ant.libs}:${log4j.libs}:${struts.libs}:${j2ee.libs}

    This was the easy and dirty part but it indicates the first problem well. The second problem is this exception during the build and I dont know what to do

         [java] genjava:
         [java]     [unzip] Expanding: C:\devtools\uml2ejb\sample\CarRentalSystem15.zargo into C:\devtools\uml2ejb\sample\build\model\unzipped
         [java]     [style] Transforming into C:\devtools\uml2ejb\sample\build\model

         [java] BUILD FAILED
         [java] file:C:/devtools/uml2ejb/sample/build.xml:115: javax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory could not be instantiated: java.lang.NoClassDefFoundError: com/sun/xml/bind/ImplementationRegistry   
         [java]  - with linked exception:
         [java] [java.lang.NoClassDefFoundError: com/sun/xml/bind/ImplementationRegistry]

         [java] Total time: 2 seconds

    Who can help me ?

    !!!! see you at JAX-2003 in Frankfurt !!!!

    Roland Ettema
    email: vigenic@netscape.net

     
    • Roland Ettema

      Roland Ettema - 2003-03-05

      Changed the build.properties in this way

      ------start build.properties---------
      # ATTENTION: this is an example file how to overwrite settings in this
      # project.  Please rename it to "build.properties" and adjust the
      # settings to your needs.

      #
      # Only the two properties
      #
      #   * uml2ejb.home
      #   * build.classpath
      #
      # are used by build.xml.
      #
      # The remaining ones are just for easier maintenance of the data.
      #
      # The new UML2EJB version has packaged almost all of the required
      # jars into the "lib" directory.
      #
      # "JAXB" from SUN and "ant" from Jakarta are not included.
      #
      # The properties here assume that you have downloaded them
      # and unpacked them into the directory ${tools.base.dir}
      #

      #
      # Set the path to the root directory of the Uml2Ejb distribution (see
      # http://uml2ejb.sourceforge.net/\)
      #
      # We are in the sub-directory "sample" of the Uml2Ejb distribution.
      # Just one directory up is all we need.
      #
      uml2ejb.home=c://devtools/uml2ejb/
      #
      # All required packages are assumed to be unpacked into this dir
      #
      tools.base.dir=/home/stefan/tools/
      #
      # Set the path to the root directory of the JAXB distribution (see
      # http://java.sun.com/xml/jaxb/\)
      #

      jwsdp.home=c://jwsdp-1.1/
      jaxb.home=${jwsdp.home}jaxb-1.0/
      jaxp.home=${jwsdp.home}jaxp-1.2.2/
      jwsdp.shared=${jwsdp.home}/jwsdp-shared/

      #
      # Set the path to the root directory of the Velocity distribution (see
      # http://jakarta.apache.org/velocity/\)
      #
      # Velocity 1.2 comes packaged in the lib directory of Uml2Ejb by default
      #
      velocity.home=${uml2ejb.home}lib/
      #
      # Set the path to the root directory of the Xdoclet distribution (see
      # http://xdoclet.sourceforge.net/\)
      #
      # XDoclet comes packaged in the lib directory of Uml2Ejb by default
      #
      xdoclet.home=${uml2ejb.home}lib/
      #
      # Set the path to the root directory of the log4j distribution (see
      # http://jakarta.apache.org/log4j/\)
      #
      # Log4j and Jakarta commons logging come packaged in the lib directory of Uml2Ejb by default
      #
      log4j.home=${uml2ejb.home}lib/
      commons.logging.home=${uml2ejb.home}lib/
      #
      # Set the path to the root directory of the ant distribution (see
      # http://jakarta.apache.org/ant/\)
      #
      myant.home=C://jwsdp-1.1/jakarta-ant-1.5.1/
      #
      # Set the path to the root directory of the Jboss distribution (see
      # http://www.jboss.org/\)
      #
      jboss.home=C://jboss-3.0.6_tomcat-4.1.18/
      #
      # Set the path to the root directory of the J2EE SDK distribution (see
      # http://java.sun.com/j2ee/\)
      #
      j2ee.home=C://j2sdkee1.4/
      #
      # Set the path to the root directory of the Struts distribution (see
      # http://jakarta.apache.org/struts/\)
      #
      # Struts comes packaged in the lib directory of Uml2Ejb by default
      #
      struts.home=${uml2ejb.home}lib/

      #
      # The exact libraries used.  Change these values if you're using
      # different versions.  If there are multiple jars for one project,
      # one can separate them with the usual classpath separators ':' or ';'.
      #
      uml2ejb.libs=${uml2ejb.home}uml2ejb.jar:${uml2ejb.home}jaxbfix
      #
      jaxb.libs=${jaxb.home}lib/jaxb-api.jar:${jaxb.home}lib/jaxb-libs.jar:${jaxb.home}lib/jaxb-ri.jar:${jaxb.home}lib/jaxb-xjc.jar
      jaxp.libs=${jaxp.home}lib/jaxp-api.jar:${jaxp.home}lib/endorsed/dom.jar:${jaxp.home}lib/endorsed/sax.jar:${jaxp.home}lib/endorsed/xercesImpl.jar:${jaxp.home}lib/endorsed/xalan.jar:${jaxp.home}lib/endorsed/xsltc.jar
      jwsdp.shared.libs={jwsdp.shared}lib/jax-qname.jar
      #
      velocity.libs=${velocity.home}velocity-dep-1.2.jar
      #
      xdoclet.libs=${xdoclet.home}/xdoclet-ejb-module.jar:${xdoclet.home}/xdoclet-java-module.jar:${xdoclet.home}/xdoclet-jboss-module.jar:${xdoclet.home}/xdoclet-web-module.jar:${xdoclet.home}/xdoclet-xdoclet-module.jar:${xdoclet.home}/xdoclet.jar:${xdoclet.home}/xjavadoc.jar:${xdoclet.home}/xdoclet-jmx-module.jar
      #
      log4j.libs=${log4j.home}/log4j.jar:${commons.logging.home}commons-logging.jar:${commons.logging.home}commons-logging-api.jar
      #
      ant.libs=${myant.home}lib/ant.jar:${myant.home}lib/optional.jar

      #
      j2ee.libs=${jboss.home}server/default/lib/jboss-j2ee.jar:${j2ee.home}/lib/j2ee.jar
      #
      struts.libs=${struts.home}struts.jar

      #
      # This property is used in build.xml to define the build classpath
      #
      build.classpath=${uml2ejb.libs}:${jaxb.libs}:${jaxp.libs}:${jwsdp.shared.libs}:${qname.libs}:${velocity.libs}:${xdoclet.libs}:${ant.libs}:${log4j.libs}:${struts.libs}:${j2ee.libs}

      ------end build.properties----------

      ------start <section> launchbuild.xml---------
          <target name="launch"
                  description="Launches build script after initializing the system classpath" >

              <echo message="Running the build script on a separate VM..."/>
              <java classname="org.apache.tools.ant.Main" fork="true">
                  <classpath refid="launch.class.path" />
                  <jvmarg value="-Dant.home=${ant.home}" />
                  <jvmarg value="-Dcom.sun.xml.bind.ContextFactory=com.sun.xml.bind.DefaultJAXBContextImpl" />
              </java>
          </target>
      ------end launchbuild.xml----------

      Now it works with the final release, still had to work with the launchBuild.xml

      Roland Ettema
      vigenic@netscape.net

       
    • Anonymous

      Anonymous - 2003-04-05

      I have followed all instructions as above but I still get the same error as the first post? What do I miss?

      Pls help.

       

Log in to post a comment.