[ 
https://issues.apache.org/jira/browse/KARAF-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537042#comment-13537042
 ] 

Charles Moulliard commented on KARAF-2077:
------------------------------------------

BTW, If I use this dependency

{code}
        <dependency>
            <groupId>org.apache.karaf.tooling.exam</groupId>
            <artifactId>org.apache.karaf.tooling.exam.options</artifactId>
            <version>2.3.0</version>
        </dependency>
{code}

I get this error now :

{code}
SLF4J: Found binding in 
[jar:file:/Users/chmoulli/.m2/repository/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/Users/chmoulli/.m2/repository/org/slf4j/slf4j-jdk14/1.6.1/slf4j-jdk14-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.175 sec <<< 
FAILURE!

Results :

Tests in error: 
  
initializationError(org.jboss.weld.environment.osgi.tests.karaf.ContainerTest): 
No TestContainer implementation in Classpath
{code}
                
> Exported package names cannot be zero length. when karaf 2.3 starts within 
> unit test using openengsb
> ----------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-2077
>                 URL: https://issues.apache.org/jira/browse/KARAF-2077
>             Project: Karaf
>          Issue Type: Task
>    Affects Versions: 2.3.0
>         Environment: MacOS
>            Reporter: Charles Moulliard
>            Assignee: Andreas Pieber
>
> Dependency pom
> {code}
>         <dependency>
>             <groupId>org.apache.karaf</groupId>
>             <artifactId>apache-karaf</artifactId>
>             <version>2.3.0</version>
>             <type>tar.gz</type>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.url</groupId>
>             <artifactId>pax-url-aether</artifactId>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-link-mvn</artifactId>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.openengsb.labs.paxexam.karaf</groupId>
>             <artifactId>paxexam-karaf-container</artifactId>
>             <version>1.0.0</version>
>             <exclusions>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam-spi</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam-container-rbc</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam-container-rbc-client</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam-container-remote</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam-invoker-junit</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.ops4j.pax.exam</groupId>
>                     <artifactId>pax-exam</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-spi</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-container-rbc</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-container-rbc-client</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-container-remote</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-extender-service</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-inject</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-invoker-junit</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.ops4j.pax.exam</groupId>
>             <artifactId>pax-exam-junit4</artifactId>
>             <version>${pax.exam.version}</version>
>         </dependency>
> {code}
> Java Code
> {code}
>     public static Option[] getDefaultKarafOptions() {
>         Option[] options =
>                 // Set the karaf environment with some customer configuration
>                 new Option[]{
>                         karafDistributionConfiguration()
>                                 
> .frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").version("2.3.0"))
>                                 .karafVersion("2.3.0")
>                                 .name("Apache Karaf")
>                                 .useDeployFolder(false).unpackDirectory(new 
> File("target/paxexam/unpack/")),
>                         KarafDistributionOption.keepRuntimeFolder(),
>                         logLevel(LogLevelOption.LogLevel.INFO)
>                         // override the config.properties (to fix pax-exam 
> bug)
>                         //replaceConfigurationFile("etc/config.properties", 
> new 
> File("src/test/resources/org/jboss/weld/environment/osgi/tests/karaf/config.properties")),
>                         //replaceConfigurationFile("etc/custom.properties", 
> new 
> File("src/test/resources/org/jboss/weld/environment/osgi/tests/karaf/custom.properties"))
>                 };
>         return options;
>     }
> @RunWith(JUnit4TestRunner.class)
> @ExamReactorStrategy(AllConfinedStagedReactorFactory.class)
> public class ContainerTest {
>     @Configuration
>     public static Option[] configure() {
>         Option[] options = combine(
>                 getDefaultKarafOptions(),
>                 Environment.toCDIKarafEnvironment(
>                         toMavenBundle("org.jboss.weld.osgi.tests", 
> "weld-osgi-bundle1"),
>                         toMavenBundle("org.jboss.weld.osgi.tests", 
> "weld-osgi-bundle2"),
>                         toMavenBundle("org.jboss.weld.osgi.tests", 
> "weld-osgi-bundle3")
>                 )
>         );
>         return options;
>     }
> {code}
> Error 
> [org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
> org.osgi.framework.BundleException: Exported package names cannot be zero 
> length.
>       at 
> org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeExportClauses(ManifestParser.java:729)
>       at 
> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:191)
>       at 
> org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:220)
>       at org.apache.felix.framework.Felix.<init>(Felix.java:374)
>       at 
> org.apache.felix.framework.FrameworkFactory.newFramework(FrameworkFactory.java:28)
>       at org.apache.karaf.main.Main.launch(Main.java:288)
>       at org.apache.karaf.main.Main.main(Main.java:497)
> ERROR: Error parsing system bundle export statement: 
> org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0", 
> org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to