将我的代码导出为jar文件时,当我的APP尝试解压缩jar文件时,我收到以下错误

时间:2017-04-10 14:55:21

标签: java

ERROR

  

ERROR Bundle [za.co.multichoice.eventtracker.logging]创建错误   豆的名字   'org.eclipse.gemini.blueprint.service.exporter.support.OsgiServiceFactoryBean#0':   bean的初始化失败;嵌套异常是   org.springframework.beans.TypeMismatchException:无法转换   类型'java.lang.String'的属性值为必需的类型   'java.lang.Class []'用于属性'interfaces';嵌套异常是   java.lang.IllegalArgumentException:找不到类   [com.soa.message.handler.HandlerFactory] ​​

LoggingHandlerFactory类

package za.co.multichoice.eventtracker.logging;

import com.digev.fw.exception.GException;
import com.soa.message.handler.HandlerContext;
import com.soa.message.handler.HandlerFactory;
import com.soa.message.handler.HandlerRole;
import com.soa.message.handler.MessageHandler;

public class LoggingHandlerFactory implements HandlerFactory {

    public MessageHandler create(HandlerContext context, HandlerRole role)
      throws GException {

        return new LoggingHandler();

    }

}

OSGI xml文件

<?xml version="1.0" encoding="UTF-8"?>

<!-- 
  Spring definition for the logging handler OSGi integration.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://www.springframework.org/schema/osgi"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans.xsd
                            http://www.springframework.org/schema/osgi
                            http://www.springframework.org/schema/osgi/spring-osgi.xsd">

    <osgi:service interface="com.soa.message.handler.HandlerFactory">
        <osgi:service-properties>
            <entry key="name" value="examples.logging.factory"/>
            <entry key="scope" value="all"/>
            <entry key="role" value="provider"/>
        </osgi:service-properties>
        <bean class="za.co.multichoice.eventtracker.logging.LoggingHandlerFactory"/>
    </osgi:service> 

</beans>

0 个答案:

没有答案