asmack 経由で XMPP サーバーに接続できましたが、接続後に NullPointerException 警告が表示されます。carets.bks ファイルを raw フォルダーに入れます。この警告は重要ですか?
the logcat show:
java.lang.NullPointerException
at java.io.File.fixSlashes(File.java:185)
at java.io.File.<init>(File.java:134)
at java.io.FileInputStream.<init>(FileInputStream.java:105)
at org.jivesoftware.smack.ServerTrustManager.<init>(ServerTrustManager.java:62)
at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:839)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:268)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:71)
this is my connection :
configure(ProviderManager.getInstance());
config = new ConnectionConfiguration(server, port);
config.setCompressionEnabled(true);
config.setSecurityMode(SecurityMode.enabled);
config.setSASLAuthenticationEnabled(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
config.setTruststoreType("AndroidCAStore");
config.setTruststorePassword(null);
config.setTruststorePath(null);
} else {
config.setTruststoreType("BKS");
String path = System.getProperty("javax.net.ssl.trustStore");
path = System.getProperty("java.home") + File.separator + "etc"
+ File.separator + "security" + File.separator
+ "cacerts.bks";
config.setTruststorePath(path);
}
connection = new XMPPConnection(config);
connection.connect();