Skip to content

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

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

Closed
baolongcheng opened this issue Jan 19, 2020 · 3 comments
Closed

Comments

@baolongcheng
Copy link

版本号:

2.1.3.RELEASE

问题描述:

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

截图&代码:

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

在打包后运行结果

image

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

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

@zhangdaiscott
Copy link
Member

zhangdaiscott commented Feb 10, 2020

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

@zhangdaiscott
Copy link
Member

zhangdaiscott commented Feb 10, 2020

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

<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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants