i was trying out this example authentication code from ORacle. The only thing I change is the logincontext
try {
lc = new LoginContext("SampleConfig", new TextCallbackHandler());
}
my jaas.conf file looks like this
SampleConfig {
com.sun.security.auth.module.Krb5LoginModule required client=true useTicketCache=false;
};
I put the conf file together with the class. However when i run it, it gives me this error
C:\AnotherDirectory> java -Djava.security.krb5.realm=corp.example.com -Djava.s
ecurity.krb5.kdc=corp.example.com -Djava.security.auth.login.config=jaas.conf JaasAcn
at JaasAcn.main(JaasAcn.java:37)
Caused by: java.net.UnknownHostException: corp.example.com
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at sun.security.krb5.internal.UDPClient.<init>(Unknown Source)
at sun.security.krb5.internal.NetClient.getInstance(Unknown Source)
at sun.security.krb5.KdcComm$KdcCommunication.run(Unknown Source)
at sun.security.krb5.KdcComm$KdcCommunication.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KrbAsReqBuilder.send(Unknown Source)
at sun.security.krb5.KrbAsReqBuilder.action(Unknown Source)
I am running a test AD in a VBox Host only adaptor. I guess I did not set up the AD properly. So I use the actual IP address (IPv4) instead.
C:\AnotherDirectory>java -Djava.security.krb5.realm=192.168.56.101 -Djava.secu
rity.krb5.kdc=192.168.56.101 -Djava.security.auth.login.config=jaas.config JaasAcn
Kerberos username [Administrator]: dorothy
Kerberos password for dorothy:
javax.security.auth.login.LoginException: null (68)
at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Unknown Source)
at com.sun.security.auth.module.Krb5LoginModule.login(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.invoke(Unknown Source)
at javax.security.auth.login.LoginContext.access$000(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at javax.security.auth.login.LoginContext$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
at javax.security.auth.login.LoginContext.login(Unknown Source)
at JaasAcn.main(JaasAcn.java:37)
Caused by: KrbException: null (68)
at sun.security.krb5.KrbAsRep.<init>(Unknown Source)
at sun.security.krb5.KrbAsReqBuilder.send(Unknown Source)
at sun.security.krb5.KrbAsReqBuilder.action(Unknown Source)
... 14 more
Caused by: KrbException: Identifier doesn't match expected value (906)
at sun.security.krb5.internal.KDCRep.init(Unknown Source)
at sun.security.krb5.internal.ASRep.init(Unknown Source)
at sun.security.krb5.internal.ASRep.<init>(Unknown Source)
... 17 more
class sun.security.krb5.KrbException
dorothy is a normal test user that I created using "Active Directory Users and Computers". Does this account need to be "Administrator" because the prompt says [Administrator]? I have also ticked the "Use Kerberos DES Encryption types" and also the AES 128, 256 support in the user profile.
This is my AD (win 2008 server) setup
C:\> ksetup
default realm = corp.example.com (NT Domain)
No user mappings defined.
How to solve this? I am guessing this is a AD config problem and not with JAas? thanks
Related
My previous question was deleted here because it was considered as duplicate. I say it's not because the answers were about java itself while mine is about charles proxy and those answers didn't resolve my problem.
I had installed jdk-17.0.1 and jre1.8.0_311 on my machine when I tried to open charles proxy 4.6.2 on double click but nothing happened, the application didn't start. I try to open via command prompt by typing Charles.exe and this error is shown
java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge
at java.desktop/java.awt.Toolkit.newAWTError(Unknown Source)
at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Unknown Source)
at de.sciss.syntaxpane.DefaultSyntaxKit.<clinit>(DefaultSyntaxKit.java:105)
at com.xk72.charles.gui.lib.UIUtils.<clinit>(Unknown Source)
at com.xk72.charles.gui.s.h(Unknown Source)
at com.xk72.charles.gui.Main.c(Unknown Source)
at com.xk72.charles.Main.b(Unknown Source)
at com.xk72.charles.gui.Main.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.xk72.lib.a.a(Unknown Source)
at com.xk72.charles.gui.MainWithClassLoader.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.java.accessibility.AccessBridge
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
... 24 more
I'm using Windows 10 64bit. %JAVA_HOME% is also setup
For me going to C:\Users\my account\.accessibility.properties and commenting out every line by adding a # a front of it worked.(I at least don't need the accessibility)
Found this solution at: Exception in thread "main" java.awt.AWTError: Assistive Technology not found
I am trying to implement the RangeSlider class in a program, however, I am receiving the following error:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalAccessError: class impl.org.controlsfx.behavior.RangeSliderBehavior (in unnamed module #0x74bf073e) cannot access class com.sun.javafx.scene.control.inputmap.InputMap$Mapping (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.inputmap to unnamed module #0x74bf073e
at impl.org.controlsfx.behavior.RangeSliderBehavior.<init>(RangeSliderBehavior.java:67)
at impl.org.controlsfx.skin.RangeSliderSkin.<init>(RangeSliderSkin.java:95)
at org.controlsfx.control.RangeSlider.createDefaultSkin(RangeSlider.java:194)
at javafx.controls/javafx.scene.control.Control.doProcessCSS(Unknown Source)
at javafx.controls/javafx.scene.control.Control.access$000(Unknown Source)
at javafx.controls/javafx.scene.control.Control$1.doProcessCSS(Unknown Source)
at javafx.controls/com.sun.javafx.scene.control.ControlHelper.processCSSImpl(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.doProcessCSS(Unknown Source)
at javafx.graphics/javafx.scene.Parent.access$400(Unknown Source)
at javafx.graphics/javafx.scene.Parent$1.doProcessCSS(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.ParentHelper.processCSSImpl(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.NodeHelper.processCSS(Unknown Source)
at javafx.graphics/javafx.scene.Node.processCSS(Unknown Source)
at javafx.graphics/javafx.scene.Scene.doCSSPass(Unknown Source)
at javafx.graphics/javafx.scene.Scene.preferredSize(Unknown Source)
at javafx.graphics/javafx.scene.Scene$2.preferredSize(Unknown Source)
at javafx.graphics/com.sun.javafx.scene.SceneHelper.preferredSize(Unknown Source)
at javafx.graphics/javafx.stage.Window$12.invalidated(Unknown Source)
at javafx.base/javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
at javafx.base/javafx.beans.property.BooleanPropertyBase.set(Unknown Source)
at javafx.graphics/javafx.stage.Window.setShowing(Unknown Source)
at javafx.graphics/javafx.stage.Window.show(Unknown Source)
at javafx.graphics/javafx.stage.Stage.show(Unknown Source)
at minimalist.DoubleSliderInterface.start(DoubleSliderInterface.java:104)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
... 1 more
Exception running application minimalist.DoubleSliderInterface
I am using ControlsFX version 9.0.0 while running Java 10 on Eclipse, however, I believe I can rule out incompatibility with the Java version as I also tried running this on Java 9.0.4 and as well was able to successfully run the Rating class.
My code is just a number of instances of the following, succeeded by a VBox to contain them, a group, and the scene and stage as is normal-
final RangeSlider blur = new RangeSlider(0,30,0,30);
Text blurTitle = new Text("Blur");
Text blurMin = new Text();
blurMin.textProperty().bindBidirectional(blur.lowValueProperty(),converter);
Text blurMax = new Text();
blurMax.textProperty().bindBidirectional(blur.highValueProperty(),converter);
HBox blurBox = new HBox();
blurBox.getChildren().addAll(blurMin,blur,blurMax);
blurBox.setPadding(new Insets(5));
blurBox.setSpacing(10);
Any help is appreciated, thanks.
Adding --add-exports=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED to your VM arguments when running the application will resolve the issue. Answer thanks to #kleopatra
There is already a bug report on their bitbucket page. It looks like it's just not compatible with java9+
https://bitbucket.org/controlsfx/controlsfx/issues/802/rangeslider-uses-inaccessable-package
I didn't read the code of this specific control but you might be able to copy the code you need and remove the part that uses the InputMap related classes.
Other than that you are probably better off downgrading to java8 or using another ui element to mimic similar behavior.
I'm trying to connect my app to Facebook API, but I get following Exception when I execute the code:
Exception in thread "main" com.restfb.exception.FacebookNetworkException: A network error occurred while trying to communicate with Facebook: Facebook request failed (HTTP status code null)
at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1024)
at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:952)
at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:914)
at com.restfb.DefaultFacebookClient.fetchObject(DefaultFacebookClient.java:392)
at Test.main(Test.java:18)
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at javax.net.ssl.DefaultSSLSocketFactory.throwException(Unknown Source)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.createSocket(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at com.restfb.DefaultWebRequestor.execute(DefaultWebRequestor.java:374)
at com.restfb.DefaultWebRequestor.executeGet(DefaultWebRequestor.java:96)
at com.restfb.DefaultFacebookClient$3.makeRequest(DefaultFacebookClient.java:965)
at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1022)
... 4 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
at java.security.Provider$Service.newInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getInstance(Unknown Source)
at javax.net.ssl.SSLContext.getDefault(Unknown Source)
at javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(Unknown Source)
at javax.net.ssl.HttpsURLConnection.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(Unknown Source)
at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
at sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at com.restfb.DefaultWebRequestor.openConnection(DefaultWebRequestor.java:219)
at com.restfb.DefaultWebRequestor.execute(DefaultWebRequestor.java:365)
... 7 more
Caused by: java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
at sun.security.provider.KeyStoreDelegator.engineLoad(Unknown Source)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(Unknown Source)
at java.security.KeyStore.load(Unknown Source)
at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultTrustManager(Unknown Source)
at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
... 21 more
I think it's important to mention that I was getting the same exception when trying to run code with facebook4j.
I spent a lot of time trying to figure out, and I'm really stuck.
Code for the test class:
import com.restfb.DefaultFacebookClient;
import com.restfb.FacebookClient;
import com.restfb.Version;
import com.restfb.types.User;
public class Test {
public Test() {
}
public static void main(String[] args) {
String accessToken = "******";
FacebookClient fc = new DefaultFacebookClient(accessToken, Version.UNVERSIONED); // Setting version has no effect
User me = fc.fetchObject("me", User.class);
System.out.println(me.getFirstName());
System.out.println(me.getLanguages());
}
}
Ok, I tried to run the code on different machine, and it comes out that there was an issue with setup of development enviroment.
I had JRE 1.6 which was updated to 1.8.0_31. After this update my applet has stopped working and I am getting below error
java.lang.ExceptionInInitializerError
at com.sun.deploy.net.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: sun.security.ssl.X509TrustManagerImpl cannot be cast to com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager
at com.sun.deploy.security.X509ExtendedDeployTrustManager.<init>(Unknown Source)
at com.sun.deploy.net.protocol.https.Handler$Initializer$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.net.protocol.https.Handler$Initializer.<clinit>(Unknown Source)
... 29 more
Exception: java.lang.ExceptionInInitializerError
java.lang.NoClassDefFoundError: Could not initialize class com.sun.deploy.net.protocol.https.Handler$Initializer
at com.sun.deploy.net.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NoClassDefFoundError: Could not initialize class com.sun.deploy.net.protocol.https.Handler$Initializer
I am using Jboss server and the server.xml file has been updated to use the correct Keystore and certificate using SSL.
I have added the https site which I am trying to access in the exception list of both the browser and JAVA control Panel. Cleared the cache of both and have also deleted the user certificate to ensure the latest certificate gets downloaded.
Kindly help to know the resolution steps.
I was able to remove the above issue by unchecking and checking back the "Enable java content on browser" check box in the java control panel.
Still I am facing issues when the application is used by external set of users.
I observe that there are 2 sets of exceptions
1. Connection timeout
2. Class not getting loaded
All these issues started only after downloading JRE version 1.8.0_31-b13
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter#195fb2b
security: Expected Main URL: https://www.VVV/GFH/SecurityApplet.jar
basic: Plugin2ClassLoader.addURL parent called for https://VVV/GFH/SecurityApplet.jar
network: Cache entry found [url: https://VVV/GFH/SecurityApplet.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: https://VVV/GFH/SecurityApplet.jar
cache: Resource https://VVV/GFH/SecurityApplet.jar has expired.
cache: Resource https://VVV/GFH/SecurityApplet.jar has cache control: no-cache.
network: Connecting https://VVV/GFH/SecurityApplet.jar with proxy=DIRECT
network: Cache entry not found [url: file:/D:/Program%20Files/Java/lib/ext/sunec.jar, version: null]
network: Cache entry not found [url: file:/D:/Program%20Files/Java/lib/ext/sunjce_provider.jar, version: null]
network: Connecting http://VVV:443/ with proxy=DIRECT
network: Connecting https://VVV/GFH/SecurityApplet.jar with proxy=DIRECT
network: Connecting http:/VVV:443/ with proxy=DIRECT
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
Also getting class not found as below
basic: load: class com/cosl/security/GHB/api/MACApplet.class not found.
java.lang.ClassNotFoundException: com.cosl.security.GHB.api.MACApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.ClassNotFoundException: com.cosl.security.armor4c.api.MACApplet.class
basic: Dialog type is not candidate for embedding
security: Reset deny session certificate store
Any help on these is appreciated. Am stuck on this issue since 3 -4 weeks and there is no solution available anywhere
Have you verified your certificate for any junk chars? This seems to be a certificate error.
I'm running into an issue with my applet. It's supposed to take a url and parse the html there to construct an image. I've gotten it to work on my eclipse debugger. However, when I try to use it on a web browser I get an AccessControlException. I'm using the jEditorPane.setPage(url) method. Currently both the applet and url are hosted on my localhost and I did self sign the applet.
java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:80 connect,resolve)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at javax.swing.JEditorPane.getStream(Unknown Source)
at javax.swing.JEditorPane.setPage(Unknown Source)
at javax.swing.JEditorPane.setPage(Unknown Source)
at com.mindbody.printer.PrinterApplet.print(PrinterApplet.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MethodInfo.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MemberBundle.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke0(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$DefaultInvocationDelegate.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
An unsigned applet is only allowed to connect to the host it came from. And even for signed applets, in methods invoked from code less trusted (like the javascript code here), it has only the rights of this code (or more exactly, the intersection of all rights).
To be able to do everything for which your applet has the rights, wrap your rights-needing code with AccessController.doPrivileged(...). (But make sure that this can not do dangerous things when given malicious arguments from outside.)