org.osgi.framework.BundleException: отсутствует требование [демонстрационный пример [231] (R 231.39)] osgi.wiring.package;(Osgi.wiring.package = org.apache.http) - PullRequest
0 голосов
/ 04 июня 2019

Я хочу принять файл xls как многопараметрический в camel cxfrs и прочитать его детали.К сожалению, в fuse он обнаруживает ошибку и показывает

org.osgi.framework.BundleException:  missing requirement [demo-example [231](R 231.39)] osgi.wiring.package; (osgi.wiring.package=org.apache.http)

ProcessService.java

public class ProcessService implements Processor {


    @Override
    public void process(Exchange exchange) throws Exception {


        InputStream is = exchange.getIn().getBody(InputStream.class);
        Object name= exchange.getIn().getHeader(Exchange.FILE_NAME);



        MultipartEntityBuilder entity = MultipartEntityBuilder.create();
        entity.addBinaryBody("file", is);

        exchange.getOut().setBody(entity.build().getContent());

    }

Часть pom.xml показана ниже pom.xml


<properties>
            <cxf.version>3.1.11.fuse-710022-redhat-00001</cxf.version>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            <version.maven-bundle-plugin>3.2.0</version.maven-bundle-plugin>
            <jboss.fuse.bom.version>7.1.0.fuse-710023-redhat-00001</jboss.fuse.bom.version>
            <jacoco.version>0.8.2</jacoco.version>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <swagger.version>3.1.17</swagger.version>
            <guava.version>25.0.0.redhat-1</guava.version>
        </properties>
        <dependencyManagement>
    <dependencies>
                <dependency>
                    <groupId>org.jboss.fuse</groupId>
                    <artifactId>jboss-fuse-parent</artifactId>
                    <version>${jboss.fuse.bom.version}</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.3.1</version>
    </dependency>

            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-rs-service-description</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-rs-json-basic</artifactId>
                <version>${swagger.version}</version>
            </dependency>   
        </dependencies><build>
            <defaultGoal>install</defaultGoal>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${version.maven-bundle-plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Bundle-SymbolicName>demo-example</Bundle-SymbolicName>
                            <Bundle-Name>Demo Example Services[demo-example]</Bundle-Name>
                            <Export-Package>
                                com.demo.example.demo.*
                            </Export-Package>
                            <Private-Package>org.apache.cxf.jaxrs.json.basic.*</Private-Package>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>

Ошибка:

Ошибка при запуске пакета:

file:/D:/softwares/jboos-fuse-karaf/fuse-karaf-7.3.0/fuse-karaf-7.3.0.fuse-730079-redhat-00001/deploy/demo-example-1.0.0.jar
org.osgi.framework.BundleException: Unable to resolve demo-example [231](R 231.39): missing requirement [demo-example [231](R 231.39)] osgi.wiring.package; (osgi.wiring.package=org.apache.http) Unresolved requirements: [[demo-example [231](R 231.39)] osgi.wiring.package; (osgi.wiring.package=org.apache.http)]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149) ~[?:?]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2119) ~[?:?]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [11:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [11:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [11:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [11:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [11:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [11:org.apache.felix.fileinstall:3.6.4]
...