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. 

Comments:

Hi,
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?
Thanks

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

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

(RssFolderChildren.java: 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 java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222)
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(ProxyClassLoader.java:224)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Caused: java.lang.NoClassDefFoundError: org/jdom/JDOMException
at com.sun.syndication.io.SyndFeedInput.<init>(SyndFeedInput.java:58)
at com.sun.syndication.io.SyndFeedInput.<init>(SyndFeedInput.java:48)
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.readSyndFeedFromStream(HttpURLFeedFetcher.java:269)
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.getSyndFeedFromStream(HttpURLFeedFetcher.java:277)
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.resetFeedInfo(HttpURLFeedFetcher.java:191)
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveAndCacheFeed(HttpURLFeedFetcher.java:163)
at com.sun.syndication.fetcher.impl.HttpURLFeedFetcher.retrieveFeed(HttpURLFeedFetcher.java:119)
at org.neptune.feedreader.Feed.getSyndFeed(Feed.java:41)
at org.neptune.feedreader.RssFolderChildren.createNodes(RssFolderChildren.java:40)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterNodeEntry.nodes(FilterNode.java:1906)
at org.openide.nodes.EntrySupportLazyState$EntryInfo.getNode(EntrySupportLazyState.java:296)
at org.openide.nodes.FilterNode$Children$LazySupport$FilterLazySnapshot.get(FilterNode.java:1752)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:880)
at org.openide.nodes.EntrySupportLazy$LazySnapshot.get(EntrySupportLazy.java:865)
at org.openide.explorer.view.VisualizerChildren.getChildAt(VisualizerChildren.java:127)
at org.openide.explorer.view.VisualizerNode.getChildAt(VisualizerNode.java:321)
at javax.swing.tree.DefaultTreeModel.getChild(DefaultTreeModel.java:174)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(FixedHeightLayoutCache.java:1523)
at javax.swing.tree.FixedHeightLayoutCache$VisibleFHTreeStateNodeEnumeration.nextElement(FixedHeightLayoutCache.java:1478)
at javax.swing.tree.AbstractLayoutCache.getPreferredWidth(AbstractLayoutCache.java:245)
at javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(BasicTreeUI.java:1882)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1985)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(BasicTreeUI.java:1973)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1660)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:790)
at org.openide.explorer.view.TreeView$ExplorerScrollPaneLayout.layoutContainer(TreeView.java:1725)
at java.awt.Container.layout(Container.java:1503)
at java.awt.Container.doLayout(Container.java:1492)
at java.awt.Container.validateTree(Container.java:1688)
at java.awt.Container.validate(Container.java:1623)
at org.openide.explorer.view.TreeView.access$101(TreeView.java:151)
at org.openide.explorer.view.TreeView$3.run(TreeView.java:670)
at org.openide.util.Mutex.readAccess(Mutex.java:367)
at org.openide.util.Mutex$1R.run(Mutex.java:1309)
at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1921)
at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1328)
at org.openide.util.Mutex.readAccess(Mutex.java:356)
at org.openide.explorer.view.TreeView.validate(TreeView.java:667)
at javax.swing.RepaintManager$2.run(RepaintManager.java:679)
at javax.swing.RepaintManager$2.run(RepaintManager.java:677)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:676)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1650)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

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
About

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.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today