Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 18941 invoked from network); 14 May 2009 19:47:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 May 2009 19:47:47 -0000 Received: (qmail 78217 invoked by uid 500); 14 May 2009 19:47:47 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 78180 invoked by uid 500); 14 May 2009 19:47:47 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 78170 invoked by uid 99); 14 May 2009 19:47:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 19:47:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rahul.soa@googlemail.com designates 74.125.78.150 as permitted sender) Received: from [74.125.78.150] (HELO ey-out-1920.google.com) (74.125.78.150) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 19:47:36 +0000 Received: by ey-out-1920.google.com with SMTP id 3so395783eyh.30 for ; Thu, 14 May 2009 12:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=hf0Qf49GXiFrxFeZnCfP1xjn+sxLBaE/QNMjEn27/8Q=; b=AJyRE66xjI4hGQrLe6/km2mHAIN9PeMazuGmu3kU+fTezUWVl4taiHWYYCImfnl57c pKnetqfg0oocf37K4mHuuxUPZ1t+GS7rL36T5ML28hqRM3Tj3t+/SJNHEupb/s3g8eQi qsWStDQVxpHoZgNORMxXKyvwHYv+FQP4djFVM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lSIcpXWtGGp15LOfBdiFK1U8t8bXsgKj5P4CrWmsRjxrA1HgYoKqMsgsNoSSsSfVwo rLIKnpdiwteb7q0JJYHo7wj64Khx9eiTxMWSRe49BJAngDeKX6SEQUZ5Ca75UyB6nBAD gNM3RBF1ZESn0VYnLMXP52wtQvIQ/xT66BLbQ= MIME-Version: 1.0 Received: by 10.210.43.11 with SMTP id q11mr2639902ebq.37.1242330434750; Thu, 14 May 2009 12:47:14 -0700 (PDT) In-Reply-To: References: Date: Thu, 14 May 2009 21:47:14 +0200 Message-ID: Subject: Re: [Solved] Error: Syntax error, annotations are only available if source level is 5.0 From: "rahul.soa" To: dev@cxf.apache.org Cc: Jarek Gawor Content-Type: multipart/alternative; boundary=000e0ce0d19441e3930469e49802 X-Virus-Checked: Checked by ClamAV on apache.org --000e0ce0d19441e3930469e49802 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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 > > [rahul@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 > > --000e0ce0d19441e3930469e49802--