java - Ant build of a J2EE project fails by giving various compilation errors and warnings -


i working on java project using web logic 12c server deploy. have written build file consist of init, build, compile , deploy stages. ant build fails when comes compilation.i including build file , error log. please tell me in respect of web logic server.also suggest correction in build file if any.

 <project name="captchatest" default="build" basedir=".">     <property name="weblogic-home" value="\c:\oracle\middleware\oracle_home\user_projects\domains\devdomain" />     <description>         build file captchatest     </description>      <path id="build.classpath">       <fileset dir="webcontent/web-inf/lib" includes="*.jar" />       <fileset dir="${weblogic-home}/lib" includes="*.jar" />       <pathelement location="."/>     </path>      <target name="init">         <delete dir="dist" />         <mkdir dir="dist" />     </target>      <target name="build" depends="init">         <war destfile="./dist/captchatest.war">             <fileset dir="webcontent">             </fileset>         </war>     </target>      <target name="compile" depends="build">         <javac includeantruntime="false" srcdir="./src/com/amgen/sharedservices/"                destdir="./webcontent/web-inf/classes" classpathref="build.classpath"/>     </target>      <taskdef name="wldeploy"          classname="weblogic.ant.taskdefs.management.wldeploy"          classpath="c:/oracle/middleware/oracle_home/wlserver/server/lib/weblogic.jar" />      <target name="deploy" depends="compile">         <wldeploy action="deploy" name="captcha" source="./dist/captchatest.war"         user="devdomain"         password=""          verbose="true"         adminurl="t3://localhost:7001"         upload="true"         targets="adminserver" />      </target>      <target name="undeploy">      </target> </project>     

error log

buildfile: c:\users\pandabhi\eclipseworkspace\captchatest\build.xml init:    [delete] deleting directory c:\users\pandabhi\eclipseworkspace\captchatest\dist     [mkdir] created dir: c:\users\pandabhi\eclipseworkspace\captchatest\dist build:       [war] building war: c:\users\pandabhi\eclipseworkspace\captchatest\dist\captchatest.war compile:     [javac] compiling 5 source files c:\users\pandabhi\eclipseworkspace\captchatest\webcontent\web-inf\classes     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:19: warning: wavefilewriter internal proprietary api , may removed in future release     [javac] import com.sun.media.sound.wavefilewriter;     [javac]                           ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'validatedby()' in type 'constraint': class file javax.validation.constraint not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'regexp()' in type 'pattern': class file javax.validation.constraints.pattern not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute': class file javax.validation.overridesattribute not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/length.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/modcheck.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/luhncheck.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/mod10check.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/mod11check.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/notblank.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/safehtml.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/scriptassert.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'regexp()' in type 'pattern'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:19: warning: wavefilewriter internal proprietary api , may removed in future release     [javac] import com.sun.media.sound.wavefilewriter;     [javac]                           ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:20: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.imageformatexception;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:21: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegcodec;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:22: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegimageencoder;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:17: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegcodec;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:18: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegimageencoder;     [javac]                                ^     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'validatedby()' in type 'constraint': class file javax.validation.constraint not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'regexp()' in type 'pattern': class file javax.validation.constraints.pattern not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute': class file javax.validation.overridesattribute not found     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/email.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/length.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/modcheck.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/luhncheck.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/mod10check.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/mod11check.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/notblank.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/safehtml.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/scriptassert.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'validatedby()' in type 'constraint'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'regexp()' in type 'pattern'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'constraint()' in type 'overridesattribute'     [javac] c:\oracle\middleware\oracle_home\user_projects\domains\devdomain\lib\hibernate-validator-5.1.3.final.jar(org/hibernate/validator/constraints/url.class): warning: cannot find annotation method 'name()' in type 'overridesattribute'     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:20: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.imageformatexception;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:21: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegcodec;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchatest.java:22: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegimageencoder;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:17: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegcodec;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:18: error: package com.sun.image.codec.jpeg not exist     [javac] import com.sun.image.codec.jpeg.jpegimageencoder;     [javac]                                ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:19: warning: wavefilewriter internal proprietary api , may removed in future release     [javac] import com.sun.media.sound.wavefilewriter;     [javac]                           ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\imagecaptchaservlet.java:32: warning: pixelconverter internal proprietary api , may removed in future release     [javac] import sun.awt.image.pixelconverter.bgrx;     [javac]                     ^     [javac] c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\captchaverifierservlet.java:45: error: cannot find symbol     [javac]    b = captchaserviceinstance.getinstance().validateresponseforid( captchaid, inputchars );     [javac]        ^     [javac]   symbol:   variable captchaserviceinstance     [javac]   location: class captchaverifierservlet     [javac] note: c:\users\pandabhi\eclipseworkspace\captchatest\src\com\amgen\sharedservices\customlistimagecaptchaengine.java uses unchecked or unsafe operations.     [javac] note: recompile -xlint:unchecked details.     [javac] 6 errors     [javac] 49 warnings  build failed c:\users\pandabhi\eclipseworkspace\captchatest\build.xml:27: compile failed; see compiler error output details.  total time: 7 seconds 

what's unclear you? you're getting lot of warnings using proprietary apis , errors when package has been removed (that's why warn against using them).

rewrite software without using com.sun.* packages.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -