4 Replies Latest reply on Apr 4, 2005 9:50 AM by vashistvishal

    java.lang.NoClassDefFoundError: com/sun/enterprise/tools/pac

    emailssent

      Dear All,

      NOTE: i am new to jboss,

      while executing the following command,
      ant -f build.xml package-ejb

      i am getting this error,

      Buildfile: build.xml

      init:

      prepare:

      compile-detail:

      compile-exception:

      compile-interface:

      compile-util:

      compile-ejb:


      package-account:
      [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/tools/packager/Main
      [java] Java Result: 1

      package-customer:
      [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/tools/packager/Main
      [java] Java Result: 1

      package-tx:
      [java] Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/tools/packager/Main
      [java] Java Result: 1

      package-ejb:

      BUILD SUCCESSFUL
      Total time: 1 second


      where i am wrong ?? which class it is not able to find ??

      Any help appreciated.


      -jack

        • 1. Re: java.lang.NoClassDefFoundError: com/sun/enterprise/tools

          This doesn't seem to be JBoss -specific files, i think u are probably using some examples from sun bundled in jar file to be deploy in jboss and by the looks of it it seems u are not setting the classpath variable properly, which u intend to use in these jars.

          try jar -tvf .jar to see where these classes sre coming from
          I intillay thought u might me missing tools.jar (under jdk/lib/) but that's not the case as well.

          • 2. Re: java.lang.NoClassDefFoundError: com/sun/enterprise/tools
            emailssent

            Thanks for reply.

            I am trying use jboos, and trying to deploy Duke's Bank application that is taught in getting started docuementation of jboss.

            Is J2EE server is necessary for deploy java application to jboss, i am first compiling it, then generation ejbs,war,ear........ and then i will deploy but before deploying while making ejbs it is giving me error of Noclass def found.

            >try jar -tvf .jar to see where these classes sre coming from
            on which file should i do that.


            plz guide me

            -jack


            • 3. Re: java.lang.NoClassDefFoundError: com/sun/enterprise/tools
              emailssent

              Is J2EE server is necessary for deploy java application to jboss

              • 4. Re: java.lang.NoClassDefFoundError: com/sun/enterprise/tools

                J2EE Server is needed (JBoss is J2EE compliant server) for deploying J2EE applications.
                When u say Java applications what do u mean by that, because J2EE applications are itslef in JAVA. So not sure what u mean.
                If u mean non J2EE applications then u dont need J2EE Server.
                I hope this clarifies.
                But the example u are reffring from SUN needs J2EE compliant application server - JBoss or others.