pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <Roger.Whitc...@actian.com>
Subject Applet-related question
Date Fri, 10 Apr 2015 20:03:45 GMT
Hi all,
                Our application has been running very well for about 3 years as a desktop
app, and now we're beginning to deploy it as an applet.  That also is working very well, except
for one very strange thing.
                We have renamed the Pivot .jar files to eliminate the version number suffix
(just for simplicity, since we have gone through several revisions of Pivot already, and it
simplified the installers).  The main .jar file has this as the manifest:
Main-Class: com.ingres.director.pivot.DirectorMain
Class-Path: pivot-core.jar pivot-wtk.jar pivot-wtk-terra.jar jh.jar commons-logging-api.jar
commons-vfs2.jar pivot-charts.jar pivot-jfree.jar jfreechart.jar jcommon.jar sigar.jar hadoop-common.jar
hadoop-auth.jar hadoop-dfs.jar guava.jar commons-collections.jar commons-configuration.jar
commons-lang.jar commons-cli.jar commons-io.jar slf4j-api.jar slf4j-log4j12.jar log4j.jar
protobuf-java.jar
                And the call to "deployJava.js" has this library list:
                        var libraries = [];
                        libraries.push("pivot-wtk.jar");
                        libraries.push("pivot-core.jar");
                        libraries.push("pivot-wtk-terra.jar");
                        libraries.push("director.jar");
                        libraries.push("commons-cli.jar");
                        libraries.push("commons-collections.jar");
                        libraries.push("commons-configuration.jar");
                        libraries.push("commons-io.jar");
                        libraries.push("commons-lang.jar");
                        libraries.push("commons-logging-api.jar");
                        libraries.push("commons-vfs2.jar");
                        libraries.push("guava.jar");
                        libraries.push("hadoop-auth.jar");
                        libraries.push("hadoop-common.jar");
                        libraries.push("hadoop-hdfs.jar");
                        libraries.push("jcommon.jar");
                        libraries.push("jfreechart.jar");
                        libraries.push("jh.jar");
                        libraries.push("log4j.jar");
                        libraries.push("pivot-charts.jar");
                        libraries.push("pivot-web.jar");
                        libraries.push("pivot-web-server.jar");
                        libraries.push("protobuf-java.jar");
                        libraries.push("slf4j-api.jar");
                        libraries.push("slf4j-log4j12.jar");

                        attributes.archive = libraries.join(",");

                        var parameters = {
                            codebase_lookup:false,
                            permissions:"all-permissions",
                            java_arguments:"-Dsun.awt.noerasebackground=true -Dsun.awt.erasebackgroundonresize=true
-Djnlp.packEnabled=true",
                            application_class_name:"com.ingres.director.pivot.DirectorMain"
                        };

                        var startupProperties = [];
                        startupProperties.push("language=en_US");

                        parameters.startup_properties = startupProperties.join("&");


                        deployJava.runApplet(attributes, parameters, "1.7");

So, everything works fine and the applet displays the application perfectly, just like in
the desktop version.

                But, at some point when we start to deploy a Pivot FileBrowser I start to
see these errors in the Java Console, where it is trying to find the "pivot-wtk-terra-2.1.0.jar"
file.  Of course it does not find it, and eventually realizes that the class is in the "pivot-wtk-terra.jar"
file and everything works.  So, the question is: where is it getting the idea to look for
the version-numbered pivot-wtk-terra-2.1.0.jar file?  I have found nothing in any manifest
or any other place that references this .jar file name...

                Anyone have any clues (I'm assuming this is some kind of classloader thing,
because the code in Resources.readJSONResource is calling this:
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
right before it gets the error, but I really don't know where else to look.
                I have also checked the Java cache and there is no "pivot-wtk-terra-2.1.0.jar"
file there either.

Thanks,
~Roger Whitcomb

network: Cache entry not found [url: http://localhost:8080/director/pivot-wtk-terra-2.1.0.jar,
version: null]
network: Connecting http://localhost:8080/director/pivot-wtk-terra-2.1.0.jar.pack.gz with
proxy=DIRECT
network: Connecting http://localhost:8080/ with proxy=DIRECT
network: Cache entry not found [url: http://localhost:8080/director/pivot-wtk-terra-2.1.0.jar,
version: null]
network: Connecting http://localhost:8080/director/pivot-wtk-terra-2.1.0.jar with proxy=DIRECT
java.io.FileNotFoundException: http://localhost:8080/director/pivot-wtk-terra-2.1.0.jar
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.security.AccessController.doPrivileged(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
                at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
                at sun.plugin.PluginURLJarFileCallBack.access$000(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 com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader$4.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown
Source)
                at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
                at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsResource(Unknown Source)
                at sun.plugin2.applet.Plugin2ClassLoader.getResourceAsResource(Unknown Source)
                at com.sun.deploy.security.DeployURLClassLoader.getResourceAsStream(Unknown
Source)
                at sun.plugin2.applet.Applet2ClassLoader.getResourceAsStream(Unknown Source)
                at org.apache.pivot.util.Resources.readJSONResource(Resources.java:201)
                at org.apache.pivot.util.Resources.<init>(Resources.java:109)
                at org.apache.pivot.util.Resources.<init>(Resources.java:45)
                at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:570)
                at org.apache.pivot.wtk.skin.terra.TerraFileBrowserSheetSkin.install(TerraFileBrowserSheetSkin.java:99)
                at org.apache.pivot.wtk.Component.setSkin(Component.java:757)
                at org.apache.pivot.wtk.Component.installSkin(Component.java:817)
                at org.apache.pivot.wtk.FileBrowserSheet.<init>(FileBrowserSheet.java:134)
                at org.apache.pivot.wtk.FileBrowserSheet.<init>(FileBrowserSheet.java:99)
                at com.ingres.director.pivot.dialogs.ToolsOptionsDialog.<init>(ToolsOptionsDialog.java:516)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message