Skip to content

InvalidPathException thrown when parsing typeAliases elements using package as sub-tag #1974

@akamonk

Description

@akamonk

MyBatis version

3.5.4

Database vendor and version

MySQL v8.0.20

JDK version and OS

v9.0.1 & MacOS

Test case or example project

https://github.com/akamonk/mybatis-demo

Steps to reproduce

Use JDK9 as the running environment to build a named module. the module-info.java like as follows:

open module mybatis.demo {
    requires org.mybatis;
    requires java.sql;
}

When configuring, use package as a sub-tag of typeAliases tag.

<typeAliases>
      <package name="com.xxx.xxx.entity" />  
</typeAliases>

then, build the SqlSessionFactory. When parsing the typeAliases element, an InvalidPathException was thrown.

My attempt:

When I removed module-info.java from the module, I got the expected result.

Expected result

Successfully constructed SqlSessionFactory

Actual result

InvalidPathException thrown

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions