Giter VIP home page Giter VIP logo

Comments (3)

kamranzafar avatar kamranzafar commented on June 18, 2024

Apparently it looks like the classloader that is loading jcl-core is different from the classloader that is loading Pager. Are both jcl-core and you Pager api in lib folder of your web app? Is jcl-core or ur api jar also available somewhere else in the classpath?

Try the following to see if it works.

Pager pager = JclUtils.cast(plugin.activate(), Pager.class, Pager.class.getClassLoader());

It could also be a bug, will run a few tests later to see whats going on.

from jcl.

massenz avatar massenz commented on June 18, 2024

First off, thanks so much for super-quick reply!
You are absolutely correct: I actually had "left" in the JAR being loaded the AlertPlugin/Pager classes: for some reason, it worked with the AlertPlugin, but it didn't with the subsequent Pager; I've manually removed those classes from the Jar, and the command now succeeds.

In a 'realistic' environment, obviously this would not happen, as I'd have an SDK Jar with the API classes, for the plugin to be built against, but that would not be 'carried over' during the upload.

I will now test whether I'm getting (behind the scenes) the same object and will let you know if this all works.

Just FYI (more details in the github repo of the project) I'm using Spring Boot, and building it all with Maven; so there's no such thing as a "lib folder".

Thanks!

PS - please let me know if there are areas you'd like me to test/contribute to: JCL is solving a pretty important problem for my project and I'm a big believer in "giving back".

Wish you all the best.

from jcl.

kamranzafar avatar kamranzafar commented on June 18, 2024

Glad that it worked for you. Contributions are always welcome, u could browse the issues and see if some issue can be fixed. And good luck with your project.

from jcl.

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.