Skip to content

2.1.3.RELEASE 版本,打成jar包不可用导入功能不可用 #899

@baolongcheng

Description

@baolongcheng
版本号:

2.1.3.RELEASE

问题描述:

打成jar包后导入功能使用异常,报空指针异常。不打包本机运行正常。
依赖的auto-poi的版本为1.0.4

截图&代码:

查看源码后, 发现问题是在PoiPublicUtil.class.getClassLoader().getResource("") 在打包后返回null。
image

在打包后运行结果

image

而在导入功能中有一处调用org.jeecgframework.poi.util.PoiPublicUtil#getWebRootPath
这个方法。
image

友情提示: 未按格式要求发帖,会直接删掉。

Activity

zhangdaiscott

zhangdaiscott commented on Feb 10, 2020

@zhangdaiscott
Member

你怎么部署的?这块特意改过,应该不会有问题了

zhangdaiscott

zhangdaiscott commented on Feb 10, 2020

@zhangdaiscott
Member

你把依赖升级到这个版本试试

<dependency>
	<groupId>org.jeecgframework</groupId>
	<artifactId>autopoi-web</artifactId>
	<version>1.0.5</version>
	<exclusions>
		<exclusion>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</exclusion>
	</exclusions>
</dependency>
zhangdaiscott

zhangdaiscott commented on Feb 17, 2020

@zhangdaiscott
Member

经过测试 centos下 jar包部署不存在问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zhangdaiscott@baolongcheng

        Issue actions

          2.1.3.RELEASE 版本,打成jar包不可用导入功能不可用 · Issue #899 · jeecgboot/JeecgBoot