Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105636 - www-servers/tomcat and java5 / java1.5
Summary: www-servers/tomcat and java5 / java1.5
Status: RESOLVED DUPLICATE of bug 69970
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Java team
URL: http://jakarta.apache.org/tomcat
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-09-11 14:58 UTC by Martin von Gagern
Modified: 2005-12-23 17:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tomcat-5.0.28-r4.ebuild (tomcat-5.0.28-r4.ebuild,9.54 KB, text/plain)
2005-09-11 14:59 UTC, Martin von Gagern
Details
files/5.0.28/java5.patch (java5.patch,18.66 KB, patch)
2005-09-11 15:01 UTC, Martin von Gagern
Details | Diff
tomcat-5.0.28-r4.ebuild.diff (tomcat-5.0.28-r4.ebuild.diff,2.75 KB, patch)
2005-09-11 15:04 UTC, Martin von Gagern
Details | Diff
Patched ebuild (tomcat-5.0.28-r7.ebuild,9.91 KB, text/plain)
2005-09-22 03:47 UTC, Patrizio Bassi
Details
diff from portage basic ebuild (jdk1.5_for_5.0.28-r7.diff,1.70 KB, patch)
2005-09-22 03:47 UTC, Patrizio Bassi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2005-09-11 14:58:47 UTC
I finally got tomcat to at least compile using sun-jdk-1.5.0.04. I use
jaxen-1.1_beta7 as posted in bug #105629.

The attached patch modifies all build.xml to use sensible default settings and
also resolves one ambiguity in favor of the form available in 1.4.

I tried to apply some of the tricks mentioned in bug #86903 to get away without
modifying the build files, but somehow this did not work at once, and theese
changes do.

I'm not too happy about my hack to support different versions of jaxen,
especially as this does not take future versions into account. Some better
approach here?
Comment 1 Martin von Gagern 2005-09-11 14:59:36 UTC
Created attachment 68195 [details]
tomcat-5.0.28-r4.ebuild

This is my modified ebuild for tomcat.
Comment 2 Martin von Gagern 2005-09-11 15:01:00 UTC
Created attachment 68196 [details, diff]
files/5.0.28/java5.patch

This patch makes tomcat compile using java 5.
Comment 3 Martin von Gagern 2005-09-11 15:04:16 UTC
Created attachment 68197 [details, diff]
tomcat-5.0.28-r4.ebuild.diff

Here are only the differences between my ebuild and the one already in portage.
Strange was that I had to remove the beanutils version number.

BTW: It would be nice to have some version of getjar that immediately dies
instead of just writing an error message.
Comment 4 Patrizio Bassi 2005-09-21 10:31:14 UTC
why not bumping jaxen and merging this changes with -r6 actually in portage? 
Comment 5 Patrizio Bassi 2005-09-22 00:05:10 UTC
i manually merged changes and even without jaxen bumped it compiles and runs. 
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2005-09-22 00:13:01 UTC
(In reply to comment #5)
> i manually merged changes and even without jaxen bumped it compiles and runs. 

If you can post a diff against -r7 that will help in getting the changes to the
tree faster. The build.xml patch will be obsolete with the new java setup but I
can apply it when I get back from Germany after this weekend.
Comment 7 Patrizio Bassi 2005-09-22 00:34:06 UTC
oops, i forgot i had to keep the "-1.7" version, while ebuild removes those. 
 
without it fails here. 
Comment 8 Patrizio Bassi 2005-09-22 03:47:13 UTC
Created attachment 68997 [details]
Patched ebuild
Comment 9 Patrizio Bassi 2005-09-22 03:47:43 UTC
Created attachment 68998 [details, diff]
diff from portage basic ebuild
Comment 10 Patrizio Bassi 2005-09-22 03:48:52 UTC
i added -r7 patch ebuild. 
 
it still uses the java5 patch. 
 
works for me, please try 
Comment 11 Patrizio Bassi 2005-09-22 06:03:48 UTC
that's a bug in ebuild ihmo. 
 
as http://bugs.gentoo.org/show_bug.cgi?id=106788 
 
without example flag you don't get pages installed in default webapp dir, and this make 
first localhost:8080 access fail with no error printed. 
 
ihmo example  should be completly removed, as it contains important files. 
Comment 12 Patrizio Bassi 2005-10-18 09:07:13 UTC
-r9 ebuild compiles good with jdk 1.5,only need this patch 
 
(it's a subset of attached one) 
 
 
diff -ur 
jakarta-tomcat-5.0.28-orig/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java 
jakarta-tomcat-5.0.28-src/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java 
--- 
jakarta-tomcat-5.0.28-orig/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java	
2005-09-11 23:45:08.000000000 +0200 
+++ 
jakarta-tomcat-5.0.28-src/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java	
2005-09-11 23:47:14.000000000 +0200 
@@ -24,6 +24,7 @@ 
 import java.security.CodeSource; 
 import java.security.PermissionCollection; 
 import java.security.Policy; 
+import java.security.cert.Certificate; 
 import java.util.Collections; 
 import java.util.HashMap; 
 import java.util.Iterator; 
@@ -369,7 +370,7 @@ 
                 } 
                 File contextDir = new File(codeBase); 
                 URL url = contextDir.getCanonicalFile().toURL(); 
-                codeSource = new CodeSource(url,null); 
+                codeSource = new CodeSource(url,(Certificate[])null); 
                 permissionCollection = policy.getPermissions(codeSource); 
  
                 // Create a file read permission for web app context directory 
Only in 
jakarta-tomcat-5.0.28-src/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler: 
JspRuntimeContext.java~ 
 
Comment 13 Patrizio Bassi 2005-11-15 05:53:41 UTC
why not applying these changes? -r10 has same problem :( 
Comment 14 Petteri Räty (RETIRED) gentoo-dev 2005-12-06 13:48:40 UTC
Sorry about not getting back to this bug. We already support using tomcat with
1.5 via the axxo-overlay so this hasn't been such a big priority to me:
http://www.gentoo.org/proj/en/java/tiger-faq.xml#doc_chap3
http://dev.gentoo.org/~betelgeuse/axxo-overlay
You can contact me on #gentoo-java@freenode for questions.
Comment 15 Patrizio Bassi 2005-12-20 05:30:13 UTC
-r12 does not compile , need the comment #12 patch too.

can you keep back 1.5 compatibility?

seems so simple to add. i tested and works
Comment 16 Josh Nichols (RETIRED) gentoo-dev 2005-12-23 17:53:48 UTC
With axxo-overlay, it is no longer necessary to patch the ant script to specify source/target. Additionally, the part of the java5.patch which patches source code (versus ant scripts) is being applied to the tomcat ebuilds in axxo-overlay.

*** This bug has been marked as a duplicate of 69970 ***