X

Geertjan's Blog

  • November 28, 2012

Rewritten NetBeans Platform Feed Reader Tutorial

Geertjan Wielenga
Product Manager

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. 

Join the discussion

Comments ( 6 )
  • guest Wednesday, December 5, 2012

    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


  • Geertjan Wednesday, December 5, 2012

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

    (RssFolderChildren.java: line 39)


  • guest Sunday, April 14, 2013

    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.


  • Geertjan Sunday, April 14, 2013

    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.


  • guest Monday, April 15, 2013

    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.


  • guest Monday, April 15, 2013

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


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services