karakun / OpenWebStart

Run Web Start based applications after the release of Java 11
https://openwebstart.com
Other
417 stars 48 forks source link

program launched via web start can't find a method in a class that works just fine when launched directly #538

Open plehal opened 1 year ago

plehal commented 1 year ago

I have this xsl stylesheet which uses calls to some static methods in a java class ( to use as counters etc... and this cclass has been in use for more than a decade in hundreds of style sheets). Now when a program is launched via open webstart, for some reason the one or more methods can't be seen by the jdk which work just fine when run under normal environment on the same jdk and same machine.

here is now it goes in the style sheet

rems is the name space defined for the java package....

  1. variable is defined <xsl:variable name="counter" select="rems:webutil.XSLCounter.new()" /> <xsl:variable name="counter1" select="rems:webutil.XSLCounter.new()" />

  2. method to increment the counter is called as and when needed

  3. last value of the counter is recalled as and when needed...


All this has been working just fine ...for more than decade...as it should.. Given below is the source code for that method in question "getLastCount"


public static int getLastCount(XSLCounter xc) {

    return xc.lastCount();
}

Clearly, the method is declared public..... and given below is the stack trace(in reverse) from open webstart console where it fails...

Cannot find external method 'com.xixpxex.webutil.XSLCounter.getLastCount' (must be public).     at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)     at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)     at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)     at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)     at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)     at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)     at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)     at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)     at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)     at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)     at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)     at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)     at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)     at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)     at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)     at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)     at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)     at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)     at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)     at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)     at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)     at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)     at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)     at java.desktop/java.awt.Component.dispatchEvent(Component.java:4827)     at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)     at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4995)     at java.desktop/java.awt.Container.processEvent(Container.java:2266)     at java.desktop/java.awt.Component.processEvent(Component.java:6385)     at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)     at java.desktop/java.awt.Component.processMouseEvent(Component.java:6620)     at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)     at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)     at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407)     at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314)     at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)     at net.xxxuser.cad.check.DataIntegrityChecker.actionPerformed(DataIntegrityChecker.java:295)     at net.xxxuser.cad.check.DataIntegrityChecker.runChecks(DataIntegrityChecker.java:167)     at net.xxxuser.api.Presenter.getHtml(Presenter.java:225)     at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:834)     at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1079) javax.xml.transform.TransformerConfigurationException: Cannot find external method 'com.xixpxex.webutil.XSLCounter.getLastCount' (must be public). xml file written