2012-08-09 2 views
2

Pax Exam을 실행할 때 다음 예외가 발생합니다. 내 구성에는 파일 시스템과 junit 및 felix의 단일 번들 만 포함됩니다. 왜 이런 일이 일어나는 지 아십니까?Pax Exam 실행 중 IllegalStateException

java.lang.IllegalStateException: Stream handler unavailable due to: null 
    at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openConnection(URLHandlersStreamHandlerProxy.java:311) 
    at java.net.URL.openConnection(URL.java:945) 
    at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:155) 
    at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:82) 
    at org.apache.felix.framework.cache.JarRevision.<init>(JarRevision.java:60) 
    at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:868) 
    at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:549) 
    at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:148) 
    at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:251) 
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2541) 
    at org.apache.felix.framework.Felix.installBundle(Felix.java:2501) 
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:150) 
    at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:123) 
    at org.ops4j.pax.exam.nat.internal.NativeTestContainer.installAndStartBundles(NativeTestContainer.java:319) 
    at org.ops4j.pax.exam.nat.internal.NativeTestContainer.start(NativeTestContainer.java:163) 
    at org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:67) 
    at org.ops4j.pax.exam.junit.JUnit4TestRunner$2.evaluate(JUnit4TestRunner.java:284) 
    at org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:93) 

EDIT : Pax 시험 2.5.0을 사용 중이며 다음과 같은 구성 방법이 있습니다. 버전 4.9.2 문제에 대한

@Configuration 
public Option[] config() { 
    return options(
      bundle("file:/home/nufail/mybundle.jar"), 
      junitBundles(), 
      felix().version("3.2.2") 
    ); 
} 
+0

당신의 코드를 보지 않고 수 있도록하는 것은 매우 어렵다 메이븐 다음 의존성을 추가함으로써 해결되었다. 일부 게시 할 수 있습니까? – Dahaka

+0

이 하나에 대한 추가 정보 필요 : 어떤 Pax 시험 버전을 사용하고 있습니까? Felix에서 네이티브 컨테이너를 사용하고 있습니다. 구성 섹션 (@Configuration)을 더 제공 할 수 있습니까? –

+0

doublecheck with http://stackoverflow.com/questions/5127969/pax-url-protocol-not-supported-at-felixs-startup/5731293#5731293 –

답변

0

<dependency> 
    <groupId>org.ops4j.pax.exam</groupId> 
    <artifactId>pax-exam-link-mvn</artifactId> 
    <version>4.9.2</version> 
    <scope>test</scope> 
</dependency>