Quantcast

Trunk not building on JDK 7

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Trunk not building on JDK 7

uromahn
I have just switched my dev box to use the latest Oracle JDK 7 (u3) and noticed that it won't compile.

Here is the full message:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project org.apache.karaf.package.core: Compilation failure: Compilation failure:
[ERROR] /home/uromahn/Projects/apache-karaf-trunk/package/core/src/main/java/org/apache/karaf/packages/core/internal/PackageServiceImpl.java:[46,45] error: incompatible types
[ERROR] Object
[ERROR] /home/uromahn/Projects/apache-karaf-trunk/package/core/src/main/java/org/apache/karaf/packages/core/internal/PackageServiceImpl.java:[70,45] error: incompatible types
[ERROR] Object
[ERROR] /home/uromahn/Projects/apache-karaf-trunk/package/core/src/main/java/org/apache/karaf/packages/core/internal/PackageServiceImpl.java:[90,45] error: incompatible types

When I build the same using openjdk 1.6, everything builds just fine.

I am doing the build with SVN revision 1308440 on CentOS 6.2 64bit with the following MAVEN_OPTS:
-client -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=640m -XX:ReservedCodeCacheSize=64m

I am in the process investigating what exactly is wrong here, but I still wanted to let you know.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Trunk not building on JDK 7

uromahn
I am replying to my own post...

I believe this issue is closely related to https://issues.apache.org/jira/browse/KARAF-1067.

It appears that the referenced org.osgi.core-4.3.0 library must have been compiled with JDK1.4 support which breaks compilation as reported in this JIRA.

I have identified a "fix", aka workaround, for this issue. Instead of referencing the org.osg.core-4.3.0 library in the package/core and package/command sub-projects, I removed the osgi.core bundle as dependency and added the org.apache.karaf.main package as dependency since this has the proper osgi.core classes. That way, the build works also on JDK7.

I will also send a message to the apparent maintainer of this bundle, Peter Kriens, and ask how to fix this issue.

Question: should I also create a JIRA ticket for this issue or is this post to the message board enough?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Trunk not building on JDK 7

jbonofre
Hi,

Package module has been re-added and we should fix in it.

More general, we know what the OSGi core issue is, and already discussed
of that in the team.

Previously, most of the module was linked to Karaf main. The karaf main
embeds OSGi core packages and compile it without the JSR14 flag.

We started to remove this dependency to use the OSGi core dependency.

The problem is that in OSGi Alliance (and in Apache Felix), the OSGi
core is compiled with the JSR14 flag which is an issue to the JDK7 support.

I'm gonna talk with the Felix and OSGi Alliance guys to remove the JSR14
flag. If it's not possible, we will create a "dedicated" bundle in Felix.

So, it's not required to raise a Jira, we are already aware of the issue
and we explore different ways to fix that in the most elegant way.

Regards
JB

On 04/03/2012 12:03 AM, uromahn wrote:

> I am replying to my own post...
>
> I believe this issue is closely related to
> https://issues.apache.org/jira/browse/KARAF-1067.
>
> It appears that the referenced org.osgi.core-4.3.0 library must have been
> compiled with JDK1.4 support which breaks compilation as reported in this
> JIRA.
>
> I have identified a "fix", aka workaround, for this issue. Instead of
> referencing the org.osg.core-4.3.0 library in the package/core and
> package/command sub-projects, I removed the osgi.core bundle as dependency
> and added the org.apache.karaf.main package as dependency since this has the
> proper osgi.core classes. That way, the build works also on JDK7.
>
> I will also send a message to the apparent maintainer of this bundle, Peter
> Kriens, and ask how to fix this issue.
>
> Question: should I also create a JIRA ticket for this issue or is this post
> to the message board enough?
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Trunk-not-building-on-JDK-7-tp3878598p3879215.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Loading...