Bug 733686 - xalan jars in F16 fail to load under openjdk-1.6.0
Summary: xalan jars in F16 fail to load under openjdk-1.6.0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xalan-j2
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luis Bazan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-26 13:51 UTC by Andy Grimm
Modified: 2016-11-08 03:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-18 03:11:31 UTC


Attachments (Terms of Use)

Description Andy Grimm 2011-08-26 13:51:29 UTC
Description of problem:

xalan in F16 was built with openjdk-1.7.0, and any attempt to use it with openjdk-1.6.0 fails.  There's still some discussion about whether openjdk-1.6.0 will be present in rawhide, but right now it's the only thing there.

Version-Release number of selected component (if applicable):
xalan-j2-2.7.1-6.fc16.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create foo.xml with contents:
<?xml version="1.0" ?>
<hello>HELLO, WORLD!
</hello>

2. Create foo.xsl with contents:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"       
  xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="text"/>
</xsl:stylesheet>

3. /usr/lib/jvm/java-1.6.0/bin/java -cp $( build-classpath xalan-j2 xerces-j2  ) org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl
  
Actual results:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/xalan/xslt/Process : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.xalan.xslt.Process. Program will exit.



Expected results:
HELLO, WORLD!

Comment 1 Andrew Overholt 2011-08-26 13:53:28 UTC
I'll let Andrew/Deepak chime in with their thoughts on OpenJDK 7.

Comment 2 Deepak Bhole 2011-08-26 14:01:53 UTC
This is going to happen for any applications built with 1.7, unless the explicitly build with target 1.6.

As for 1.7.0 not being in rawhide, it has been there for a while:
http://koji.fedoraproject.org/koji/buildinfo?buildID=257378

Comment 3 Andy Grimm 2011-08-26 14:35:57 UTC
It's not that it's not in rawhide -- it's not in updates-testing.  My F16 system is set up to look for packages in 3 locations:

1) https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch

2) https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch

3) https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch

I think this is pretty standard, since f16 is branched from rawhide already (please correct me if I'm wrong here).  xalan-j2 already went into updates-testing, but openjdk 7 is not in any of those three repos yet.  I can and have installed 7 from koji, but that's not the issue here.  The issue is that unless openjdk 6 is going to be completely dropped, you can't build critical packages like xalan-j2 with target=1.7.  It's going to make openjdk 6 useless.

I've posted to the devel list about this as well.

Comment 4 Deepak Bhole 2011-08-26 15:35:36 UTC
Ah, you mean it is not in F-16. Rawhide is different from F-16 now that they have branched.

Yes, there was a problem that caused it to not be on the repos. An update has been submitted for it though, and it has been marked stable. A soon as the system gets around to it, it should appear on the F-16 repos:

https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.0-0.1.20110803.fc16

Comment 5 Andy Grimm 2011-08-26 15:52:38 UTC
yikes, sorry, I did not realize that I had said rawhide.  That was before my morning coffee.  :-)  I certainly meant F16; sorry for the confusion.

Comment 6 Deepak Bhole 2011-08-26 20:42:54 UTC
No problem. It seems like for now, rebuilding xalan might be the best thing while we work out the 1.6/1.7 situation.

I have expired the buildroot override for 1.7, so it should build with 1.6 again.

Comment 7 Fedora Admin XMLRPC Client 2011-09-08 14:42:33 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Andy Grimm 2011-09-08 20:25:00 UTC
Note: as long as this is being rebuilt, it would be nice if it could include a POM files for each jar.

Comment 9 Andrew Overholt 2011-09-09 13:50:41 UTC
It doesn't look like xalan-j2 is built with Maven.  Are you proposing injecting POMs from somewhere else?  What about getting them into xalan upstream first?

Comment 10 Andy Grimm 2011-09-09 14:04:43 UTC
Getting it from someplace like this is fine with me:
http://repo1.maven.org/maven2/xalan/xalan/2.7.1/xalan-2.7.1.pom

Note that maven2-common-poms currently contains
/usr/share/maven2/default_poms/JPP-xalan-j2.pom

So for that POM I'm really asking that it be moved into the correct package.
There should also be POMs for 

1) xalan-j2-serializer:
http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1.pom

and

2) xsltc -- there's no upstream POM for this, but something like this is sufficient:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>xalan</groupId>
  <artifactId>xsltc</artifactId>
  <version>2.7.1</version>
  <dependencies>
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.1</version>
    </dependency>
  </dependencies>
</project>


I'd love to see official POM files in upstream, but there are already several precedents in Fedora for shipping POMs for maven.org

Comment 11 Andrew Overholt 2011-09-09 19:48:59 UTC
I'm not a maven expert (nor am I the maintainer of xalan-j2) so I can't help with POM stuff.  But I support all efforts with the Fedora Java stack :)

Comment 12 Andy Grimm 2011-10-18 03:11:31 UTC
The original issue reported here was fix (xalan-j2 was rebuilt with jdk6).  I'll open a separate issue with a patch for the pom addition.


Note You need to log in before you can comment on or make changes to this bug.