|
|
|
|
|
|
|
|
Re: Client Notifications Tutorial [message #1836850 is a reply to message #1836804] |
Fri, 15 January 2021 15:32 |
|
I don't quite understand your problem. INotificationService and LockNotification is custom code, right?
When sending the notification, simply add the parameters as members to your notification class (they have to be Serializable). Then you should be able to access them again after casting: ((LockNotification) notification).getP1();
Regards,
Beat
|
|
|
|
Re: Client Notifications Tutorial [message #1837044 is a reply to message #1837032] |
Thu, 21 January 2021 11:03 |
|
Is NotificationService a backend service? If yes, check the log of the backend server for exceptions (for security reasons, the original exception is not transported to the UI server). It could also be possible that the call to the backend failed entirely. In that case you should check that the @TunnelToServer annotation is present on INotificationService, that the backend server is up and running (look for the "Server ready" message) and that the tunnel is configured properly in config.properties (backendUrl, auth tokens etc.).
Regards,
Beat
|
|
|
|
Re: Client Notifications Tutorial [message #1837077 is a reply to message #1837074] |
Thu, 21 January 2021 16:25 |
|
With "backend" I meant the server log. This is the client log, as you can tell from the class names starting with "org.eclipse.scout.rt.client...". Apparently the ClientNotificationPoller could not connect to the server, but I don't know if this is related to the previous error in execRowClick(). Check the server is up and running and that the client is properly configured with the server's URL.
Regards,
Beat
|
|
|
|
Re: Client Notifications Tutorial [message #1837391 is a reply to message #1837127] |
Fri, 29 January 2021 08:17 |
Marco Giudici Messages: 19 Registered: July 2020 |
Junior Member |
|
|
Hi,
is possible that this error is linked to the proxy configuration of my company?
INFORMAZIONI: Stopping ProtocolHandler ["http-bio-8086"]
gen 29, 2021 9:12:53 AM org.apache.coyote.AbstractProtocol stop
INFORMAZIONI: Stopping ProtocolHandler ["ajp-bio-8009"]
entJob.java:189)
at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
ProcessingException[ProcessingStatus[ERROR code=0 Calling INotificationService.sendLock() / Errore di elaborazione]]
at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:167)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalHttpServiceTunnel.invokeService(InternalHttpServiceTunnel.java:175)
at org.eclipse.scout.rt.client.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:115)
at org.eclipse.scout.rt.client.servicetunnel.ServiceTunnelInvocationHandler.invoke(ServiceTunnelInvocationHandler.java:47)
at com.sun.proxy.$Proxy21.sendLock(Unknown Source)
at org.zeiss.mo.scout.myproject.client.orderManagement.ErrorMonitorForm$MainBox$ResTabBox$ResultsBox$RejectedFilesField.sendLockEvent(ErrorMonitorForm.java:2994)
at org.zeiss.mo.scout.myproject.client.orderManagement.ErrorMonitorForm$MainBox$ResTabBox$ResultsBox$RejectedFilesField$Table.execRowClick(ErrorMonitorForm.java:2553)
at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.fireRowClick(AbstractTable.java:3751)
at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.access$0(AbstractTable.java:3747)
at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable$P_TableUIFacade.fireRowClickFromUI(AbstractTable.java:4137)
at org.eclipse.scout.rt.ui.rap.basic.table.RwtScoutTable$6.run(RwtScoutTable.java:789)
at org.eclipse.scout.rt.ui.rap.concurrency.RwtScoutSynchronizer$1.runVoid(RwtScoutSynchronizer.java:61)
at org.eclipse.scout.rt.client.ClientJob.runStatus(ClientJob.java:189)
at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
[Updated on: Fri, 29 January 2021 08:18] Report message to a moderator
|
|
|
Re: Client Notifications Tutorial [message #1837396 is a reply to message #1837391] |
Fri, 29 January 2021 10:09 |
|
Possible, but not likely when both *.war files (your.project.ui.html.war and your.project.server.war) are deployed on the same Tomcat instance. The line you highlighted is not related to network proxies but to dynamic Proxy classes.
It is not clear what the problem is from the information you posted so far. You have to make sure that the following chain works:
1. Browser connects to the UI server at http://your-server:8082/your-ui-app
2. UiServlet accepts the request, and passes it to the client model to handle. The client model calls a remote service -> hand off to HTTP Service Tunnel
3. HTTP Service Tunnel connects to the backend server at http://your-server:8080/your-server-app/process
4. ProcessServlet accepts the request and call the remote service
If connection #1 does not work, you will see an error message in the browser (check the network log in the F12 developer tools). Possible causes: firewall blocks access to UI server, tomcat is not running, ui.html WAR file is not deployed, error while starting up the ui.html Scout platform, wrong configuration in web.xml or config.properties.
If code in #2 encounters an exception (e.g. NullPointerException in execClickAction), a message is written to the client log file and a message box is shown to the user.
If connection #3 does not work, a ProcessingException will be thrown. Possible causes: firewall blocks access to backend server, server WAR file is not deployed, error while starting up the server Scout platform, wrong configuration in ui.html config.properties, wrong configuration in web.xml or config.properties in the server WAR file.
If code in #4 encounters an exception (e.g. NullPointerException in YourProcessService or database error), a message is writen to the backend log file and an error is sent back to the HTTP service tunnel. This causes a ProcessingException to be thrown, which will again be written to the client log file and a message is shown to the user.
Regards,
Beat
|
|
|
|
Re: Client Notifications Tutorial [message #1837575 is a reply to message #1837557] |
Tue, 02 February 2021 16:29 |
|
The NullPointerException you posted is caused by Tomcat trying to restore previous HTTP sessions. I suggest you disable the session manager entirely, since Scout sessions are not serializable anyways. To do so, uncomment the following line in context.xml in your Tomcat installation: <Manager pathname="" />
If all other services work as intendend and only INotificationService/NotificationService does not work, you should carefully compare the implementations. Ensure that INotificationService "extends IService" and that it has the @TunnelToServer annotation present. The server-side implementation should implement INotificationService.
Regards,
Beat
|
|
|
|
Re: Client Notifications Tutorial [message #1837655 is a reply to message #1837644] |
Wed, 03 February 2021 17:27 |
|
Oh sorry, I did not expect somone to use this ancient release... You are right, this annotation does not exist until Scout 5.2. Please not that Scout 3.9 is very outdated and is not maintained anymore. It might not run on modern versions of application servers or the Java platform and many libraries are probably not compatible any more. We strongly recommend migrating to a more recent release!
If I remember correctly, the equivalent of @TunnelToServer would be to correctly register the service:
- In your.project.server/plugin.xml register the service itself using the <service> tag.
- In your.project.client/plugin.xml register the service proxy (i.e. the interface) using the <proxy> tag.
Since your other services work fine, you should be able to find the relevant places by searching all files in your workspace for their names and then just copy the entries accordingly.
Regards,
Beat
|
|
|
|
Powered by
FUDForum. Page generated in 0.06502 seconds