issue deriving automatic module name
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 4 13:07:03 UTC 2017
On 03/10/2017 17:44, Paul Bakker wrote:
> Hi,
>
> I ran into an issue testing some migration scenarios. When using jboss-transaction-api_1.2_spec-1.0.1.Final.jar as an automatic module, startup fails with:
>
> Caused by: java.lang.IllegalArgumentException: jboss.transaction.api.1.2.spec: Invalid module name: '1' is not a Java identifier
>
> This is clearly a strange JAR name, and can be fixed by providing a module name, but it should probably not prevent startup.
>
I assume you've put this JAR file on the module path because some code
in an automatic module has references to classes in this JAR file. So
catching this at startup seem right, you will otherwise risk a failure
at runtime (NoClassDefFoundError) if the module system were to ignore
the oddly named JAR file.
As an aside, the contents of this JAR file are also problematic because
it contains classes from the java.transaction and java.sql modules. This
is something that we hope the owners of the Java Transaction API JSR
will resolve soon, maybe by splitting the spec into two so that Java SE
can define a java.transaction.xa module (in conjunction with jettisoning
the java.transaction module from Java SE and the JDK).
-Alan
More information about the jigsaw-dev
mailing list