Ich versuche gerade über die smack api auf einen Chatserver über JSF auf einem Jboss zuzugreifen. Als ich dann die funktionierende Anwendung als Beans umbauen wollte, kam dieser Fehler. Als Java SE Anwendung funktioniert alles.
Gibt es da irgendwelche Lösungsansätze?
Gibt es da irgendwelche Lösungsansätze?
Code:
00:05:39,052 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) java.security.NoSuchAlgorithmException: Algorithm TLS not available
00:05:39,053 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at com.sun.net.ssl.b.a([DashoPro-V1.2-120198])
00:05:39,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at com.sun.net.ssl.SSLContext.getInstance([DashoPro-V1.2-120198])
00:05:39,054 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jivesoftware.smack.SSLXMPPConnection$DummySSLSocketFactory.<init>(SSLXMPPConnection.java:94)
00:05:39,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jivesoftware.smack.SSLXMPPConnection.<clinit>(SSLXMPPConnection.java:43)
00:05:39,055 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at com.eichler.javaee6.lolchat.ViewController.init(ViewController.java:53)
00:05:39,056 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
00:05:39,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
00:05:39,057 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
00:05:39,058 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at java.lang.reflect.Method.invoke(Method.java:601)
00:05:39,058 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)
00:05:39,059 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
00:05:39,060 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
00:05:39,060 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
00:05:39,061 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:106)
00:05:39,062 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
00:05:39,063 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
.... und noch die anderen Jbossexcptionsweitergaben
Java:
private static class DummySSLSocketFactory extends SSLSocketFactory {
private SSLSocketFactory factory;
public DummySSLSocketFactory() {
try {
SSLContext sslcontent = SSLContext.getInstance("TLS"); // <-- Fehlerstelle
sslcontent.init(null, // KeyManager not required
new TrustManager[] { new DummyTrustManager() },
new java.security.SecureRandom());
factory = sslcontent.getSocketFactory();
}
catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
catch (KeyManagementException e) {
e.printStackTrace();
}
}