New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDEMPIERE-6117:POI: WorkbookFactory.create cannot be used to open XLS… #2325
Conversation
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unnecessary, just add the test xlsx to test project. it is just 1 file and I don't expect we need to make frequent update of it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the XLSX file, I also have two JAR files for testing case updates and multi-version installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 jar files: but that's not what iDempiere core is using, we shouldn't add test here that's for your project work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, for multi version, AFAIU, if you don't limit the import version in MANIFEST.MF, the resolver should always resolve to the latest version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 jar test for this condition (it's not my case)
- hot server updates using update.sh and new release has update of POI
- some one has plugin that require other version of POI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test above doesn't test anything for multi version of POI. You install a different version and unless your bundle specifically import only that version, the OSGi resolver will just resolve to the latest version install.
@@ -61,6 +143,9 @@ public void start(BundleContext context) throws Exception { | |||
context.registerService(CommandProvider.class.getName(), new StackTraceCommand(), null); | |||
|
|||
blacklistService = new ComponentBlackListService(context); | |||
|
|||
int trackStates = Bundle.RESOLVED | Bundle.STOPPING | Bundle.ACTIVE | Bundle.STARTING; | |||
new PoiBundleTracker(context, trackStates).open(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example at https://github.com/apache/poi/blob/trunk/osgi/src/main/java/org/apache/poi/osgi/Activator.java just add the provider in activator, why do we need to use bundle tracker here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example for case merger POI and POI-OOXML into a single bundle
In Idempiere, I need the Bundle Tracker to ensure that both the wrapper bundle already resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but that's not how it is configure in iDempiere core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there's compelling reason for doing so, I would prefer the simple approach in the link example above and don't have to depends on hard coded bundle name check as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like a straightforward approach, similar to sample, but need to merged JARs for POI and POI-OOXML for deployment on the idempiere/binary.file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a plugin need a different version of POI, that should be managed in that plugin/bundle, it is not the core's responsibility to do that. Also, it is not alright for us to integrate something that we can't test properly.
replaced by #2357 |
IDEMPIERE-6117
Pull Request Checklist
Tests
Documentation