You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bilgin Ibryam <bi...@iguanait.com> on 2008/10/29 17:57:04 UTC

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

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, doogie@apache.org 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
> 
> 


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

Posted by BJ Freeman <bj...@free-man.net>.
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.
>>
> 
> 

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
To be clear  (and maybe for future FAQ)

In Eclipse : Windows Menu, then Preferences option, Ant/Runtime, from Ant Home button choice "framework/base"

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> OF course, it works  but IMO it's not a very satisfying solution even if we can generalize for all configurations at the workspace 
> level using the Runtime Ant Preferences.
> Because it's a new setup one have to do for every new Eclipse environments (I already imagine the number of questions we will have 
> from that...)
>
> Jacques
>
> From: "Scott Gray" <le...@gmail.com>
>> You should be able to change your ant home directory from the build
>> configuration under the classpath tab.  Change it to use
>> framework/base and everything should be fine.
>>
>> Regards
>> Scott
>>
>> 2008/10/31 BJ Freeman <bj...@free-man.net>:
>>> this would be done in the .classpath included in the trunk
>>> if eclipse is not longer supported in the trunk then the .project and
>>> .classpath should be removed.
>>> also I think that a vote should be done on removing Eclipse.
>>> However that will effect many who develop with eclipse.
>>> so it should be removed till a fix is found.
>>>
>>>
>>> Adam Heath sent the following on 10/30/2008 2:01 PM:
>>>> BJ Freeman wrote:
>>>>> i should clarify that ant build works
>>>>> but build thru eclipse does not
>>>>
>>>> Then how does eclipse call ant?  If the classloader it uses to call ant
>>>> only has a small part of ant's optional libs, then there is nothing more
>>>> we can do.  The classpath eclipse uses to call ant needs to be fixed.
>>>>
>>>>
>>>
>>
> 


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

Posted by Jacques Le Roux <ja...@les7arts.com>.
OF course, it works  but IMO it's not a very satisfying solution even if we can generalize for all configurations at the workspace 
level using the Runtime Ant Preferences.
Because it's a new setup one have to do for every new Eclipse environments (I already imagine the number of questions we will have 
from that...)

Jacques

From: "Scott Gray" <le...@gmail.com>
> You should be able to change your ant home directory from the build
> configuration under the classpath tab.  Change it to use
> framework/base and everything should be fine.
>
> Regards
> Scott
>
> 2008/10/31 BJ Freeman <bj...@free-man.net>:
>> this would be done in the .classpath included in the trunk
>> if eclipse is not longer supported in the trunk then the .project and
>> .classpath should be removed.
>> also I think that a vote should be done on removing Eclipse.
>> However that will effect many who develop with eclipse.
>> so it should be removed till a fix is found.
>>
>>
>> Adam Heath sent the following on 10/30/2008 2:01 PM:
>>> BJ Freeman wrote:
>>>> i should clarify that ant build works
>>>> but build thru eclipse does not
>>>
>>> Then how does eclipse call ant?  If the classloader it uses to call ant
>>> only has a small part of ant's optional libs, then there is nothing more
>>> we can do.  The classpath eclipse uses to call ant needs to be fixed.
>>>
>>>
>>
> 


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

Posted by Scott Gray <le...@gmail.com>.
You should be able to change your ant home directory from the build
configuration under the classpath tab.  Change it to use
framework/base and everything should be fine.

Regards
Scott

2008/10/31 BJ Freeman <bj...@free-man.net>:
> this would be done in the .classpath included in the trunk
> if eclipse is not longer supported in the trunk then the .project and
> .classpath should be removed.
> also I think that a vote should be done on removing Eclipse.
> However that will effect many who develop with eclipse.
> so it should be removed till a fix is found.
>
>
> Adam Heath sent the following on 10/30/2008 2:01 PM:
>> BJ Freeman wrote:
>>> i should clarify that ant build works
>>> but build thru eclipse does not
>>
>> Then how does eclipse call ant?  If the classloader it uses to call ant
>> only has a small part of ant's optional libs, then there is nothing more
>> we can do.  The classpath eclipse uses to call ant needs to be fixed.
>>
>>
>

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

Posted by Adam Heath <do...@brainfood.com>.
Adam Heath wrote:
> BJ Freeman wrote:
>> so why brake the development environment?
>> The trunk should not be a test bed but a development image.
>> if something breaks the way people develop, it should be removed and
>> tested as a patch.
> 
> It's not ofbiz that is broken, it the ant install that is.
> 
> Classloader heiarchay(guess, but probably pretty accurate)
> 
> SystemLoader -> AntBaseLoader -> build.xml loaders(multiple)
> 
> Any class loaded by a particular loader can only have bytecode level
> depends on classes loaded by it's same loader, or a parent.  This is
> just the way classloaders work.
> 
> What is occuring in these cases, is that the ScriptDefTask.java,
> provided by ant, is loaded by the AntBaseLoader, but then the
> BSFManager/BSFException class that it needs is not available in either
> the AntBaseLoader, nor the SystemLoader.
> 
> The fix is to make certain the ScriptDefTask is not in the global ant
> library, or move the bsf.jar into the global ant library.
> 
> If you are having this problem, then its the ant install that is broken.
>  There's nothing ofbiz can do to fix the global ant.

Or look at http://ant.apache.org/manual/install.html#optionalTasks

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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> so why brake the development environment?
> The trunk should not be a test bed but a development image.
> if something breaks the way people develop, it should be removed and
> tested as a patch.

It's not ofbiz that is broken, it the ant install that is.

Classloader heiarchay(guess, but probably pretty accurate)

SystemLoader -> AntBaseLoader -> build.xml loaders(multiple)

Any class loaded by a particular loader can only have bytecode level
depends on classes loaded by it's same loader, or a parent.  This is
just the way classloaders work.

What is occuring in these cases, is that the ScriptDefTask.java,
provided by ant, is loaded by the AntBaseLoader, but then the
BSFManager/BSFException class that it needs is not available in either
the AntBaseLoader, nor the SystemLoader.

The fix is to make certain the ScriptDefTask is not in the global ant
library, or move the bsf.jar into the global ant library.

If you are having this problem, then its the ant install that is broken.
 There's nothing ofbiz can do to fix the global ant.


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

Posted by BJ Freeman <bj...@free-man.net>.
so why brake the development environment?
The trunk should not be a test bed but a development image.
if something breaks the way people develop, it should be removed and
tested as a patch.


David E Jones sent the following on 10/30/2008 1:38 PM:
> 
> I don't know that we need to go that far.
> 
> The easiest solution, for now, is to use the ofbiz ant script. Hopefully
> we'll find better solutions in the near future.
> 
> -David
> 
> 
> On Oct 30, 2008, at 2:35 PM, BJ Freeman wrote:
> 
>> 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.
>>>
>>>
>>>
> 
> 
> 

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

Posted by David E Jones <jo...@hotwaxmedia.com>.
I don't know that we need to go that far.

The easiest solution, for now, is to use the ofbiz ant script.  
Hopefully we'll find better solutions in the near future.

-David


On Oct 30, 2008, at 2:35 PM, BJ Freeman wrote:

> 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.
>>
>>
>>


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

Posted by BJ Freeman <bj...@free-man.net>.
hopefully you can have it running on you laptop, or your staging server,
for the conference.
that is what I do when I go to a clients or prepare a demo on my staging
server.

Adam Heath sent the following on 10/30/2008 5:25 PM:
> Jacques Le Roux wrote:
>> Even more reasonnable, but dit you not intend to make the community take
>> advantage of your changes ?
> 
> Sure, but it might be premature.  Was hoping to have this basic stuff
> working for the conference, but might have to push back a bit.  There's
> still time for me to figure out what I'm going to do.
> 
> 

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

Posted by Adam Heath <do...@brainfood.com>.
Jacques Le Roux wrote:
> Even more reasonnable, but dit you not intend to make the community take
> advantage of your changes ?

Sure, but it might be premature.  Was hoping to have this basic stuff
working for the conference, but might have to push back a bit.  There's
still time for me to figure out what I'm going to do.

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Even more reasonnable, but dit you not intend to make the community take advantage of your changes ?

Jacques

From: "Adam Heath" <do...@brainfood.com>
> Jacques Le Roux wrote:
>> I finally agree, sound reasonnable enough and would allow Adam to
>> continue his work
>> Maybe a vote ?
> 
> Since I'm the only one who needs/wants this stuff, I should be the one
> that has to maintain a local-only change.
>

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

Posted by Adam Heath <do...@brainfood.com>.
Jacques Le Roux wrote:
> I finally agree, sound reasonnable enough and would allow Adam to
> continue his work
> Maybe a vote ?

Since I'm the only one who needs/wants this stuff, I should be the one
that has to maintain a local-only change.

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
I finally agree, sound reasonnable enough and would allow Adam to continue his work
Maybe a vote ?

Jacques
PS : except if, as I already suggested, there is a solution in Ant plugin itself (to be checked)

From: "Scott Gray" <le...@gmail.com>
> As far as I can see there is now way to specify ANT_HOME in a way that
> we could put into svn.  I don't think it is a big deal to create a
> confluence page showing users how to change ANT_HOME per build launch
> or globally and I think most other projects do just that.
> 
> Regards
> Scott
> 
> 2008/10/31 Adrian Crum <ad...@hlmksw.com>:
>> Adam Heath wrote:
>>>
>>> Done, version 709292.  I'm going to have to get eclipse installed, and
>>> see how to make it work.
>>
>> Or the Eclipse users can uncomment the script stuff and continue trying to
>> find a solution.
>>
>> -Adrian
>>
>>
>>
>

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

Posted by Scott Gray <le...@gmail.com>.
As far as I can see there is now way to specify ANT_HOME in a way that
we could put into svn.  I don't think it is a big deal to create a
confluence page showing users how to change ANT_HOME per build launch
or globally and I think most other projects do just that.

Regards
Scott

2008/10/31 Adrian Crum <ad...@hlmksw.com>:
> Adam Heath wrote:
>>
>> Done, version 709292.  I'm going to have to get eclipse installed, and
>> see how to make it work.
>
> Or the Eclipse users can uncomment the script stuff and continue trying to
> find a solution.
>
> -Adrian
>
>
>

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

Posted by BJ Freeman <bj...@free-man.net>.
updated SVN
run as for the build.xml

ofbiz_svn\build.xml:126: The following error occurred while executing
this line:

ofbiz_svn\framework\build.xml:22: The following error occurred while
executing this line:

ofbiz_svn\macros.xml:63: Could not create type ofbizscriptdef due to
java.lang.NoClassDefFoundError: org/apache/bsf/BSFException



Adam Heath sent the following on 10/30/2008 2:29 PM:
> BJ Freeman wrote:
>> this would be done in the .classpath included in the trunk
>> if eclipse is not longer supported in the trunk then the .project and
>> .classpath should be removed.
>> also I think that a vote should be done on removing Eclipse.
>> However that will effect many who develop with eclipse.
>> so it should be removed till a fix is found.
> 
> <rant>
> Oh my, that is so broken.  That is a stupid way to make eclipse work.
> Combining libraries that the *code* needs to compile, with libraries
> that the *build* system needs.  Shame on eclipse for doing it that way.
>  Bad monkey, no cookie for you.
> </rant>
> 
> I've added the new ant jars in 709250.  Don't use eclipse, so can't test.
> 
> 

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

Posted by BJ Freeman <bj...@free-man.net>.
hehehehe

Adam Heath sent the following on 10/30/2008 2:29 PM:
> BJ Freeman wrote:
>> this would be done in the .classpath included in the trunk
>> if eclipse is not longer supported in the trunk then the .project and
>> .classpath should be removed.
>> also I think that a vote should be done on removing Eclipse.
>> However that will effect many who develop with eclipse.
>> so it should be removed till a fix is found.
> 
> <rant>
> Oh my, that is so broken.  That is a stupid way to make eclipse work.
> Combining libraries that the *code* needs to compile, with libraries
> that the *build* system needs.  Shame on eclipse for doing it that way.
>  Bad monkey, no cookie for you.
> </rant>
> 
> I've added the new ant jars in 709250.  Don't use eclipse, so can't test.
> 
> 

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

Posted by Adrian Crum <ad...@hlmksw.com>.
Adam Heath wrote:
> Done, version 709292.  I'm going to have to get eclipse installed, and
> see how to make it work.

Or the Eclipse users can uncomment the script stuff and continue trying 
to find a solution.

-Adrian



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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Simpler than the solutions proposed so far  :o)
One solution (to avoid any settings on our side) would be to request the Eclipse Ant plugin team to put the needed jars in their 
directory.
Maybe there is already a mechanism to automatize that since from UI you are able to do it
Window --> Preferences, Ant --> Runtime. In the Classpath tab click on Global Entries and then Add External JARs....

Jacques

From: "Adam Heath" <do...@brainfood.com>
> BJ Freeman wrote:
>> the point is not that it would come up, but that it would not cause a
>> glitch.
>> by backing out you changes, it would give a chance to find a solution
>> without disrupting development environments.
>>
>> once everyone is on board with the changes, which may include a upgrade
>> of eclipse, then put them back in.
>
> Done, version 709292.  I'm going to have to get eclipse installed, and
> see how to make it work.
>
> I really wanted this stuff to work, as I need javacc/jjtree for a new
> feature I've been working on for years, but I guess it'll have to wait.
> 


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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> the point is not that it would come up, but that it would not cause a
> glitch.
> by backing out you changes, it would give a chance to find a solution
> without disrupting development environments.
> 
> once everyone is on board with the changes, which may include a upgrade
> of eclipse, then put them back in.

Done, version 709292.  I'm going to have to get eclipse installed, and
see how to make it work.

I really wanted this stuff to work, as I need javacc/jjtree for a new
feature I've been working on for years, but I guess it'll have to wait.

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

Posted by BJ Freeman <bj...@free-man.net>.
the point is not that it would come up, but that it would not cause a
glitch.
by backing out you changes, it would give a chance to find a solution
without disrupting development environments.

once everyone is on board with the changes, which may include a upgrade
of eclipse, then put them back in.



Adam Heath sent the following on 10/30/2008 3:18 PM:
> Backing out my change from a few days ago is not the right thing to do
> here; this probably would eventually come up at some point, so we might
> as well go about seeing what needs to be done to fix it.
> 
> 

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

Posted by Adrian Crum <ad...@hlmksw.com>.
As Jacques mentioned, your guess is right. Eclipse insists on using its 
own copy of Ant - even when you try to change the preferences. I tried 
creating my own project-specific Builder, but that didn't work either.

I tried, but I couldn't get it to work. Can I have a cookie anyway?

-Adrian

Adam Heath wrote:
> Adrian Crum wrote:
> 
>> Your commit doesn't fix the Eclipse issue. I have a fresh checkout and
>> I'm willing to help solve the problem.
>>
>> Here are the ant jars listed in the classpath file, let me know what
>> order they should be in:
>>
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant/ant-nodeps-1.7.0.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant/ant-apache-bsf-1.7.0.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant-launcher-1.7.0.jar"/>
>> <classpathentry kind="lib" path="framework/base/lib/ant-1.7.0.jar"/>
> 
> My guess is that any ant jar in .classpath is not used at all; eclipse
> itself has it's one ant jars that is uses to start the build process.
> 
> As a test, remove those 4 entries, and try a build.  If it starts ant,
> and fails in the exact same way, then it shows that it's not using our
> own ant jars, but something else.  It also means something else inside
> eclipse needs to be fixed to make this work.
> 
> Backing out my change from a few days ago is not the right thing to do
> here; this probably would eventually come up at some point, so we might
> as well go about seeing what needs to be done to fix it.
> 

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, by default, Eclipse uses its embedded plugin (path set in [Preferences, Ant Runtime, "Ant Home" ])

Jacques

From: "Adam Heath" <do...@brainfood.com>
> Adrian Crum wrote:
> 
>> Your commit doesn't fix the Eclipse issue. I have a fresh checkout and
>> I'm willing to help solve the problem.
>> 
>> Here are the ant jars listed in the classpath file, let me know what
>> order they should be in:
>> 
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant/ant-nodeps-1.7.0.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant/ant-apache-bsf-1.7.0.jar"/>
>> <classpathentry kind="lib"
>> path="framework/base/lib/ant-launcher-1.7.0.jar"/>
>> <classpathentry kind="lib" path="framework/base/lib/ant-1.7.0.jar"/>
> 
> My guess is that any ant jar in .classpath is not used at all; eclipse
> itself has it's one ant jars that is uses to start the build process.
> 
> As a test, remove those 4 entries, and try a build.  If it starts ant,
> and fails in the exact same way, then it shows that it's not using our
> own ant jars, but something else.  It also means something else inside
> eclipse needs to be fixed to make this work.
> 
> Backing out my change from a few days ago is not the right thing to do
> here; this probably would eventually come up at some point, so we might
> as well go about seeing what needs to be done to fix it.
>

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

Posted by Adam Heath <do...@brainfood.com>.
Adrian Crum wrote:

> Your commit doesn't fix the Eclipse issue. I have a fresh checkout and
> I'm willing to help solve the problem.
> 
> Here are the ant jars listed in the classpath file, let me know what
> order they should be in:
> 
> <classpathentry kind="lib"
> path="framework/base/lib/ant/ant-nodeps-1.7.0.jar"/>
> <classpathentry kind="lib"
> path="framework/base/lib/ant/ant-apache-bsf-1.7.0.jar"/>
> <classpathentry kind="lib"
> path="framework/base/lib/ant-launcher-1.7.0.jar"/>
> <classpathentry kind="lib" path="framework/base/lib/ant-1.7.0.jar"/>

My guess is that any ant jar in .classpath is not used at all; eclipse
itself has it's one ant jars that is uses to start the build process.

As a test, remove those 4 entries, and try a build.  If it starts ant,
and fails in the exact same way, then it shows that it's not using our
own ant jars, but something else.  It also means something else inside
eclipse needs to be fixed to make this work.

Backing out my change from a few days ago is not the right thing to do
here; this probably would eventually come up at some point, so we might
as well go about seeing what needs to be done to fix it.

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

Posted by Adrian Crum <ad...@hlmksw.com>.
Adam,

Your commit doesn't fix the Eclipse issue. I have a fresh checkout and 
I'm willing to help solve the problem.

Here are the ant jars listed in the classpath file, let me know what 
order they should be in:

<classpathentry kind="lib" 
path="framework/base/lib/ant/ant-nodeps-1.7.0.jar"/>
<classpathentry kind="lib" 
path="framework/base/lib/ant/ant-apache-bsf-1.7.0.jar"/>
<classpathentry kind="lib" 
path="framework/base/lib/ant-launcher-1.7.0.jar"/>
<classpathentry kind="lib" path="framework/base/lib/ant-1.7.0.jar"/>

-Adrian

Adam Heath wrote:
> BJ Freeman wrote:
>> this would be done in the .classpath included in the trunk
>> if eclipse is not longer supported in the trunk then the .project and
>> .classpath should be removed.
>> also I think that a vote should be done on removing Eclipse.
>> However that will effect many who develop with eclipse.
>> so it should be removed till a fix is found.
> 
> <rant>
> Oh my, that is so broken.  That is a stupid way to make eclipse work.
> Combining libraries that the *code* needs to compile, with libraries
> that the *build* system needs.  Shame on eclipse for doing it that way.
>  Bad monkey, no cookie for you.
> </rant>
> 
> I've added the new ant jars in 709250.  Don't use eclipse, so can't test.
> 

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
Sorry but the problem remains

Jacques

From: "Adam Heath" <do...@brainfood.com>
> BJ Freeman wrote:
>> this would be done in the .classpath included in the trunk
>> if eclipse is not longer supported in the trunk then the .project and
>> .classpath should be removed.
>> also I think that a vote should be done on removing Eclipse.
>> However that will effect many who develop with eclipse.
>> so it should be removed till a fix is found.
> 
> <rant>
> Oh my, that is so broken.  That is a stupid way to make eclipse work.
> Combining libraries that the *code* needs to compile, with libraries
> that the *build* system needs.  Shame on eclipse for doing it that way.
> Bad monkey, no cookie for you.
> </rant>
> 
> I've added the new ant jars in 709250.  Don't use eclipse, so can't test.
>

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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> this would be done in the .classpath included in the trunk
> if eclipse is not longer supported in the trunk then the .project and
> .classpath should be removed.
> also I think that a vote should be done on removing Eclipse.
> However that will effect many who develop with eclipse.
> so it should be removed till a fix is found.

<rant>
Oh my, that is so broken.  That is a stupid way to make eclipse work.
Combining libraries that the *code* needs to compile, with libraries
that the *build* system needs.  Shame on eclipse for doing it that way.
 Bad monkey, no cookie for you.
</rant>

I've added the new ant jars in 709250.  Don't use eclipse, so can't test.

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

Posted by BJ Freeman <bj...@free-man.net>.
this would be done in the .classpath included in the trunk
if eclipse is not longer supported in the trunk then the .project and
.classpath should be removed.
also I think that a vote should be done on removing Eclipse.
However that will effect many who develop with eclipse.
so it should be removed till a fix is found.


Adam Heath sent the following on 10/30/2008 2:01 PM:
> BJ Freeman wrote:
>> i should clarify that ant build works
>> but build thru eclipse does not
> 
> Then how does eclipse call ant?  If the classloader it uses to call ant
> only has a small part of ant's optional libs, then there is nothing more
> we can do.  The classpath eclipse uses to call ant needs to be fixed.
> 
> 

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
I guess it uses its plugin. For me it's eclipse3.4\plugins\org.apache.ant_1.7.0.v200803061910\bin

A bit late here, but I'd have a look

Jacques

From: "Adam Heath" <do...@brainfood.com>
> BJ Freeman wrote:
>> i should clarify that ant build works
>> but build thru eclipse does not
> 
> Then how does eclipse call ant?  If the classloader it uses to call ant
> only has a small part of ant's optional libs, then there is nothing more
> we can do.  The classpath eclipse uses to call ant needs to be fixed.
>

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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> i should clarify that ant build works
> but build thru eclipse does not

Then how does eclipse call ant?  If the classloader it uses to call ant
only has a small part of ant's optional libs, then there is nothing more
we can do.  The classpath eclipse uses to call ant needs to be fixed.

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

Posted by BJ Freeman <bj...@free-man.net>.
i should clarify that ant build works
but build thru eclipse does not


BJ Freeman sent the following on 10/30/2008 1:50 PM:
> I have a checkout that is only svn.
> I don't add or change anything.
> and it is broke, per the data already shown, on a windows xp.
> 
> 
> Adam Heath sent the following on 10/30/2008 1:44 PM:
>> BJ Freeman wrote:
>>> then back it out till it is fixed.
>> Er, you can't fix it, it's an ant problem.
>>
>> If you have a half-modified global ant(one that has part of the optional
>> libs, but not all), then the global ant is broken.  That's not something
>> that ofbiz can deal with.
>>
>> A completely plain, clean ant install works with a fresh ofbiz checkout.
>>  It's only those global ants that have been partly extended that don't work.
>>
>>
> 
> 

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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> I have a checkout that is only svn.
> I don't add or change anything.
> and it is broke, per the data already shown, on a windows xp.

Local ant or global ant?

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

Posted by BJ Freeman <bj...@free-man.net>.
I have a checkout that is only svn.
I don't add or change anything.
and it is broke, per the data already shown, on a windows xp.


Adam Heath sent the following on 10/30/2008 1:44 PM:
> BJ Freeman wrote:
>> then back it out till it is fixed.
> 
> Er, you can't fix it, it's an ant problem.
> 
> If you have a half-modified global ant(one that has part of the optional
> libs, but not all), then the global ant is broken.  That's not something
> that ofbiz can deal with.
> 
> A completely plain, clean ant install works with a fresh ofbiz checkout.
>  It's only those global ants that have been partly extended that don't work.
> 
> 

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

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> then back it out till it is fixed.

Er, you can't fix it, it's an ant problem.

If you have a half-modified global ant(one that has part of the optional
libs, but not all), then the global ant is broken.  That's not something
that ofbiz can deal with.

A completely plain, clean ant install works with a fresh ofbiz checkout.
 It's only those global ants that have been partly extended that don't work.

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

Posted by BJ Freeman <bj...@free-man.net>.
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.
> 
> 
> 

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

Posted by Adam Heath <do...@brainfood.com>.
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.


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

Posted by David E Jones <jo...@hotwaxmedia.com>.
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


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

Posted by Adam Heath <do...@brainfood.com>.
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.

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

Posted by Ray <ra...@makeyour-point.com>.
> 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

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

Posted by Adrian Crum <ad...@hlmksw.com>.
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" <do...@brainfood.com>
>> 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?
>>
> 

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

Posted by Adam Heath <do...@brainfood.com>.
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.

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

Posted by Ray <ra...@makeyour-point.com>.
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 ?
> 


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

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <do...@brainfood.com>
> 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?
>

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

Posted by Adam Heath <do...@brainfood.com>.
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?

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

Posted by Bilgin Ibryam <bi...@iguanait.com>.
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


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

Posted by Ray <ra...@makeyour-point.com>.
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.
> 

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

Posted by Adam Heath <do...@brainfood.com>.
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.


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

Posted by Mridul Pathak <mr...@hotwaxmedia.com>.
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.


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

Posted by Adam Heath <do...@brainfood.com>.
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.

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

Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
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.


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

Posted by Adam Heath <do...@brainfood.com>.
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.

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

Posted by Adam Heath <do...@brainfood.com>.
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.