Project

General

Profile

Actions

Bug #5248

closed

downloading non-public kars from Search Components doesn't work

Added by Derik Barseghian almost 14 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Category:
core
Target version:
Start date:
11/24/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5248

Description

When searching for components, kars that are not publicly accessible are visible in the search results, and you may attempt to download these, but no dialog prompting for credentials appears. Instead errors appear on the console, and a Downloading... progress monitor just stays on screen.

To replicate:
- check the Kepler Repository as a Search repository from the Components tab in Preferences.
- search for 'tfri'
- attempt to download TFRI-ecogridwriter,kar

The stacktrace for this is:

Error downloading kar file: Error getting docid 2776.64.7: java.rmi.RemoteException: User public does not have permission to read the document with the docid 2776.64.7
Caught repository exception!
org.kepler.objectmanager.repository.RepositoryException: Error caching the kar file for the component null
at org.kepler.objectmanager.repository.EcogridRepositoryResults.cacheKAR(EcogridRepositoryResults.java:228)
at org.kepler.objectmanager.repository.KARDownloader.download(KARDownloader.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kepler.gui.kar.DownloadKARFileAction.actionPerformed(DownloadKARFileAction.java:57)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6352)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6117)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
MC 12:13:04,383: [ERROR]: Error caching KAR contents [org.kepler.gui.kar.DownloadKARFileAction]
java.lang.NullPointerException
at java.util.zip.ZipFile.<init>(ZipFile.java:106)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at org.kepler.kar.KARFile.<init>(KARFile.java:191)
at org.kepler.gui.kar.DownloadKARFileAction.actionPerformed(DownloadKARFileAction.java:59)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6352)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6117)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.kepler.kar.KARCacheManager.getKARCacheContents(KARCacheManager.java:191)
at org.kepler.objectmanager.library.LibraryManager.addKAR(LibraryManager.java:206)
at org.kepler.gui.kar.DownloadKARFileAction.actionPerformed(DownloadKARFileAction.java:71)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264)
at java.awt.Component.processMouseEvent(Component.java:6352)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6117)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Actions #1

Updated by Matt Jones almost 14 years ago

I'll bet this is a side effect of using the anonymous Ecogrid Get Service rather than the AuthenticatedGet service. We have both configured in the registry, but I'll bet the search pane uses the one without Authentication. Its a challenge because we sometimes need one, sometimes the other, depending on the explicit package we are getting. This is true for data too. The best solution would be to have a single service that can get both public and private data depending on the credentials provided, and modify the search pane to prompt AuthMan for credentials if the first non-authenticated attempt fails.

We are designing a better API along these lines for this as part of DataONE, so this could be fixed as part of the move to DataONE APIs if it isn't needed right away.

Actions #2

Updated by Derik Barseghian almost 14 years ago

You can also find non-publicly accessible kars from the web interface (http://library.kepler-project.org/kepler/style/skins/kepler/index.jsp ), but similarly can't download them, and there's no visible interface to the user to log in.

I don't need this right away, but if the solution is far off, we should figure out a stopgap.

Actions #3

Updated by Derik Barseghian almost 14 years ago

My changes in r26708 are probably worth looking at when looking at this bug.

Actions #4

Updated by ben leinfelder almost 14 years ago

A) I don't believe it makes sense to have non-public entries showing up in the public searches. I can see how this error case might exist: we search for KarXML but download the actual Kar. If the KarXML is readable by the public, then it is included in the public search. If this is indeed the TFRI case only, then I think it's an error that happened when I was trying to share a workflow at the TFRI tutorial (Oct 2010). The valid assumption should be that if it is in your search results, it should be readable. The "it" being different objects in our implementation, but logically one and the same.
B) The service includes methods for query() and read(). There are two versions of this service and one takes an authentication credential. If an invalid (null) credential is given, the authenticated version of the service acts exactly like the non-authenticated version of the service.
C) It sounds like we should only be using the authenticated version of the service and relying on the AuthenticationManager for the credential. The AuthenticationManager will provide a credential if it has one, or prompt for user/pass in order to get one. After a "cancel" event it would be nice if it did not prompt again as this could get very annoying.

Actions #5

Updated by Derik Barseghian almost 14 years ago

Discussed with Matt, I'll take this one.

Actions #6

Updated by Derik Barseghian almost 14 years ago

no-frills fix in r26836.
Going to test/talk with jing and matt before closing.

Actions #7

Updated by Derik Barseghian almost 14 years ago

So we don't forget: the changes to always use authenticated query and gets necessitate a fix to an xslt file --Jing fixed this for kepler-dev, but the official kepler library server hasn't been fixed. Until that happens, no remote repository results will show in the Components pane.

Actions #8

Updated by Derik Barseghian over 13 years ago

Jing patched the kepler repository tonight, and Component search against the kepler repository works. Closing.

Actions #9

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5248

Actions

Also available in: Atom PDF