You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ugo Cei <u....@cbim.it> on 2002/02/19 09:28:05 UTC

Core libraries

I've recently decided that the simplest way to start a new Cocoon 
project is to prepare a "minimal" configuration as a template and start 
adding to it whatever is needed. I've got the latest CVS, compiled it 
(WITH scratchpad) and tried to strip sitemap.xmap and cocoon.xconf to 
their barebones (you can look at the attached files).

The problem is with the libraries. It looks like there are two 
"optional" jars that must be included or you get an error.

The first one is maybeupload_1-0-5pre3.jar. If I don't put it in 
WEB-INF/libs I get a stacktrace with this error:

root cause

java.lang.NoClassDefFoundError: 
uk/co/weft/maybeupload/MaybeUploadRequestWrapper

The full page is in the attached status.html file.

The second one is bsf-2.2.jar. If I don't include it in WEB-INF/lib I 
get a page telling me that the sitemap could not be compiled and the 
following message is in the logs:

ERROR   (2002-02-19) 09:22.07:682   [sitemap] (/cocoon/status) 
HttpProcessor[8080][4]/Handler: Error compiling sitemap
java.lang.NoClassDefFoundError: com/ibm/bsf/BSFException

I can't find where in the sitemap or xconf file these classes are 
referred to.

My configuration is the following:

- Linux RedHat 7.1
- Sun JDK 1.4.0 (with xalan-2.2.0.jar, xerces-1.4.4.jar, xml-apis.jar
   in jre/lib/endorsed)
- Cocoon 2 from CVS as of February 18.
- Tomcat 4.0.1

If we can solve this issue, we might provide this kind of configuration 
in the distribution, as it seems it could be useful.

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it

RE: Core libraries

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
> Ugo Cei wrote:
>
>
> Carsten Ziegeler wrote:
> > Hi,
> >
> > you have to remove the libraries from the lib/opt directory *before*
> > building cocoon. The resulting webapp should be runnable without
> > any changes.
>
> Then there are a couple of problems in the build script.
>
> Environment: RedHat Linux 7.1, Sun JDK 1.3.1, Cocoon 2.0.2dev (snapshot
> 20020220051703).
>
> I remove everything from lib/optional, then:
>
>
> $ ./build.sh
> [...]
> /home/ugo/download/java/xml/xml-cocoon2/tools/src/JTidyTask.java:31:
> Class org.w3c.tidy.Tidy not found in import.
> import org.w3c.tidy.Tidy;
>         ^
> 1 error
>
> BUILD FAILED
>
Ok, this is a dependency from the build system and not Cocoon to jtidy.
I personally don't like this, but it's in there...so a workaround for
you is to copy the jtidy.jar into the tools/lib directory before
building - now you can remove if from lib/optinal again.

> I restore jtidy.jar to lib/optional and build again:
>
> [...]
> Compiling 141 source files to
> /home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/classes
> /home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/sr
c/org/apache/cocoon/sunshine/context/RequestSessionContext.java:69:
> Class org.apache.cocoon.environment.http.HttpRequest not found in import.
> import org.apache.cocoon.environment.http.HttpRequest;
>         ^
> /home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/sr
c/org/apache/cocoon/sunshine/SunShine.java:83:
> Class org.apache.cocoon.environment.http.HttpResponse not found in import.
> import org.apache.cocoon.environment.http.HttpResponse;
>         ^
> Note: 8 files use or override a deprecated API.  Recompile with
> "-deprecation" for details.
> 2 errors, 1 warning
>
> BUILD FAILED
>

Ah, these are problems of some components in the scratchpad area which
you not need for a "core" cocoon as scratchpad indicates that they might
disappear, change etc.
AFAIK, the only solution for this is to remove the src directory from
the scratchpad directory before building.

I know this is not very pleasant and should be fixed somehow.

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Core libraries

Posted by Ugo Cei <u....@cbim.it>.
Carsten Ziegeler wrote:
> Hi,
> 
> you have to remove the libraries from the lib/opt directory *before*
> building cocoon. The resulting webapp should be runnable without
> any changes.

Then there are a couple of problems in the build script.

Environment: RedHat Linux 7.1, Sun JDK 1.3.1, Cocoon 2.0.2dev (snapshot 
20020220051703).

I remove everything from lib/optional, then:


$ ./build.sh
[...]
/home/ugo/download/java/xml/xml-cocoon2/tools/src/JTidyTask.java:31: 
Class org.w3c.tidy.Tidy not found in import.
import org.w3c.tidy.Tidy;
        ^
1 error

BUILD FAILED

I restore jtidy.jar to lib/optional and build again:

[...]
Compiling 141 source files to 
/home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/classes
/home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/src/org/apache/cocoon/sunshine/context/RequestSessionContext.java:69: 
Class org.apache.cocoon.environment.http.HttpRequest not found in import.
import org.apache.cocoon.environment.http.HttpRequest;
        ^
/home/ugo/download/java/xml/xml-cocoon2/build/cocoon/scratchpad/src/org/apache/cocoon/sunshine/SunShine.java:83: 
Class org.apache.cocoon.environment.http.HttpResponse not found in import.
import org.apache.cocoon.environment.http.HttpResponse;
        ^
Note: 8 files use or override a deprecated API.  Recompile with 
"-deprecation" for details.
2 errors, 1 warning

BUILD FAILED

Unfortunately I am not familiar enough with Ant to understand what is 
going on here.


	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Core libraries

Posted by Davanum Srinivas <di...@yahoo.com>.
Ugo,

1. Remove all libraries from optional directory before you build cocoon.
2. Remove the whole section "<target-language name="js">" found under xsp-language from
cocoon.xconf. Those entries use bsf jar.

Thanks,
dims


--- Carsten Ziegeler <cz...@s-und-n.de> wrote:
> Hi,
> 
> you have to remove the libraries from the lib/opt directory *before*
> building cocoon. The resulting webapp should be runnable without
> any changes.
> 
> Carsten
> 
> > -----Original Message-----
> > From: Ugo Cei [mailto:u.cei@cbim.it]
> > Sent: Tuesday, February 19, 2002 9:28 AM
> > To: cocoon-dev@xml.apache.org
> > Subject: Core libraries
> > 
> > 
> > I've recently decided that the simplest way to start a new Cocoon 
> > project is to prepare a "minimal" configuration as a template and start 
> > adding to it whatever is needed. I've got the latest CVS, compiled it 
> > (WITH scratchpad) and tried to strip sitemap.xmap and cocoon.xconf to 
> > their barebones (you can look at the attached files).
> > 
> > The problem is with the libraries. It looks like there are two 
> > "optional" jars that must be included or you get an error.
> > 
> > The first one is maybeupload_1-0-5pre3.jar. If I don't put it in 
> > WEB-INF/libs I get a stacktrace with this error:
> > 
> > root cause
> > 
> > java.lang.NoClassDefFoundError: 
> > uk/co/weft/maybeupload/MaybeUploadRequestWrapper
> > 
> > The full page is in the attached status.html file.
> > 
> > The second one is bsf-2.2.jar. If I don't include it in WEB-INF/lib I 
> > get a page telling me that the sitemap could not be compiled and the 
> > following message is in the logs:
> > 
> > ERROR   (2002-02-19) 09:22.07:682   [sitemap] (/cocoon/status) 
> > HttpProcessor[8080][4]/Handler: Error compiling sitemap
> > java.lang.NoClassDefFoundError: com/ibm/bsf/BSFException
> > 
> > I can't find where in the sitemap or xconf file these classes are 
> > referred to.
> > 
> > My configuration is the following:
> > 
> > - Linux RedHat 7.1
> > - Sun JDK 1.4.0 (with xalan-2.2.0.jar, xerces-1.4.4.jar, xml-apis.jar
> >    in jre/lib/endorsed)
> > - Cocoon 2 from CVS as of February 18.
> > - Tomcat 4.0.1
> > 
> > If we can solve this issue, we might provide this kind of configuration 
> > in the distribution, as it seems it could be useful.
> > 
> > 	Ugo
> > 
> > -- 
> > Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
> > P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
> > Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Core libraries

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hi,

you have to remove the libraries from the lib/opt directory *before*
building cocoon. The resulting webapp should be runnable without
any changes.

Carsten

> -----Original Message-----
> From: Ugo Cei [mailto:u.cei@cbim.it]
> Sent: Tuesday, February 19, 2002 9:28 AM
> To: cocoon-dev@xml.apache.org
> Subject: Core libraries
> 
> 
> I've recently decided that the simplest way to start a new Cocoon 
> project is to prepare a "minimal" configuration as a template and start 
> adding to it whatever is needed. I've got the latest CVS, compiled it 
> (WITH scratchpad) and tried to strip sitemap.xmap and cocoon.xconf to 
> their barebones (you can look at the attached files).
> 
> The problem is with the libraries. It looks like there are two 
> "optional" jars that must be included or you get an error.
> 
> The first one is maybeupload_1-0-5pre3.jar. If I don't put it in 
> WEB-INF/libs I get a stacktrace with this error:
> 
> root cause
> 
> java.lang.NoClassDefFoundError: 
> uk/co/weft/maybeupload/MaybeUploadRequestWrapper
> 
> The full page is in the attached status.html file.
> 
> The second one is bsf-2.2.jar. If I don't include it in WEB-INF/lib I 
> get a page telling me that the sitemap could not be compiled and the 
> following message is in the logs:
> 
> ERROR   (2002-02-19) 09:22.07:682   [sitemap] (/cocoon/status) 
> HttpProcessor[8080][4]/Handler: Error compiling sitemap
> java.lang.NoClassDefFoundError: com/ibm/bsf/BSFException
> 
> I can't find where in the sitemap or xconf file these classes are 
> referred to.
> 
> My configuration is the following:
> 
> - Linux RedHat 7.1
> - Sun JDK 1.4.0 (with xalan-2.2.0.jar, xerces-1.4.4.jar, xml-apis.jar
>    in jre/lib/endorsed)
> - Cocoon 2 from CVS as of February 18.
> - Tomcat 4.0.1
> 
> If we can solve this issue, we might provide this kind of configuration 
> in the distribution, as it seems it could be useful.
> 
> 	Ugo
> 
> -- 
> Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
> P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
> Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org