[Opensource] Re: eForum Kicking Tires

Larry Hamel larry at codeguild.com
Mon Jul 22 10:10:12 PDT 2002


hi David,

you get 2 awards from me, for best description of a new-build problem and most patient, persistent new-build debugger.

I'm chiming in to explain/fix just the first item: the jalopy tag is defined in project.dtd, in the same directory as the build.  The build.xml specifies using this DTD.  I suppose some ways to use Ant somehow get around using this DTD (?), but since this target is only for source-code formatting/maintenance, which few people do, I can add back temporarily in the future when necessary.  I've removed it.

Mike R. recently removed .jar files from the /lib directory in favor of a download package.  This means that building requires both source checkout and a library download/unpack.  

Mike, if many people expect that a CVS checkout is sufficient to build (not a bad assumption), consider reinstating the .jars in CVS, or perhaps create a new pre-build target which ascertains the existence of the .jars in their required location, and spits out a clear error message about how to fix the problem the jars are not found.

For the other errors, I haven't been built recently and sorry, can't offer solutions yet.

thanks for the detailed report.  

larry

At 10:20 PM 7/20/2002, you wrote:

>I've gotten a little further.  MikeR suggested using the CVS source tree for everything rather than the built eForum, as he has been making changes to eForum.
>
>But now I'm stuck in a different way and don't even have Expresso running.  This is the log of what I had to do to get running.  Much of this are things which could be improved in the build process or build documentation.
>
>It may be important to note that I'm using ant 1.5beta2.
>
>The last problem, though, is a real stumper and that's where I'm stuck.  I'd appreciate any help.
>
>- David Herron
>
>
>
>Installing Expresso into Resin from CVS
>
>------------------------
>ERROR 1: Running "ant" (no args) I get
>Resolved by commenting out the <taskdef> and <target> for "jalopy" at the end.
>
>BUILD FAILED
>/Users/david/Expresso/src-cvs/expresso/expresso-web/build.xml:360: taskdef class de.hunsicker.jalopy.plugin.ant.AntPlugin cannot be found
>
>-------------------------
>ERROR 2: The "war" target doesn't exist, despite the usage comments in build.xml.
>Resolved by not using "war" but "expresso-complete".
>
>[peebee:src-cvs/expresso/expresso-web] david% ant war
>Buildfile: build.xml
>
>BUILD FAILED
>Target `war' does not exist in this project.
>----------------------------
>ERROR 3: The expresso/expresso-web/WEB-INF/lib directory doesn't exist:
>Resolved by creating the lib directory.
>
>[peebee:src-cvs/expresso/expresso-web] david% ant expresso-complete
>Buildfile: build.xml
>
>init:
>
>BUILD FAILED
>/Users/david/Expresso/src-cvs/expresso/expresso-web/WEB-INF/lib not found.
>-------------------------------
>ERROR 4: Now there's a bunch of compile errors for missing symbols and the like.  They
>are from the org.apache.log4j, javax.servlet, org.apache.commons.*, org.apache.struts.*,
>org.apache.oro.*, edu.oswego.cs.dl.util.*, javax.activation, and javax.sql packages.
>
>Resolution is a bit convoluted.  Turns out there's a multiplicity of ant build.xml files
>floating around, not just the one at the top of the tree (hmmm, why???!?).  In any case,
>it's simple enough to add the relavent .jar files to the CLASSPATH. Most of the required
>jar files come with the expresso-complete distribution.  Missing are javax.servlet (provided
>by Caucho in the Resin distribution as .../lib/jsdk23.jar) and the edu.oswego part.  The oswego
>package isn't documented on JCorporate's web site, that I see.
>
>Doing a google search I end up at
>        http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
>which seems to be the definitive place to go.  Unpacked that source distribution, and made its
>directory "oswego-concurrent-src" and also made a directory "oswego-concurrent".  CD'd to
>oswego-concurrent-src and typed:
>
>        javac -d ../oswego-concurrent *.java
>
>Added the oswego-concurrent directory to the CLASSPATH environment variable.
>
>I have the following resulting shell script:
>
>[peebee:src-cvs/expresso/expresso-web] david% cat mk
>#!/bin/sh
>
>RESIN=/Users/david/Expresso/resin-2.1.2
>EXPRESSO=/Users/david/Expresso/expresso-tools
>
>CLASSPATH=${RESIN}/lib/jsdk23.jar:${RESIN}/lib/jdbc-mysql.jar:/Users/david/Expresso/oswego-concurrent
>for i in /Users/david/Expresso/expresso-tools/*.jar; do
>        CLASSPATH="${CLASSPATH}":"${i}"
>done
>export CLASSPATH
>ant $*
>[peebee:src-cvs/expresso/expresso-web] david%
>
>------------------------------
>ERROR 5: The build fails because of this message
>
>BUILD FAILED
>/Users/david/Expresso/src-cvs/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/build.xml:275: No source files and no packages have been specified.
>
>The line in question is in the middle of the javadoc target.  Since I don't care
>about generating javadoc, I simply commented the body of the target. Except that commenting
>it out doesn't resolve anything.  So I undid the commenting out.
>
>What resolved the problem is to build "expresso-binary" rather than "expresso-complete".
>
>---------------------------------
>
>PROBLEM 1: Now that I have an expresso-xx-complete.war, it's **MISSING** eForum and eSearch
>even though I have that source checked out.  Glancing through the ant build.xml shows that
>this is the intended behavior.  Since they're separate "products" you probably hafta build
>them separately.
>
>Ah, that was easy.  Found the ant build.xml file for eForum, read that, and then in the
>master build.xml file see the "components" target that was documented in the usage message.
>
>---------------------------------
>
>ERROR 6: Building "components" gives the following error.
>
>
>BUILD FAILED
>/Users/david/Expresso/src-cvs/expresso/expresso-web/WEB-INF/src/com/jcorporate/eforum/build.xml:94: No source files and no packages have been specified.
>
>Looking at the "components" tag, I see that it wants to build -src.jar files as
>well as the actual component.
>
>Resolved by:  Since I don't care about the -src.jar files, I've commented them out and the build
>runs to completion.
>
>Now I have the following:
>
>[peebee:src-cvs/expresso/expresso-web] david% ls ..
>CVS                     eforum2-22-ea1.jar      esearch0-90.jar expresso4-1-ea3-bin.war
>META-INF                epoll2-21-ea1.jar       expresso-web
>[peebee:src-cvs/expresso/expresso-web] david%
>
>-----------------------------------
>
>ERROR 7: Running the resin bin/httpd.sh gives the message
>
>DefaultInit: init
>Expresso Configuration initializing...
>Initialization error:
>java.lang.NoClassDefFoundError: org/apache/xerces/parsers/AbstractDOMParser
>        at com.jcorporate.expresso.core.misc.ConfigManager.config(ConfigManager.java:1126)
>        at com.jcorporate.expresso.core.servlet.StdServlet.init(StdServlet.java:309)
>        at com.jcorporate.expresso.core.servlet.DBServlet.init(DBServlet.java:48)
>        at com.jcorporate.expresso.core.servlet.InitServlet.init(InitServlet.java:70)
>        at com.jcorporate.expresso.core.servlet.DefaultInit.init(DefaultInit.java:57)
>        at com.caucho.server.http.Application.createServlet(Application.java:2982)
>        at com.caucho.server.http.Application.loadServlet(Application.java:2941)
>        at com.caucho.server.http.Application.initServlets(Application.java:1841)
>        at com.caucho.server.http.Application.init(Application.java:1772)
>        at com.caucho.server.http.VirtualHost.init(VirtualHost.java:621)
>        at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:831)
>        at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:648)
>        at com.caucho.server.http.ServletServer.init(ServletServer.java:483)
>        at com.caucho.server.http.ResinServer.init(ResinServer.java:360)
>        at com.caucho.server.http.ResinServer.main(ResinServer.java:1107)
>        at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
>
>Note that the requisite .jar files were not in CVS and therefore were not checked out into
>the workspace.  I have the .jar files separately (from the downloaded -complete.jar file
>off the web site).  Both putting them into the CLASSPATH and putting them into WEB-INF/lib
>does not help.  The class being looked for, AbstractDOMParser, is not directly referenced
>from Expresso src (shown from greping the whole source tree).
>
>Checked at xml.apache.org and downloading the latest Xerces distribution (Xerces-J-bin.2.0.2.tar.gz).
>Found a xercesImpl.jar which included the AbstractDOMParser class. Installed this into
>the WEB-INF/lib directory, and removed the xerces.jar which had come with the expresso
>distribution.
>
>---------------------------------
>
>ERROR 8: Now there's a different error:
>
>DefaultInit: init
>Expresso Configuration initializing...
>Initialization error:
>java.lang.VerifyError: (class: com/jcorporate/expresso/core/logging/LogManager, method: initialize signature: ()V) Incompatible object argument for function call
>        at com.jcorporate.expresso.core.misc.ConfigManager.config(ConfigManager.java:1126)
>        at com.jcorporate.expresso.core.servlet.StdServlet.init(StdServlet.java:309)
>        at com.jcorporate.expresso.core.servlet.DBServlet.init(DBServlet.java:48)
>        at com.jcorporate.expresso.core.servlet.InitServlet.init(InitServlet.java:70)
>        at com.jcorporate.expresso.core.servlet.DefaultInit.init(DefaultInit.java:57)
>        at com.caucho.server.http.Application.createServlet(Application.java:2982)
>        at com.caucho.server.http.Application.loadServlet(Application.java:2941)
>        at com.caucho.server.http.Application.initServlets(Application.java:1841)
>        at com.caucho.server.http.Application.init(Application.java:1772)
>        at com.caucho.server.http.VirtualHost.init(VirtualHost.java:621)
>        at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:831)
>        at com.caucho.server.http.ServletServer.initInternal(ServletServer.java:648)
>        at com.caucho.server.http.ServletServer.init(ServletServer.java:483)
>        at com.caucho.server.http.ResinServer.init(ResinServer.java:360)
>        at com.caucho.server.http.ResinServer.main(ResinServer.java:1107)
>        at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
>[2002-07-20 17:15:47.312] initializing application http://localhost:8080/java_tut
>...and later...
>http can't bind to *:8080. Check for conflicting servers.
>[2002-07-20 17:16:01.105] closing application http://localhost:8080/
>[2002-07-20 17:16:01.440] initializing application http://localhost:8080/
>
>
>This is confusing.  In ConfigManager is
>
>        LogManager.setupLog();
>
>This refers to a static method which returns Category.  There is not a method by that name which
>returns "void", as the signature says.  So what can this be referring to.
>
>Theory 1: It's confused because at the calling line nothing is done with the
>        return value.  Changing this to "Category __cc = LogManager.setupLog()"
>        changed nothing.
>
>Theory 2: There's a local variable in LogManager also named setupLog, and this
>        might be confusing the compiler.  Changed all instances of the local variable
>        to prepend an underscore (that is, "_setupLog" vs "setupLog").  Again, no
>        change.
>
>Grasping at straws 1:  Put a try{}catch(){} around the call.  It gets a little further.
>        This method gets called in lots of places though, and now we just get the message
>        a bunch of other times.  Also connecting to the resin web server gives a similar
>        error message:
>
>500 Servlet Exception
>
>java.lang.VerifyError: (class: com/jcorporate/expresso/core/logging/LogManager,
>method: initialize signature: ()V) Incompatible object argument for function
>call
>        at _expresso._error__jsp._jspService(/expresso/error.jsp:19)
>        at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
>        at com.caucho.jsp.Page.subservice(Page.java:485)
>        at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
>        at com.caucho.server.http.Invocation.service(Invocation.java:311)
>        at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
>        at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:213)
>        at com.caucho.jsp.QPageContext.handlePageException(QPageContext.java:592)
>        at _expresso._frame__jsp._jspService(_frame__jsp.java:192)
>        at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
>        at com.caucho.jsp.Page.subservice(Page.java:485)
>        at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
>        at com.caucho.server.http.Invocation.service(Invocation.java:311)
>        at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
>        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
>        at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
>        at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
>        at java.lang.Thread.run(Thread.java:496)
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list