Hell everyone, This problem is solved. Please dont spend time on it.
The problem was with ant as the ant script by default looks for /etc/ant.conf file and the conf file point to an old version of ant which does not know how to detect java 5 or 6. So I removed the ant.conf from /etc and point to the ANT_HOME which is set to the newer version of ant. Thanks to Jarek for solving this with me. Regards, Rahul Thanks to Jarek for solving this with me. On Thu, May 14, 2009 at 9:44 AM, rahul.soa <[email protected]> wrote: > Hello everyone, > > I am trying to run some samples given under the apache CXF distribution > (apache-cxf-2.1.5). I have deployed /apache-cxf-2.1.5/samples/* > java_first_pojo* in tomcat and it works well. > > However, when I try to create a war file (by running "ant war") for the > sample /apache-cxf-2.1.5/samples/*java_first_spring_support* > I get the following error > > "Syntax error, annotations are only available if source level is 5.0" > > I am using sun java 1.6 version and its set on path. > > Can anyone help me in this? > > //quote > > [ra...@localhost java_first_spring_support]$ ant war > Buildfile: build.xml > maybe.generate.code: > compile: > [javac] Compiling 2 source files to > /home/rahul/apache-cxf-2.1.5/samples/java_first_spring_support/build/classes > [javac] ---------- > [javac] 1. ERROR in > /home/rahul/apache-cxf-2.1.5/samples/java_first_spring_support/src/demo/spring/HelloWorld.java > (at line 24) > [javac] @WebService > [javac] ^^^^^^^^^^^ > [javac] Syntax error, annotations are only available if source level is > 5.0 > [javac] ---------- > [javac] ---------- > [javac] 2. ERROR in > /home/rahul/apache-cxf-2.1.5/samples/java_first_spring_support/src/demo/spring/HelloWorldImpl.java > (at line 24) > [javac] @WebService(endpointInterface = "demo.spring.HelloWorld") > [javac] ^^^^^^^^^^^ > [javac] Syntax error, annotations are only available if source level is > 5.0 > [javac] ---------- > [javac] 2 problems (2 errors) > BUILD FAILED > /home/rahul/apache-cxf-2.1.5/samples/common_build.xml:113: Compile failed; > see the compiler error output for details. > Total time: 2 seconds > > //unquote > > Many Thanks, > Rahul > >
