Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Bundle-RequiredExecutionEnvironment: JavaSE-1.7 problem

This should be fixed in 0.15 already

https://bugs.eclipse.org/bugs/show_bug.cgi?id=371565

--
Regards,
Igor

On 12-02-16 12:21 PM, Blackburn, James (London) wrote:
Oh dear, got it. Java 7 was on the path, but $JAVA_HOME was pointing at
a 1.6 release. Fixing that has resolved the issue (even though I had
specified a toolchain!).

I had a toolchain configured like:

Toolchains.xml:

<?xml version="1.0" encoding="UTF-8"?>

<toolchains>

<toolchain>

<type>jdk</type>

<provides>

<id>JavaSE-1.7</id>

<version>1.7</version>

</provides>

<configuration>

<jdkHome>/opt/ahl/releases/java/jdk1.7.0/jre</jdkHome>

</configuration>

</toolchain>

</toolchains>

And in my Pom:

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-toolchains-plugin</artifactId>

<version>1.0</version>

<executions>

<execution>

<phase>validate</phase>

<goals>

<goal>toolchain</goal>

</goals>

</execution>

</executions>

<configuration>

<toolchains>

<jdk>

<id>JavaSE-1.7</id>

</jdk>

</toolchains>

</configuration>

</plugin>

When I run mvn clean install –t toolchains.xml with the Java 1.6
JAVA_HOME, I get:

Resolution errors:

Bundle ahl.pydev - Missing Constraint:
Bundle-RequiredExecutionEnvironment: JavaSE-1.7

If I unset JAVA_HOME, or point it at the jdk 7 release, it works
correctly… Shouldn’t the value in the pom always win?

Thanks for the pointer!

Cheers,

James

*From:*tycho-user-bounces@xxxxxxxxxxx
[mailto:tycho-user-bounces@xxxxxxxxxxx] *On Behalf Of *Blackburn, James
(London)
*Sent:* 16 February 2012 17:12
*To:* Tycho user list
*Subject:* Re: [tycho-user] Bundle-RequiredExecutionEnvironment:
JavaSE-1.7 problem

Thanks for the reply. Yes it does:

* java -version

java version "1.7.0"

Java(TM) SE Runtime Environment (build 1.7.0-b147)

Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Cheers,

James

*From:*tycho-user-bounces@xxxxxxxxxxx
<mailto:tycho-user-bounces@xxxxxxxxxxx>
[mailto:tycho-user-bounces@xxxxxxxxxxx]
<mailto:[mailto:tycho-user-bounces@xxxxxxxxxxx]> *On Behalf Of *Mickael
Istria
*Sent:* 16 February 2012 17:11
*To:* Tycho user list
*Subject:* Re: [tycho-user] Bundle-RequiredExecutionEnvironment:
JavaSE-1.7 problem

Hi,

Have you verified "java -version" tells you you can use Java 7 ?

On 02/16/2012 06:07 PM, Blackburn, James (London) wrote:

Hi All,

I’m unable to get tycho to build a bundle that has Java 7 specified in
the manifest’s execution environment.

Bundle-RequiredExecutionEnvironment: JavaSE-1.7

The Java on my path is Java 7, the bundle builds correctly within
Eclipse’s PDE. The problem doesn’t occur if I use JavaSE-1.6 or less
(though some files fail to compile as I’m using new nio features).

Tycho 0.14.0 gives me this error:

[INFO] Computing target platform for MavenProject:
foo:test:1.0.0-SNAPSHOT @ /users/is/jblackburn/workspaces/pydev/test/pom.xml

[INFO] Resolving dependencies of MavenProject: foo:test:1.0.0-SNAPSHOT @
/users/is/jblackburn/workspaces/pydev/test/pom.xml

[INFO] Resolving class path of MavenProject: foo:test:1.0.0-SNAPSHOT @
/users/is/jblackburn/workspaces/pydev/test/pom.xml

[ERROR] Internal error: java.lang.RuntimeException:
org.osgi.framework.BundleException: Bundle test cannot be resolved

[ERROR] Resolution errors:

[ERROR] Bundle test - Missing Constraint:
Bundle-RequiredExecutionEnvironment: JavaSE-1.7

[ERROR] -> [Help 1]

org.apache.maven.InternalErrorException: Internal error:
java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle
test cannot be resolved

Resolution errors:

Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment:
JavaSE-1.7

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)

at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)

at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: java.lang.RuntimeException:
org.osgi.framework.BundleException: Bundle test cannot be resolved

Resolution errors:

Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment:
JavaSE-1.7

at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:252)

at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:158)

at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:111)

at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:61)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)

... 11 more

Caused by: org.osgi.framework.BundleException: Bundle test cannot be
resolved

Resolution errors:

Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment:
JavaSE-1.7

at
org.eclipse.tycho.core.osgitools.EquinoxResolver.assertResolved(EquinoxResolver.java:280)

at
org.eclipse.tycho.core.osgitools.EquinoxResolver.newResolvedState(EquinoxResolver.java:69)

at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:250)

... 16 more

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions,
please read the following articles:

[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

Does anyone know how can I influence the RequiredExecutionEnvironment?

Cheers,

James

This email has been sent by a member of the Man group (“Man”). Man’s
parent company, Man Group plc, is registered in England and Wales
(company number 2921462) at Riverbank House, 2 Swan Lane, London, EC4R 3AD.
The contents of this email are for the named addressee(s) only. It
contains information which may be confidential and privileged. If you
are not the intended recipient, please notify the sender immediately,
destroy this email and any attachments and do not otherwise disclose or
use them. Email transmission is not a secure method of communication and
Man cannot accept responsibility for the completeness or accuracy of
this email or any attachments. Whilst Man makes every effort to keep its
network free from viruses, it does not accept responsibility for any
computer virus which might be transferred by way of this email or any
attachments. This email does not constitute a request, offer,
recommendation or solicitation of any kind to buy, subscribe, sell or
redeem any investment instruments or to perform other such transactions
of any kind. Man reserves the right to monitor, record and retain all
electronic and telephone communications through its network in
accordance with applicable laws and regulations.--UwQe9f5k7pI3vplngP



_______________________________________________

tycho-user mailing list

tycho-user@xxxxxxxxxxx  <mailto:tycho-user@xxxxxxxxxxx>

https://dev.eclipse.org/mailman/listinfo/tycho-user

--
Mickael Istria
Eclipse developer at JBoss, by RedHat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top