Help Please
Ok so I am working on this program for my school and we thot it was all good and ready to go but we are having major problems now. Its a signed JApplet (Thats why Im here) and it is signed because it talks to a MySQL DB. It works sometimes and then it doesn't. I found out today that if I go to the site and it doesn't, work I can go to the files them selves and double click the index.html and it works fine. This means the webserver is messing it up some how. This is the set up.
The web server is sitting next to me. So I access it with a local IP. Others use duckmanis1.no-ip.com.
Generic information:
Server time: Fri, 24 Sep 2004 09:43:46 -0700
Uptime: 3 days, 23 hours, 11 minutes and 51 seconds
Hostname: 192.168.0.2
IP: 192.168.0.2
Operating system: Microsoft Windows XP [Version 5.1.2600]
Webserver: Apache/2.0.50 (Win32) PHP/5.0.1
Protocol: HTTP/1.1
Port: 80
CPU: 1 * x86 Family 6 Model 3 Stepping 3, GenuineIntel (Architecture: x86)
Admin: duckmanis1@comcast.net
So let me get this straight: You have a signed applet that talks to MySQL DB. It doesnt work if you load it from the web server (ie. http://duckmantis1.no-ip.com/japplet.html) but it works from (i.e.)c:\project\japplet\web\japplet.html. Correct?
Need more details!!
How did you sign it (not gorey details but was it from same machine?) ?
How are talking to MySQL? MySQL JDBC? ODBC?
Where are the drivers? In the applet jar? jre/ext?
Did you change any policy files? If so...what?
Post your applet tags in the html file.
I think we can start from these questions for now :)
Regards,
-Jay
I singed on my machine. Not the webserver itself. The cammand is like this:
jarsigner -storepass ************* "C:\Documents and Settings\Duck Man\My Documents\My Programs\Project\wasc\wasc.jar" WASC
I amde the key like this:
keytool -genkey -alias WASC
Then put in what I needed (name and stuff). Balh Blah Blah.
Im using the MySQL Connector/J (http://dev.mysql.com/doc/connector/j/en/index.html) to connect to the db. The DB itself is on my friends web server. The drivers are in the .jar file. That made it easier because the only other way to do it would be to get dumb parent volenteers tring to install it.
No policy files changed
<APPLET archive="WASC.jar" code="WASC/WASC.class" width=800 height=500></APPLET>
I think thats all.
Maybe some more help. This is the exception that is thrown:
java.lang.NullPointerException
at sun.plugin.net.proxy.PluginProxyManager.getProxyInfo(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.connectSetup(Unknown Source)
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.isUpToDate(Unknown Source)
at sun.plugin.cache.CachedJarLoader.loadFromCache(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(URLClassPath.java:579)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:542)
at sun.misc.URLClassPath$3.run(URLClassPath.java:320)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:309)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:286)
at sun.misc.URLClassPath.getResource(URLClassPath.java:156)
at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:534)
What's it doing just before the exception?
To turn the full trace on (windows) you can start the java console, to be found here:
C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
In the advanced tab you can fill in something for runtime parameters fill in this:
-Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
The trace is here:
C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log