Does the Pax Exam Karaf Testframework 4.0 work on Windows ?

Today I tried it and got the following stack trace and error:


[INFO] 
[INFO] --- depends-maven-plugin:1.2:generate-depends-file 
(generate-depends-file) @ osgi.test.example ---
[INFO] Created: 
C:\DEV2\Sources\MySources\test.example\target\classes\META-INF\maven\dependencies.properties
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
osgi.test.example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
C:\DEV2\Sources\MySources\test.example\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ 
osgi.test.example ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ 
osgi.test.example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
C:\DEV2\Sources\MySources\test.example\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ 
osgi.test.example ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. 
build is platform dependent!
[INFO] Compiling 1 source file to 
C:\DEV2\Sources\MySources\test.example\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ osgi.test.example 
---
[INFO] Surefire report directory: 
C:\DEV2\Sources\MySources\test.example\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.prysmian.osgi.test.TestExample
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in 
[jar:file:/C:/Documents%20and%20Settings/Giacomo/.m2/repository/org/apache/karaf/org.apache.karaf.client/2.2.4/org.apache.karaf.client-2.2.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in 
[jar:file:/C:/Documents%20and%20Settings/Giacomo/.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:/C:/Documents%20and%20Settings/Giacomo/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.6.3/pax-logging-api-1.6.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[org.ops4j.pax.url.mvn.internal.AetherBridgeConnection] : Ather URL Handler not 
available. Using mvn fallback to resolve 
mvn:org.apache.karaf/apache-karaf/2.2.4/zip
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving 
[mvn:org.apache.karaf/apache-karaf/2.2.4/zip]
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository 
[file:/C:/Documents%20and%20Settings/Giacomo/.m2/repository/,releases=true,snapshots=true]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository [http://central/,releases=true,snapshots=true]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository 
[http://osgi.sonatype.org/content/groups/pax-runner/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository [http://repo1.maven.org/maven2/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository [http://repository.ops4j.org/maven2/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository 
[http://repository.springsource.com/maven/bundles/release/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from 
repository 
[http://repository.springsource.com/maven/bundles/external/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] :   Resolving exact version
        __ __                  ____      
       / //_/____ __________ _/ __/      
      / ,<  / __ `/ ___/ __ `/ /_        
     / /| |/ /_/ / /  / /_/ / __/        
    /_/ |_|\__,_/_/   \__,_/_/         

  Apache Karaf (2.2.4)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf.

karaf@root> 2011-11-15 15:11:31,484 | ERROR | rint Extender: 3 | 
BlueprintContainerImpl           | container.BlueprintContainerImpl  358 | 9 - 
org.apache.aries.blueprint - 0.3.1 | Unable to start blueprint container for 
bundle org.apache.karaf.features.core
org.osgi.service.blueprint.container.ComponentDefinitionException: Error 
setting property: PropertyDescriptor <name: urls, getter: null, setter: [public 
void 
org.apache.karaf.features.internal.FeaturesServiceImpl.setUrls(java.lang.String)
 throws java.net.URISyntaxException]
        at 
org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:807)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:773)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:754)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:720)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[9:org.apache.aries.blueprint:0.3.1]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_16]
        at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_16]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_16]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_16]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)[:1.6.0_16]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_16]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_16]
        at java.lang.Thread.run(Thread.java:619)[:1.6.0_16]
Caused by: java.net.URISyntaxException: Illegal character in opaque part at 
index 17: file:C:/Documents and Settings/Giacomo/.pax/exam/examfeatures.xml
        at java.net.URI$Parser.fail(URI.java:2809)[:1.6.0_16]
        at java.net.URI$Parser.checkChars(URI.java:2982)[:1.6.0_16]
        at java.net.URI$Parser.parse(URI.java:3019)[:1.6.0_16]
        at java.net.URI.<init>(URI.java:578)[:1.6.0_16]
        at 
org.apache.karaf.features.internal.FeaturesServiceImpl.setUrls(FeaturesServiceImpl.java:187)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)[:1.6.0_16]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_16]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_16]
        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_16]
        at 
org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:476)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:307)[9:org.apache.aries.blueprint:0.3.1]
        at 
org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:805)[9:org.apache.aries.blueprint:0.3.1]
        ... 17 more

The problem seem to be in:


Caused by: java.net.URISyntaxException: Illegal character in opaque part at 
index 17: file:C:/Documents and Settings/Giacomo/.pax/exam/examfeatures.xml

Due to the not handling the spaces in ": file:C:/Documents and Settings". If I 
go to   ../.pax/exam/etc/org.apache.karaf.features.cfg and modify the url for 
the paxeam feature from "file:C:/Documents and 
Settings/Giacomo/.pax/exam/examfeatures.xml" to "C:/Documents%20and%20 
Settings/Giacomo/.pax/exam/examfeatures.xml" then I can start karaf without the 
error above.

Is there a workaound to have the TestFramework  running on windows without this 
problem ?

Thank you


Giacomo Coletta

 
___________________________________________________________________________________
 
AVVISO DI RISERVATEZZA
 
Le informazioni contenute nella comunicazione che precede possono essere 
riservate e confidenziali e sono, comunque, destinate esclusivamente alla 
persona o all'ente sopraindicati. La confidenzialità, sicurezza e la 
correttezza dei messaggi di posta elettronica non possono essere garantite. 
Prysmian potrebbe avere nozione di tutti i messaggi di risposta e/o tutti gli 
allegati, alla/dalla stessa trasmessi e/o ricevuti. Qualora Lei non fosse la 
persona alla quale il presente messaggio è destinato, la invitiamo a non 
procedere ad alcun uso, distribuzione, copiatura od azione ad esso conseguente. 
Se avete ricevuto questo messaggio per errore La invitiamo ad eliminarlo 
dandocene gentilmente comunicazione rispondendo a questo messaggio oppure 
attraverso il "contact us" sul sito web http://www.prysmian.com/.

___________________________________________________________________________________
 
CONFIDENTIALITY NOTICE
 
This message and any attachment is intended exclusively for the individual or 
entity to which it is addressed. This communication may contain information 
that is proprietary, confidential, legally privileged or otherwise exempt from 
disclosure. The security and integrity of e-mails can not be guaranteed. Any 
reply to this e-mail and any attachment received may be subject to Prysmian 
monitoring.
If you are not the named addressee, you are not authorized to use, distribute, 
copy or take any action in reliance on this message. The unauthorized use, 
disclosure, or copying of this communication, or any attachment, is strictly 
prohibited and may be unlawful. No waiver of confidentiality or any applicable 
privilege is intended by any mistransmission. If you have received this message 
in error, please notify the sender immediately by replying to this e-mail or by 
going to our web-site http://www.prysmian.com/ on “contact us” and delete all 
copies of this message and any attachments.

Reply via email to