Bean not available to Smart Client on remote machine

Hi all,

I would like to use the JBarcodeBean on one of my forms, so I put the JBarcodeBean.jar file in my Servoy/beans folder. I have defined an onRecordSelection method that just defines the ‘code’ value of the ‘bean_309’ element to the one contained in the ‘barcode’ field:

elements.bean_309.code = barcode

It works as expected when I develop on the local machine (DB’s served with Servoy Server), but when I point my remote Developer to the server machine, I get an error when loading that form, saying:

org.mozilla.javascript.EvaluatorException: The undefined value has no properties.

The form itself shows an error message at the bean’s location:

error accessing beanjbarcodebean.JBarcodeBean

Seems like the bean is not being uploaded/ is not available to my remote development. I sure hope that I don’t have to copy the same beans on my remote Developer machine that were added to the Server machine… :!: :?: :!:

The Smart Client gives me a similar error when accessing the solution remotely and showing the form in question:

Java class “com.servoy.j2db.dataui.ComponentJLabel” has no public instance field or method named "co…

(sorry, the rest of the message is not visible).

Again, the form itself shows an error message at the bean’s location:

bean missing beanjbarcodebean.JBarcodeBean

In this last case, the bean would necessarily need to be available to the Smart Client for this solution, without the need for any intervention whatsoever.

Can anyone point me to a solution please?

Thanks,

Ben

but when I point my remote Developer

When you develop with another machine you need the been for that instance as well.
This is not applicable for a client. A client should pick up your bean when it is in the server folder.
Are there any dependencies or is it just one jar?

PS why don’t you use the barcode plug-in, will probably solve your issue(s)…

When you develop with another machine you need the been for that instance as well.

Thanks Marcel, I didn’t know that.

This is not applicable for a client. A client should pick up your bean when it is in the server folder.

In my server folder structure, I see a folder named ‘server\work\Catalina\localhost\beans’ that contains zipped jars with very long numbers. Can I just place the unzipped jar in there? Or do I just put it in the ‘Servoy\beans’ folder? :?:

Are there any dependencies or is it just one jar?

Pretty sure it’s a standalone jar.

PS why don’t you use the barcode plug-in, will probably solve your issue(s)…

Correct, I installed your free barcode plugin, and it works great, thanks Marcel! :)

That being said, I would really like to know, for future reference, how to make sure that the beans I use will work within the Smart Client, as it does not presently for me… :cry:

Thanks,

Ben

In my server folder structure, I see a folder named ‘server\work\Catalina\localhost\beans’ that contains zipped jars with very long numbers. Can I just place the unzipped jar in there? Or do I just put it in the ‘Servoy\beans’ folder?

The latter. Never install anything in that server folder(s).

Correct, I installed your free barcode plugin, and it works great, thanks Marcel!

Nice…

how to make sure that the beans I use will work within the Smart Client

Hard to tell, it should work I guess. Having that said there can be many reasons. Have you tried to flush your java cache before downloading a client?

Flushing the java cache did it, Marcel! Thank you very much for pointing me in the right direction!

On a related question, is there a way to automate the deletion of cache files on client machines, or a quick-and-dirty url-style command that would do the same trick on both Mac and PC? I would like to avoid having to explain/execute the whole manual procedure [Open Java Control Panel / Select ‘View’ from the General tab / Click to select the application to flush / Click on the red ‘X’ / Exit Java Control Panel] dozens of times for each site, if need be… :?

Thanks again,

Ben

Not that I know of…

When you develop with another machine you need the been for that instance as well.
This is not applicable for a client. A client should pick up your bean when it is in the server folder.

After some testing, it seems this also applies to plugins - they must also be installed on each development machine to be available to Developer, otherwise an error will pop up.

Having to reproduce the development environment locally feels counter-productive. Is there no way that Servoy Developer could ‘see’ the plugins and beans installed on the server, and somehow ‘push’ them down to the Developer (as seems to be the case with Smart Client), or at least be able to use the propertiy pane for these, instead of getting an error when calling them, since we are referencing a location where the plugins and/or beans are available to be served to the clients?

I know I’m probably asking a lot here, but you guys have been called (deservedly) The Dev Dream Team… :roll:

TIA,

Ben