Support #10206
closedError calling WorkspaceFolder.exists function
100%
Description
I get the following exception when I call the WorkspaceFolder.exists function.
17:06:14.595 [catalina-exec-10] DEBUG TwCrawler: createResFolder
17:06:14.595 [catalina-exec-10] DEBUG TwCrawler: root folder for user salvam = /Workspace
17:06:14.595 [catalina-exec-10] DEBUG TwCrawler: Checking for folder TwitterMonitor
17:06:14.601 [DefaultQuartzScheduler_Worker-10] ERROR TwCrawler: Internal error
org.gcube.common.homelibrary.home.exceptions.InternalErrorException: org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException: html
at org.gcube.common.homelibrary.jcr.workspace.JCRWorkspace.exists(JCRWorkspace.java:1781)
at org.gcube.common.homelibrary.jcr.workspace.JCRAbstractWorkspaceFolder.exists(JCRAbstractWorkspaceFolder.java:106)
at it.cnr.iit.wafi.gcube.twmon.crawler.TwCrawler.createResFolder(TwCrawler.java:373)
at it.cnr.iit.wafi.gcube.twmon.crawler.TwCrawler.transferFiles(TwCrawler.java:290)
at it.cnr.iit.wafi.gcube.twmon.crawler.TwCrawler.onStop(TwCrawler.java:451)
at it.cnr.iit.wafi.gcube.twmon.crawler.TwCrawler.runCrawler(TwCrawler.java:201)
at it.cnr.iit.wafi.gcube.twmon.crawler.TwCrawler.launch(TwCrawler.java:168)
at org.gcube.vremanagement.executor.pluginmanager.RunnablePlugin.run(RunnablePlugin.java:124)
at org.gcube.vremanagement.executor.scheduler.SmartExecutorTask.execute(SmartExecutorTask.java:251)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException: html
at org.gcube.common.homelibrary.jcr.workspace.servlet.JCRSession.getItemById(JCRSession.java:308)
at org.gcube.common.homelibrary.jcr.workspace.JCRWorkspace.exists(JCRWorkspace.java:1769)
... 10 common frames omitted
The code in which I get the error is:
logger.debug("Checking for folder " + folderName);
path = path + "/" + folderName;
if(!currFolder.exists(folderName))
{
logger.debug("Creating folder " + folderName);
WorkspaceFolder newFolder = currFolder.createFolder(folderName, "descr");
I check if a folder exists before I try to create it.
currFolder contains a reference to "/Workspace" of user "salvam".
The first time I ran this code, when the TwitterMonitor (no blanks) folder did not exist, it gave no error but I don't see the folder in the Workspace.
The Home libraries loaded by maven are:
home-library-jcr-2.11.1-SNAPSHOT.jar
home-library-2.10.0-SNAPSHOT.jar
home-library-model-1.7.1-SNAPSHOT.jar
The plugin in which I get the error is TwMonCrawler installed on node19.d4science.org.
Files