You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org> on 2010/03/15 12:50:28 UTC
[jira] Closed: (CLEREZZA-153) DiscoBitsHandler -
NullPointerException while put operation ( at
org.apache.clerezza.platform.security.UserUtil.getUserName(UserUtil.java:70))
[ https://issues.apache.org/jira/browse/CLEREZZA-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reto Bachmann-Gmür closed CLEREZZA-153.
---------------------------------------
> DiscoBitsHandler - NullPointerException while put operation ( at org.apache.clerezza.platform.security.UserUtil.getUserName(UserUtil.java:70))
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CLEREZZA-153
> URL: https://issues.apache.org/jira/browse/CLEREZZA-153
> Project: Clerezza
> Issue Type: Bug
> Reporter: Oliver Strässer
> Assignee: Manuel Innerhofer
> Priority: Critical
>
> i use a timer to shedule events. in this scheduled functions i check for new pdf files and i found new files, i save the pdf in the contentgraph (via the DiscoBitsHandler function put())
> my source to save the online pdf file:
> URL u = new URL(url);
> URLConnection urlc = u.openConnection();
> InputStream is = urlc.getInputStream();
> ByteArrayOutputStream bos = new ByteArrayOutputStream();
> bos.write(is.read());
> byte[] ba = bos.toByteArray();
> discobitsHandler.put(new UriRef("http://localhost/testURL"), MediaType.valueOf("application/pdf"), ba);
> the following error occurs:
> java.lang.NullPointerException
> at org.apache.clerezza.platform.security.UserUtil.getUserName(UserUtil.java:70)
> at org.apache.clerezza.platform.security.UserUtil.getCurrentUserName(UserUtil.java:43)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.getCreator(HierarchyService.java:426)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.addCreationProperties(HierarchyService.java:404)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:305)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:377)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.addToParent(HierarchyService.java:255)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:304)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:377)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.addToParent(HierarchyService.java:255)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:304)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createCollectionNode(HierarchyService.java:377)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.addToParent(HierarchyService.java:255)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createNonCollectionNode(HierarchyService.java:156)
> at org.apache.clerezza.platform.content.hierarchy.HierarchyService.createNonCollectionNode(HierarchyService.java:277)
> at org.apache.clerezza.platform.content.AbstractDiscobitsHandler.put(AbstractDiscobitsHandler.java:82)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider.downloadFile(GoogleAlertsProvider.java:246)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider.getPDF(GoogleAlertsProvider.java:196)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider.saveNode(GoogleAlertsProvider.java:543)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider.updateFeed(GoogleAlertsProvider.java:283)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider.refreshFeeds(GoogleAlertsProvider.java:272)
> at net.getunik.app.google.alerts.core.GoogleAlertsProvider$1.run(GoogleAlertsProvider.java:145)
> at java.util.TimerThread.mainLoop(Unknown Source)
> at java.util.TimerThread.run(Unknown Source)
> the problem is, that no usercontext is available (because i use the timer - and i need the timer)
> can you fix this problem anyway - so that i can put the pdf file?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.