ClassNotFoundException: com.servoy.plugins.jasperreports.bea

  • This message appears on a Win2003 Server, but works fine on my developer and my Win2008 Testserver.

  • The bean exists on the Win2003 Server.

  • The bean directory looks absolute the same like in my Developer, and absolute same like on my Win2008 Testserver

  • Problem in the smart client it looks like this:
    [attachment=0]Print_Screen_01017.jpg[/attachment]

The Java Console of the smart client shows the following:

31.03.2012 11:29:07 com.sebster.tunnel.impl.ic a
INFO: using direct connection
31.03.2012 11:29:07 com.sebster.tunnel.impl.ic a
INFO: jcifs library found; NTLM support enabled
31.03.2012 11:29:07 com.sebster.tunnel.impl.ic a
INFO: using direct connection
31.03.2012 11:29:07 com.sebster.tunnel.impl.ic a
INFO: jcifs library found; NTLM support enabled
31.03.2012 11:29:37 com.servoy.j2db.util.Debug error
SCHWERWIEGEND: Throwable
java.lang.ClassNotFoundException: com.servoy.plugins.jasperreports.bean.JasperReportsServoyViewer
	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.component.ComponentFactory.getBeanInstanceFromXML(ComponentFactory.java:800)
	at com.servoy.j2db.component.ComponentFactory.createBean(ComponentFactory.java:2289)
	at com.servoy.j2db.component.ComponentFactory.createComponentEx(ComponentFactory.java:361)
	at com.servoy.j2db.component.ComponentFactory.createComponent(ComponentFactory.java:246)
	at com.servoy.j2db.smart.dataui.DataRendererFactory.placeElements(DataRendererFactory.java:270)
	at com.servoy.j2db.smart.dataui.DataRendererFactory.completeRenderers(DataRendererFactory.java:236)
	at com.servoy.j2db.FormController.createDataRenderers(FormController.java:1705)
	at com.servoy.j2db.FormController.init(FormController.java:1545)
	at com.servoy.j2db.FormManager.leaseFormPanel(FormManager.java:890)
	at com.servoy.j2db.FormManager.showFormInMainPanel(FormManager.java:640)
	at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShowInDialog(SwingRuntimeWindow.java:453)
	at com.servoy.j2db.smart.SwingRuntimeWindow.doOldShow(SwingRuntimeWindow.java:398)
	at com.servoy.j2db.scripting.RuntimeWindow.doShow(RuntimeWindow.java:241)
	at com.servoy.j2db.scripting.RuntimeWindow.show(RuntimeWindow.java:235)
	at com.servoy.j2db.scripting.RuntimeWindow.showObject(RuntimeWindow.java:222)
	at com.servoy.j2db.scripting.JSWindow.js_show(JSWindow.java:149)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367)
	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:65)
	at org.mozilla.javascript.gen.c38._c0(doShowExec:1032)
	at org.mozilla.javascript.gen.c38.call(doShowExec)
	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:91)
	at org.mozilla.javascript.gen.c59._c0(doShowFrmWhenNoDataSource:977)
	at org.mozilla.javascript.gen.c59.call(doShowFrmWhenNoDataSource)
	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:91)
	at org.mozilla.javascript.gen.c67._c0(Drucken:3156)
	at org.mozilla.javascript.gen.c67.call(Drucken)

and so on …

The code in that moment looks like:

function ProzedJasperFrm(firstShow, event) {
	 
	if(firstShow){
		// Till Servoy 6.1 Plugin must be loaded bevor because of the Bean
		cRepMsg = globals.gPrtParms.cRepMsg
		cReportsDir = plugins.jasperPluginRMI.reportDirectory
		cPluginVersion = plugins.jasperPluginRMI.pluginVersion
	}	

	if(globals.gPrtParms.cDirektTo == 'scrn'){
		// ---- Report is shown in Bean  ----
		forms.ProzedJasperFrm.elements.bean_Jasper.displayMode = 'display_mode_fit_page' // JR_SVY_VIEWER_DISPLAY_MODE.FIT_PAGE
		forms.ProzedJasperFrm.elements.bean_Jasper.showReport(	globals.gPrtParms.oDummyFs,
																globals.gPrtParms.cRepNam,
																null)
	}
}

Thank you for any help.

What cold be the right procedure to find the problem ?

I just checked if all files exist and checked also the

D:\Programme\servoy6\application_server\server\work\Catalina\localhost\beans*jrbean.jar1330621547000.gz*

Thank you for any suggestions

Hi, Alessandro.

I think you are having the same problem I had a while back. See Andrei Costache’s explanation and solution at the following link and see if that helps:

https://www.servoy.com/forum/viewtopic.php?f=15&t=15862&hilit=+jasper

Thank you for your suggestion.

If I understood it right, you mean specially this:

before using the constants provided by the Jasper plugin, first the plugin has to be touched

I have done this before (part of my code example of my later post):

if(firstShow){
      // Till Servoy 6.1 Plugin must be loaded bevor because of the Bean
      cReportsDir = plugins.jasperPluginRMI.reportDirectory
   }

And also, the absolute same code works fine on my Win2008 Testserver and works fine on my XP-Developer-Installation,
but NOT an the clients Win2003 Server…

Hi Alessandro,

Are you able to use any other Servoy bean without problems?

Regards,
Andrei

Hi Andrei,
I updated to Servoy 6.0.6 for other reasons and now, after weeks of wondering, the problem is gone !
:roll:
thank you for your help