1 Reply Latest reply on Mar 10, 2008 7:33 AM by ropalka

    webservice compiler error

    arrojusrikanth

      when compile webservice with ant it generating compiler errors

      
      
      D:\programs\webservices\calculatorwebservice>ant
      Buildfile: build.xml
      
      prepare:
       [mkdir] Created dir:
      
      D:\programs\webservices\calculatorwebservice\build
       [mkdir] Created dir:
      
      D:\programs\webservices\calculatorwebservice\build\
      
      clas
      ses
      
      compile:
       [javac] Compiling 3 source files to
      
      D:\programs\webservices\calculatorwebser
      vice\build\classes
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      torBean.java:2: cannot find symbol
       [javac] symbol : class Stateless
       [javac] location: package javax.ejb
       [javac] import javax.ejb.Stateless;
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      tor.java:9: incompatible types
       [javac] found : javax.jws.WebService
       [javac] required:
      
      java.lang.annotation.Annotation
       [javac] @WebService(name="Calculator1")
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      tor.java:10: incompatible types
       [javac] found : javax.jws.soap.SOAPBinding
       [javac] required:
      
      java.lang.annotation.Annotation
       [javac] @SOAPBinding(style=Style.RPC)
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      tor.java:10: duplicate annotation
       [javac] @SOAPBinding(style=Style.RPC)
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      tor.java:13: incompatible types
       [javac] found : javax.jws.WebMethod
       [javac] required:
      
      java.lang.annotation.Annotation
       [javac] @WebMethod int add(int x, int y);
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      tor.java:15: incompatible types
       [javac] found : javax.jws.WebMethod
       [javac] required:
      
      java.lang.annotation.Annotation
       [javac] @WebMethod int subtract(int x, int
      
      y);
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      torBean.java:6: cannot find symbol
       [javac] symbol: class Stateless
       [javac] @Stateless
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Calcula
      torBean.java:7: incompatible types
       [javac] found : javax.jws.WebService
       [javac] required:
      
      java.lang.annotation.Annotation
       [javac] @WebService(name="Calculator1",
      
      endpointInterface="webservice1.Calcu
      lator")
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Client.
      java:17: warning: [deprecation]
      
      webservice1.Calculator in webservice1 has been d
      eprecated
       [javac] Calculator calculator =
      
      (Calculator) service.getPort(Calculato
      r.class);
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Client.
      java:17: warning: [deprecation]
      
      webservice1.Calculator in webservice1 has been d
      eprecated
       [javac] Calculator calculator =
      
      (Calculator) service.getPort(Calculato
      r.class);
       [javac] ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Client.
      java:17: warning: [deprecation]
      
      webservice1.Calculator in webservice1 has been d
      eprecated
       [javac] Calculator calculator =
      
      (Calculator) service.getPort(Calculato
      r.class);
       [javac]
      
       ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Client.
      java:18: warning: [deprecation] add(int,int) in
      
      webservice1.Calculator has been
      deprecated
       [javac] System.out.println("1 + 1 = " +
      
      calculator.add(1, 1));
       [javac]
      
       ^
       [javac]
      
      D:\programs\webservices\calculatorwebservice\src\we
      
      bservice1\Client.
      java:19: warning: [deprecation] subtract(int,int)
      
      in webservice1.Calculator has
      been deprecated
       [javac] System.out.println("1 - 1 = " +
      
      calculator.subtract(1, 1));
       [javac]
      
       ^
       [javac] 8 errors
       [javac] 5 warnings
      
      BUILD FAILED
      D:\programs\webservices\calculatorwebservice\build.
      
      xml:47: Compile failed; see t
      he compiler error output for details.
      
      Total time: 10 seconds
      
      D:\programs\webservices\calculatorwebservice>
      


        • 1. Re: webservice compiler error
          ropalka

          The workaround is to copy/paste all jars from .sh scripts to your batch file that are not mentioned there.
          Or you can use SVN snapshot or wait for next release scheduled to the end of March where this is already fixed.