Skip to content
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

Init WeixinPayProxy failed #154

Closed
sutra opened this issue Jun 25, 2018 · 2 comments
Closed

Init WeixinPayProxy failed #154

sutra opened this issue Jun 25, 2018 · 2 comments

Comments

@sutra
Copy link
Collaborator

sutra commented Jun 25, 2018

Version 1.8.0

package com.oxerr.sandbox.weixin4j;

import com.foxinmy.weixin4j.payment.WeixinPayProxy;

public class WeixinPayProxyDemo {

	public static void main(String[] args) {
		// WeixinPayProxy wpp = new WeixinPayProxy();
		System.out.println(WeixinPayProxy.VERSION);
	}

}

Exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.foxinmy.weixin4j.payment.WeixinPayProxy.<clinit>(WeixinPayProxy.java:846)
	at com.oxerr.sandbox.weixin4j.WeixinPayProxyDemo.main(WeixinPayProxyDemo.java:9)
Caused by: java.lang.NullPointerException
	at java.util.Properties$LineReader.readLine(Properties.java:434)
	at java.util.Properties.load0(Properties.java:353)
	at java.util.Properties.load(Properties.java:341)
	at com.foxinmy.weixin4j.util.Consts.loadProperties(Consts.java:23)
	at com.foxinmy.weixin4j.util.Consts.<clinit>(Consts.java:32)
	... 2 more
@sutra
Copy link
Collaborator Author

sutra commented Jun 25, 2018

这个问题只在 weixin4j 以 jar 的形式引入时才会发生,如果是解压缩状态的 classes 则不会发生。

foxinmy added a commit that referenced this issue Jun 25, 2018
Fix Consts.loadProperties. Fixes #154.
@sutra
Copy link
Collaborator Author

sutra commented Jun 26, 2018

By the way, this issue is introduced in #150

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

1 participant