On 9/9/10 12:50, Anna Karina Nava Soriano wrote:
as it is now the 448 then i got:

[ 304] [Active     ] [    1] 
file:/Applications/NetBeans/sges-v3/glassfish/modules/iText-rtf-2.1.7.jar
[ 408] [Active     ] [    1] 
file:/Applications/NetBeans/sges-v3/glassfish/modules/junit-4.8.1.jar
[ 447] [Active     ] [    1] Apache Felix iPOJO Extender Pattern Handler (1.4.0)
[ 448] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner - Felix 
Command (1.0.0)
[ 451] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner - Swing Gui 
(1.0.0)
[ 452] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner 
(1.1.0.SNAPSHOT)
[ 454] [Active     ] [    1] Apache Felix iPOJO (1.6.4)
->  inspect s c 448
Apache Felix iPOJO OSGi Junit Runner - Felix Command (448) provides services:
-----------------------------------------------------------------------------
component.class = org.apache.felix.ipojo.junit4osgi.command.JunitCommand
component.description =<unknown value type>
component.properties =<unknown value type>
component.providedServiceSpecifications = org.apache.felix.shell.Command
factory.name = org.apache.felix.ipojo.junit4osgi.command.JunitCommand
factory.state = 1
objectClass = org.apache.felix.ipojo.Factory, 
org.osgi.service.cm.ManagedServiceFactory
service.id = 42
service.pid = org.apache.felix.ipojo.junit4osgi.command.JunitCommand
->

If I check, this project depends on junit-3.8.1 and  now I am adding junit 
-4.8.1 to my felix, so may be this could be the problem? if it is... then 
shouldI change all project dependencies to junit 4.8.1? or may be there will be 
some possible errors?

I checked Felix Command MANIFEST:
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                </dependency>

That could certainly be related. I doubt you can change everyone to 4.8.1, you probably have more luck downgrading everyone to 3.8.1.

-> richard

On Sep 9, 2010, at 6:35 PM, Richard S. Hall wrote:

On 9/9/10 12:01, Anna Karina Nava Soriano wrote:
thanks Richard!!!!

Now in the junit-4.8.1.jar MANIFEST I included all the missing packages and the 
result is:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Export-Package: org.junit.runner.notification,org.junit,
  org.junit.runner.manipulation,org.junit.runner
Created-By: 1.5.0_20-141 (Apple Inc.)

Now everithing is able to be installed and started:
[ 404] [Active     ] [    1] Apache Felix iPOJO Extender Pattern Handler (1.4.0)
[ 405] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner - Felix 
Command (1.0.0)
[ 408] [Active     ] [    1] 
file:/Applications/NetBeans/sges-v3/glassfish/modules/junit-4.8.1.jar
[ 409] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner - Swing Gui 
(1.0.0)
[ 410] [Active     ] [    1] Apache Felix iPOJO OSGi Junit Runner 
(1.1.0.SNAPSHOT)
[ 412] [Active     ] [    1] Apache Felix iPOJO (1.6.4)
[ 428] [Active     ] [    1] Broker Project Services TESTS (1.3)

but even having the Felix Command bundle installed and active. I got no junit 
command :( and previously I was.  In fact if I type help
What do you see if you type "inspect s c 405" ?

->  richard

->   help
bundlelevel
cd
find
headers
help
inspect
install
log
ps
refresh
resolve
scr
shutdown
start
startlevel
stop
sysprop
uninstall
update
version

see? no junit command :( I haven't changed that bundle at all. I don't know 
what is happening here.  I tried uninstall everything from 404 and reinstalling 
it but having the same result.  May be it is there is a problem if some part of 
the unit test packages are being exported by junit4osgi and other by the junit 
library?  I don't know how to make junit4osgi treat this packages the same way 
since its manifest is automatically built when I compile the junit4osgi project

Thanks for your supor!





On Sep 9, 2010, at 3:34 PM, Richard S. Hall wrote:

On 9/9/10 6:28, Anna Karina Nava Soriano wrote:
Hello everyone!

Nice tool junit4osgi!

I am working with junit4osgi and needed to extend the JunitExtender class to 
run tests in a particular way (the reason is not important).  MyJunitExtender 
is the new class and it extends JunitExtender and only overrides the run 
method.  I tested it and this was working fine! (obviously I changed 
metadata.xml to tell the new MyJunitExtender class) so far so good.

The thing is that I need now org.junit.internal.JUnitSystem.  So in MyJunitExtender I 
added  "import org.junit.internal.JUnitSystem;" then I compile the project 
again, and the import-Package in my new MANIFEST looks like this:
....
Import-Package: org.apache.felix.ipojo.junit4osgi.helpers, org.junit.i
  nternal, junit.runner, org.apache.felix.ipojo;version=1.6, org.junit.
  runner.notification, javax.xml.parsers, org.osgi.service.packageadmin
  ;version=1.1, org.w3c.dom, junit.textui, org.apache.felix.ipojo.parse
  r;version=1.6, org.junit, junit.extensions, org.junit.runner.manipula
  tion, org.osgi.service.log;version=1.2, junit.framework, org.apache.f
  elix.ipojo.junit4osgi, org.apache.felix.ipojo.architecture;version=1.
  6, org.junit.runner, org.osgi.framework;version=1.2, org.osgi.service
  .cm;version=1.1, org.apache.felix.ipojo.metadata
....

as you can see, the org.junit.internal is there.  I install this new jar in my 
Felix (see the last line)
....
[ 320] [Active     ] [    1] 
file:/Applications/NetBeans/sges-v3/glassfish/modules/junit-4.8.1.jar
[ 326] [Active     ] [    1] Apache Felix iPOJO Extender Pattern Handler (1.4.0)
[ 327] [Installed  ] [    1] Apache Felix iPOJO OSGi Junit Runner - Felix 
Command (1.0.0)
[ 330] [Installed  ] [    1] Apache Felix iPOJO OSGi Junit Runner - Swing Gui 
(1.0.0)
[ 332] [Active     ] [    1] Apache Felix iPOJO (1.6.4)
[ 339] [Installed  ] [    1] Broker Project Services TESTS (1.3)
[ 354] [Installed  ] [    1] Apache Felix iPOJO OSGi Junit Runner 
(1.1.0.SNAPSHOT)

and when I do "start 354"  it keeps saying:
"org.osgi.framework.BundleException: Unresolved constraint in bundle 
org.apache.felix.ipojo.junit4osgi [354]: package; (package=org.junit.internal)"

I know probably there is some stupid thing that I am missing.  My junit file (you can see 
it with the id "320") has this manifest:
"Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 1.5.0_20-141 (Apple Inc.)"
If that's all it has, then it is not a bundle. It needs to, at least, export 
its packages.

->   richard

So... does somebody knows what am I doing wrong? I am new in the junit4osgi 
world and I always get kind of lost with all dependencies.

Thank you so much in advance!
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to