Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
61 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Bilgin Ibryam
I don't know if this is the final fix, but I still can't run ant

Bilgin

On Wed, 2008-10-29 at 15:51 +0000, [hidden email] wrote:

> Author: doogie
> Date: Wed Oct 29 08:51:41 2008
> New Revision: 708924
>
> URL: http://svn.apache.org/viewvc?rev=708924&view=rev
> Log:
> Fix use of optional ant features, <scriptdef>.
>
> Added:
>     ofbiz/trunk/framework/base/lib/ant-apache-bsf-1.7.0.jar   (with props)
>     ofbiz/trunk/framework/base/lib/ant-nodeps-1.7.0.jar   (with props)
>     ofbiz/trunk/framework/base/lib/bsf-2.4.0.jar
>       - copied unchanged from r490457, ofbiz/trunk/framework/base/lib/scripting/bsf-2.4.0.jar
> Removed:
>     ofbiz/trunk/framework/base/lib/scripting/bsf-2.4.0.jar
>
> Added: ofbiz/trunk/framework/base/lib/ant-apache-bsf-1.7.0.jar
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/ant-apache-bsf-1.7.0.jar?rev=708924&view=auto
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: ofbiz/trunk/framework/base/lib/ant-apache-bsf-1.7.0.jar
> ------------------------------------------------------------------------------
>     svn:mime-type = application/octet-stream
>
> Added: ofbiz/trunk/framework/base/lib/ant-nodeps-1.7.0.jar
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/ant-nodeps-1.7.0.jar?rev=708924&view=auto
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: ofbiz/trunk/framework/base/lib/ant-nodeps-1.7.0.jar
> ------------------------------------------------------------------------------
>     svn:mime-type = application/octet-stream
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Adam Heath-2
Bilgin Ibryam wrote:
> I don't know if this is the final fix, but I still can't run ant

Use ./ant or ./ant.bat.

If you want to use a globally installed ant, then you have to make that
work yourself.  If you can't figure out how, then respond here, and I'll
tell you.

If so inclined, I could come up with an ant shell script wrapper, that
one could install into $HOME/bin, that checks to see if $PWD is in an
ofbiz tree, and call the local version, otherwise the global.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Adam Heath-2
Adam Heath wrote:

> Bilgin Ibryam wrote:
>> I don't know if this is the final fix, but I still can't run ant
>
> Use ./ant or ./ant.bat.
>
> If you want to use a globally installed ant, then you have to make that
> work yourself.  If you can't figure out how, then respond here, and I'll
> tell you.
>
> If so inclined, I could come up with an ant shell script wrapper, that
> one could install into $HOME/bin, that checks to see if $PWD is in an
> ofbiz tree, and call the local version, otherwise the global.

Ok, sorry, I should have included more info into what was happening with
this.

Classloaders in java are heirachal.  If a child loader delegates to it's
parent first, before trying it's own system of loading.  And, once a
class is loaded from some loader, any other classes that it references
in it's bytecode have to come from that same loader, or their parents.

In this particular case, the loader that loads the main ant classes has
to be able to find the <scriptdef> task; this is due to it being an
internal extension, not some <taskdef> addition.  Which means the
ant-nodep.jar needs to be on the same classloader as main ant.

Then, once <scriptdef> is loaded, it tries to probe for JSR223
support(scripting, included by default in java 1.6), then bsf.  Since
this is a bytecode dependency, it again has to be in the same global
classloader.

I'm wondering if I could try to use <taskdef> to create <scriptdef>;
this would allow for moving them out of global, *if* it works.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Tim Ruppert
Still getting this:

BUILD FAILED
/demo/deployments/demo.hotwaxmedia.com/build.xml:106: The following  
error occurred while executing this line:
/demo/deployments/demo.hotwaxmedia.com/specialpurpose/build.xml:22:  
The following error occurred while executing this line:
/demo/deployments/demo.hotwaxmedia.com/macros.xml:58: Could not create  
type scriptdef due to java.lang.NoClassDefFoundError: org/apache/bsf/
BSFException

---

Adam, we either need to remove whatever is causing this and put  
something in place to ensure that we don't bank on using ./ant or ./
ant.bat - or help me come up with a better process.  This has been  
working with the current process for a number of months and now it's  
busted (which just means the current stuff is not available to the  
community).

What shall we do?

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595

On Oct 29, 2008, at 11:23 AM, Adam Heath wrote:

> Adam Heath wrote:
>> Bilgin Ibryam wrote:
>>> I don't know if this is the final fix, but I still can't run ant
>>
>> Use ./ant or ./ant.bat.
>>
>> If you want to use a globally installed ant, then you have to make  
>> that
>> work yourself.  If you can't figure out how, then respond here, and  
>> I'll
>> tell you.
>>
>> If so inclined, I could come up with an ant shell script wrapper,  
>> that
>> one could install into $HOME/bin, that checks to see if $PWD is in an
>> ofbiz tree, and call the local version, otherwise the global.
>
> Ok, sorry, I should have included more info into what was happening  
> with
> this.
>
> Classloaders in java are heirachal.  If a child loader delegates to  
> it's
> parent first, before trying it's own system of loading.  And, once a
> class is loaded from some loader, any other classes that it references
> in it's bytecode have to come from that same loader, or their parents.
>
> In this particular case, the loader that loads the main ant classes  
> has
> to be able to find the <scriptdef> task; this is due to it being an
> internal extension, not some <taskdef> addition.  Which means the
> ant-nodep.jar needs to be on the same classloader as main ant.
>
> Then, once <scriptdef> is loaded, it tries to probe for JSR223
> support(scripting, included by default in java 1.6), then bsf.  Since
> this is a bytecode dependency, it again has to be in the same global
> classloader.
>
> I'm wondering if I could try to use <taskdef> to create <scriptdef>;
> this would allow for moving them out of global, *if* it works.


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Adam Heath-2
Tim Ruppert wrote:

> Still getting this:
>
> BUILD FAILED
> /demo/deployments/demo.hotwaxmedia.com/build.xml:106: The following
> error occurred while executing this line:
> /demo/deployments/demo.hotwaxmedia.com/specialpurpose/build.xml:22: The
> following error occurred while executing this line:
> /demo/deployments/demo.hotwaxmedia.com/macros.xml:58: Could not create
> type scriptdef due to java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
>
> ---
>
> Adam, we either need to remove whatever is causing this and put
> something in place to ensure that we don't bank on using ./ant or
> ./ant.bat - or help me come up with a better process.  This has been
> working with the current process for a number of months and now it's
> busted (which just means the current stuff is not available to the
> community).

Got a better one, not modifying global ant, not adding any additional
load-time stuff to ./ant.  Am about to test in a chroot.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Mridul Pathak-2
Hi,

     The reason behind this build fail can be the names of the  
following newly added Groovy files:
1)  ofbiz/trunk/framework/base/ant-scripts/if-script.groovy (r708699)
2) ofbiz/trunk/framework/base/ant-scripts/ofbiz-jjtree.groovy (r708734)

I think the name of the groovy files should be as per the Java Class  
Name conventions.

Thanks!

--
Regards,
Mridul Pathak
HotWax Media Pvt. Ltd.
http://www.hotwaxmedia.com


On 30-Oct-08, at 1:13 AM, Adam Heath wrote:

> Tim Ruppert wrote:
>> Still getting this:
>>
>> BUILD FAILED
>> /demo/deployments/demo.hotwaxmedia.com/build.xml:106: The following
>> error occurred while executing this line:
>> /demo/deployments/demo.hotwaxmedia.com/specialpurpose/build.xml:22:  
>> The
>> following error occurred while executing this line:
>> /demo/deployments/demo.hotwaxmedia.com/macros.xml:58: Could not  
>> create
>> type scriptdef due to java.lang.NoClassDefFoundError:
>> org/apache/bsf/BSFException
>>
>> ---
>>
>> Adam, we either need to remove whatever is causing this and put
>> something in place to ensure that we don't bank on using ./ant or
>> ./ant.bat - or help me come up with a better process.  This has been
>> working with the current process for a number of months and now it's
>> busted (which just means the current stuff is not available to the
>> community).
>
> Got a better one, not modifying global ant, not adding any additional
> load-time stuff to ./ant.  Am about to test in a chroot.

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Ray-91
In reply to this post by Adam Heath-2
Since my last post on this including suggested fixes that I tested and
had working on Java 1.5 & 1.6 using internal OFBiz ant I was able to get
on with stuff. Personally I didn't test those on my Ubuntu machine as it
was already working and I felt it was more an issue with OFBiz build
files not including enough jars and paths etc. so adding those was not
likely to break the Ubuntu machine.

This morning though with a clean check out from SVN on my Ubuntu machine
it doesn't work now!!! Can't test XP machine as not available at the moment!

BUILD FAILED
ofbiz_svn_clean_test/build.xml:106: The following error occurred while
executing this line:
ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
occurred while executing this line:
ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
org/apache/bsf/BSFException

Am I alone or is this still an issue?

Ray



Adam Heath wrote:

> Tim Ruppert wrote:
>> Still getting this:
>>
>> BUILD FAILED
>> /demo/deployments/demo.hotwaxmedia.com/build.xml:106: The following
>> error occurred while executing this line:
>> /demo/deployments/demo.hotwaxmedia.com/specialpurpose/build.xml:22: The
>> following error occurred while executing this line:
>> /demo/deployments/demo.hotwaxmedia.com/macros.xml:58: Could not create
>> type scriptdef due to java.lang.NoClassDefFoundError:
>> org/apache/bsf/BSFException
>>
>> ---
>>
>> Adam, we either need to remove whatever is causing this and put
>> something in place to ensure that we don't bank on using ./ant or
>> ./ant.bat - or help me come up with a better process.  This has been
>> working with the current process for a number of months and now it's
>> busted (which just means the current stuff is not available to the
>> community).
>
> Got a better one, not modifying global ant, not adding any additional
> load-time stuff to ./ant.  Am about to test in a chroot.
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

BJ Freeman
svn 709126
I had to fix my main build.xml since it was merged.
after downloading the build from the svn.
ant clean
ant build
BUILD SUCCESSFUL
Total time: 1 minute 56 seconds

Ray sent the following on 10/30/2008 2:39 AM:

> Since my last post on this including suggested fixes that I tested and
> had working on Java 1.5 & 1.6 using internal OFBiz ant I was able to get
> on with stuff. Personally I didn't test those on my Ubuntu machine as it
> was already working and I felt it was more an issue with OFBiz build
> files not including enough jars and paths etc. so adding those was not
> likely to break the Ubuntu machine.
>
> This morning though with a clean check out from SVN on my Ubuntu machine
> it doesn't work now!!! Can't test XP machine as not available at the moment!
>
> BUILD FAILED
> ofbiz_svn_clean_test/build.xml:106: The following error occurred while
> executing this line:
> ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
> occurred while executing this line:
> ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
>
> Am I alone or is this still an issue?
>
> Ray
>
>
>
> Adam Heath wrote:
>> Tim Ruppert wrote:
>>> Still getting this:
>>>
>>> BUILD FAILED
>>> /demo/deployments/demo.hotwaxmedia.com/build.xml:106: The following
>>> error occurred while executing this line:
>>> /demo/deployments/demo.hotwaxmedia.com/specialpurpose/build.xml:22: The
>>> following error occurred while executing this line:
>>> /demo/deployments/demo.hotwaxmedia.com/macros.xml:58: Could not create
>>> type scriptdef due to java.lang.NoClassDefFoundError:
>>> org/apache/bsf/BSFException
>>>
>>> ---
>>>
>>> Adam, we either need to remove whatever is causing this and put
>>> something in place to ensure that we don't bank on using ./ant or
>>> ./ant.bat - or help me come up with a better process.  This has been
>>> working with the current process for a number of months and now it's
>>> busted (which just means the current stuff is not available to the
>>> community).
>> Got a better one, not modifying global ant, not adding any additional
>> load-time stuff to ./ant.  Am about to test in a chroot.
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Bilgin Ibryam
In reply to this post by Ray-91
On Thu, 2008-10-30 at 09:39 +0000, Ray wrote:

> BUILD FAILED
> ofbiz_svn_clean_test/build.xml:106: The following error occurred while
> executing this line:
> ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
> occurred while executing this line:
> ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
>
> Am I alone or is this still an issue?
>
> Ray

Ray,

Yesterday I got the same error on FC and Vista.
Today it works on FC, but still the same error on Vista.

Bilgin

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib: ant-apache-bsf-1.7.0.jar ant-nodeps-1.7.0.jar bsf-2.4.0.jar scripting/bsf-2.4.0.jar

Adam Heath-2
In reply to this post by Mridul Pathak-2
Mridul Pathak wrote:
> Hi,
>
>     The reason behind this build fail can be the names of the following
> newly added Groovy files:
> 1)  ofbiz/trunk/framework/base/ant-scripts/if-script.groovy (r708699)
> 2) ofbiz/trunk/framework/base/ant-scripts/ofbiz-jjtree.groovy (r708734)

The names of the files have nothing to do with the error.

> I think the name of the groovy files should be as per the Java Class
> Name conventions.

That's a separate question.  These aren't java classes, but scripts.
I'm not wedded to any particular name pattern for these, as long as we
have one.

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Adam Heath-2
In reply to this post by Ray-91
Ray wrote:

> Since my last post on this including suggested fixes that I tested and
> had working on Java 1.5 & 1.6 using internal OFBiz ant I was able to get
> on with stuff. Personally I didn't test those on my Ubuntu machine as it
> was already working and I felt it was more an issue with OFBiz build
> files not including enough jars and paths etc. so adding those was not
> likely to break the Ubuntu machine.
>
> This morning though with a clean check out from SVN on my Ubuntu machine
> it doesn't work now!!! Can't test XP machine as not available at the moment!
>
> BUILD FAILED
> ofbiz_svn_clean_test/build.xml:106: The following error occurred while
> executing this line:
> ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
> occurred while executing this line:
> ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException

I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
external system-installed clean ant.  Did this in a brand new chroot.

I've tested with java 1.5(which doesn't have the java scripting
library), so that it can only use bsf.  It tries to use bsf first, so
using 1.6 shouldn't be an issue.

Are you *completely* clean?
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Jacques Le Roux
Administrator
I can run ant (after an ant clean) on an XP console but I can't from Eclipse : I get

Buildfile: D:\workspace\ofbizRun\build.xml

build:

[echo] [build] ========== Start Building (Compile) ==========


BUILD FAILED

D:\workspace\ofbizRun\build.xml:126: The following error occurred while executing this line:

D:\workspace\ofbizRun\framework\build.xml:22: The following error occurred while executing this line:

D:\workspace\ofbizRun\macros.xml:63: java.lang.NoClassDefFoundError: org/apache/bsf/BSFException


Total time: 140 milliseconds

Any ideas ?

From: "Adam Heath" <[hidden email]>

> Ray wrote:
>> Since my last post on this including suggested fixes that I tested and
>> had working on Java 1.5 & 1.6 using internal OFBiz ant I was able to get
>> on with stuff. Personally I didn't test those on my Ubuntu machine as it
>> was already working and I felt it was more an issue with OFBiz build
>> files not including enough jars and paths etc. so adding those was not
>> likely to break the Ubuntu machine.
>>
>> This morning though with a clean check out from SVN on my Ubuntu machine
>> it doesn't work now!!! Can't test XP machine as not available at the moment!
>>
>> BUILD FAILED
>> ofbiz_svn_clean_test/build.xml:106: The following error occurred while
>> executing this line:
>> ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
>> occurred while executing this line:
>> ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
>> org/apache/bsf/BSFException
>
> I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
> external system-installed clean ant.  Did this in a brand new chroot.
>
> I've tested with java 1.5(which doesn't have the java scripting
> library), so that it can only use bsf.  It tries to use bsf first, so
> using 1.6 shouldn't be an issue.
>
> Are you *completely* clean?
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Ray-91
In reply to this post by Adam Heath-2
> I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
> external system-installed clean ant.  Did this in a brand new chroot.
>
> I've tested with java 1.5(which doesn't have the java scripting
> library), so that it can only use bsf.  It tries to use bsf first, so
> using 1.6 shouldn't be an issue.
>
> Are you *completely* clean?

Often been asked! But I only have 4 or 5 files modified, most being ftl
or java and one being general.properties, as reported by 'svn st',
certainly no build files.

Revision 709185: (Ubuntu 8.04)
'ant clean' - same error as I last reported class not found BSFException
'./ant clean' - works OK

Revision 708620: (just rolled back from above so same everything else!)
'ant clean' - works OK
'./ant clean' - works OK

OK so following './ant' usage I can build and compile, I'm just so used
to typing 'ant ...' to get the job done.

Not going to lose any more sleep over this as I have plenty of other
stuff to get on with, more a point for search history and notes, but am
I reading this right that external ant (such as my standard repos
1.7.0-3 install) wont work OOTB with OFBiz now?

Ray
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Adrian Crum
In reply to this post by Jacques Le Roux
Add the location of the jar containing the missing class to the
.classpath file?

*shrug*

-Adrian

Jacques Le Roux wrote:

> I can run ant (after an ant clean) on an XP console but I can't from
> Eclipse : I get
>
> Buildfile: D:\workspace\ofbizRun\build.xml
>
> build:
>
> [echo] [build] ========== Start Building (Compile) ==========
>
>
> BUILD FAILED
>
> D:\workspace\ofbizRun\build.xml:126: The following error occurred while
> executing this line:
>
> D:\workspace\ofbizRun\framework\build.xml:22: The following error
> occurred while executing this line:
>
> D:\workspace\ofbizRun\macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
>
>
> Total time: 140 milliseconds
>
> Any ideas ?
>
> From: "Adam Heath" <[hidden email]>
>> Ray wrote:
>>> Since my last post on this including suggested fixes that I tested and
>>> had working on Java 1.5 & 1.6 using internal OFBiz ant I was able to get
>>> on with stuff. Personally I didn't test those on my Ubuntu machine as it
>>> was already working and I felt it was more an issue with OFBiz build
>>> files not including enough jars and paths etc. so adding those was not
>>> likely to break the Ubuntu machine.
>>>
>>> This morning though with a clean check out from SVN on my Ubuntu machine
>>> it doesn't work now!!! Can't test XP machine as not available at the
>>> moment!
>>>
>>> BUILD FAILED
>>> ofbiz_svn_clean_test/build.xml:106: The following error occurred while
>>> executing this line:
>>> ofbiz_svn_clean_test/specialpurpose/build.xml:22: The following error
>>> occurred while executing this line:
>>> ofbiz_svn_clean_test/macros.xml:63: java.lang.NoClassDefFoundError:
>>> org/apache/bsf/BSFException
>>
>> I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
>> external system-installed clean ant.  Did this in a brand new chroot.
>>
>> I've tested with java 1.5(which doesn't have the java scripting
>> library), so that it can only use bsf.  It tries to use bsf first, so
>> using 1.6 shouldn't be an issue.
>>
>> Are you *completely* clean?
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Ray-91
In reply to this post by Jacques Le Roux
Sorry didn't see your post before I sent but my other message, but it
comes to the conclusion that external ant builds wont work OOTB with the
latest changes.

Will likely need class path mods as per Adrian's comment.

Ray


Jacques Le Roux wrote:

> I can run ant (after an ant clean) on an XP console but I can't from
> Eclipse : I get
>
> Buildfile: D:\workspace\ofbizRun\build.xml
>
> build:
>
> [echo] [build] ========== Start Building (Compile) ==========
>
>
> BUILD FAILED
>
> D:\workspace\ofbizRun\build.xml:126: The following error occurred while
> executing this line:
>
> D:\workspace\ofbizRun\framework\build.xml:22: The following error
> occurred while executing this line:
>
> D:\workspace\ofbizRun\macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException
>
>
> Total time: 140 milliseconds
>
> Any ideas ?
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Adam Heath-2
In reply to this post by Ray-91
Ray wrote:

>> I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
>> external system-installed clean ant.  Did this in a brand new chroot.
>>
>> I've tested with java 1.5(which doesn't have the java scripting
>> library), so that it can only use bsf.  It tries to use bsf first, so
>> using 1.6 shouldn't be an issue.
>>
>> Are you *completely* clean?
>
> Often been asked! But I only have 4 or 5 files modified, most being ftl
> or java and one being general.properties, as reported by 'svn st',
> certainly no build files.
>
> Revision 709185: (Ubuntu 8.04)
> 'ant clean' - same error as I last reported class not found BSFException
> './ant clean' - works OK

As I said previously in this thread, if you have a slightly modified
global ant(ant-nodeps.jar exists), then you have to go the rest of the
way, and make the bsf stuff work with it.  There's nothing I can do to
fix this, unfortunately; it's a classloader scoping issue.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Adam Heath-2
In reply to this post by Jacques Le Roux
Jacques Le Roux wrote:

> I can run ant (after an ant clean) on an XP console but I can't from
> Eclipse : I get
>
> Buildfile: D:\workspace\ofbizRun\build.xml
>
> build:
>
> [echo] [build] ========== Start Building (Compile) ==========
>
>
> BUILD FAILED
>
> D:\workspace\ofbizRun\build.xml:126: The following error occurred while
> executing this line:
>
> D:\workspace\ofbizRun\framework\build.xml:22: The following error
> occurred while executing this line:
>
> D:\workspace\ofbizRun\macros.xml:63: java.lang.NoClassDefFoundError:
> org/apache/bsf/BSFException

Same as I said previously, most likely.  If ant-nodep is in the global
ant classpath, then the ant-apache-bsf has to be as well.
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

David E Jones
In reply to this post by Adam Heath-2

On Oct 30, 2008, at 2:10 PM, Adam Heath wrote:

> Ray wrote:
>>> I've tested with internal ofbiz ant(./ant, but not ./ant.bat), and
>>> external system-installed clean ant.  Did this in a brand new  
>>> chroot.
>>>
>>> I've tested with java 1.5(which doesn't have the java scripting
>>> library), so that it can only use bsf.  It tries to use bsf first,  
>>> so
>>> using 1.6 shouldn't be an issue.
>>>
>>> Are you *completely* clean?
>>
>> Often been asked! But I only have 4 or 5 files modified, most being  
>> ftl
>> or java and one being general.properties, as reported by 'svn st',
>> certainly no build files.
>>
>> Revision 709185: (Ubuntu 8.04)
>> 'ant clean' - same error as I last reported class not found  
>> BSFException
>> './ant clean' - works OK
>
> As I said previously in this thread, if you have a slightly modified
> global ant(ant-nodeps.jar exists), then you have to go the rest of the
> way, and make the bsf stuff work with it.  There's nothing I can do to
> fix this, unfortunately; it's a classloader scoping issue.

Is there any way to do runtime classpath manipulation in ant? Or  
perhaps a groovy script that runs really early as ant is loading?

We will have the ofbiz.home variable so we can find jar files relative  
to that, and if we can add them to the classpath somehow... voila!

-David

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

Adam Heath-2
I'll restate the problem.

At startup, and goes and looks at the it's own global lib folder, and
adds any jars it finds to a brand new classloader.

Then, those jars have to be able to find *all* their dependants, using
that same new classloader.

So, the <scriptdef> classes have an internal dep on the BSFManager and
BSFExtension; those libraries have to be available to this new
classloader(or any of it's parents).

The actual language implementations, forunately, do not; they can loaded
from a build.xml controlled path.

If someone just types 'ant', which then uses the global classloader,
there is no way to add any additional libraries once the loader
heirarchy has been initialized.

This is really a problem with the way ant is designed, unfortunately.
Classloaders are always notoriously hard to get right.

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r708924 - in /ofbiz/trunk/framework/base/lib

BJ Freeman
then back it out till it is fixed.

Adam Heath sent the following on 10/30/2008 1:30 PM:

> I'll restate the problem.
>
> At startup, and goes and looks at the it's own global lib folder, and
> adds any jars it finds to a brand new classloader.
>
> Then, those jars have to be able to find *all* their dependants, using
> that same new classloader.
>
> So, the <scriptdef> classes have an internal dep on the BSFManager and
> BSFExtension; those libraries have to be available to this new
> classloader(or any of it's parents).
>
> The actual language implementations, forunately, do not; they can loaded
> from a build.xml controlled path.
>
> If someone just types 'ant', which then uses the global classloader,
> there is no way to add any additional libraries once the loader
> heirarchy has been initialized.
>
> This is really a problem with the way ant is designed, unfortunately.
> Classloaders are always notoriously hard to get right.
>
>
>
1234