Not sure about the RMI problems but I see you specify the bundles with a file name. This is very fragile and for example I can not run your test as the files are not present on my machine. Try to use mavenBundle and the maven coordinates. You should also use the maven-depends-plugin. It creates a file in target that pax exam uses for .versionAsInProject(). This means you only
need to specify the versions in the pom file.

You also should consider using the newest pax exam:
https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers
The pax exam version 2.5 you use is quite ancient.

This is a snippet for the depends plugin:
            <plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>depends-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>generate-depends-file</id>
                        <goals>
<goal>generate-depends-file</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Christian

n 12.02.2015 14:43, Helm, Phil wrote:

Thanks for the response Christian. I separated the service code and the test code into two separate bundles, as well as added the ds as a dependency in the service project and loaded the ds bundle in the test project. Updated code (as well as the maven output – debug.out) is here: https://github.com/dendron8/paxosgi

How can I verify that the service bundle is installed? I know how to do it in a standalone Felix environment, but I am not sure about this pax-embeded one.

After making these changes I am getting the same error. I turned on maven debug (-X) in hopes I would see more meaningful messages from the Felix runtime, but the only Felix message I see is this

[FelixStartLevel] INFO org.ops4j.pax.exam.rbc.internal.Activator - Name, port or host is null. So this RBC remains inactive.

Previously I was getting an RMI timeout and I had to edit my hosts file to map local host (127.0.0.1) to my machine name to bypass the error.

*Phil Helm**| **Principal Software Engineer**| Global Employee Benefits*

5411 Page Road, 4^th Floor, C4145 | Durham, NC 27703

Office: 919.907.4118 |**E-mail:**[email protected]

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Christian Schneider
*Sent:* Wednesday, February 11, 2015 3:28 PM
*To:* OSGi Developer Mail List
*Subject:* Re: [osgi-dev] Integration Testing framework recommendation

Looks like the code you want to test is inside the same project as the pax exam test. This will not work.

Move the test to a separate project and mae sure you also install the bundle that contains the service. As your service seems to use declarative services you will also need a ds runtime in the pax test setup.

Christian


On 11.02.2015 20:24, Helm, Phil wrote:

    Thanks Toni.

    Sample code here: https://github.com/dendron8/paxosgi

    *Phil Helm**| Principal Software Engineer | Global Employee Benefits*

    5411 Page Road, 4^th Floor, C4145 | Durham, NC 27703

    Office: 919.907.4118 |E-mail:**[email protected]
    <mailto:[email protected]>



--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message.


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to