Ciao Roger, so repackaging jars is not enough ? sorry, a quick fix like this was too easy to not try :-) .
Yes, the problem could be something related to classloaders but we should't have hardcoded strings ... anyway I can take a look. For 2.1 I'd like to fix issues related to classloaders (important fixes / improvements to handle them in a consistent way across all classes) but maybe we will have to expand application interface to handle this ... I'll give you more detail soon. Let's update. Bye Il 11/Apr/2015 19:49, "Roger and Beth Whitcomb" <rogerandb...@rbwhitcomb.com> ha scritto: > Ciao Sandro, > It was the same behavior before I was packing the .jar files, so > that's not it. I right now I have renamed them BEFORE signing and > packing... > It actually loads the "pivot-wtk-terra.jar" file long before this > comes up, so it is related (I think) to which classloader is being invoked > by the Resources.loadJSONResource method (as opposed to the classloader > that is invoked from my application main class). I remember some discussion > maybe from Chris B. about classloader issues a couple of years ago... Do > you remember that? I'm thinking the use of TCCL in Resources should be > changed, but .... The strange thing is that there is no reference (that I > can see) to the versioned .jar file name, so I don't see how it could even > figure out that name to even try.... > > Talk soon, > ~Roger > > On 4/11/15 6:08 AM, Sandro Martini wrote: > >> Hi Roger, >> it's a strange behavior ... could you try even without deploying then >> packed version of jars ? >> Then maybe try to regenerate them but from Pivot renamed jars ? >> >> In next days I can try to take a look ... >> >> Let's update. >> >> Bye >> Il 10/apr/2015 22:10, "Roger Whitcomb" <roger.whitc...@actian.com> ha >> scritto: >> >> 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) >>> >>> >>> >