Bug 34191 - JDK 1.5 build fails with NoClassDefFoundError: org/apache/xpath/XPathAPI
Summary: JDK 1.5 build fails with NoClassDefFoundError: org/apache/xpath/XPathAPI
Status: RESOLVED FIXED
Alias: None
Product: Lenya
Classification: Unclassified
Component: Build System (show other bugs)
Version: Trunk
Hardware: PC Linux
: P2 major
Target Milestone: 1.4
Assignee: Lenya Developers
URL:
Keywords: JDK1.5
Depends on:
Blocks: 32923
  Show dependency tree
 
Reported: 2005-03-26 21:20 UTC by Erik Hoogeveen
Modified: 2006-07-28 01:58 UTC (History)
0 users



Attachments
patch for build.sh to set the classpath including xalan (1.46 KB, patch)
2006-01-27 15:52 UTC, Jan Metzner
Details | Diff
patch for build.sh to set the classpath including xalan (1.36 KB, patch)
2006-01-27 16:30 UTC, Jan Metzner
Details | Diff
patch for build.bat to set the classpath including xalan (1.26 KB, patch)
2006-02-14 04:18 UTC, Christian d'Heureuse
Details | Diff
patch for build.bat revision 419866 to work with winXP/JDK1.5 (1.12 KB, patch)
2006-07-07 12:20 UTC, Michael Wohlfart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Hoogeveen 2005-03-26 21:20:55 UTC
While building the trunk from the SVN reposotory. The build system quits with
the following error:
BUILD FAILED: java.lang.NoClassDefFoundError: org/apache/xpath/XPathAPI
This is at the prepare-cocoon task.

I've tried building against cocoon 2.1.7 and the latest 2.1.x branch both result
in the same error. I'm using java 1.5 and building in Eclipse 3.02. I couldn't
build against cocoon 2.1.6 because I'm using java 1.5 if I try to it tells me
then that it conflicts with the 1.3 requirement.

Grtz,
Noodle
Comment 1 Gregor J. Rothfuss 2005-03-26 23:32:56 UTC
lenya currently does not support jdk 1.5

Comment 2 Gregor J. Rothfuss 2005-03-27 00:46:35 UTC
the likely reason is that jdk 1.5 uses a xerces / xalan version that does not
have the necessary classes. that's why the lenya build script has xerces in it's
classpath, which i recommend you do too.
Comment 3 Gregor J. Rothfuss 2005-03-30 06:22:43 UTC
we need to have xalan on our build cp to make this go away. 
Comment 4 Erik Hoogeveen 2005-03-30 23:12:07 UTC
Hi,

First of all thanks for the replies.
I've did what you've said. I've added all the cocoon and leny jar to the
classpath and well with java 1.4 lenya compiles.
However when compiling Leny with java 1.5 I now get:

BUILD FAILED: /home/noodle/workspace/lenya-1.4.x/src/targets/init-build.xml:73:
TransformerException: javax.xml.transform.TransformerException:
java.io.FileNotFoundException:
file:/home/noodle/workspace/lenya-1.4.x/build/lenya/webapp/sitemap.xmap (No such
file or directory)

Funny thing is, the sitmap.xmap file does exist.

This is still during the prepare-cocoon task.

If I shouldn't be bothering you with this, please say so. But I'd like to help
in getting this thing going under java 1.5
Comment 5 Gregor J. Rothfuss 2005-03-30 23:18:05 UTC
(In reply to comment #4)

> BUILD FAILED: /home/noodle/workspace/lenya-1.4.x/src/targets/init-build.xml:73:
> TransformerException: javax.xml.transform.TransformerException:
> java.io.FileNotFoundException:
> file:/home/noodle/workspace/lenya-1.4.x/build/lenya/webapp/sitemap.xmap (No such
> file or directory)

this is a seperate issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=33966
Comment 6 Gregor J. Rothfuss 2005-05-23 00:26:38 UTC
(In reply to comment #5)
> (In reply to comment #4)
> 
> > BUILD FAILED: /home/noodle/workspace/lenya-1.4.x/src/targets/init-build.xml:73:
> > TransformerException: javax.xml.transform.TransformerException:
> > java.io.FileNotFoundException:
> > file:/home/noodle/workspace/lenya-1.4.x/build/lenya/webapp/sitemap.xmap (No such
> > file or directory)
> 
> this is a seperate issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=33966


i was wrong. this was due to an old copy of the XConfToolTask. fixed now.
Comment 7 Jan Metzner 2006-01-27 15:52:14 UTC
Created attachment 17516 [details]
patch for build.sh to set the classpath including xalan

patch for build.sh to add the endorsed libs from cocoon to the ant classpath
Comment 8 Jan Metzner 2006-01-27 16:30:38 UTC
Created attachment 17517 [details]
patch for build.sh to set the classpath including xalan

sorry some typos - should work now
Comment 9 Christian d'Heureuse 2006-02-14 02:44:38 UTC
(In reply to comment #8)
> patch for build.sh to set the classpath including xalan

Why did you comment out adding the endorsed libs to the class path in your
second patch?
Comment 10 Christian d'Heureuse 2006-02-14 04:18:44 UTC
Created attachment 17682 [details]
patch for build.bat to set the classpath including xalan

Analogous patch for build.bat.
Adds endorsed libs from Cocoon for compiling Lenya with Java 1.5.

The value of the COCOON_HOME variable has to be adjusted manually. (I don't
know a good method for a Windows batch file to extract this value from
local.build.properties.)
Comment 11 Antonio Gallardo 2006-05-07 04:46:50 UTC
I activated java 1.5 support for Linux. Since Cocoon is now placed into
externals/, we can take advantage of this and use cocoon endorsed libs dir directly.

Missing is the support for windows. Somebody can take this job and close the
bug? Many thanks in advance.
Comment 12 Michael Wohlfart 2006-07-07 12:20:49 UTC
Created attachment 18568 [details]
patch for build.bat revision 419866 to work with winXP/JDK1.5

I just adjusted the privious patch to cope with Cocoon under
externals\cocoon_2_1_x
Comment 13 Thorsten Scherler 2006-07-28 08:58:31 UTC
Committed revision 426442 the patch from Michael Wohlfart (id=18568). 
Thx Micheal and everyone else who helped solving this issue.