WebLogic: выпуск "Джерси-медиа-многокомпонентный" - PullRequest
0 голосов
/ 20 декабря 2018

У меня есть веб-приложение в Spring Boot, которое отлично работает на локальном tomcat.Однако наш производственный сервер работает в Weblogic, и приложение не запускается при запуске с ошибкой:

""2018-12-20 08:28:14 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR org.glassfish.jersey.internal.Errors - Following issues have been detected:
WARNING: No injection source found for a parameter of type public javax.ws.rs.core.Response com.blah.rest.UploadCSVResource.uploadFile(java.io.InputStream,java.lang.String,java.lang.String) throws java.io.IOException at index 0.
WARNING: A HTTP GET method, public com.blah.entity.Status com.blah.rest.StatusResource.fetchLatestRecordByDate(int), should not consume any entity.
HINT: A HTTP GET method, public void com.blah.rest.BlahResource.load(java.lang.Integer,javax.servlet.http.HttpServletRequest), returns a void type. It can be intentional and perfectly fine, but it is a little uncommon that GET method returns always "204 No Content".

""2018-12-20 08:28:14 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO  o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@ac3fd42: startup date [Thu Dec 20 08:27:54 EST 2018]; root of context hierarchy

Приложение работает нормально, когда я вынимаю jersey-media-multipart.Вот как выглядит соответствующая часть моего файла Gradle:

  compile ("javax:javaee-api:7.0")
  compile ("javax.xml.bind:jaxb-api:2.3.0")
  compile ("com.jcraft:jsch:0.1.54")
  compile ("org.jasypt:jasypt:1.9.2")
  compile ("javax.el:javax.el-api:3.0.0")
  compile ("org.projectlombok:lombok:1.16.14")
  compile ("org.glassfish.web:javax.el:2.2.6")
  compile ('org.javassist:javassist:3.20.0-GA')
  compile ('org.glassfish.jersey.core:jersey-server:2.24.1')
  compile ('org.glassfish.jersey.containers:jersey-container-servlet-core:2.23.2')  
  compile ('org.glassfish.jersey.media:jersey-media-multipart:2.23.2')  
  compile ("org.apache.commons:commons-lang3:3.6")
  compile ("org.apache.commons:commons-math3:3.6.1")
  compile ("org.apache.commons:commons-collections4:4.1")
  compile ("org.apache.commons:commons-io:1.3.2")
  compile ("org.apache.commons:commons-csv:1.5")
  compile ("org.springframework.boot:spring-boot:${springBootVersion}") 
  compile ("org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}")
  compile ("org.springframework.boot:spring-boot-starter:${springBootVersion}")
  compile ("org.springframework.boot:spring-boot-starter-logging:${springBootVersion}")
  compile ("org.springframework.boot:spring-boot-starter-parent:${springBootVersion}")
  compile ("org.springframework.boot:spring-boot-starter-web:${springBootStarterVersion}")
  compile ("org.springframework.boot:spring-boot-starter-data-jpa:${springBootStarterVersion}")
  compile ("org.springframework.boot:spring-boot-starter-jersey:${springBootStarterVersion}")
  compile ("org.springframework.boot:spring-boot-starter-cache:${springBootStarterVersion}")
  compile ("org.springframework.boot:spring-boot-starter-security:${springBootStarterVersion}")
  compile ("org.springframework.boot:spring-boot-starter-thymeleaf:${springBootStarterVersion}")  

, и я удостоверился, что зарегистрировал функцию multipart в моей конфигурации джерси

package com.blah.config;

import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.RequestContextFilter;

@Configuration
public class JerseyConfig extends ResourceConfig {

public JerseyConfig() {
    register(RequestContextFilter.class);
    register(MultiPartFeature.class);
    // Resources
    packages("com.blah.rest");
    // Exception Handlers
    packages("com.blah.exception");
    // Interceptor for Compression
    packages("com.blah.interceptor");
}
}

У кого-нибудь есть идеи?как решить эту проблему в weblogic?Я перепробовал все, что мог придумать.

...