You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dave Pawson <da...@gmail.com> on 2008/05/28 12:36:26 UTC

script problem

Inside a target I have

<path id="sys.jars">
   <pathelement path="/usr/share/java/bsf.jar"/>
 </path>


<script language="beanshell" manager='bsf' >
<classpath refid="sys.jars"/>

      System.out.println("message is " + message);
    </script>


The jar file contains the exception
$jar -tf bsf.jar |grep BSFException
org/apache/bsf/BSFException.class

yet when I run ant I get


BUILD FAILED
/files/java/build.xml:23: java.lang.NoClassDefFoundError:
org/apache/bsf/BSFException

I can't see what is wrong,

Any help appreciated.

regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Dave Pawson <da...@gmail.com>.
2008/5/28 Martin <mg...@hotmail.com>:
> Dave-
>
> Did you download the latest Bean Scripting Framework jar located at
> http://jakarta.apache.org/bsf/

Yes, 2.4, extracted bsf.jar
Tried it in the classpath child - no joy
Put it in ant/lib and it now works

regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Martin <mg...@hotmail.com>.
Dave-

Did you download the latest Bean Scripting Framework jar located at
http://jakarta.apache.org/bsf/

HTH
Martin
----- Original Message ----- 
From: "Dave Pawson" <da...@gmail.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, May 28, 2008 6:36 AM
Subject: script problem


> Inside a target I have
> 
> <path id="sys.jars">
>   <pathelement path="/usr/share/java/bsf.jar"/>
> </path>
> 
> 
> <script language="beanshell" manager='bsf' >
> <classpath refid="sys.jars"/>
> 
>      System.out.println("message is " + message);
>    </script>
> 
> 
> The jar file contains the exception
> $jar -tf bsf.jar |grep BSFException
> org/apache/bsf/BSFException.class
> 
> yet when I run ant I get
> 
> 
> BUILD FAILED
> /files/java/build.xml:23: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
> 
> I can't see what is wrong,
> 
> Any help appreciated.
> 
> regards
> 
> -- 
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Peter Reilly <pe...@gmail.com>.
On Wed, May 28, 2008 at 1:34 PM, Dave Pawson <da...@gmail.com> wrote:
> 2008/5/28 Peter Reilly <pe...@gmail.com>:
>> Wait for ant 1.7.1.
>
> Thanks Peter.  Any due date (roughly)?
There is a beta out,
http://people.apache.org/dist/ant/v1.7.1beta2/
 I assume that a release will be made soon.

Peter

>
>>> Is the documentation wrong?
>>>
>> no ;-)
>> """
>>  NB: This classpath cannot (currently) be used to specify the location
>> of the BSF jar file. Also, due to classloading issues, languages that
>> have engines in the BSF jar file cannot have the implementation in the
>> classpath element. This includes the javascript, jython, netrexx and
>> jacl languages.
>> """
>
> I'm guessing I'd find that piece if I dug far enough?

http://ant.apache.org/manual/OptionalTasks/script.html
in the doc on the <classpath> nested element.
Peter

>
> A case of the documentation *leading* the implementation!
> A rare beasty!
>
>
> regards
>
>
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Dave Pawson <da...@gmail.com>.
2008/5/28 Peter Reilly <pe...@gmail.com>:
> Wait for ant 1.7.1.

Thanks Peter.  Any due date (roughly)?

>> Is the documentation wrong?
>>
> no ;-)
> """
>  NB: This classpath cannot (currently) be used to specify the location
> of the BSF jar file. Also, due to classloading issues, languages that
> have engines in the BSF jar file cannot have the implementation in the
> classpath element. This includes the javascript, jython, netrexx and
> jacl languages.
> """

I'm guessing I'd find that piece if I dug far enough?

A case of the documentation *leading* the implementation!
A rare beasty!


regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Peter Reilly <pe...@gmail.com>.
Wait for ant 1.7.1.



On Wed, May 28, 2008 at 12:55 PM, Dave Pawson <da...@gmail.com> wrote:
> 2008/5/28 Knuplesch, Juergen <Ju...@icongmbh.de>:
>> Do you have bsf.jar in the ANT-classpath?
>> (You can copy it in the lib-Folder of ANT)
>>
>> See "Ant-Tasks"-"Library dependencies" in
>> http://ant.apache.org/manual/
>
> Also needed jakarta-commons-logging.jar
> Thanks.
>
> I don't want to clog up the ant lib, I thought the classpathref
> attribute would provide access to the jars?
>
> Is the documentation wrong?
>
no ;-)
"""
 NB: This classpath cannot (currently) be used to specify the location
of the BSF jar file. Also, due to classloading issues, languages that
have engines in the BSF jar file cannot have the implementation in the
classpath element. This includes the javascript, jython, netrexx and
jacl languages.
"""

> regards
>
>
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: script problem

Posted by Dave Pawson <da...@gmail.com>.
2008/5/28 Knuplesch, Juergen <Ju...@icongmbh.de>:
> Do you have bsf.jar in the ANT-classpath?
> (You can copy it in the lib-Folder of ANT)
>
> See "Ant-Tasks"-"Library dependencies" in
> http://ant.apache.org/manual/

Also needed jakarta-commons-logging.jar
Thanks.

I don't want to clog up the ant lib, I thought the classpathref
attribute would provide access to the jars?

Is the documentation wrong?

regards



-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: script problem

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Do you have bsf.jar in the ANT-classpath?
(You can copy it in the lib-Folder of ANT)

See "Ant-Tasks"-"Library dependencies" in
http://ant.apache.org/manual/  


-- 
Jürgen Knuplesch              

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: Dave Pawson [mailto:dave.pawson@gmail.com] 
Gesendet: Mittwoch, 28. Mai 2008 12:36
An: Ant Users List
Betreff: script problem

Inside a target I have

<path id="sys.jars">
   <pathelement path="/usr/share/java/bsf.jar"/>  </path>


<script language="beanshell" manager='bsf' > <classpath refid="sys.jars"/>

      System.out.println("message is " + message);
    </script>


The jar file contains the exception
$jar -tf bsf.jar |grep BSFException
org/apache/bsf/BSFException.class

yet when I run ant I get


BUILD FAILED
/files/java/build.xml:23: java.lang.NoClassDefFoundError:
org/apache/bsf/BSFException

I can't see what is wrong,

Any help appreciated.

regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org