NullPointerException at sun.applet.AppletPanel.findAppletJDKLevel
Hi,
we have a online HTML page containing an <applet> and different <iframe> definitions. By clicking a HTML link or calling Applet.getAppletContext().showDocument(), other HTML pages containing other applets are loaded into the referenced frame. All applets have identical archive and codebase attributes, allowing them to communicate with each other.
This works actually very well. The problem is that sometimes newly loaded applets do not start, and a red cross appears in the inner frame. In all cases, the following exception appears in the java console (which does not happen if everything works fine):
java.lang.NullPointerException
at sun.applet.AppletPanel.findAppletJDKLevel(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
We experienced this on customer clients using
- Windows XP or Vista
- SUN Java 1.6 (e.g. Java 1.6.0_02), Java 1.5 worked so far
- Firefox2, IE6, IE7
Any ideas?
We use the JarIndex mechanism to enable dynamical class loading, could that cause problems?
After installing JRE1.6.0_02, the problem occured now as well, but didn't occur under the previously JRE1.5.0_07 version.
For me, it seems to be some classloader related timing problem and occurs even in the following scenario:
I have a main frame m, containing an inner frame a with applet A and an empty inner frame b.
1. at startup, A gets loaded into a. A starts well.
2. A loads a second Applet B via <applet> into b. B starts well.
3. Click HTML button within m loads a third Applet C via <applet> into b. Using Java 1.6, B does sometimes not start (see first post)
4. Click HTML button within m loads B via <applet> into b. This works.
5. Click HTML button within m loads C via <applet> into b. This works sometimes, sometimes not.
So, the class needed at that moment (whatever that is) is actually available but cannot be loaded properly at first start for some reason.
As said before, codebase and archive tags are exactly the same. Javascript is not used at all. I couldn't set up a test environment to simulate this effect, so I'm sorry that I couldn't supply any code example.
Does anyone could give me a hint please?
Similar Messages
-
What does this mean?
java.lang.NoSuchMethodError:sun.applet.AppletPanel.changeFrameAppContext(Ljava/awt/Frame;Lsun/awt/AppContext;)V
at sun.plugin.viewer.IExplorerPluginObject.appletStateChanged(Unknown Source)
at sun.applet.AppletEventMulticaster.appletStateChanged(AppletEventMulticaster.java:32)
at sun.applet.AppletPanel.dispatchAppletEvent(AppletPanel.java:233)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:532)
at sun.applet.AppletPanel.run(AppletPanel.java:293)
at java.lang.Thread.run(Thread.java:536)
and where does it occur?
thanks in advance, ulrichI've started seeing this as well since installing 1.4.2. Anyone have any ideas on this?
What does this mean?
java.lang.NoSuchMethodError:sun.applet.AppletPanel.chan
eFrameAppContext(Ljava/awt/Frame;Lsun/awt/AppContext;)V
at
sun.plugin.viewer.IExplorerPluginObject.appletStateCha
ged(Unknown Source)
at
sun.applet.AppletEventMulticaster.appletStateChanged(A
pletEventMulticaster.java:32)
at
sun.applet.AppletPanel.dispatchAppletEvent(AppletPanel
java:233)
at
sun.applet.AppletPanel.runLoader(AppletPanel.java:532)
at sun.applet.AppletPanel.run(AppletPanel.java:293)
at java.lang.Thread.run(Thread.java:536)
and where does it occur?
thanks in advance, ulrich -
When I am loading my applet in the browser, sun.applet.appletPanel.run() function is invoked 2 times according to JProfiler.
How can we solve this problem to reduce the number of calls to one???
TIA
AshishAnyone having slightest of idea about this problem please reply....
-
We upgraded to the latest JRE and when we go to our website which has an unsigned applet and I answer Yes to trust it, the applet never runs.
I turned on debugging in the java console and see this after the certificate negotiation stuff is sent bck and forth:
security: Certificate has failed the verification with the SSL Root CA certificates
security: Invalid certificate from HTTPS server
java.lang.NullPointerException
at com.sun.deploy.ui.UIFactory.showSecurityDialog(Unknown Source)
at com.sun.deploy.security.TrustDeciderDialog.showDialog(Unknown Source)
at com.sun.deploy.security.X509ExtendedDeployTrustManager.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(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 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 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 java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
security: Adding certificate in Deployment denied certificate store
security: Added certificate in Deployment denied certificate store
For another person at same IE level and JRE level it works fine and debug for that shows:
security: Certificate has failed the verification with the Internet Explorer ROOT certificates
security: Invalid certificate from HTTPS server
security: Adding certificate in Deployment session certificate store
security: Added certificate in Deployment session certificate store
security: Saving certificates in Deployment session certificate store
security: Saved certificates in Deployment session certificate store
Is there something wrong with the "Deployment session certificate store" in the first instance? Treid un/reinstalling the JRE but it didn;t fix things.Regenerate what certificate? The applet is unsigned.
Plus other people with the same IE level and same JRE level do not have this problem, which leads me to think it is something specific to this user, like maybe the deployment session certificate store. Is that a file someplace we can like delete to start clean?
Edited by: Jim_does_java on Oct 1, 2007 4:56 AM -
i Signed applet as
keytool -genkey -keyalg rsa -alias TradeCast
keytool -export -alias TradeCast -file TradeCastCert.crt
jarsigner "CatalystDockingApplet.jar" TradeCast lib*but got some exception
java.lang.NullPointerException
at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(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.NullPointerException
where am i wrong?You are likely missing a class file that in your jar file.
I had a similar situation and found that the new "next-generation" java plugin does not report NoClassDefFoundError, but instead reports findAppletJDKLevel.
To see if you are missing class files, do the following:
1) Close all browsers, ensuring that there are no plugin coffee cup icons in the Windows taskbar.
2) Open the Java Control panel (Start->Control Panel->Java).
2.5) On the General tab, clear cache by clicking Settings..., Delete Files..., OK.
3) Open the Advanced tab.
4) Expand the Java Plug-in tree option.
5) Ensure that the "Enable the next-generation Java Plug-in" option is NOT checked and click OK.
6) Visit your page again.
7) View the java console stacktrace. It should include NoClassDefFoundError error message.
8) Add the missing classes to your jar file. -
Sun.applet.AppletViewer vs. appletviewer
What's the difference between sun.applet.AppletViewer and just plain appletviewer. I recently had a problem with sun.applet.AppletViewer and I just wondered what the difference between the two is. I've looked around on the forum and conducted a search on the java.sun.com website. I can't really find any documentation on sun.applet.AppletViewer.
Thanks,
LisaI presume that they are the same? i.e. sun.applet.AppletViewer is the class that is used when you run appletviewer
How come you're using sun.applet.AppletViewer anyway if there's no docs for it? :) -
How to find sun/applet/AppletViewer class?
Hello, everyone,
I have successfully deployed Form Server Applications in several
ways as following:
1. Using Jinitiator 1.1.7.11 plug in to run Forms inside Web
browser in Windows 98 OS &IE4.0 SP1.
2. In Windows 98 OS DOS Command prompt line,using Appletviewer
to run remote NT
Server's Forms application with format: C:\>Appletview
http://appserver:9999/webhtml/example.html. The
form runs smoothly in a AppletViewer window.
3. In NT4.0 OS SP3, run form inside IE4.0 SP1 browser without
Jinitiator 1.1.7.11 plug in program, but I
must set CLASSPATH Env variable including
C:\ORANT\JDK\LIB\CLASSES.ZIP & C:\ORANT\FORMS60\JAVA, or else
the error message shows: class no found:sun/applet/appletviewer.
But I even encounter some problem:
1. In the above first way, jinit.exe(Jinitiator 1.1.7.11
version) can not run in my NT4.0 SP3 OS. So the
above first way of running Form can only succeed in my Windows98
OS. Has anybody installed jinit.exe
successfully in NT4.0 SP3?
2. In the above third way, I try to run Form inside my IE4.0 SP1
in Windows98 OS. I tried to set the
CLASSPATH correctly as above describled, but I failed. I always
got the above mentioned error message. I
don't know why in windows98 the appletviewer class can not be
found but in NT it can.
Anyone can help me out? Thanks in advance.
Robby
nullbut problem is:
the class name is a string "JFrame", which is
how to solve the problem?It is simply not possible.
If you have javax.swing.JFrame, you can use Class.forName(). But then you've already got the package.
Beyond that, if you've ever decompiled code, you'd have seen that import statements don't exist in bytecode and all class references are by their full names. There is no facility in java to get the list of loaded classes, or to search for a class this way -
Blank TOC with a red "X" / Java errors
Everyone,
I've been asked to troubleshoot a problem with a build,
actually a series of builds in a WebHelp project, built in RH X5 on
Windows XP.
The project contains about 7 different builds, with
conditional expressions (LOTS of them) in each one. The builds
displayed correctly at one time, but they don't now. I had to dig
through an archive folder and went back to September 2006 to find a
build that displayed correctly. I'm doing more research on that,
but that's another issue.
Anyway, when opened any output created in 2007 or 2008, the
TOC pane displays a red "X", that, when clicked on, displays a
"Java Console" option, which in turn lists the following errors
when the build is viewed through Internet Explorer 6, service pack
2:
java.lang.NullPointerException
at sun.applet.AppletPanel.findAppletJDKLevel(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-4" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown
Source)
at sun.plugin.AppletViewer.showAppletException(Unknown
Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown
Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I'm not able to view the Index or Search - the build is
"frozen" on this blank TOC pane with the starting topic. In
Firefox, the TOC is fine, but the Index and Search display "weird"
I tried rebuilding the output on my PC, with the same result.
I even closed the project, deleted the CPD file, reopened the
project, got the same result. I even deleted all of the subfolders
under SSL, then regenerated one of the corrupted outputs - same
result. I have NO problems creating new help projects on my own PC,
I just can't seem to do anything (or properly view) this help
project's output.
I'm thinking it's an issue with IE (maybe Java?), but the
last time we stated that theory to our support organization, they
ignored us and gave us a band aid solution. My Java runtime is
1.5.0_06 but other people have 1.5.0_11 and they have the same
issue - they all see the red "X".
Any help would be greatly appreciated.
Thanks,
JimFirst let's try to see if Flash Player is correctly installed.
When you go to this site http://www.adobe.com/software/flash/about/ - can you see the Flash animation? -
JavaApplets dont work offline in IE6 (security issues)
I try to run this applet offline in IE but it doesn't work (red x). It works when being online but thats no choice.
Applet:
http://www.videohelp.com/calc.htm
You can download an offline version below the applet.
Anyone know what's wrong? It did work some time ago so i think it has something to do with ms security updates.
Console log:
java.lang.NullPointerException
at sun.applet.AppletPanel.findAppletJDKLevel(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-9" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-BitrateCalc.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)This error java.lang.NullPointerException is thrown when an application attempts to use null in a case where an object is required. These include:
Calling the instance method of a null object.
Accessing or modifying the field of a null object.
Taking the length of null as if it were an array.
Accessing or modifying the slots of null as if it were an array.
Throwing null as if it were a Throwable value.
It has nothing to do with security - it's a code error. -
I am suddenly having poblems entering a chat room. My java console contains:
Java(TM) Plug-in: Version 1.4.1_02
Using JRE version 1.4.1_02 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Beth
Proxy Configuration: No proxy
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
java.net.UnknownHostException: www.wikked.us
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.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.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.net.protocol.http.HttpUtils.followRedirects(Unknown Source)
at sun.plugin.cache.CachedJarLoader.download(Unknown Source)
at sun.plugin.cache.CachedJarLoader.load(Unknown Source)
at sun.plugin.cache.JarCache.get(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(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 java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class ConferenceRoom.class not found.
java.lang.ClassNotFoundException: ConferenceRoom.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.wikked.us
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.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.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 11 more
java.net.UnknownHostException: www.wikked.us
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.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.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.net.protocol.http.HttpUtils.followRedirects(Unknown Source)
at sun.plugin.cache.CachedJarLoader.download(Unknown Source)
at sun.plugin.cache.CachedJarLoader.load(Unknown Source)
at sun.plugin.cache.JarCache.get(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(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 java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
load: class ConferenceRoom.class not found.
java.lang.ClassNotFoundException: ConferenceRoom.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.wikked.us
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.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.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.privBlock(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection$PrivilegedBlockAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 11 more
TestVM 2.3 kc
Copyright (c) 2004 Sun Microsystems, Inc.
All Rights Reserved.
java.lang.NullPointerException
at sun.plugin.viewer.context.IExplorerAppletContext.getJSObject(Unknown Source)
at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
at sun.plugin.AppletViewer.appletInit(Unknown Source)
at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.viewer.context.IExplorerAppletContext.getJSObject(Unknown Source)
at sun.plugin.AppletViewer.getDocumentBase(Unknown Source)
at sun.plugin.AppletViewer.getCodeBase(Unknown Source)
at sun.plugin.AppletViewer.appletInit(Unknown Source)
at sun.plugin.viewer.LifeCycleManager.initAppletPanel(Unknown Source)
at sun.plugin.viewer.IExplorerPluginObject$Initer.run(Unknown Source)
java.lang.NullPointerException
at sun.applet.AppletPanel.appletResize(Unknown Source)
at sun.plugin.viewer.frame.IExplorerEmbeddedFrame$3.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Can someone tell me what's wrong?I've managed to get the second applet to load by changing the deployment of the class files. Here's what I did.
As indicated above, the LoaderApplet is in the default package as deployed outside of any jar file. The applet that it loads by class name is in a jar file in that same directory. Under 1.5 and previous, this second applet class file was located no problems. Under 1.6, the classloader doesn't find it.
However, I extracted the jar file into the directory structure and now it loads fine.
Why would something like this be different across the Java versions? -
Firefox & openJDK && applets problem
Latest Firefox & latest openJDK7 & icedtea-web-java7
Starting Firefox form console and open URL with java applet in console appears errors:
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (ArchLinux build 7.u7_2.3.2-2-i686)
OpenJDK Client VM (build 23.2-b09, mixed mode)
File cannot be launched because offline-allowed tag not specified and system currently offline.
java.lang.NullPointerException
at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
at sun.applet.AppletPanel.run(AppletPanel.java:379)
at java.lang.Thread.run(Thread.java:722)
java.lang.NullPointerException
at sun.applet.AppletPanel.run(AppletPanel.java:429)
at java.lang.Thread.run(Thread.java:722)
and applet won't run with error in Firefox's status bar: "start: applet not initialized"
If replace openJDK7 & icedtea-web-java7 to openJDK6 & icedtea-web still errors:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.4) (ArchLinux-6.b24_1.11.4-1-i686)
OpenJDK Client VM (build 20.0-b12, mixed mode)
File cannot be launched because offline-allowed tag not specified and system currently offline.
java.lang.NullPointerException
at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
at sun.applet.AppletPanel.run(AppletPanel.java:380)
at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
at sun.applet.AppletPanel.run(AppletPanel.java:430)
at java.lang.Thread.run(Thread.java:679)
With jre-7.7 from AUR everything works ok.
Whats wrong with openJDK and icedtea-web ?Try to disable hardware acceleration.
*Edit > Preferences > Advanced > General > Browsing: "Use hardware acceleration when available"
Create a new profile as a test to check if your current profile is causing the problems.
See Basic Troubleshooting: Make a new profile:
*https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
See:
*http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox -
Null pointer Exception on java plug-in , using Mutity language...
hi all :)
I found at plug-in do not suppor Multy language.
for Example...
my operating System is Window XP and log in ID is not English ... like Korean, Chinese etc...
i programmed Web application with Swing Applet(JApplet)... and tested plug-in version 1.2.2 and 1.3.1 and XP plug-in
Plug-in said that like this.
Java(TM) Plug-in: version 1.3.1
JRE version usage 1.3.1 Java HotSpot(TM) Client VM
user home = C:\Documents and Settings\��????��java.lang.NullPointerException java.lang.NullPointerException������ ����:java.lang.NullPointerException������ ����java.lang.NullPointerException java.lang.NullPointerException java.lang.NullPointerException----------------------------------------------------
c: clear console window
f: final queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
q: hide console
s: dump system properties
t: dump thread list
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------java.lang.NullPointerException java.lang.NullPointerExceptionjava.security.PrivilegedActionException: java.lang.NullPointerExceptionjava.io.FileNotFoundException: C:\Documents and Settings\��????��\Local Settings\Temporary Internet Files\Content.IE5\9KENTUKR\graph-a[1].jar (���� ����, �������� ���� ���� ���� ������ ������ ��������)java.lang.NullPointerException java.lang.NullPointerException at java.io.FileInputStream.open(Native Method)
... etc....
this message is plug-in do not download class archive in client System cache... because of VM cannot know user.home directory...
you can find that java plug-in does not support mulity language to see the next sentence.
"user home = C:\Documents and Settings\��????"
in this reason i found a problem in communication JApplet and java-script by using cookies...
How can I solve this problem...( i must use Multi language login ID plz.....)
have a nice day!!!
poemtry ... ^^I have such problems with a russian version Windows 2000....
Java(TM) Plug-in: Version 1.4.0
Using JRE version 1.4.0-beta3 Java HotSpot(TM) Client VM
User home directory = D:\Documents and Settings\?????????????
ava.lang.NullPointerExceptionjava.lang.NullPointerException
java.lang.NullPointerException at sun.plugin.cache.Cache$3.hasMoreElements(Cache.java:306)
java.lang.NullPointerException at sun.plugin.cache.CachedFileLoader$2.run(CachedFileLoader.java:94)
java.lang.NullPointerException at java.security.AccessController.doPrivileged(Native Method)
java.lang.NullPointerException at sun.plugin.cache.Cache.privileged(Cache.java:237)
java.lang.NullPointerException at sun.plugin.cache.CachedFileLoader.getCacheFile(CachedFileLoader.java:86)
java.lang.NullPointerException at sun.plugin.cache.CachedFileLoader.load(CachedFileLoader.java:66)
java.lang.NullPointerException at sun.plugin.cache.FileCache.get(FileCache.java:138)
java.lang.NullPointerException at sun.plugin.net.protocol.http.HttpURLConnection.connectWithCache(HttpURLConnection.java:198)
java.lang.NullPointerException at sun.plugin.net.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:144)
java.lang.NullPointerException at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:290)
java.lang.NullPointerException at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1120)
java.lang.NullPointerException at sun.net.www.protocol.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1134)
java.lang.NullPointerException at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:224)
java.lang.NullPointerException at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:42)
java.lang.NullPointerException at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:143)
java.lang.NullPointerException at java.security.AccessController.doPrivileged(Native Method)
java.lang.NullPointerException at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:140)
java.lang.NullPointerException at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:191)
java.lang.NullPointerException at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
java.lang.NullPointerException at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
java.lang.NullPointerException at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
java.lang.NullPointerException at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:470)
java.lang.NullPointerException at sun.applet.AppletPanel.createApplet(AppletPanel.java:551)
java.lang.NullPointerException at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1610)
java.lang.NullPointerException at sun.applet.AppletPanel.runLoader(AppletPanel.java:480)
java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:293)
java.lang.NullPointerException at java.lang.Thread.run(Thread.java:539)
java.lang.NullPointerExceptionjava.lang.NullPointerException
java.lang.NullPointerException at sun.plugin.cache.Cache$3.hasMoreElements(Cache.java:306)
java.lang.NullPointerException at sun.plugin.cache.CachedJarLoader$4.run(CachedJarLoader.java:212)
java.lang.NullPointerException at java.security.AccessController.doPrivileged(Native Method)
java.lang.NullPointerException at sun.plugin.cache.Cache.privileged(Cache.java:237)
java.lang.NullPointerException at sun.plugin.cache.CachedJarLoader.getCacheFile(CachedJarLoader.java:204)
java.lang.NullPointerException at sun.plugin.cache.CachedJarLoader.<init>(CachedJarLoader.java:81)
java.lang.NullPointerException at sun.plugin.cache.JarCache.get(JarCache.java:170)
java.lang.NullPointerException at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:73)
java.lang.NullPointerException at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(CachedJarURLConnection.java:58)
java.lang.NullPointerException at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:501)
java.lang.NullPointerException at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:462)
java.lang.NullPointerException at sun.misc.URLClassPath$2.run(URLClassPath.java:258)
java.lang.NullPointerException at java.security.AccessController.doPrivileged(Native Method)
java.lang.NullPointerException at sun.misc.URLClassPath.getLoader(URLClassPath.java:247)
java.lang.NullPointerException at sun.misc.URLClassPath.getLoader(URLClassPath.java:224)
java.lang.NullPointerException at sun.misc.URLClassPath.getResource(URLClassPath.java:137)
java.lang.NullPointerException at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
java.lang.NullPointerException at java.security.AccessController.doPrivileged(Native Method)
java.lang.NullPointerException at java.net.URLClassLoader.findClass(URLClassLoader.java:189)
java.lang.NullPointerException at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:134)
java.lang.NullPointerException at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:191)
java.lang.NullPointerException at java.lang.ClassLoader.loadClass(ClassLoader.java:309)
java.lang.NullPointerException at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114)
java.lang.NullPointerException at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
java.lang.NullPointerException at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:470)
java.lang.NullPointerException at sun.applet.AppletPanel.createApplet(AppletPanel.java:551)
java.lang.NullPointerException at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1610)
java.lang.NullPointerException at sun.applet.AppletPanel.runLoader(AppletPanel.java:480)
java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:293)
java.lang.NullPointerException at java.lang.Thread.run(Thread.java:539)
java.lang.NullPointerException
on mainpage http://java.sun.com :-) -
Webutil demo using jinitiator issue
Hello, I am running dev suite 10g, patch 2 on Win 2k. I set up webutil 1.05 (with jacob 1.7, didn't work with jacob 1.9) and the webutil_demo locally, and run it with the config=webutil parameter as described in the documentation. It works except for one thing.
When I hit the run button, the browser starts (IE 6) and just says "Loading Java applet...". Nothing happens unless I press the refresh button, at which point the form opens as expected.
Any ideas?
Thanks,
GaryThanks for your reply! I enabled the console as you mentioned, tried to run my app from the forms 10g IDE. As before it hangs with only "loading java applet" displayed. The console shows a dump of environment variables but no error messages.
I press the refresh button, and get a message from internet explorer stating "the page cannot be refreshed without resending the information. click retry...". The console displays the following:
Registered modality listener
Registered modality listener
Unregistered modality listener
Doing a join...
Done with join ...
Sending events to applet. STOP
Sending events to applet. DESTROY
Sending events to applet. DISPOSE
Sending events to applet. QUIT
java.lang.NullPointerException
at sun.applet.AppletPanel.getAccessControlContext(Unknown Source)
at sun.applet.AppletPanel.getClassLoader(Unknown Source)
at sun.applet.AppletPanel.sendEvent(Unknown Source)
at sun.plugin.AppletViewer.onPrivateClose(Unknown Source)
at sun.plugin.AppletViewer$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Unregistered modality listener
Doing a join...
Done with join ...
Sending events to applet. STOP
Sending events to applet. DESTROY
Sending events to applet. DISPOSE
Sending events to applet. QUIT
java.lang.NullPointerException
at sun.applet.AppletPanel.getAccessControlContext(Unknown Source)
at sun.applet.AppletPanel.getClassLoader(Unknown Source)
at sun.applet.AppletPanel.sendEvent(Unknown Source)
at sun.plugin.AppletViewer.onPrivateClose(Unknown Source)
at sun.plugin.AppletViewer$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
If I go ahead and click retry the app runs as expected.
Any ideas?
Gary -
hi Gurus,
I am using Oracle Developer suite 10g Release 1 (9.0.4). I tried to configure the webutil. I followed the instructions (in the pdf) that came along with the zip file.
But now when I run a from I get a white screen with the message Applet started in the status bar.
The OS is Windows XP Professional Edition.
Can you please help me on this regard?
Thanks.Content of Java Console.
Oracle JInitiator: Version 1.3.1.17
Using JRE version 1.3.1.17-internal Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\bhanat01
Proxy Configuration: Manual Configuration
Proxy: proxynj.liz.com:8080
Proxy Overrides: *.liz.com,<local>
JAR cache enabled
Location: C:\Documents and Settings\bhanat01\Oracle Jar Cache
Maximum size: 50 MB
Compression level: 0
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
q: hide console
s: dump system properties
t: dump thread list
x: clear classloader cache
0-5: set trace level to <n>
---------------------------------------------------- (When loads for the first time it stops here. When I press F5 it continues as follows)
java.lang.NullPointerException
at sun.applet.AppletPanel.getAccessControlContext(Unknown Source)
at sun.applet.AppletPanel.getClassLoader(Unknown Source)
at sun.applet.AppletPanel.sendEvent(Unknown Source)
at sun.plugin.AppletViewer.onPrivateClose(Unknown Source)
at sun.plugin.AppletViewer$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.applet.AppletPanel.getAccessControlContext(Unknown Source)
at sun.applet.AppletPanel.getClassLoader(Unknown Source)
at sun.applet.AppletPanel.sendEvent(Unknown Source)
at sun.plugin.AppletViewer.onPrivateClose(Unknown Source)
at sun.plugin.AppletViewer$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Loading http://wnj2042bhanat01.ds.liz.com:8889/forms90/java/f90all_jinit.jar from JAR cache
Loading http://wnj2042bhanat01.ds.liz.com:8889/forms90/java/frmwebutil.jar from JAR cache
RegisterWebUtil - Loading WebUtil Version 1.0.6
Loading http://wnj2042bhanat01.ds.liz.com:8889/forms90/java/jacob.jar from JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
Forms Applet version is : 9.0.4.0 -
Nullpointerexception in applet...
Hi!
I have got a jsp page and an applet. The jsp page set some parameters for applet, but I cannot access those in the applet, because there is a nullpointer exception in the java console
(line 38 ->
System.out.println(getParameter("__sessionid")==null ? "null" : getParameter("__sessionid"));
Please help me, I can't find where the problem is! Thank You very much!
Viktor
Here are the source:
**************************** JSP **************************************
<HTML>
<HEAD><TITLE>Title of Applet page</TITLE></HEAD>
<BODY>
<APPLET CODE="StartApplet.class" WIDTH=150 HEIGHT=250>
<PARAM NAME="__sessionid" VALUE="<%= request.getSession().getId() %>">
<PARAM NAME="__username" VALUE="<%= request.getRemoteUser() %>">
<PARAM NAME="__principal" VALUE="<%= request.getUserPrincipal().toString() %>">
</APPLET>
</BODY>
</HTML>
***************************** APPLET *************************************
* StartApplet.java
* Created on 2006. szeptember 19., 16:28
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
* @author VHORVATH
public class StartApplet extends javax.swing.JApplet {
String SessionID = new String();
String UserName = new String();
String Principal = new String();
* Creates a new instance of StartApplet
public StartApplet() {
super();
System.out.println("processing();");
processing();
void preProcessing() {
System.out.println(getParameter("__sessionid")==null ? "null" : getParameter("__sessionid"));
System.out.println(getParameter("__username")==null ? "null" : getParameter("__username"));
System.out.println(getParameter("__principal")==null ? "null" : getParameter("__principal"));
SessionID = getParameter("__sessionid");
UserName = getParameter("__username");
Principal = getParameter("__principal");
void processing() {
System.out.println("preProcessing();0");
preProcessing();
try {
ObjectOutputStream oos;
ObjectInputStream ois;
HttpURLConnection uc;
URL servletPath = new URL("http://127.0.0.1:7001/ProgrammaticSecurityWithWebApplications/OwnServlet");
uc = (HttpURLConnection)servletPath.openConnection();
uc.setDoOutput(true);
uc.setDoInput(true);
uc.setUseCaches(false);
uc.setRequestMethod("POST");
uc.addRequestProperty("Cookie", "JSESSIONID="+SessionID);
uc.addRequestProperty("_User", UserName);
uc.addRequestProperty("_Principal", Principal);
oos = new ObjectOutputStream(uc.getOutputStream());
oos.writeObject("k�nya2");
oos.flush();
oos.close();
ois = new ObjectInputStream(uc.getInputStream());
String resp = (String)ois.readObject();
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"A v�lasz:!\n"+resp,"Figyelem!",javax.swing.JOptionPane.INFORMATION_MESSAGE);
catch(IOException ioe) {
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"Hiba a kapcsolatfelv�tel sor�n! (IOException)\n"+ioe.getMessage(),"Figyelem!",javax.swing.JOptionPane.WARNING_MESSAGE);
catch(ClassNotFoundException cnfe) {
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"Hiba a kapcsolatfelv�tel sor�n! (ClassNotFoundException)\n"+cnfe.getMessage(),"Figyelem!",javax.swing.JOptionPane.WARNING_MESSAGE);
****************************** ERROR MESSAGE **************************
java.lang.NullPointerException
at java.applet.Applet.getParameter(Unknown Source)
at StartApplet.preProcessing(StartApplet.java:38)
at StartApplet.processing(StartApplet.java:49)
at StartApplet.<init>(StartApplet.java:33)
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)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-4" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)oh, yeah! Thank you!
but... the applet does not throw exception, but i cannot access the parameter value of jsp page, this line
System.out.println(getParameter("__sessionid")==null ? "null" : getParameter("__sessionid"));
writes this to the output : "null"
hmm...
this is my new code:
* StartApplet.java
* Created on 2006. szeptember 19., 16:28
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
* @author VHORVATH
public class StartApplet extends javax.swing.JApplet {
String SessionID = new String();
String UserName = new String();
String Principal = new String();
* Creates a new instance of StartApplet
public void init() {
System.out.println("preProcessing");
SessionID = new String();
UserName = new String();
Principal = new String();
preProcessing();
public void start() {
//super.start();
System.out.println("processing");
processing();
void preProcessing() {
System.out.println(getParameter("__sessionid")==null ? "null" : getParameter("__sessionid"));
System.out.println(getParameter("__username")==null ? "null" : getParameter("__username"));
System.out.println(getParameter("__principal")==null ? "null" : getParameter("__principal"));
SessionID = getParameter("__sessionid");
UserName = getParameter("__username");
Principal = getParameter("__principal");
void processing() {
try {
ObjectOutputStream oos;
ObjectInputStream ois;
HttpURLConnection uc;
URL servletPath = new URL("http://127.0.0.1:7001/ProgrammaticSecurityWithWebApplications/OwnServlet");
uc = (HttpURLConnection)servletPath.openConnection();
uc.setDoOutput(true);
uc.setDoInput(true);
uc.setUseCaches(false);
uc.setRequestMethod("POST");
uc.addRequestProperty("Cookie", "JSESSIONID="+SessionID);
uc.addRequestProperty("_User", UserName);
uc.addRequestProperty("_Principal", Principal);
oos = new ObjectOutputStream(uc.getOutputStream());
oos.writeObject("k�nya2");
oos.flush();
oos.close();
ois = new ObjectInputStream(uc.getInputStream());
String resp = (String)ois.readObject();
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"A v�lasz:!\n"+resp,"Figyelem!",javax.swing.JOptionPane.INFORMATION_MESSAGE);
catch(IOException ioe) {
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"Hiba a kapcsolatfelv�tel sor�n! (IOException)\n"+ioe.getMessage(),"Figyelem!",javax.swing.JOptionPane.WARNING_MESSAGE);
catch(ClassNotFoundException cnfe) {
javax.swing.JOptionPane.showMessageDialog(new javax.swing.JDialog(),"Hiba a kapcsolatfelv�tel sor�n! (ClassNotFoundException)\n"+cnfe.getMessage(),"Figyelem!",javax.swing.JOptionPane.WARNING_MESSAGE);
}
Maybe you are looking for
-
How can I determine which version of jvm is running?
I am on a windows xp machine. I have downloaded jre1.5 from sun. When I use netbeans and sun application serverI know I am using that version of the jre. However, I am going to create an iis (microsofts internet information server) project. How can I
-
Using select event for interlayer navigation
Hi All, I have two tables. The output of first table is input for the second one. When I select a row in the first table,the SELECT event is fired and the second table is populated based on the selection. Now I have a scena
-
Every other function works perfectly, and my Internet/router are working at top speed. I can watch HD Netflix and YouTube but nothing via my iTunes library on my MacBook or iPad. All software is updated. The AppleTV will recognize that Air Play is
-
Paragraph construction with fillable fields
Not sure if this is possible, but I wanted to know if it would be possible to basically have a form letter with blanks within the sentences that could be filled in, and once filled in, the field would shrink to the size of whatever was entered and th
-
i am not able to download free apps. A message comes up telling me that I havent purchased anything from the app store. What do I do?