GithubHelp home page GithubHelp logo

Comments (5)

chunlinyao avatar chunlinyao commented on May 21, 2024

I think javax.websocket.server.ServerContainer is loaded by multiple ClassLoaders. We shipped a websocket api jar file in WEB-INF/lib. Tomcat also include a websocket api jar. I don't known why tomcat8 can work. Can you remove WEB-INF/lib/javax.websocket-api-1.0.jar from war file and deploy that war file again.

from moqui-framework.

jonesde avatar jonesde commented on May 21, 2024

Aside from the Websocket API (not sure why that is having a binding issue with Tomcat 7...) you'll likely have issues with other things once you're past that (i.e. if removing javax.websocket-api-1.0.jar works). Like you mentioned, Moqui is using the Servlet 3.1 spec now.

In general with the current code base and the 2.0.0 release we're finally moving to some newer stuff like requiring Java 8 and more recent servlet containers too. There was never any official support for external servlet containers, but I generally test with at least Tomcat and Jetty now and it should work on any that support the spec versions used in Moqui (which you can see most easily in the framework/build.gradle file with the javax spec dependencies).

In short no, Tomcat 7 is no longer supported just like Java 7 is no longer supported since the 1.6.2 release (along with various other deprecations and updates in the upcoming 2.0.0 release).

from moqui-framework.

chunlinyao avatar chunlinyao commented on May 21, 2024

FYI: The reason tomcat 8 not throw this exception is because WebappClassLoader in tomcat8 filter out javax.websocket.

from moqui-framework.

jenshp avatar jenshp commented on May 21, 2024

@chunlinyao it did not work by removing the WEB-INF/lib/javax.websocket-api-1.0.jar from the WAR file, but it did work by configuring tomcat 7 classloader with delegate=true for the context in which moqui is loaded.
However, it seems to be a fragile fix, as moqui will be using the classes provided by the server instead of the ones shipped in the WAR.

from moqui-framework.

jonesde avatar jonesde commented on May 21, 2024

For things like spec jars Moqui really doesn't care which one is used, and it should even work fine with a Websocket 1.1 spec jar instead of the 1.0 (if that is what the underlying websocket implementation supports).

from moqui-framework.

Related Issues (20)

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.