Servoy 5 and jPDFViewer Bean

Hi everybody,

We use jPDFViewer Bean in our solution. Now that we moved to Servoy 5, we get the following linked to this bean apparently:

ERROR - Debug - Throwable
java.lang.ClassNotFoundException: com.qoppa.pdfViewer.PDFViewerBean
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.servoy.j2db.dataui.Zdb.getBeanInstanceFromXML(Zdb.java:514)
at com.servoy.j2db.dataui.Zdb.createBean(Zdb.java:323)
at com.servoy.j2db.dataui.Zdb.createComponentEx(Zdb.java:684)
at com.servoy.j2db.dataui.Zdb.createComponent(Zdb.java:316)
at com.servoy.j2db.dataui.Zsc.Za(Zsc.java:7)
at com.servoy.j2db.dataui.Zsc.Za(Zsc.java:53)
at com.servoy.j2db.Zpb.Za(Zpb.java:517)
at com.servoy.j2db.Zpb.Zb(Zpb.java:53)
at com.servoy.j2db.Zwb.Zg(Zwb.java:81)
at com.servoy.j2db.scripting.CreationalPrototype.get(CreationalPrototype.java:21)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1429)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1418)
at org.mozilla.javascript.gen.c3._c0(RegisterPlugins:4621)
at org.mozilla.javascript.gen.c3.call(RegisterPlugins)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:111)
at org.mozilla.javascript.gen.c2._c0(InitApp:4031)
at org.mozilla.javascript.gen.c2.call(InitApp)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
at org.mozilla.javascript.gen.c2.call(InitApp)
at com.servoy.j2db.scripting.Zsb.executeFunction(Zsb.java:47)
at com.servoy.j2db.Zwb.Za(Zwb.java:89)
at com.servoy.j2db.Zxb.Za(Zxb.java:267)
at com.servoy.j2db.Zzb.run(Zzb.java:1)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
ERROR - Debug - Throwable
org.mozilla.javascript.EcmaError: TypeError: Cannot call method “setKey” of undefined (RegisterPlugins#4621)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3655)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3649)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3678)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3697)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2115)
at org.mozilla.javascript.gen.c3._c0(RegisterPlugins:4621)
at org.mozilla.javascript.gen.c3.call(RegisterPlugins)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:111)
at org.mozilla.javascript.gen.c2._c0(InitApp:4031)
at org.mozilla.javascript.gen.c2.call(InitApp)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3127)
at org.mozilla.javascript.gen.c2.call(InitApp)
at com.servoy.j2db.scripting.Zsb.executeFunction(Zsb.java:47)
at com.servoy.j2db.Zwb.Za(Zwb.java:89)
at com.servoy.j2db.Zxb.Za(Zxb.java:267)
at com.servoy.j2db.Zzb.run(Zzb.java:1)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

It looks like the bean jar is not on the server. But it is, and when we try to run the solution via Developer on the server itself, it works fine. :shock:
Why is it working on Developer and not on the server?

Foobrother:
It looks like the bean jar is not on the server. But it is, and when we try to run the solution via Developer on the server itself, it works fine. :shock:
Why is it working on Developer and not on the server?

Hi,

had a simular situation with a bean in our solution.
Although in the background, developer will throw errors as well… :-(
It looks like something went wrong when converting the old ‘4’ form/element structure to the new ‘5’ form/element structure.

Johan came up with the following solution:

  1. open the form where this bean is on
  2. toggle a bean property (tick/untick a checkbox for instance)
  3. save the form

Now commit/upload or whatever you have to do to run this code from a client.

Hope this helps!

Fixed!

I have tried your tip. It still didn’t work but I got a slightly different error which involved cache data.
So I have deleted my Java cache and now it works fine!

Thx for your help Marc.