Pax runner supports the notion of execution environments (find more
about this in osgi specs). By default , so when the option is not
specify) it detects the execution environment based on the java
version that is used to run pax runner. In your case this is Java 7,
which is not supported. You can find a list of supported execution
environments here:
(http://wiki.ops4j.org/display/ops4j/Platform+-+Extender#Platform-Extender-ee).
Solution is to force another execution environemnet using option --ee
(e.g. --ee=JavaSE-1.6)

On Mon, Mar 2, 2009 at 4:22 PM, xu he <[email protected]> wrote:
> Hi,
>
> I run into below errors on Windows Vista platform while executing 'mvn clean
> install pax:provision' ( I can successfully run the previous 4 steps
> mentioned in http://www.ops4j.org/projects/pax/construct/):
>
> .........
>
>> mvn:examples.test/test.bundle/
>>
>> 1.0-SNAPSHOT : 5051 bytes @ [ 5051kBps ]
>>        ___
>>       /  /
>>      /  / Oops, there has been a problem!
>>     /  /
>>    /__/
>>   ___
>>  /__/
>>
>> > java.lang.RuntimeException:
>> > org.ops4j.pax.runner.platform.PlatformException: Execution environment
>> > [J2SE-1.7] could not be found
>> va.lang.RuntimeException: org.ops4j.pax.runner.platform.PlatformException:
>> Execution environment [J2SE-1.7] could not be found
>>       at org.ops4j.pax.runner.Run.startPlatform(Run.java:537)
>>       at org.ops4j.pax.runner.Run.start(Run.java:201)
>>       at org.ops4j.pax.runner.Run.main(Run.java:129)
>>       at org.ops4j.pax.runner.Run.main(Run.java:102)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>       at java.lang.reflect.Method.invoke(Method.java:623)
>>       at
>> org.ops4j.pax.construct.lifecycle.ProvisionMojo.invokePaxRunner(ProvisionMojo.java:802)
>>       at
>> org.ops4j.pax.construct.lifecycle.ProvisionMojo.deployRunnerNG(ProvisionMojo.java:780)
>>       at
>> org.ops4j.pax.construct.lifecycle.ProvisionMojo.deployBundles(ProvisionMojo.java:477)
>>       at
>> org.ops4j.pax.construct.lifecycle.ProvisionMojo.execute(ProvisionMojo.java:270)
>>       at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:513)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:483)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:228)
>>       at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)
>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>       at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>       at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>       at java.lang.reflect.Method.invoke(Method.java:623)
>>       at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>       at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> used by: org.ops4j.pax.runner.platform.PlatformException: Execution
>> environment [J2SE-1.7] could not be found
>>       at
>> org.ops4j.pax.runner.platform.internal.ExecutionEnvironment.discoverExecutionEnvironmentURL(ExecutionEnvironment.java:151)
>>       at
>> org.ops4j.pax.runner.platform.internal.ExecutionEnvironment.<init>(ExecutionEnvironment.java:76)
>>       at
>> org.ops4j.pax.runner.platform.internal.PlatformImpl.start(PlatformImpl.java:168)
>>       at org.ops4j.pax.runner.Run.startPlatform(Run.java:533)
>>       ... 29 more
>> used by: java.net.MalformedURLException: no protocol: J2SE-1.7
>>       at java.net.URL.<init>(URL.java:583)
>>       at java.net.URL.<init>(URL.java:480)
>>       at java.net.URL.<init>(URL.java:429)
>>       at
>> org.ops4j.pax.runner.platform.internal.ExecutionEnvironment.discoverExecutionEnvironmentURL(ExecutionEnvironment.java:146)
>>       ... 32 more
>>
>> Would you please help me solve this problem? Thanks in advance.
>>
>> My exeuction ENV are as follows:
>> 1. JDK1.7
>> D:\eclipse-jee-ganymede-SR1-win32\apache-maven-2.0.10\myProjects\test>java
>> -version
>> java version "1.7.0-ea"
>> Java(TM) SE Runtime Environment (build 1.7.0-ea-b48)
>> Java HotSpot(TM) Client VM (build 15.0-b01, mixed mode, sharing)
>> 2. OS:
>> Windows Vista
>> 3. Maven:
>> D:\eclipse-jee-ganymede-SR1-win32\apache-maven-2.0.10\myProjects\test>mvn
>> -version
>> Maven version: 2.0.10
>> Java version: 1.7.0-ea
>> OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
>>
>>
>> Regards,
>> Xu He
>>
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>
>



-- 
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://www.codedragons.com - New Energy for Projects - Great People
working on Great Projects at Great Places
Sent from: Cluj-napoca Cj Romania.

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to