Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Client Notifications Tutorial( I am getting an error when I try to trigger a client notification.)
Client Notifications Tutorial [message #1471596] Thu, 13 November 2014 07:43 Go to next message
kike Diaz is currently offline kike DiazFriend
Messages: 10
Registered: November 2014
Junior Member

Hi, I tried to follow the tutorial "Client Notifications" but i am getting an error when I try to trigger a client notification using the following line.

SERVICES.getService(INotificationService.class).sendMessageNotification();

I´m using Eclipse3.8 Scout-Luna 4.4.1 and JDK7

This is the error:

registry does not contain a service of type tut.wizard.shared.services.process.INotificationProcessService

And here is the full trace:

!ENTRY org.eclipse.scout.rt.server 4 0 2014-11-10 15:23:33.892
!MESSAGE org.eclipse.scout.rt.server.DefaultTransactionDelegate.invoke(DefaultTransactionDelegate.java:115) invoking tut.wizard.shared.services.process.INotificationProcessService:sendMessageNotification
service registry does not contain a service of type tut.wizard.shared.services.process.INotificationProcessService
!STACK 0
java.lang.SecurityException: service registry does not contain a service of type tut.wizard.shared.services.process.INotificationProcessService
at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invokeImpl(DefaultTransactionDelegate.java:194)
at org.eclipse.scout.rt.server.DefaultTransactionDelegate.invoke(DefaultTransactionDelegate.java:95)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransactionWithDelegate(ServiceTunnelServlet.java:426)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.runServerJobTransaction(ServiceTunnelServlet.java:422)
at org.eclipse.scout.rt.server.ServiceTunnelServlet$RemoteServiceJob.runTransaction(ServiceTunnelServlet.java:450)
at org.eclipse.scout.rt.server.ServerJob.runTransactionWrapper(ServerJob.java:221)
at org.eclipse.scout.rt.server.ServerJob.access$0(ServerJob.java:205)
at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:177)
at org.eclipse.scout.rt.server.ServerJob$1.run(ServerJob.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.eclipse.scout.rt.server.ServerJob.run(ServerJob.java:172)
at org.eclipse.scout.commons.job.JobEx.runNow(JobEx.java:51)
at org.eclipse.scout.rt.server.ServerJob.runNow(ServerJob.java:164)
at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:332)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.scout.rt.server.commons.servletfilter.HttpServletEx.access$0(HttpServletEx.java:1)
at org.eclipse.scout.rt.server.commons.servletfilter.HttpServletEx$1.service(HttpServletEx.java:38)
at org.eclipse.scout.rt.server.commons.internal.FilterChainImpl.doFilter(FilterChainImpl.java:44)
at org.eclipse.scout.rt.server.SoapWsseJaasFilter$2.run(SoapWsseJaasFilter.java:158)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.eclipse.scout.rt.server.SoapWsseJaasFilter.continueChainWithPrincipal(SoapWsseJaasFilter.java:151)
at org.eclipse.scout.rt.server.SoapWsseJaasFilter.doFilter(SoapWsseJaasFilter.java:146)
at org.eclipse.scout.rt.server.commons.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
at org.eclipse.scout.rt.server.commons.servletfilter.ServletFilterDelegate.delegateServiceMethod(ServletFilterDelegate.java:60)
at org.eclipse.scout.rt.server.commons.servletfilter.HttpServletEx.service(HttpServletEx.java:35)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:360)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)


Any help would be very appreciated, thanks in advance. Smile
Re: Client Notifications Tutorial [message #1471607 is a reply to message #1471596] Thu, 13 November 2014 07:55 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi kike,

are you sure you registered the INotificationService in the server's plugin.xml ?

When you open the server's plugin.xml with the Plug-in Manifest Editor, there should be an entry which references your INotificationService.

index.php/fa/19878/0/
  • Attachment: plugin.png
    (Size: 35.78KB, Downloaded 920 times)
Re: Client Notifications Tutorial [message #1471912 is a reply to message #1471607] Thu, 13 November 2014 12:47 Go to previous messageGo to next message
kike Diaz is currently offline kike DiazFriend
Messages: 10
Registered: November 2014
Junior Member
Hi and thanks for the help, attached is a picture with my server extensions, I have an INotificationProccessService, but still getting the same error.



Re: Client Notifications Tutorial [message #1471969 is a reply to message #1471912] Thu, 13 November 2014 13:41 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
hm... another think you can try is: open your server-dev.product, click synchronize and start again:

index.php/fa/19892/0/

However I am not sure if it helps
  • Attachment: synch.png
    (Size: 13.06KB, Downloaded 876 times)
Re: Client Notifications Tutorial [message #1472026 is a reply to message #1471969] Thu, 13 November 2014 14:35 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Ah kike,
in your server_extensions.jpg it says:

class*: ...INotificationProcessService 


Do you reference the Interface here? I think the Implementation should be referenced here. I guess your Implementation looks like this:

public class NotificationProcessService extends AbstractService implements INotificationProcessService


Now, try to reference
NotificationProcessService 
instead.
Re: Client Notifications Tutorial [message #1476958 is a reply to message #1472026] Mon, 17 November 2014 13:54 Go to previous messageGo to next message
kike Diaz is currently offline kike DiazFriend
Messages: 10
Registered: November 2014
Junior Member
Thanks for all the help. I did everything again from scratch and now it works, I noticed there are a couple of bad spelled names in the tutorial, but not very hard to avoid.

I guess I also did something wrong registering INotificationService but now I did it your way and it works fine, thank you very much.
Re: Client Notifications Tutorial [message #1476963 is a reply to message #1476958] Mon, 17 November 2014 13:56 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi kike,

glad it works now. If you have any further questions, let us know Smile

Best regards,
Matthias
Re: Client Notifications Tutorial [message #1836804 is a reply to message #1476963] Thu, 14 January 2021 10:41 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi,
I create a notification with parameters. How can I retrieve these parameters on the client side when consume the notification?

Code to consume the event

    final IClientNotification notification = e.getClientNotification();
    final IClientSession session = ClientSyncJob.getCurrentSession();

    if (notification instanceof LockNotification) {
      new ClientAsyncJob("async wrapper (lock)", session) {
        @Override
        protected void runVoid(IProgressMonitor monitor) throws Throwable {
          new ClientSyncJob("Lock", session) {
            @Override
            protected void runVoid(IProgressMonitor monitor1) throws Throwable {
              Desktop desktop = Desktop.get();
              if (desktop != null) {
                /* At this point how can retrieve the three parameters P1, P2 and P3 when the event is triggered??? */
              }
            }
          }.schedule();
        }
      }.schedule();
    }



Code of the triggering event
SERVICES.getService(INotificationService.class).sendLock(/P1, P2, P3);


Thanks in advance for any suggestions
Re: Client Notifications Tutorial [message #1836850 is a reply to message #1836804] Fri, 15 January 2021 15:32 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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 #1837032 is a reply to message #1836850] Thu, 21 January 2021 09:15 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi,
I have implemented the client notification service as explained in the HOW TO section.
I tested directly in eclipse Kepler 3.9 environment and everything works as I expected, but when I deploy my scout project in Tomcat 7 seems that works only at 50%
I say that because I expect that a row in a tree field became checked and change the font style, but this not happens, but if I try to click on it appear a popup as expected

Here the details of the error that I found in the Tomcat's log
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.$Proxy22.sendLock(Unknown Source)
	at org.scout.myproject.client.orderManagement.ErrorMonitorForm$MainBox$ResTabBox$ResultsBox$RejectedFilesField$Table.execRowClick(ErrorMonitorForm.java:2550)
	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)


The row 2550 on my source code contains the call to the notification service on my client
SERVICES.getService(INotificationService.class).sendLock(getRORUSERID(), fileName, fileId);


Could someone help me to understand exactly this error and a possible way how to fix it?

Thanks in advance for any help

Marco
Re: Client Notifications Tutorial [message #1837044 is a reply to message #1837032] Thu, 21 January 2021 11:03 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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 #1837074 is a reply to message #1837044] Thu, 21 January 2021 15:56 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi,
in the backend server log I found the following messages

[code][
!MESSAGE org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:50) polling
!STACK 0
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy14.ping(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:46)
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)
Caused by: ProcessingException[ProcessingStatus[ERROR code=0 Calling IPingService.ping() java.net.SocketTimeoutException: Read timed out]]
at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:163)
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.$Proxy14.ping(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:46)
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)
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)
... 5 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.HttpBackgroundJob.runStatus(HttpBackgroundJob.java:79)
... 3 more

!ENTRY org.eclipse.scout.rt.client 1 0 2021-01-21 10:19:18.622
!MESSAGE org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:50) polling
!STACK 0
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy14.ping(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:46)
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)
Caused by: ProcessingException[ProcessingStatus[ERROR code=0 Calling IPingService.ping() java.net.ConnectException: Connection timed out: connect]]
at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:163)
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.$Proxy14.ping(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:46)
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)
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)
... 5 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.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.<init>(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.plainConnect0(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.getOutputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalHttpServiceTunnel.createURLConnection(InternalHttpServiceTunnel.java:113)
at org.eclipse.scout.rt.client.servicetunnel.http.HttpServiceTunnel.createURLConnection(HttpServiceTunnel.java:70)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.HttpBackgroundJob.runStatus(HttpBackgroundJob.java:77)
... 3 more

!ENTRY org.eclipse.rap.ui.workbench 4 2 2021-01-21 10:19:40.952
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.rap.ui.workbench".
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: assertion failed: The application has not been initialized.
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.internal.runtime.InternalPlatform.assertInitialized(InternalPlatform.java:139)
at org.eclipse.core.internal.runtime.InternalPlatform.addLogListener(InternalPlatform.java:132)
at org.eclipse.core.runtime.Platform.addLogListener(Platform.java:495)
at org.eclipse.ui.statushandlers.StatusManager.<init>(StatusManager.java:131)
at org.eclipse.ui.statushandlers.StatusManager.getManager(StatusManager.java:125)
at org.eclipse.ui.internal.progress.ProgressManager$2.done(ProgressManager.java:504)
at org.eclipse.rap.ui.internal.progress.JobManagerAdapter.done(JobManagerAdapter.java:137)
at org.eclipse.core.internal.jobs.JobListeners$3.notify(JobListeners.java:39)
at org.eclipse.core.internal.jobs.JobListeners.doNotify(JobListeners.java:96)
at org.eclipse.core.internal.jobs.JobListeners.done(JobListeners.java:152)
at org.eclipse.core.internal.jobs.JobManager.endJob(JobManager.java:647)
at org.eclipse.core.internal.jobs.WorkerPool.endJob(WorkerPool.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:70)

!ENTRY org.eclipse.core.jobs 4 2 2021-01-21 10:19:40.953
!MESSAGE An internal error occurred during: "Client notification fetcher".
!STACK 0
java.lang.NullPointerException
at org.eclipse.scout.commons.logger.internal.eclipse.EclipseLogWrapper.logImpl(EclipseLogWrapper.java:69)
at org.eclipse.scout.commons.logger.internal.AbstractScoutLogger.log(AbstractScoutLogger.java:31)
at org.eclipse.scout.commons.logger.internal.AbstractScoutLogger.info(AbstractScoutLogger.java:140)
at org.eclipse.scout.rt.client.servicetunnel.http.internal.ClientNotificationPollingJob.runStatus(ClientNotificationPollingJob.java:50)
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)
/code]

Can help to understand this error?
Re: Client Notifications Tutorial [message #1837077 is a reply to message #1837074] Thu, 21 January 2021 16:25 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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 #1837127 is a reply to message #1837077] Fri, 22 January 2021 13:45 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi,
I checked all log files present in my Tomcat installation and the only errors I found were the ones I reported in the previous posts.
At this point I'm getting the idea that the problem is only client side or am I wrong?
Re: Client Notifications Tutorial [message #1837391 is a reply to message #1837127] Fri, 29 January 2021 08:17 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
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 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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 #1837557 is a reply to message #1837396] Tue, 02 February 2021 11:35 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi Beat,
thanks for your post and suggestions. I try to clarify my situation:
WAR files (html e server) are deployed on the same Tomcat instance.
UI and server backend are both reachable, and they communicate without problem for the normal request that the user made. The only problem is linked to the Notification service.
No error message appear on UI on Chrome page or Edge page of my application

I try to increase the logging of the error on my application, and today I found this in addition to the usual error that I have reported in previous posts
GRAVE: Exception loading sessions from persistent storage
java.lang.NullPointerException
	at javax.security.auth.Subject$SecureSet.readObject(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 java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.access$800(Unknown Source)
	at java.io.ObjectInputStream$GetFieldImpl.readFields(Unknown Source)
	at java.io.ObjectInputStream.readFields(Unknown Source)
	at javax.security.auth.Subject.readObject(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 java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1609)
	at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1075)
	at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:259)
	at org.apache.catalina.session.StandardManager.load(StandardManager.java:176)
	at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:465)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5643)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

feb 02, 2021 12:19:42 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMAZIONI: Deployment of web application archive C:\Tomcat7\webapps\myproject.war has finished in 2,569 ms
feb 02, 2021 12:19:42 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMAZIONI: Deploying web application archive C:\Tomcat7\webapps\myproject_server.war


This may help to better clarify and solve my problem

Thanks in advance for any other suggestions

Marco
Re: Client Notifications Tutorial [message #1837575 is a reply to message #1837557] Tue, 02 February 2021 16:29 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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 #1837644 is a reply to message #1837575] Wed, 03 February 2021 14:57 Go to previous messageGo to next message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi Beat,
but annotation @TunnelToServer is not available in scout Kepler 3.9, if I'm not wrong
this class org.eclipse.scout.rt.shared.TunnelToServer is not present.
There is an equivalent for scout Kepler 3.9???

About your suggestions:
- I uncomment the line in context.xml in my Tomcat
- INotificationService extends IService
- The server-side implementation implement INotificationService

Regards

Marco
Re: Client Notifications Tutorial [message #1837655 is a reply to message #1837644] Wed, 03 February 2021 17:27 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
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
Re: Client Notifications Tutorial [message #1837904 is a reply to message #1837655] Wed, 10 February 2021 07:58 Go to previous message
Marco Giudici is currently offline Marco GiudiciFriend
Messages: 19
Registered: July 2020
Junior Member
Hi,
I know that I use an ancient release and I need to migrate to new one.
By the way, I check your suggestions and everything in the plugin.xml is defined accorded with the HowTo page and the path is consistent with my workspace, but still not work.
Previous Topic:speed up ci pipeline
Next Topic:Error running helloworld application in Linux
Goto Forum:
  


Current Time: Tue Apr 16 22:11:01 GMT 2024

Powered by FUDForum. Page generated in 1.95375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top