Plugin throwing a RemoteException

Hello,

A while ago, I posted about an error in attempting to write a client/server plugin for Servoy. Thankfully, that issue was resolved and we were able to create the plugin and have it work successfully in both the Developer as well as the client.

Unfortunately, it seems we’re back to square one. I know that the plugin was working as recently as this week. However, this morning, on doing testing, we realised that we were getting the following message: “The undefined has no properties calling directLeaveUpload”.

now, “directLeaveUpload” is the name of one of the methods in our plugin, so it seems that the plugin was not working properly or not being initialised properly or something of the sort.

This was not the first time that this happened. So I used the same approach as I did the last time - I recreated the jar file for the plugin and restarted the server.

On doing this, however, I began getting a RemoteException. At this point, I am totally stumped, since it was working previously, and nothing was changed.

So, any suggestions as to how to resolve this?

(If anyone needs further information, feel free to ask.)

We cannot really help like this. Don’t you have a log file where you see an exception? Then you could post that exception and we could see what goes wrong where.

My apologies… yesterday was a long frustrating day…

Here’s the latest portion of the log file. I’m now seeing that it’s saying that the port the RMI uses in use, but I even resorted to physically restarting the server and nothing has been added to that server in quite some time, so what could possibly be using that port ?

(Assuming that i’m even correct in my deduction of the cause of the problem, that is…)

java.lang.IllegalStateException: Cannot find table constants (is undefined or missing) from server clico_web
at com.servoy.j2db.dataprocessing.aj.if(Unknown Source)
at com.servoy.j2db.FormController.a(Unknown Source)
at com.servoy.j2db.FormController.new(Unknown Source)
at com.servoy.j2db.FormManager.int(Unknown Source)
at com.servoy.j2db.FormManager.a(Unknown Source)
at com.servoy.j2db.FormManager.do(Unknown Source)
at com.servoy.j2db.develop.ae.do(Unknown Source)
at com.servoy.j2db.FormManager.do(Unknown Source)
at com.servoy.j2db.develop.ae.do(Unknown Source)
at com.servoy.j2db.FormManager$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)
2007-05-17 14:13:58,781 ERROR [TaskExecuter[3]] com.servoy.j2db.util.Debug - Throwable
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.servoy.j2db.develop.c.y.do(Unknown Source)
at com.servoy.j2db.develop.c.h$2.run(Unknown Source)
at com.servoy.j2db.util.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007-05-17 14:25:48,037 ERROR [TaskExecuter[3]] com.servoy.j2db.util.Debug - Throwable
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.servoy.j2db.develop.c.y.do(Unknown Source)
at com.servoy.j2db.develop.c.h$2.run(Unknown Source)
at com.servoy.j2db.util.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007-05-17 14:25:51,780 ERROR [main] com.servoy.j2db.util.Debug - Throwable
java.rmi.server.ExportException: Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
at sun.rmi.registry.RegistryImpl.(Unknown Source)
at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.a(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.initFromDeveloper(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.for(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:45)
at Servoy.main(Servoy.java:28)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at com.servoy.j2db.util.a.d$b.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at com.servoy.j2db.util.a.d$b.(Unknown Source)
at com.servoy.j2db.util.a.d.createServerSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
… 19 more
2007-05-17 14:25:51,890 ERROR [TaskExecuter[1]] com.servoy.j2db.persistence.Server - Final get connection failure for server user_data in 1 times
2007-05-17 14:25:51,906 ERROR [TaskExecuter[1]] com.servoy.j2db.persistence.Server - Final get connection failure for server example_data in 1 times
2007-05-17 14:25:51,953 ERROR [TaskExecuter[1]] com.servoy.j2db.persistence.Server - Final get connection failure for server log_server in 1 times
2007-05-17 14:25:51,953 ERROR [TaskExecuter[1]] com.servoy.j2db.persistence.Server - Final get connection failure for server udm in 1 times
2007-05-17 14:25:51,953 ERROR [TaskExecuter[1]] com.servoy.j2db.persistence.Server - Final get connection failure for server pdf_forms in 1 times
2007-05-17 14:25:53,409 ERROR [main] com.servoy.j2db.util.Debug - Cannot load mime type mappings from web.xml: java.net.ConnectException: Connection refused: connect
2007-05-17 14:25:55,962 ERROR [main] org.apache.coyote.http11.Http11Protocol - Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.start(Catalina.java:529)
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 com.servoy.j2db.server.WebServer.startWebServer(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.startWebServer(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.try(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.for(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:45)
at Servoy.main(Servoy.java:28)
2007-05-17 14:25:55,962 ERROR [main] org.apache.catalina.startup.Catalina - Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:930)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at org.apache.catalina.startup.Catalina.start(Catalina.java:529)
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 com.servoy.j2db.server.WebServer.startWebServer(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.startWebServer(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.try(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.for(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:45)
at Servoy.main(Servoy.java:28)
2007-05-17 14:25:59,517 ERROR [main] org.apache.coyote.http11.Http11Protocol - Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:182)
at org.apache.catalina.connector.Connector.start(Connector.java:1001)
at org.apache.catalina.core.StandardService.start(StandardService.java:459)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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 com.servoy.j2db.server.WebServer.startWebServer(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.startWebServer(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.try(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.for(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:45)
at Servoy.main(Servoy.java:28)
2007-05-17 14:25:59,517 ERROR [main] org.apache.catalina.startup.Catalina - Catalina.start:
LifecycleException: Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.start(Connector.java:1003)
at org.apache.catalina.core.StandardService.start(StandardService.java:459)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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 com.servoy.j2db.server.WebServer.startWebServer(Unknown Source)
at com.servoy.j2db.server.ApplicationServer.startWebServer(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.try(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.for(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:45)
at Servoy.main(Servoy.java:28)
2007-05-17 14:28:33,043 WARN [Thread-4] org.apache.catalina.connector.MapperListener - Error unregistering MBeanServerDelegate
java.lang.NullPointerException
at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:161)
at org.apache.catalina.connector.Connector.stop(Connector.java:1044)
at org.apache.catalina.core.StandardService.stop(StandardService.java:521)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:629)
2007-05-17 15:39:42,530 ERROR [TaskExecuter[3]] com.servoy.j2db.util.Debug - Throwable
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.servoy.j2db.develop.c.y.do(Unknown Source)
at com.servoy.j2db.develop.c.h$2.run(Unknown Source)
at com.servoy.j2db.util.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007-05-18 09:06:09,580 ERROR [TaskExecuter[3]] com.servoy.j2db.util.Debug - Throwable
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at com.servoy.j2db.develop.c.y.do(Unknown Source)
at com.servoy.j2db.develop.c.h$2.run(Unknown Source)
at com.servoy.j2db.util.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I can’t see errors of your plugin there. One of the errors says a table is missing. That really is a problem.

Maybe you can post the whole log file as attachment and we can look at that.

Not only a table is missing but it looks like you db connections can not be opened.

The RMI error can either come from Servoy, when an address is already in use, or from your plugin when you try to set up your own RMI connection instead of using Servoy for that…

Hi guys,

This is just a follow up to let everyone know the solution to the problem.

Just to recap, we’ve developed a plugin that allows us to use SAPs API (BAPI is the official term) to update it.

However, recently we started getting a Remote Exception. I figured out the problem, and the resulting solution.

The plugin we used required two dll files to be in the system’s PATH (this is Windows i’m talking about here). So, to use the plugin before, we had to ensure that those two dll’s were in the windows/system32 directory. However, Servoy was only finding the dlls when we ran the Servoy Server as an application.

To run the Servoy Server as a service and still get the plugin functionality, we had to place the two dll’s in the Servoy/service directory. That solved the problem.

This is just a heads up for anyone else who writes plugins that depend on external resources like dll’s.

The plugin we used required two dll files to be in the system’s PATH (this is Windows i’m talking about here). So, to use the plugin before, we had to ensure that those two dll’s were in the windows/system32 directory. However, Servoy was only finding the dlls when we ran the Servoy Server as an application.

You can load the dlls into your classpath dynamically. That will also solve your issue and make your solution, when needed, more transportable…

Thanks Marcel,

That definitely sounds like a more portable solution to the issue. Where could i find info about loading those dlls into the classpath dynamically?

google is your friend!

There is really tons of information about the subject.

Client side: jnlp + dll.
Server side: java dynamic library load.

or something like that.