Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Spring Boot to weblogic 12

I have created an app(spring boot 1.5.6) using start.spring.io and trying to deploy it to Weblogic 12.1.3.0.0.
Messages in administration console:

Error Unable to access the selected application.
Error java.io.IOException
Error weblogic.utils.compiler.ToolFailureException

Message in logs:
<23.08.2017 13:40:26 GMT+03:00> <Error> <J2EE> <BEA-160228> <AppMerge failed to merge your application. If you are running AppMerge on the command-line, merge again with the -verbose option for more details. See the error message(s) below.>

These links don't help:
https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/howto-traditional-deployment.html
Deploy Spring Boot app in Weblogic

Update:
The problem is dependency JAX-RS. Without it app is deployed successfully. Not sure how to make it work With this dependency
Update x2:
Removed Jax-rs and now:
java.lang.NoSuchMethodError:org.springframework.core.annotation.AnnotationAwareOrderComparator.sort(Ljava/util/List;)V
Resolved by this

like image 204
Kirill Avatar asked Aug 23 '17 10:08

Kirill


People also ask

Can we deploy spring boot in WebLogic?

To deploy a Spring Boot application to WebLogic, you must ensure that your servlet initializer directly implements WebApplicationInitializer (even if you extend from a base class that already implements it).

Can we deploy jar file in WebLogic?

To deploy the JAR file on WebLogic Server, you must extract the contents of the JAR file into a directory, add the required WebLogic-specific deployment descriptors and any generated container classes, and then create a new JAR file containing the old and new files.

Does WebLogic support spring?

WebLogic Server supports the open source Spring projects when they are used in Java EE applications. This document describes the Spring features that WebLogic supports for use inside Java EE applications.

Does WebLogic support Java 11?

Oracle WebLogic Server 14c (14.1. 1.0. 0) is certified for use with JDK 11, in addition to JDK 8.


1 Answers

Our team started to use Spring Boot 2.0.0 and we had this issue also.

After some investigation, we have found that AppMerge tool scans all classes before deploy.

Root cause:

  • In case of WebLogic 12.1.3.* it fails because of Multi-Release JAR Files.
  • AppMerge tool can't work with JDK 9 files.

Solution:

  • Use Log4j 2.8.2

In pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project>
   <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.0.0.RELEASE</version>
      <relativePath/> <!-- lookup parent from repository -->
   </parent>
   ...
   <properties>
      ...
      <log4j2.version>2.8.2</log4j2.version>
      ...
   </properties>
   ...
</project>
like image 188
Artyom Gornostayev Avatar answered Sep 22 '22 10:09

Artyom Gornostayev