You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2021/01/25 16:59:16 UTC

[Bug 65103] New: Java application cannot launch using JPMS and POI-OOXML 5.0.0

https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

            Bug ID: 65103
           Summary: Java application cannot launch using JPMS and
                    POI-OOXML 5.0.0
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: codebangusllc@gmail.com
  Target Milestone: ---

Created attachment 37716
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37716&action=edit
NetBeans project that exhibits this bug

Trying to run a simple Java command line application using the JPMS launcher
fails with the following error:

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
/home/koppdk/.m2/repository/xalan/xalan/2.7.2/xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class
org.apache.bsf.BSFManager not in module

I have attached a very simple NetBeans maven project that exhibits this error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #11 from Andreas Beeker <ki...@apache.org> ---
Created attachment 37725
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37725&action=edit
Fixed project

Fixed project attached

> mvn clean package
> java --module-path target/modules --module poiooxmljpmsbroken

Batik maven descriptors seems to be broken, i.e. beside batik-all most of the
other artifacts are included.

I try to update the dependencies to try to get rid of batik-script

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

codebangusllc@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #37716|0                           |1
        is obsolete|                            |

--- Comment #7 from codebangusllc@gmail.com ---
Created attachment 37723
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37723&action=edit
Project that can be run without NetBeans

To use this version, change into the project directory an then:

mvn clean install

java -p target/modules -m
poiooxmljpmsbroken/com.codebangusllc.poiooxmljpmsbroken.Main

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #12 from marius@volkhart.com ---
batik-script dropped in r1887643

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #14 from codebangusllc@gmail.com ---
It does work

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
Also exact version of Java might be helpful to narrow down this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #13 from Dominik Stadler <do...@gmx.at> ---
As far as I see this was adjusted some more via r1893289 by excluding batik
from the default dependencies and thus this should work in recent releases.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by "fanningpj@apache.org" <fa...@apache.org>.
I don't know much about Jigsaw. I'm more of a Scala developer - and Java modules haven't really caught on in Scala community.

But that 65103 issue looks like it could be an issue. We've added. a dependency to Batik and it brings in dependencies on Xalan and other jars that haven't been released in a while. This means those jars won't have module info in there META-INF.

If we get this issue resolved or are happy it's not really an issue, I would be +1 for the POI 5.0.1 release.








On Monday 1 February 2021, 14:01:09 GMT, <bu...@apache.org> wrote: 





https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
Can you reproduce this also outside of NetBeans when run as standalone project?
As far as I know none of the active contributors of Apache POI uses NetBeans,
so would be good to be able to reproduce it without this "dependency".


-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
Can you reproduce this also outside of NetBeans when run as standalone project?
As far as I know none of the active contributors of Apache POI uses NetBeans,
so would be good to be able to reproduce it without this "dependency".

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you provide a bit more details, ideally providing a small project which
shows the problem would be good to allow others to easily reproduce it.

At least detailed information about what the application tries to do and how
you build and run the application are necessary to take a look.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #10 from Andreas Beeker <ki...@apache.org> ---
Regarding "Provider class org.apache.batik.bridge.RhinoInterpreterFactory not
in module":
see https://issues.apache.org/jira/browse/BATIK-1260

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

codebangusllc@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #3 from codebangusllc@gmail.com ---
There is a NetBeans project attached to this issue that does what you
requested.

I ran this against OpenJDK 15, bit I’m pretty sure it will exhibit the same
behavior on Java 9+

The key to producing this bug is to run the code with the module path switches.
That is, use java -p <path to target jar> -m <module name/main class>

If you run using -classpath then the code will run.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #5 from Dominik Stadler <do...@gmx.at> ---
Ah, sorry, missed that part of the bug-report

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #8 from Dominik Stadler <do...@gmx.at> ---
Thanks, this makes it easier to reproduce it.

The following error message is actually reported with this now:

$ java -p target/modules -m
poiooxmljpmsbroken/com.codebangusllc.poiooxmljpmsbroken.Main
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
target/modules/batik-script-1.13.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class
org.apache.batik.bridge.RhinoInterpreterFactory not in module

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #4 from codebangusllc@gmail.com ---
The error message produced by running the NetBeans project is:

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
/home/koppdk/.m2/repository/xalan/xalan/2.7.2/xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class
org.apache.bsf.BSFManager not in module

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65103] Java application cannot launch using JPMS and POI-OOXML 5.0.0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65103

--- Comment #9 from Andreas Beeker <ki...@apache.org> ---
I can reproduce it on IntelliJ. I'm not sure why our junit-tests don't fail ...
yet.

Further reading:
https://stackoverflow.com/questions/54682417/java-11-unable-to-derive-module-descriptor

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org