Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Testing with Virgo Test Framework
Testing with Virgo Test Framework [message #651278] Fri, 28 January 2011 16:59 Go to next message
Wesley is currently offline WesleyFriend
Messages: 13
Registered: July 2010
Junior Member
Hi, i'm trying to get virgo test framework to run my integration tests. I'm not using maven or ant.
I get the follow message when i try to run a simple test:

Quote:
java.lang.IllegalStateException: There must be exactly one user region bundle context in the service registry. 0 were found.



Should i put something test.config.properties to make it work? I just cant find any tutorials to help me on that.
Re: Testing with Virgo Test Framework [message #651377 is a reply to message #651278] Sun, 30 January 2011 03:01 Go to previous messageGo to next message
Wesley is currently offline WesleyFriend
Messages: 13
Registered: July 2010
Junior Member
I gave up of using DmKernelTestRunner, since my tests wouldn't really use the Virgo Kernel and user region.

So i'm using now OsgiTestRunner and when i try to run the tests i got the message:

Quote:
The System Bundle could not be resolved: Missing Constraint: Bundle-RequiredExecutionEnvironment: J2SE-1.5,OSGi/Minimum-1.2


I thought it was just a case of change the compilance level in Eclipse, but when i change, i got the trace from JUnit:

Quote:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamed Type(Unknown Source)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature (Unknown Source)
at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseSig(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseClassValue(Unkn own Source)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(Unk nown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unkn own Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Un known Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unk nown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotations(Unknown Source)
at org.junit.runner.Description.createSuiteDescription(Descript ion.java:72)
at org.junit.internal.runners.ErrorReportingRunner.getDescripti on(ErrorReportingRunner.java:25)
at org.junit.runner.Runner.testCount(Runner.java:38)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassRefere nce.countTestCases(JUnit4TestClassReference.java:30)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.count Tests(RemoteTestRunner.java:487)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:455)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:197)


And i got locked, where should i go?

Re: Testing with Virgo Test Framework [message #651397 is a reply to message #651377] Sun, 30 January 2011 11:47 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

As the message you get says you will need at least JDK 1.5. In fact it is better to run with Java 6 as mentioned in the user guide.

The later message just says that you are trying to run class compiled with 1.6 on your old Java SDK/SE.

The compliance level in Eclipse just turns on/off the checks and generation of Java's new features and in no way will affect the actual runtime used.
Re: Testing with Virgo Test Framework [message #651406 is a reply to message #651397] Sun, 30 January 2011 14:12 Go to previous messageGo to next message
Wesley is currently offline WesleyFriend
Messages: 13
Registered: July 2010
Junior Member
Quote:
As the message you get says you will need at least JDK 1.5. In fact it is better to run with Java 6 as mentioned in the user guide.


Yes, i see what you mean, but the fact is that i am running against a JDK 6 and the system bundle is still complaining about the environment, i really don't know why...
Re: Testing with Virgo Test Framework [message #909223 is a reply to message #651406] Thu, 06 September 2012 18:56 Go to previous messageGo to next message
James Gartner is currently offline James GartnerFriend
Messages: 30
Registered: March 2012
Member
was there ever a resolution to this?
I'm actually seeing the same "Caused by: java.lang.IllegalStateException: The System Bundle could not be resolved: Missing Constraint: Bundl
e-RequiredExecutionEnvironment: J2SE-1.5,OSGi/Minimum-1.2"
when I just try to START virgo jetty?

I have the jdk 1.6_31 installed, JAVA_HOME is set, etc...
Re: Testing with Virgo Test Framework [message #909709 is a reply to message #909223] Fri, 07 September 2012 16:20 Go to previous message
James Gartner is currently offline James GartnerFriend
Messages: 30
Registered: March 2012
Member
BTW, it looks like my java-server.properties must have had something wrong. I copied that file from a workinig virgo install, and it starts up fine now.
Previous Topic:Two RAP application in the SAME Virgo kernel
Next Topic:Security Manager AGAIN
Goto Forum:
  


Current Time: Mon Dec 22 19:40:34 GMT 2014

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

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