Rewritten NetBeans Platform Feed Reader Tutorial

The next tutorial that has been thoroughly restructured and rewritten is:

NetBeans Platform Feed Reader Tutorial

Originally written by Rich Unger, it was one of the very first NetBeans Platform tutorials that ever existed. In this particular rewrite, the entire structure of the tutorial has changed, in an attempt to make the flow more "bite size", rather than a big lump. Also, thanks to recent NetBeans Platform changes, there are no Bundle files anymore, all Strings are declared via @Messages annotations.

Theoretically, the browser in the application could be a JavaFX WebView, though the browser part of the application isn't a central theme of the tutorial, hence only a reference is made to the JavaFX alternative. Here's what it looks like:

Comments to the NetBeans Platform Feed Reader Tutorial are, as always, very welcome. 


I followed your tutorial for the FeedReader. But having installed Netbeans 7.2 the FileObject does not have a lookup. Consequently with my netbeans version I Have the follwoing error in the class RssFolderChildren:
Feed feed = getFeed(fo.getLookup());

How to make it work with netbeans 7.2?

Posted by guest on December 05, 2012 at 09:16 AM PST #

Feed feed = getFeed(DataObject.find(fo).getLookup());

( line 39)

Posted by Geertjan on December 05, 2012 at 01:25 PM PST #

Hi, I followed your tutorial up until the actions because when i try to run the app on netbeans 7.3, i get an exception.
This exception to be more exact:
java.lang.ClassNotFoundException: org.jdom.JDOMException
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.netbeans.ProxyClassLoader.loadClass(
Caused: java.lang.ClassNotFoundException: org.jdom.JDOMException starting from ModuleCL@15c61fb5[org.rome] with possible defining loaders [ModuleCL@2c3ba220[org.jdom]] and declared parents [ModuleCL@2c3ba220[org.jdom]]
at org.netbeans.ProxyClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Caused: java.lang.NoClassDefFoundError: org/jdom/JDOMException
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.readSyndFeedFromStream(
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.getSyndFeedFromStream(
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.resetFeedInfo(
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveAndCacheFeed(
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveFeed(
at org.neptune.feedreader.Feed.getSyndFeed(
at org.neptune.feedreader.RssFolderChildren.createNodes(
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(
at org.openide.explorer.view.VisualizerChildren.getChildAt(
at org.openide.explorer.view.VisualizerNode.getChildAt(
at javax.swing.tree.DefaultTreeModel.getChild(
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(
at javax.swing.tree.AbstractLayoutCache.getPreferredWidth(
at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(
at javax.swing.JComponent.getPreferredSize(
at javax.swing.ScrollPaneLayout.layoutContainer(
at org.openide.explorer.view.TreeView$ExplorerScrollPaneLayout.layoutContainer(
at java.awt.Container.layout(
at java.awt.Container.doLayout(
at java.awt.Container.validateTree(
at java.awt.Container.validate(
at org.openide.explorer.view.TreeView.access$101(
at org.openide.explorer.view.TreeView$
at org.openide.util.Mutex.readAccess(
at org.openide.util.Mutex$
at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(
at org.openide.util.Mutex.doWrapperAccess(
at org.openide.util.Mutex.readAccess(
at org.openide.explorer.view.TreeView.validate(
at javax.swing.RepaintManager$
at javax.swing.RepaintManager$
at Method)
at javax.swing.RepaintManager.validateInvalidComponents(
at javax.swing.RepaintManager$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$200(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at org.netbeans.core.TimableEventQueue.dispatchEvent(
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Can you help me?
Thanks in advance.

Posted by guest on April 14, 2013 at 01:09 PM PDT #

Do you think the reason might be that org.jdom.JDOMException is not found? And what's the reason that you don't simply download the tutorial source files? If you actually read the tutorial, you'll know about them and also where to find them.

Posted by Geertjan on April 14, 2013 at 03:11 PM PDT #

Yes I think that's the reason, but since I was following the tutorial I find it odd that such an exception occurs. I will try to download the source haven't done with 'cause i'm still figuring out subversion.

Posted by guest on April 15, 2013 at 03:51 AM PDT #

The reason the exception occurred is because you didn't follow the tutorial correctly, as the downloaded tutorial sources will show you.

Posted by guest on April 15, 2013 at 05:55 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016