Trunk Broken, Cannot Start

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

Trunk Broken, Cannot Start

David E Jones

It looks like in the last few hours, something following SVN rev  
672652, has broken the trunk.

Now when trying to start I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/
log4j/Priority
        at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:
51)
        at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
        at org.ofbiz.base.start.Start.init(Start.java:89)
        at org.ofbiz.base.start.Start.main(Start.java:398)

It looks like there have been 4 commits since the working revision, so  
the break is in one of these: 672657, 672660, 672672, 672673.

All of these commits were by Adam Heath... so sorry for singling you  
out Adam. If you have any ideas about why this is breaking, your help  
would be appreciated.

-David

Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

David E Jones

Okay, narrowed it down a bit more: the changes in rev 672657 cause  
this problem... somehow. They are only changes to build files, but  
there are lots of changes there... not sure which might be causing this.

BTW, is anyone else seeing this problem?

-David


On Jun 29, 2008, at 5:23 PM, David E Jones wrote:

>
> It looks like in the last few hours, something following SVN rev  
> 672652, has broken the trunk.
>
> Now when trying to start I get this error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: org/
> apache/log4j/Priority
> at  
> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:51)
> at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
> at org.ofbiz.base.start.Start.init(Start.java:89)
> at org.ofbiz.base.start.Start.main(Start.java:398)
>
> It looks like there have been 4 commits since the working revision,  
> so the break is in one of these: 672657, 672660, 672672, 672673.
>
> All of these commits were by Adam Heath... so sorry for singling you  
> out Adam. If you have any ideas about why this is breaking, your  
> help would be appreciated.
>
> -David
>

Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

Tim Ruppert
I'm getting the same issue with a fresh checkout.

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

o:801.649.6594
f:801.649.6595


On Jun 29, 2008, at 5:28 PM, David E Jones wrote:

>
> Okay, narrowed it down a bit more: the changes in rev 672657 cause  
> this problem... somehow. They are only changes to build files, but  
> there are lots of changes there... not sure which might be causing  
> this.
>
> BTW, is anyone else seeing this problem?
>
> -David
>
>
> On Jun 29, 2008, at 5:23 PM, David E Jones wrote:
>
>>
>> It looks like in the last few hours, something following SVN rev  
>> 672652, has broken the trunk.
>>
>> Now when trying to start I get this error:
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError: org/
>> apache/log4j/Priority
>> at  
>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:
>> 51)
>> at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>> at org.ofbiz.base.start.Start.init(Start.java:89)
>> at org.ofbiz.base.start.Start.main(Start.java:398)
>>
>> It looks like there have been 4 commits since the working revision,  
>> so the break is in one of these: 672657, 672660, 672672, 672673.
>>
>> All of these commits were by Adam Heath... so sorry for singling  
>> you out Adam. If you have any ideas about why this is breaking,  
>> your help would be appreciated.
>>
>> -David
>>
>


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

Re: Trunk Broken, Cannot Start

Adam Heath-2
>> On Jun 29, 2008, at 5:23 PM, David E Jones wrote:
>>
>>>
>>> It looks like in the last few hours, something following SVN rev
>>> 672652, has broken the trunk.
>>>
>>> Now when trying to start I get this error:
>>>
>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>> org/apache/log4j/Priority
>>>     at
>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:51)
>>>     at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>     at org.ofbiz.base.start.Start.init(Start.java:89)
>>>     at org.ofbiz.base.start.Start.main(Start.java:398)

Somehow, the classpath used to compiled ofbiz-base.jar had 2 versions of
log4j in it, the local one in framework/base/lib, and one that appears
to be in ant's global classpath.

Hadn't noticed it myself yet, I've got some other things in progress; I
assumed that everything compiled fine, seeing as how the other libs were
found.

Sorry about it(and the fix is in).
Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

David E Jones

On Jun 29, 2008, at 6:56 PM, Adam Heath wrote:

>>> On Jun 29, 2008, at 5:23 PM, David E Jones wrote:
>>>
>>>>
>>>> It looks like in the last few hours, something following SVN rev  
>>>> 672652, has broken the trunk.
>>>>
>>>> Now when trying to start I get this error:
>>>>
>>>> Exception in thread "main" java.lang.NoClassDefFoundError: org/
>>>> apache/log4j/Priority
>>>>    at  
>>>> org
>>>> .ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:51)
>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>
> Somehow, the classpath used to compiled ofbiz-base.jar had 2  
> versions of log4j in it, the local one in framework/base/lib, and  
> one that appears to be in ant's global classpath.
>
> Hadn't noticed it myself yet, I've got some other things in  
> progress; I assumed that everything compiled fine, seeing as how the  
> other libs were found.
>
> Sorry about it(and the fix is in).

I looked into this a little more, and it's a weird one. It looks like  
all of the classes from src/base are also be put into the the build/
classes/start directory, and added to the eventual jar file, which  
means there will be lots of classes in that jar file that depend on  
other classes (in jar files) that are not on the classpath (since only  
the contents of ofbiz.jar are on the initial classpath).

Anyway, I couldn't see what might cause this, so who knows what the  
solution might be....

-David


Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

Adam Heath-2
David E Jones wrote:

>
> On Jun 29, 2008, at 6:56 PM, Adam Heath wrote:
>
>>>> On Jun 29, 2008, at 5:23 PM, David E Jones wrote:
>>>>
>>>>>
>>>>> It looks like in the last few hours, something following SVN rev
>>>>> 672652, has broken the trunk.
>>>>>
>>>>> Now when trying to start I get this error:
>>>>>
>>>>> Exception in thread "main" java.lang.NoClassDefFoundError:
>>>>> org/apache/log4j/Priority
>>>>>    at
>>>>> org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:51)
>>>>>    at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>    at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>    at org.ofbiz.base.start.Start.main(Start.java:398)
>>
>> Somehow, the classpath used to compiled ofbiz-base.jar had 2 versions
>> of log4j in it, the local one in framework/base/lib, and one that
>> appears to be in ant's global classpath.
>>
>> Hadn't noticed it myself yet, I've got some other things in progress;
>> I assumed that everything compiled fine, seeing as how the other libs
>> were found.
>>
>> Sorry about it(and the fix is in).
>
> I looked into this a little more, and it's a weird one. It looks like
> all of the classes from src/base are also be put into the the
> build/classes/start directory, and added to the eventual jar file, which
> means there will be lots of classes in that jar file that depend on
> other classes (in jar files) that are not on the classpath (since only
> the contents of ofbiz.jar are on the initial classpath).
>
> Anyway, I couldn't see what might cause this, so who knows what the
> solution might be....

Ah, yes, now I understand.

macros.xml contains a presetdef for javac; it sets srcdir="${src.dir}".
  For base, the source doesn't live directly in that dir, but in 2
subdirs, start/ and base/.  When the javac15 macro was called in
build.xml, it used a nested <src> path element; instead of overriding
this, like I thought, it actually built upon the already set srcdir.

So, I fixed this by changing the srcdir value, instead of using a nested
<src> element.

If you want to use a nested <src> element(for specifying multiple paths,
etc), then you'll need to set the srcdir attribute to the empty value,
before adding any <src> elements.
Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

David E Jones

On Jun 29, 2008, at 10:30 PM, Adam Heath wrote:

> David E Jones wrote:
>> On Jun 29, 2008, at 6:56 PM, Adam Heath wrote:
>>>>> On Jun 29, 2008, at 5:23 PM, David E Jones wrote:
>>>>>
>>>>>>
>>>>>> It looks like in the last few hours, something following SVN  
>>>>>> rev 672652, has broken the trunk.
>>>>>>
>>>>>> Now when trying to start I get this error:
>>>>>>
>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: org/
>>>>>> apache/log4j/Priority
>>>>>>   at  
>>>>>> org
>>>>>> .ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:
>>>>>> 51)
>>>>>>   at org.ofbiz.base.start.Start.initStartLoaders(Start.java:250)
>>>>>>   at org.ofbiz.base.start.Start.init(Start.java:89)
>>>>>>   at org.ofbiz.base.start.Start.main(Start.java:398)
>>>
>>> Somehow, the classpath used to compiled ofbiz-base.jar had 2  
>>> versions of log4j in it, the local one in framework/base/lib, and  
>>> one that appears to be in ant's global classpath.
>>>
>>> Hadn't noticed it myself yet, I've got some other things in  
>>> progress; I assumed that everything compiled fine, seeing as how  
>>> the other libs were found.
>>>
>>> Sorry about it(and the fix is in).
>> I looked into this a little more, and it's a weird one. It looks  
>> like all of the classes from src/base are also be put into the the  
>> build/classes/start directory, and added to the eventual jar file,  
>> which means there will be lots of classes in that jar file that  
>> depend on other classes (in jar files) that are not on the  
>> classpath (since only the contents of ofbiz.jar are on the initial  
>> classpath).
>> Anyway, I couldn't see what might cause this, so who knows what the  
>> solution might be....
>
> Ah, yes, now I understand.
>
> macros.xml contains a presetdef for javac; it sets srcdir="$
> {src.dir}".  For base, the source doesn't live directly in that dir,  
> but in 2 subdirs, start/ and base/.  When the javac15 macro was  
> called in build.xml, it used a nested <src> path element; instead of  
> overriding this, like I thought, it actually built upon the already  
> set srcdir.
>
> So, I fixed this by changing the srcdir value, instead of using a  
> nested <src> element.
>
> If you want to use a nested <src> element(for specifying multiple  
> paths, etc), then you'll need to set the srcdir attribute to the  
> empty value, before adding any <src> elements.

Interesting, and that would make sense. Sometimes the flexibility of  
ant is "enough rope to shoot yourself in the foot". ;)

Thanks for looking into this Adam.

-David

Reply | Threaded
Open this post in threaded view
|

Re: Trunk Broken, Cannot Start

Adam Heath-2
David E Jones wrote:
> Interesting, and that would make sense. Sometimes the flexibility of ant
> is "enough rope to shoot yourself in the foot". ;)

That's all well and good, but I prefer my tools to have enough rope left
over to at least give rope-burn to my first born progeny for the next
100 years.