← Back to team overview

dhis2-devs team mailing list archive

[Bug 1064993] [NEW] RSS feeds throw an uncaught error when offline

 

Public bug reported:

Very minor issue, but seems that when a server is offline, an uncaught
exception is thrown to the logs. Probably better to catch it.

* ERROR 2012-10-10 14:15:37,586 Error while reading RSS, you are probably not connected to the internet (RssContentProvider.java [http-bio-8080-exec-5])
java.net.UnknownHostException: news.yahoo.com
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
        at sun.net.www.http.HttpClient.New(HttpClient.java:321)
        at sun.net.www.http.HttpClient.New(HttpClient.java:338)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
        at org.hisp.dhis.dashboard.provider.RssContentProvider.getRss(RssContentProvider.java:101)
        at org.hisp.dhis.dashboard.provider.RssContentProvider.provide(RssContentProvider.java:86)
        at org.hisp.dhis.dashboard.manager.DefaultDashboardManager.getContent(DefaultDashboardManager.java:101)
        at org.hisp.dhis.dashboard.action.ProvideContentAction.execute(ProvideContentAction.java:111)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Del

** Affects: dhis2
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1064993

Title:
  RSS feeds throw an uncaught error when offline

Status in DHIS 2 - District Health Information Software:
  New

Bug description:
  Very minor issue, but seems that when a server is offline, an uncaught
  exception is thrown to the logs. Probably better to catch it.

  * ERROR 2012-10-10 14:15:37,586 Error while reading RSS, you are probably not connected to the internet (RssContentProvider.java [http-bio-8080-exec-5])
  java.net.UnknownHostException: news.yahoo.com
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:175)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
          at java.net.Socket.connect(Socket.java:546)
          at java.net.Socket.connect(Socket.java:495)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
          at sun.net.www.http.HttpClient.New(HttpClient.java:321)
          at sun.net.www.http.HttpClient.New(HttpClient.java:338)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
          at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
          at org.hisp.dhis.dashboard.provider.RssContentProvider.getRss(RssContentProvider.java:101)
          at org.hisp.dhis.dashboard.provider.RssContentProvider.provide(RssContentProvider.java:86)
          at org.hisp.dhis.dashboard.manager.DefaultDashboardManager.getContent(DefaultDashboardManager.java:101)
          at org.hisp.dhis.dashboard.action.ProvideContentAction.execute(ProvideContentAction.java:111)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Del

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1064993/+subscriptions


Follow ups

References