I am running a Java web applet on one of my servers. For some reason a particular user cannot access it (an error text appears in place of the applet that reads "Error. Click for details"; it is not text I placed between the tags, i.e., his JRE is installed and appears to at the very least be installed correctly but for some reason it is not working on my applet.
I think it has something to do with his particular "flavor" of JRE - this so-called "HotSpot" version. (see this: http://www.experts-exchange.com/Programming/Languages/Java/Q_24405442.html if you have an EE account, I can't remember mine offhand). I am not too familiar with Java itself or it's varieties - I am merely the implementer of the applet in the page (I did not write it).
The applet works fine for me, and every single other user to date. Also, it should not be referring to file as listed below in his error such as "http://mywebsite.com/java/JavaVersionDisplayApplet/class.class". The file is located at "http://mywebsite.com/java/JavaVersionDisplay.class". According to the applet programmer, his error points to a file that is not even specified anywhere in his code.
The users' error reads:
Java Plug-in 1.6.0_13
Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
User home directory = C:Documents and Settingsjohn
load: class JavaVersionDisplayApplet.class not found.
java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
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.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
load: class JavaVersionDisplayApplet.class not found.
java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
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.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
I'd start by packaging the application as a jarfile instead of as a set of classfiles. It seems like JavaVersionDisplayApplet.class is being interpreted as a fully-qualified class name...that is, the JVM thinks "JavaVersionDisplayApplet" is a package name and "class" is the class name.
Can you post the contents of the APPLET tag that you're using in the HTML?
A couple of things you might want to look at:
Is he using Chrome? It seems that Chrome and Java don't play well together quite yet.
Is he using a Proxy server? The "connection failed" error may indicate that he is using a Proxy that is allowing the browser through, but not the JRE.
This is the culprit:
Caused by: java.io.IOException: open HTTP connection failed:http://mywebsite.com/java/JavaVersionDisplayApplet/class.class
The JVM is started, but it cannot connect to the server hosting the applet. Does the user connect to mywebsite.com or another name?
Related
I have no prior experience with Java to be clear.
I'm trying to run this Java app (https://users.aber.ac.uk/bpt/jpsychomorph/), but when launching the application from the .jnlp file in my ..\downloads folder, I get "Unable to launch the application" application error.
In the "Details" part of the error there is:
Error: Unable to load resource:
http://users.abecer.ac.uk.bpt/jpsychomorph/version5/lib/jognl.jnlp
Here is the Exception form the error message:
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://users.aber.ac.uk/bpt/jpsychomorph/version5/lib/jogl.jnlp
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getJreResource(Unknown Source)
at com.sun.javaws.LaunchDownload._downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have tried to add this link to the "Exception site list" in the Java Control panel,
but it didn't make difference. I even added multiple versions of this link (http and https versions).
My system:
Windows 10 pro, 21H2 AMD Ryzen 5 5500U
Java 64bit, Version 8 update 341 (build 1.8.0_341-b10) I have Java security settings "High"
Browser: Firefox Deveoper edition (but same resoults on Chrome)
(In my Firefox file format setting list I don't see .jnlp files... somewhere I read, that you should set there .jnlp files to be opened with Firefox, but I don't see that file type there.. it that a problem maybe?)
At this point I don't know what to try.
Thanks for any advice!
I have a applet which usually uses jacorb.jar in endorsed directory under jre .Now I made a change in code to download jacorb.jar tp the windows temp folder (eg. C:\Users\ADMINI~1\AppData\Local\Temp\2\endorsed) .Using the jre installed in our local along with jars downloaded from the webpage we used to launch to the applet from different clients. But while launching the applet i receive the below error
org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation org.jacorb.orb.ORB vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.ORB.create_impl(Unknown Source)
at org.omg.CORBA.ORB.init(Unknown Source)
at com.nm.util.OrbUtils.initAppletORB(OrbUtils.java:2)
at com.nm.ani.share.aniclient.AniClient.initializeORB(AniClient.java:2)
at com.nm.ani.share.aniclient.AniClient.initializeCorba(AniClient.java:33)
at com.nm.ani.share.aniclient.AniClient.initialize(AniClient.java:19)
at com.nm.ani.share.aniclient.AniClient.<init>(AniClient.java:10)
at com.nm.ani.clients.lib.ui.windows.CampusApplet.createA(CampusApplet.java:66)
at com.nm.ani.clients.lib.ui.windows.CampusApplet.getA(CampusApplet.java:68)
at com.nm.ani.clients.campus.main.CampusMain.performAniLogin(CampusMain.java:30)
at com.nm.ani.clients.campus.main.CampusMain.initia(CampusMain.java:6)
at com.nm.ani.clients.lib.ui.windows.CampusApplet.init(CampusApplet.java:17)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jacorb.orb.ORB
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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source
Later i found that applet is searching for jacorb files in endorsed directory itself . It is not using the jar file in windows temp directory in which jars downloaded from the webpage newly.
I have changed every possible code to point to temp directory but it is not happening
please guide me on this...
Well, I exported my application into JAR with eclipse, but now whenever I try running it I get the: "A Java Exception has occurred". When I try to run it through command line it says:
C:\Users\Arturas>java -jar D:\Dropbox\EclipseWorkspace\Exports\Dantracio_skaiciu
oklis3.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widge
ts/Composite
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Composite
at java.net.URLClassLoader$1.run(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 java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
C:\Users\Arturas>
Any solutions to this? I just hate java for this... It never works on desktops when you want it to... sorry I'm really stressed out from this, I'm overreacting...
Any ideas what could cause this? I doesn't work on other computers as well. Right now it's using Java 1.7. And the application runs perfectly on Eclipse.
You need to get your dependencies. Looks like you are depending on swt, which is not part of the core java language. You'll need to get all the third party jars that you depend on and include them in your classpath. It runs perfectly on eclipse because eclipse takes care of setting up the classpath for you.
You can set the classpath in your manifest file as described in the documentation, or you could include a script to start your application that will use the -cp command when running the jar, or you can use something that will package everything into one monster jar like the solutions to this question.
I created an applet and added it to my JSP page. It was working fine in IE, Chrome when Java Plugin version was 1.5. Recently, I updated Java plugin to 1.6 and now the applet is not loading. The following error is displayed on the console.
load: class GraphApplet.class not found.
java.lang.ClassNotFoundException: GraphApplet.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.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://cwrug26999:8080/fluids/pages/GraphApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 9 more
Exception: java.lang.ClassNotFoundException: GraphApplet.class
The GraphApplet.class is located in the same location where JSP page is located.
I used IE with Java 1.5 plugin and the applet is loading fine.
Can anyone point out what I am missing here.
The source code that I am using in the JSP file is below:
<br><center><applet code="GraphApplet.class" codebase="pages/" width="450" height="450">
</applet></center>
Sorry, the applet can not be accessed publicly.
I am using Tomcat5 as the web server and under webapps I have my project folder "fluids" and under this folder I have "pages" folder which contains the JSP files and the applet .class files.
Thanks
The URL http://cwrug26999:8080/fluids/pages/GraphApplet/class.class looks as if the plugin interpreted the code attribute as a class name, not a file name. Try using code=GraphApplet instead.
You could also try using the <embed> tag which isn't deprecated.
I found the issue, after lots of trial and errors it was related to Java Cache. I deleted the Java Cache by going to Control Panel->Java->Temporary Internet Folder->Delete Files...
I also changed the location where the cache files were stored and apparently, the default location was write-protected.
Phew...
Anyway, thanks for the replies
I am unable to start the installed App on my WAS instance. I believe the root cause is an UnsatisfiedLinkError which is shown as follows:
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3147)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3143)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:441)
at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:132)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
at oracle.jdbc.xa.client.OracleXADataSource.getPooledConnection(OracleXADataSource.java:515)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:159)
at oracle.jdbc.xa.client.OracleXADataSource.getXAConnection(OracleXADataSource.java:133)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:935)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:972)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1625)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1220)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1988)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1660)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2341)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:932)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:608)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:449)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:418)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDataSource(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl.lookupConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unknown Source)
at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unknown Source)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown Source)
at org.apache.ojb.broker.accesslayer.RsIterator.(Unknown Source)
at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(Unknown Source)
at com.ascential.xmeta.persistence.orm.impl.ojb.OjbPersistentEObjectPersistenceRegistry.loadPackageCache(OjbPersistentEObjectPersistenceRegistry.java:371)
... 115 more
My LD_LIBRARY_PATH variable for the 'was' user is /opt/oracle/product/10.2.0/lib
What else should I be checking to fix this error?
Please help.
Thanks
Verify that "Java Library Path" in the trace header of SystemOut.log contains "/opt/oracle/product/10.2.0/lib". If it does not contain the path, then your LD_LIBRARY_PATH setting is not taking effect (perhaps the variable isn't exported, or perhaps you're executing startServer as a different user).
Regardless, I would recommend setting adding "/opt/oracle/product/10.2.0/lib" to the native library path of the JDBC provider rather than trying to set it at the OS level.
Finally, double-check that the server has the proper OS permissions to access the native library.