Загрузка Camunda BPM Spring не может начаться в weblogic - возможно, проблема с майкой - PullRequest
0 голосов
/ 05 сентября 2018

У меня есть приложение, которое использует камунду и пружинную загрузку и работал со встроенным котом. Но теперь мне нужно было установить приложение как war.
С автономным tomcat все в порядке, но с weblogic я не могу запустить приложение. Я получаю следующую ошибку:

<Sep 5, 2018 9:59:42,539 PM MSK> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "24521744092298" for task "1" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.AbstractMethodError"
weblogic.application.ModuleException: java.lang.AbstractMethodError
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.AbstractMethodError
    at org.glassfish.jersey.server.ApplicationHandler$4.get(ApplicationHandler.java:408)
    at org.glassfish.jersey.server.ApplicationHandler$4.get(ApplicationHandler.java:399)
    at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:340)
    at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
    at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
    Truncated. see log file for complete stacktrace
> 
<Sep 5, 2018 9:59:42,543 PM MSK> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application "order-management-service_war_exploded" on [partition-name: DOMAIN].> 
<Sep 5, 2018 9:59:42,545 PM MSK> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "order-management-service_war_exploded".> 
<Sep 5, 2018 9:59:42,545 PM MSK> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.AbstractMethodError
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.AbstractMethodError
    at org.glassfish.jersey.server.ApplicationHandler$4.get(ApplicationHandler.java:408)
    at org.glassfish.jersey.server.ApplicationHandler$4.get(ApplicationHandler.java:399)
    at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:340)
    at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
    at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
    Truncated. see log file for complete stacktrace

И не имеет значения, использую ли я стандартную версию Camunda Enterprise. Мой pom содержит следующие зависимости:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.camunda.bpm.springboot</groupId>
        <artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>

Как я могу решить эту проблему?

EDIT
Как я понимаю, вся проблема может заключаться в майке, которая находится внутри камуфоны зависимости. Я редактирую свой weblogic.xml, и вот как он вышел:

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

<wls:weblogic-web-app
        xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">

    <wls:container-descriptor>
        <wls:prefer-application-packages>
            <wls:package-name>org.apache.taglibs.*</wls:package-name>
            <wls:package-name>org.springframework.*</wls:package-name>
            <!--<wls:package-name>org.glassfish.*</wls:package-name>-->
            <wls:package-name>javax.persistence.*</wls:package-name>
            <wls:package-name>org.hibernate.*</wls:package-name>
            <wls:package-name>javax.validation.*</wls:package-name>
            <wls:package-name>javax.validation.bootstrap.*</wls:package-name>
            <wls:package-name>javax.validation.constraints.*</wls:package-name>
            <wls:package-name>javax.validation.groups.*</wls:package-name>
            <wls:package-name>javax.validation.metadata.*</wls:package-name>
            <wls:package-name>javax.validation.spi.*</wls:package-name>
            <wls:package-name>com.fasterxml.jackson.*</wls:package-name>
            <wls:package-name>org.slf4j.*</wls:package-name>
            <wls:package-name>org.apache.logging.*</wls:package-name>

            <!-- jsr311 -->
            <wls:package-name>javax.ws.rs.*</wls:package-name>
            <!-- javassist -->
            <wls:package-name>javassist.*</wls:package-name>
            <!-- aop repackaged -->
            <wls:package-name>org.aopalliance.*</wls:package-name>

            <!-- jersey 2 -->
            <wls:package-name>jersey.repackaged.*</wls:package-name>
            <wls:package-name>org.glassfish.jersey.*</wls:package-name>
            <wls:package-name>com.sun.research.ws.wadl.*</wls:package-name>
            <wls:package-name>com.sun.ws.rs.ext.*</wls:package-name>

            <!-- media providers -->
            <wls:package-name>org.eclipse.persistence.*</wls:package-name>
            <wls:package-name>org.codehaus.jackson.*</wls:package-name>
            <wls:package-name>org.codehaus.jettison.*</wls:package-name>

            <!-- hk2 -->
            <wls:package-name>org.glassfish.hk2.*</wls:package-name>
            <wls:package-name>org.jvnet.hk2.*</wls:package-name>
            <wls:package-name>org.jvnet.tiger_types.*</wls:package-name>

            <wls:package-name>org.objectweb.asm.*</wls:package-name>
            <wls:package-name>antlr.*</wls:package-name>


            <wls:package-name>com.sun.jersey.*</wls:package-name>

            <wls:package-name>jersey.repackaged.org.objectweb.asm.*</wls:package-name>

        </wls:prefer-application-packages>
        <wls:prefer-application-resources>
            <wls:resource-name>org.apache.taglibs.*</wls:resource-name>
            <wls:resource-name>org.springframework.*</wls:resource-name>
            <wls:resource-name>javax.persistence.*</wls:resource-name>
            <wls:resource-name>javax.validation.*</wls:resource-name>
            <wls:resource-name>org.hibernate.*</wls:resource-name>
            <wls:resource-name>com.fasterxml.jackson.*</wls:resource-name>
        </wls:prefer-application-resources>
    </wls:container-descriptor>
</wls:weblogic-web-app>

Но это также не работает, я получаю эту ошибку:

ogic.application.ModuleException: java.lang.ClassCastException: weblogic.jaxrs.server.media.multipart.Jersey1MultiPartSupport cannot be cast to org.glassfish.jersey.internal.spi.AutoDiscoverable
    at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException: weblogic.jaxrs.server.media.multipart.Jersey1MultiPartSupport cannot be cast to org.glassfish.jersey.internal.spi.AutoDiscoverable
    at java.util.TreeMap.put(TreeMap.java:552)
    at java.util.TreeSet.add(TreeSet.java:255)
    at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
    at java.util.TreeSet.addAll(TreeSet.java:312)
    at org.glassfish.jersey.model.internal.CommonConfig.configureAutoDiscoverableProviders(CommonConfig.java:599)
    Truncated. see log file for complete stacktrace
> 

Я использовал последнюю версию weblogic 12.2.1.3, весеннюю загрузку 2.0.4 и камунду 7.9.0 (стартер 3.0.0)

1 Ответ

0 голосов
/ 12 сентября 2018

Я нашел решение. Я изменил свой файл weblogic.xml на:

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

<wls:weblogic-web-app
        xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.9/weblogic-web-app.xsd">

    <wls:context-root>/order</wls:context-root>
    <wls:container-descriptor>

        <wls:prefer-application-packages>
            <wls:package-name>org.apache.taglibs.*</wls:package-name>
            <wls:package-name>org.springframework.*</wls:package-name>
            <wls:package-name>javax.persistence.*</wls:package-name>
            <wls:package-name>org.hibernate.*</wls:package-name>
            <wls:package-name>javax.validation.*</wls:package-name>
            <wls:package-name>javax.validation.bootstrap.*</wls:package-name>
            <wls:package-name>javax.validation.constraints.*</wls:package-name>
            <wls:package-name>javax.validation.groups.*</wls:package-name>
            <wls:package-name>javax.validation.metadata.*</wls:package-name>
            <wls:package-name>javax.validation.spi.*</wls:package-name>
            <wls:package-name>com.fasterxml.jackson.*</wls:package-name>
            <!--<wls:package-name>org.slf4j.*</wls:package-name>-->
            <wls:package-name>org.apache.logging.*</wls:package-name>

            <!-- jsr311 -->
            <wls:package-name>javax.ws.rs.*</wls:package-name>
            <!-- javassist -->
            <wls:package-name>javassist.*</wls:package-name>
            <!-- aop repackaged -->
            <wls:package-name>org.aopalliance.*</wls:package-name>

            <!-- jersey 2 -->
            <wls:package-name>jersey.repackaged.*</wls:package-name>
            <wls:package-name>org.glassfish.jersey.*</wls:package-name>
            <wls:package-name>com.sun.research.ws.wadl.*</wls:package-name>
            <wls:package-name>com.sun.ws.rs.ext.*</wls:package-name>

            <!-- media providers -->
            <wls:package-name>org.eclipse.persistence.*</wls:package-name>
            <wls:package-name>org.codehaus.jackson.*</wls:package-name>
            <wls:package-name>org.codehaus.jettison.*</wls:package-name>

            <!-- hk2 -->
            <wls:package-name>org.glassfish.hk2.*</wls:package-name>
            <wls:package-name>org.jvnet.hk2.*</wls:package-name>
            <wls:package-name>org.jvnet.tiger_types.*</wls:package-name>

            <wls:package-name>org.objectweb.asm.*</wls:package-name>
            <wls:package-name>antlr.*</wls:package-name>

            <wls:package-name>jersey.repackaged.org.objectweb.asm.*</wls:package-name>

        </wls:prefer-application-packages>
        <wls:prefer-application-resources>
            <wls:resource-name>org.apache.taglibs.*</wls:resource-name>
            <wls:resource-name>org.springframework.*</wls:resource-name>
            <wls:resource-name>javax.persistence.*</wls:resource-name>
            <wls:resource-name>javax.validation.*</wls:resource-name>
            <wls:resource-name>org.hibernate.*</wls:resource-name>
            <wls:resource-name>com.fasterxml.jackson.*</wls:resource-name>


            <!-- apis -->
            <wls:resource-name>javax.ws.rs.*</wls:resource-name>
            <!-- jersey -->
            <wls:resource-name>META-INF/services/org.glassfish.jersey.*</wls:resource-name>
            <wls:resource-name>com.sun.jersey.*</wls:resource-name>
            <wls:resource-name>org.glassfish.jersey.*</wls:resource-name>
            <wls:resource-name>jersey.repackaged.*</wls:resource-name>
            <!-- hk2 -->
            <wls:resource-name>META-INF/services/org.glassfish.hk2.*</wls:resource-name>
            <wls:resource-name>org.glassfish.hk2.*</wls:resource-name>
            <wls:resource-name>org.jvnet.hk2.*</wls:resource-name>
            <wls:resource-name>org.jvnet.hk2.tiger_types.*</wls:resource-name>

        </wls:prefer-application-resources>
    </wls:container-descriptor>
</wls:weblogic-web-app>

и для начала в webapp добавлен стартовый остаток (не знаю почему, но он работает) с исключением jersey-container-servlet в pom.xml:

            <dependency>
                <groupId>org.camunda.bpm.springboot</groupId>
                <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
                <version>${camunda.spring.boot.starter.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.glassfish.jersey.containers</groupId>
                        <artifactId>jersey-container-servlet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.camunda.bpm.springboot</groupId>
                <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
                <version>${camunda.spring.boot.starter.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.glassfish.jersey.containers</groupId>
                        <artifactId>jersey-container-servlet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
...