Giter Site home page Giter Site logo

micronaut3-websphere9-sample's Introduction

Notes on Micronaut War Deployed to IBM WebSphere 9

About

Currently, building a Micronaut application as a war and attempting to run it on IBM WebSphere 9 fails with the following exception.

io.micronaut.context.exceptions.NoSuchBeanException:
No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists.

Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition'
to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled
(for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor)

This is similar to a previous issue with Oracle WebLogic. The primary fault in both cases comes from unexpected quirks in the application server class loaders. This leads to failures to find and load BeanDefinitionReference resources, which leads to a failure to load the ApplicationEventPublisherFactory class. And without the factory class, the ApplicationEventPublisher is not available.

Testing

To test this out, first set useNetty in build.gradle to true and verify that you can access the hello world greeting.

Next, set useNetty to false and run gradle task :war to generate build/libs/sample-0.1.war. Load and prepare the war file on an IBM WebSphere 9 server, and start the application. Navigating to the same URL (on port 9080, or whatever port you have exposed) should generate the same response.

If you get the above exception, then your version of Micronaut is not patched to work on IBM WebSphere 9.

This project is configured for Micronaut 3.8.10; it is expected to be fixed in 3.8.11. Once it is, rebuild the project for 3.8.11 (i.e. update gradle.properties), then rebuild and retest the war.

micronaut3-websphere9-sample's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.