Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo and Java 1.7 bundles(Resolver error data <Bundle-RequiredExecutionEnvironment: JavaSE-1.7>)
Virgo and Java 1.7 bundles [message #1414790] Mon, 01 September 2014 09:56 Go to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Hi!

Simple question:

Can virgo load JavaSE-1.7 bundles?

Here the manifest entry:

Bundle-RequiredExecutionEnvironment: JavaSE-1.7


And here the message from virgo:
[2014-09-01 11:36:06.182] qtp264118019-375             <DE0000I> Installing bundle 'com.eclipsesource.jaxrs.jersey-all' version '2.10.1.SR1'. 
[2014-09-01 11:36:09.050] qtp264118019-375             <ME0003I> Dump 'serviceability/dump/2014-09-01-11-36-205' generated 
[2014-09-01 11:36:09.052] qtp264118019-375             <DE0002E> Installation of bundle 'com.eclipsesource.jaxrs.jersey-all' version '2.10.1.SR1' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.eclipsesource.jaxrs.jersey-all' at version '2.10.1.SR1': Cannot resolve: com.eclipsesource.jaxrs.jersey-all
    Resolver report:
        A bundle could not be resolved because the required execution enviroment did not match the runtime environment. Resolver error data <Bundle-RequiredExecutionEnvironment: JavaSE-1.7>. In bundle <com.eclipsesource.jaxrs.jersey-all_2.10.1.SR1>

	at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:46)


The web-console is saying:

Name	Value
OSGi Runtime	jetty/8.1.3.v20120416 on Eclipse Virgo 3.6.3.RELEASE
Virtual Machine	1.7.0_25 - Java HotSpot(TM) 64-Bit Server VM 23.25-b01 (Oracle Corporation)
Operating System	Mac OS X 10.9.4 (x86_64)


Regards!

Thorsten
Re: Virgo and Java 1.7 bundles [message #1414798 is a reply to message #1414790] Mon, 01 September 2014 10:14 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 72
Registered: July 2009
Member
Hi,

starting from 3.6.0, Virgo can be executed using a Java 7 virtual machine http://www.eclipse.org/virgo/download/release-notes/3.6.0.RELEASE.php , so I believe the answer is yes, as long as you use Java 7 to run Virgo, and edit the java6-server.profile file in the configuration folder.

Giamma.


Developing for Virgo using PDE: http://bit.ly/1w0tTit
Global JNDI in Virgo: http://bit.ly/1to42mn
Hyperic to monitor Virgo: http://bit.ly/W1Fst9
Profile Virgo with JProfiler http://bit.ly/1FBLGCw

[Updated on: Mon, 01 September 2014 10:16]

Report message to a moderator

Re: Virgo and Java 1.7 bundles [message #1414809 is a reply to message #1414798] Mon, 01 September 2014 10:40 Go to previous messageGo to next message
Thorsten Hilker is currently offline Thorsten HilkerFriend
Messages: 31
Registered: March 2014
Member
Thanx!
It does the trick!

java6-server.profile:
...
org.osgi.framework.executionenvironment = \
 OSGi/Minimum-1.0,\
 OSGi/Minimum-1.1,\
 J2SE-1.2,\
 J2SE-1.3,\
 J2SE-1.4,\
 J2SE-1.5,\
 JavaSE-1.6,\
 JavaSE-1.7
osgi.java.profile.name = Virgo-Java6



Hmm, why didn't the virgo-team do the change?

What ever.

It runs.

Regards,

Thorsten
Re: Virgo and Java 1.7 bundles [message #1414825 is a reply to message #1414809] Mon, 01 September 2014 11:24 Go to previous messageGo to next message
GianMaria Romanato is currently offline GianMaria RomanatoFriend
Messages: 72
Registered: July 2009
Member
Well, it's not that easy actually.

The execution environment is the minimum you need for your bundle to be resolved, but you may experience runtime errors if your code uses newer Java 7 API that are not made available to the application by the Virgo container. In fact, even if Virgo is run with Java 7, this does not necessarily imply that the execution environment it makes available to your code is fully compliant with Java 7.

I suggest you develop using Eclipse+Virgo Tools or if that is not the case, you'd better deploy to Virgo very very frequently to catch as soon as possible issues that may arise if your Java 7 code is using an API level that is not available in VIrgo.
In fact, you may realise that your Java 7 compliant code leads to runtime errors (e.g. Linkage exceptions) when run on Virgo. Should that be the case, you could revert the changes or try to upgrade the Java level of Virgo by replacing some specification JARs, but you may find blocking issues if the updated JARs break some Virgo internals.

Giamma.



Developing for Virgo using PDE: http://bit.ly/1w0tTit
Global JNDI in Virgo: http://bit.ly/1to42mn
Hyperic to monitor Virgo: http://bit.ly/W1Fst9
Profile Virgo with JProfiler http://bit.ly/1FBLGCw
Re: Virgo and Java 1.7 bundles [message #1421695 is a reply to message #1414825] Thu, 11 September 2014 19:12 Go to previous messageGo to next message
Kevin LaVergne is currently offline Kevin LaVergneFriend
Messages: 1
Registered: September 2014
Junior Member
According to http://www.eclipse.org/virgo/documentation/virgo-documentation-3.6.3.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html, I should be able to run Virgo with any Java version 6 or higher:

Quote:
The Virgo Server for Apache Tomcat, or VTS for short, requires Java SE 6 or later to be installed.


This appears to not be the case:

me@host /opt/virgo-tomcat-server-3.6.3.RELEASE/bin
$ startup.sh
JavaVersionChecker: Java version must be at 1.6 (detected version 1.8.0_20).


How can I get this to work with the newer versions of Java? I thought that the other info in this thread would help, but it didn't.

Thanks,

Kevin
Re: Virgo and Java 1.7 bundles [message #1426308 is a reply to message #1421695] Thu, 18 September 2014 14:51 Go to previous messageGo to next message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
Hi Kevin,

this is addressed in 440706[1]. As a workaround you can skip the JavaVersionChecker in dmk.sh / dmk.bat (depends on the platform you are using).

# Run java version check with the discovered java jvm.
#. "$KERNEL_HOME/bin/checkJava.sh"


Regards,
florian

[1] Virgo Java Version Check fails with "Java version must be at 1.6 (detected version 1.8.0) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=440706
Re: Virgo and Java 1.7 bundles [message #1426309 is a reply to message #1421695] Thu, 18 September 2014 14:51 Go to previous message
Florian Waibel is currently offline Florian WaibelFriend
Messages: 166
Registered: June 2010
Senior Member
*duplicate post*

[Updated on: Thu, 18 September 2014 15:07]

Report message to a moderator

Previous Topic:Configure Tomcat to serve static files directly from filesystem
Next Topic:Any owners of the #virgo IRC channel on Freenode around?
Goto Forum:
  


Current Time: Fri Mar 29 12:04:46 GMT 2024

Powered by FUDForum. Page generated in 0.02678 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top