-
Notifications
You must be signed in to change notification settings - Fork 607
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
MCP Asset Folder Creator Fails on AEM 6.5 SP3 #2162
Comments
Line 189 in c2eef19
The awkward thing about this bug is that the CellType enum doesn't exist until version 3.15 so we can't switch our code reliably over to that and expect things to compile or even bind correctly in older versions of AEM that use v3.0 and not a newer 3.x version of the library. Our choices are then limited to 1) Code that uses reflection to bypass version compatibility limitations (which is ugly but can work in theory) or 2) Remove that line of code which will revert the bug it fixed in the first place via #1791 |
@davidjgonzalez, @justinedelson thoughts on this one? |
perhaps this might be a work around? http://apache-poi.1045710.n5.nabble.com/How-to-set-Cell-Format-to-Text-tp3275568p3275966.html It's not obvious to me how |
That is rather strange but I've seen stranger. If we have unit test coverage of #1791 can we try this to see if it doesn't result in a regression? |
possibly try |
I have a solution in place -- I just get the type as an object and then convert to an internal version of the enumeration they introduced in POI 4. That way it works the same with new and old versions. Fortunately there were no other significant impacts in the version changes of POI that we could find. |
The problem with using other methods to coerce the value type is that you are relying on undocumented side effects and that's more fragile overall. |
Required Information
Expected Behavior
The folders should be created successfully without an error
Actual Behavior
No folders are created, the following stack trace is produced, pointing to a no such method error when calling POI.
Steps to Reproduce
Run the mcp asset folder creator tool with any compatible excel sheet.
Links
Links to related assets, e.g. content packages containing test components
In the only java doc I can find online for the relevant POI class, http://poi.apache.org/apidocs/dev/org/apache/poi/ss/usermodel/Cell.html#setCellType-org.apache.poi.ss.usermodel.CellType-, it says that method is deprecated and will be removed in 5.0. Strangely, the POI bundle used by AEM appears to export 3.0.0, so I'm not 100% sure what is going on there, but the issue is readily reproducible under SP3. My guess is that the service pack updated the POI bundle for some reason, thus causing the no such method error.
The text was updated successfully, but these errors were encountered: