Is this Pax-Exam 2.0? I can't find class
org.ops4j.pax.exam.spi.container.PaxExamRuntime.

________________________________

From: general-boun...@lists.ops4j.org
[mailto:general-boun...@lists.ops4j.org] On Behalf Of Toni Menzel
Sent: Monday, May 23, 2011 2:20 PM
To: General OPS4J
Subject: Re: Pax-Exam test CLASSPATH


mmhh.. there is no real magic behind this, so i still bet something
fundamentally missing. 

What i usually do is using a litte Main entry point to interactively
access the environment you construct in your @configuration like here:
https://github.com/tonit/Learn-PaxExam/blob/master/lesson-cxf/src/test/j
ava/org/ops4j/pax/exam/learn/cxf/CXFLaboratories.java

This lets you look at effective exports. Also you could use "which
<bundleid> com.vsp.model.util.build.service.logentry.LogEntryService.

Whats a common pitfall is that multiple bundles export the same package
but different content.


On Mon, May 23, 2011 at 11:12 PM, Timothy Barthel <tim...@vsp.com>
wrote:


        Yes, I said it was com.vsp.il but it is actually com.vsp.model.
META-INF/MANIFEST.MF excerpt:
        
        Export-Package: com.vsp.model.ancillary.service;version="1.0.0",
         com.vsp.model.util.build;version="1.0.0",
        
com.vsp.model.util.build.service.business.build;version="1.0.0",
        
com.vsp.model.util.build.service.business.buildprocess;version="1.0.0",
        
com.vsp.model.util.build.service.lifecycle.buildtype;version="1.0.0",
        
com.vsp.model.util.build.service.lifecycle.logentry;version="1.0.0",
        

        -----Original Message-----
        From: general-boun...@lists.ops4j.org
[mailto:general-boun...@lists.ops4j.org] On Behalf Of Toni Menzel
        Sent: Monday, May 23, 2011 2:07 PM
        To: General OPS4J
        Subject: Re: Pax-Exam test CLASSPATH
        
        Is one of your bundles exporting the package of
        
com/vsp/model/util/build/service/lifecycle/logentry/LogEntryService ?
        Your test ends up in a bundle that has a Dynamic-ImportPackage *
which
        should find the class if your setup exports the package
somehwere.
        Toni
        
        On Mon, May 23, 2011 at 10:55 PM, Timothy Barthel
<tim...@vsp.com> wrote:
        > Hello,
        >
        > I am just getting started with Pax-Exam. My test code cannot
find the bundle
        > code on the CLASSPATH. I am not using Maven and cannot switch
to it at this
        > time. I have this configuration:
        >
        >     @Configuration
        >     public static Option[] configure()
        >     {
        >         return options(
        >                                 equinox(),
        >                                 provision(
        > ...
        >
bundle("file:///tmp/com.vsp.il.jar"),
        >
bundle("file:///tmp/com.vsp.model.jar"),
        >
        > bundle("file:///tmp/com.vsp.util.build.lifecycle.module.jar"))
        >                         );
        >     }
        >
        > And test:
        >
        >     @Test
        >     public void findBuildById() {
        >         ClassLoader loader = this.getClass().getClassLoader();
        >         System.out.println(loader);
        >         try {
        >                         LogEntryService logService =
        > ServiceUtil.lookup(LogEntryService.class);
        > ...
        >                 } catch (Exception e) {
        >                         e.printStackTrace();
        >                         fail("Caught exception");
        >                 }
        >     }
        >
        > I get this eror: java.lang.NoClassDefFoundError:
        >
com/vsp/model/util/build/service/lifecycle/logentry/LogEntryService
        > ...
        >
        > I have another test that successfully lists the above bundles.
The interface
        > in question is defined in the bundle com.vsp.il.jar and the
implementation
        > is in com.vsp.util.build.lifecycle.module.jar. What else do I
need to do to
        > make these bundles available to the test code at runtime?
Thanks.
        >
        > Tim
        >
        > MailGate.vsp.com made the following annotations
        >
---------------------------------------------------------------------
        > NOTICE: This message is intended only for the individual to
whom it is
        > addressed and may contain information that is confidential or
privileged. If
        > you are not the intended recipient, or the employee or person
responsible
        > for delivering it to the intended recipient, you are hereby
notified that
        > any dissemination, distribution, copying or use is strictly
prohibited. If
        > you have received this communication in error, please notify
the sender and
        > destroy or delete this communication immediately.
        >
---------------------------------------------------------------------
        >
        > _______________________________________________
        > general mailing list
        > general@lists.ops4j.org
        > http://lists.ops4j.org/mailman/listinfo/general
        >
        >
        
        
        
        --
        Toni Menzel Source
        
        _______________________________________________
        general mailing list
        general@lists.ops4j.org
        http://lists.ops4j.org/mailman/listinfo/general
        
        MailGate.vsp.com made the following annotations
        
---------------------------------------------------------------------
        NOTICE: This message is intended only for the individual to whom
it is addressed and may contain information that is confidential or
privileged. If you are not the intended recipient, or the employee or
person responsible for delivering it to the intended recipient, you are
hereby notified that any dissemination, distribution, copying or use is
strictly prohibited. If you have received this communication in error,
please notify the sender and destroy or delete this communication
immediately.
        
---------------------------------------------------------------------
        
        
        _______________________________________________
        general mailing list
        general@lists.ops4j.org
        http://lists.ops4j.org/mailman/listinfo/general
        




-- 
Toni Menzel Source <http://tonimenzel.com> 



MailGate.vsp.com made the following annotations
---------------------------------------------------------------------
NOTICE: This message is intended only for the individual to whom it is 
addressed and may contain information that is confidential or privileged. If 
you are not the intended recipient, or the employee or person responsible for 
delivering it to the intended recipient, you are hereby notified that any 
dissemination, distribution, copying or use is strictly prohibited. If you have 
received this communication in error, please notify the sender and destroy or 
delete this communication immediately.
---------------------------------------------------------------------

_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to