Comments (4)
Problem resolved but not reproduced as unit test.
Adding the package in the IBS.CLASSLOADER.STATIC.INTEGRITY.PACKAGES environment variable solves this.
from bridgeservice.
Have been able to reproduce issue. Problem related to lazy instantiation of a class which is not loaded in the class loader.
from bridgeservice.
The issue shows up it seems due to lazy instantiation of classes which are not in the static integrity path. In this case neither of the calls actually accesses Element.
The exact use case definition is, given a call similar to the following:
{
"timeout": 1200000,
"callContent": {
"call1": {
"class": "com.adobe.campaign.tests.bridge.testdata.issue34.callerpkg.CalledClass1",
"method": "calledMethod",
"returnType": "java.lang.String",
"args": [
]
},
"call2": {
"class": "com.adobe.campaign.tests.bridge.testdata.issue34.callerpkg.CalledClass2",
"method": "calledMethod",
"returnType": "java.lang.String",
"args": [
]
}
}
}
Here are the circumstances:
- At least two calls.
- None of the called methods actually use the class MiddleMan
- The first call, call1, accesses a class that contains an unused method that "returns" MiddleMan.
- The second call, call2, accesses a class that has a constant is if the type MiddleMan. The constant is initiated using a factory in a different package.
- The factory class should be in a different package than the packages for call1 and call2.
- None of the packages (even in a higher package level) are declared in the bridgeService property : IBS.CLASSLOADER.STATIC.INTEGRITY.PACKAGES
from bridgeservice.
This is not a regression.
The difference is the dynmic loading of the classes.
Here is the exact problem definition:
We have two classes a.lass1, a.Class2 each calling a.ClassA.
If we include a. in our path, all is well.
If Class2 calls another class b.Class3 which initself calls a.ClassA you will get the LinkageError. This is because b.Class3 will NOT be loaded by our classloader, and it will access a.ClassA.
Two solutions exist:
- Our classloader systematically loads anything it can load.
- We require users to load their packages.
Option 1 will probably load a lot of data in memory.
Option 2 will be less memory, but requires that users configure the project better.
from bridgeservice.
Related Issues (20)
- Migrate SONAR analysis job to Java17
- Pass sonar quality gate
- When calling a class with no modifiers we do not get enough information
- Make the /test endpoint return a JSON
- Research better formatting for errors
- Better information if the deployment port is already in use
- Object not found should be error 404
- Manage server side exceptions
- Activate E2ERemoteTests
- Introduce automatic loading of classes HOT 1
- Allow for value checking in ConfigValueHandlerIBS
- Document the execution properties
- Add a test for checking that the IBS.ENVVARS.SETTER. properties actually work
- Log the class and methods in the payload
- Issue34 class loader tests fail in github actions but not locally HOT 1
- class jdk.internal.reflect.ConstructorAccessorImpl loaded by IntegroBridgeClassLoader cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl HOT 1
- making manual loading deafault until issues with the automatic loading are resolved
- Describe installation in external projects
- Detect deprecated methods
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 bridgeservice.