Comments (3)
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.
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.
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)
- Deadlock in version 2.7 HOT 1
- Don't close InputStream HOT 1
- Suggestion HOT 2
- Auto-proxying does not recursively search for all interfaces HOT 1
- ClassLoader order is broken
- How to fully release/close a loaded jar ?
- Support for OSGi header information in MANIFEST
- Reloading classes while runtime
- Which license is JCL licensed under - Apache 2 or GPL 3? HOT 2
- getResources() does not return all resources in all jars of a given classloader HOT 3
- JMS client is not working when initial context factory is loaded using JCL class loader
- jar missing in maven HOT 3
- Is this project still being maintained? HOT 1
- new JarClassLoader() exception in my javaFX program HOT 3
- Any sample config for ver 2.9
- loading all classes needed for a jsp
- getResourceAsStream() returns null for entries in directories
- java.lang.ClassNotFoundException when creating an object
- Dealing with java.net.MalformedURLException: Nested JAR URLs are not supported
- Cannot load com.ctc.wstx.stax.WstxInputFactory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcl.