Re: Barracuda: Compiling Barracuda - first time Barracuda user
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Putting ANT_HOME/lib into the classpath is entirely useless since it is the
jar file inside ANT_HOME/lib that require being put into the
classpath. Either way, the "ant" script does this for you so there is no
need to put anything in your system classpath. The "." is merely a
convenience so that wherever you are in the shell, that directory will be
put in the classpath. Makes it easier to run command-line programs.
I didn't realize you were on MacOSX. It seems to me, though that, somehow,
another version of the org.w3c.dom package is getting into your
classpath. If it didn't find it at all I'd expect "NoClassDefFoundError"
rather than reporting, for instance, not being able to find a method in the
Node class.
I'd double check that you don't already have another version of Ant
installed somewhere else on the system and when your run "ant", that is
getting called instead of the one you think is being called. The other
thing you can do is try installing j2sdk1.4.x and trying that out.
Has anyone else on this list built Barracuda on MacOSX? Can you report
your results; good or bad?
Hang in there!
Jake
At 08:38 AM 1/13/2003 +1300, you wrote:
>Hi Jacob
>
>Thanks for your reply.
>
>1. The jars are in fact in $CATALINA_HOME/shared/lib, <whoops> I made a
>typo when I prepared the terminal session thread that you saw.
>2. There is no CLASSPATH environment variable.
>
>This was run on Mac OS X. I will try the install on Linux also, with a 1.3
>JVM.
>
>Here is another terminal session just to clarify (Tomcat has already been
>started). I added $ANT_HOME/lib into the classpath to see if it would help
>but made no difference.
>[root@maclite ~/barcuda] ls /Library/Tomcat/shared/lib/
>gnu-regexp-1.1.4.jar xerces-1.4.4-xmlc-2.1.jar
>jtidy-r7-xmlc-2.1.jar xmlc-2.1.jar
>[root@maclite ~/barcuda] ls ant/lib/
>README optional.jar
>ant.jar xerces-1.4.4-xmlc-2.1.jar
>[root@maclite ~/barcuda] cat app_env
>#!/bin/bash
>export BARSRC=/var/root/barcuda
>#
>export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
>export PATH=$PATH:$JAVA_HOME/bin
># ant
>export ANT_HOME=$BARSRC/ant
>export PATH=$PATH:$ANT_HOME/bin
># tomcat
>export CATALINA_HOME=/Library/Tomcat
>#
>export CLASSPATH=.:$ANT_HOME/lib
>#
>echo $JAVA_HOME
>echo $ANT_HOME
>echo $BARSRC
>echo $CLASSPATH
>echo $CATALINA_HOME
># do the build
>cd $BARSRC/Barracuda/src
>ant contrib -Dsubproject=all -Dsubtarget=install
>[root@maclite ~/barcuda] ./app_env
>/System/Library/Frameworks/JavaVM.framework/Home
>/var/root/barcuda/ant
>/var/root/barcuda
>.:/var/root/barcuda/ant/lib
>/Library/Tomcat
>Buildfile: build.xml
>
>sample.init:
>
>taskdefs.init:
>
>source.init:
>
>init:
>
>taskdefs.compile:
>
>taskdefs:
>
>compile_core:
> [javac] Compiling 157 source files to
> /var/root/barcuda/Barracuda/WEB-INF/classes
> [javac]
> /var/root/barcuda/Barracuda/src/org/enhydra/barracuda/core/comp/renderer/html/HTMLLinkRenderer.java:91:
> cannot resolve symbol
> [javac] symbol : method hasAttributes ()
> [javac] location: interface org.w3c.dom.Node
> [javac] if (defaultNode.hasAttributes()) {
> [javac] ^
> [javac]
> /var/root/barcuda/Barracuda/src/org/enhydra/barracuda/core/util/dom/DOMUtil.java:226:
> cannot resolve symbol
> [javac] symbol : method hasAttributes ()
> [javac] location: interface org.w3c.dom.Node
> [javac] print (out, inset+" attr:"+(node.hasAttributes() ?
> "" : " (n/a)"));
> [javac] ^
> [javac] /var/root/barcuda/Barrac
>
><snip>
>
>
>Cheers
>Stephen
>
>
>
>Jacob Kjome wrote:
>>
>>hmm....
>>
>>It looks like you, properly, removed xercesImpl.jar and xml-apis.jar from
>>ANT_HOME/lib and copied in Barracuda's version of xerces. I'm curious
>>about the CATALNIA_HOME/lib. In Tomcat-4.1.12, that directory doesn't
>>exist. All the xmlc related jars go in shared/lib.
>>
>>You don't have anything on your permanent CLASSPATH, do you? If so, you
>>should clean that up to be something like this....
>>
>>.;%JAVA_HOME%\tools.jar;%JAVA_HOME%\dt.jar;%JAVA_HOME%\htmlconverter.jar;%JAVA_HOME%\jre\lib\rt.jar
>>
>>That should be the most you have on the system CLASSPATH. I only have
>>the jar files there to satisfy Jikes. Otherwise, I'd just have "." and
>>that is it.
>>
>>The CLASSPATH issue is the only thing I can think of because having
>>Barracuda's version of xerces in ANT_HOME/lib automatically puts it in
>>the Ant build classpath which should make available the org.w3c.dom package.
>>
>>Let me know if that fixes the problem or not. BTW, I am not running my
>>builds on Linux. I use Win2k for everything (although I'd like to move
>>to Linux in the near future). Anyone else out there experienced with
>>building Barracuda on Linux. Any specific pitfalls? Diez, you use
>>Linux, right? Anyone else compile under JDK1.3.x?
>>
>>Jake
>>
>>>
>>>
>>>