uPortal-start
uPortal-start copied to clipboard
Fix dataImport for Announcements
Describe the bug Currently, dataImport does not work for Announcements data files. DataInit does.
To Reproduce Steps to reproduce the behavior:
- Start Hsql
-
./gradlew dataImport -Ddir data/quickstart/announcements/
- Check if import succeeded
Expected behavior
./gradlew dataImport -Ddir data/quickstart/announcements/
imports files in that directory
Is there a workaround for it ?
Is there a workaround for it ?
The workaround is to launch ./gradlew overlays:uPortal:dataImport -D.....
when you don't need the announcement import
To provide a trace of the error:
> Task :overlays:CalendarPortlet:dataImport
No actions have been defined for this task in this project
[ant:java]
[ant:java] ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.phobos.script.javascript.RhinoScriptEngineFactory could not be instantiated
[ant:java] INFO
[ant:java] **************************************************
[ant:java] ** Invoking ScriptRunner.run(Task, TaskRequest)
[ant:java] ** TaskRequest contains 3 elements
[ant:java] ** - $1=/opt/uPortal/uPortal-start/overlays/NewsReaderPortlet/build/export
[ant:java] ** - Attributes.CACHE={}
[ant:java] ** - Attributes.ORIGIN=classpath://org/jasig/portlet/newsreader/io/import.crn.xml
[ant:java] **************************************************
[ant:java]
[ant:java] INFO Loaded 'javax.script.Compilable', assuming JDK6 and compilable script support
[ant:java] INFO Creating new lazily initialized GenericApplicationContext for the portal
[ant:java] INFO [07:05.653] Creating new lazily initialized GenericApplicationContext for the portal
[ant:java] INFO Loading XML bean definitions from class path resource [context/importExportContext.xml]
[ant:java] INFO Loading XML bean definitions from class path resource [context/databaseContext.xml]
[ant:java] INFO Refreshing org.springframework.context.support.GenericApplicationContext@1a4013: startup date [Fri Jun 04 16:07:05 CEST 2021]; root of context hierarchy
[ant:java] INFO Jasypt support for encrypted property values DISABLED; specify environment variable UP_JASYPT_KEY to use this feature
[ant:java] INFO Loading properties file from class path resource [datasource.properties]
[ant:java] INFO Loading properties file from class path resource [configuration.properties]
[ant:java] INFO Loading properties file from URL [file:/opt/uPortal/tomcat/portal/global.properties]
[ant:java] INFO Jasypt support for encrypted property values DISABLED; specify environment variable UP_JASYPT_KEY to use this feature
[ant:java] INFO Loading properties file from class path resource [datasource.properties]
[ant:java] INFO Loading properties file from class path resource [configuration.properties]
[ant:java] INFO Loading properties file from URL [file:/opt/uPortal/tomcat/portal/global.properties]
[ant:java] INFO Created new lazily initialized GenericApplicationContext for the portal in 290ms
[ant:java] ERROR The specified DIR does not exist: /opt/uPortal/uPortal-start/overlays/NewsReaderPortlet/build/export
[ant:java] INFO Closing org.springframework.context.support.GenericApplicationContext@1a4013: startup date [Fri Jun 04 16:07:05 CEST 2021]; root of context hierarchy
[ant:java] Exception in thread "main" org.danann.cernunnos.ManagedException: The Cernunnos Runtime encountered an error:
[ant:java] Origin Document: classpath://org/jasig/portlet/newsreader/io/import.crn.xml
[ant:java] Source: /with/subtasks/with-attribute/for-each/file-iterator
[ant:java] Entity Name: <file-iterator>
[ant:java] at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:93)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:148)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:123)
[ant:java] at org.danann.cernunnos.flow.ForEachTask.perform(ForEachTask.java:80)
[ant:java] at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:148)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:123)
[ant:java] at org.danann.cernunnos.core.SetAttributeTask.perform(SetAttributeTask.java:66)
[ant:java] at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:148)
[ant:java] at org.danann.cernunnos.AbstractContainerTask.performSubtasks(AbstractContainerTask.java:123)
[ant:java] at org.danann.cernunnos.core.WithTask.perform(WithTask.java:90)
[ant:java] at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
[ant:java] at org.danann.cernunnos.runtime.ScriptRunner$TaskDecorator.perform(ScriptRunner.java:436)
[ant:java] at org.danann.cernunnos.runtime.ScriptRunner.run(ScriptRunner.java:288)
[ant:java] at org.danann.cernunnos.runtime.ScriptRunner.run(ScriptRunner.java:225)
[ant:java] at org.danann.cernunnos.runtime.ScriptRunner.run(ScriptRunner.java:158)
[ant:java] at org.danann.cernunnos.runtime.Main.main(Main.java:103)
[ant:java] Caused by: java.lang.RuntimeException: The specified DIR does not exist: /opt/uPortal/uPortal-start/overlays/NewsReaderPortlet/build/export
[ant:java] at org.danann.cernunnos.io.FileIteratorTask.perform(FileIteratorTask.java:107)
[ant:java] at org.danann.cernunnos.runtime.RuntimeTaskDecorator.perform(RuntimeTaskDecorator.java:77)
[ant:java] ... 17 more
> Task :overlays:NewsReaderPortlet:dataImport FAILED
This cause .gradlew dataImport
fail , we should use ./gradlew overlays:uPortal:dataImport
instead and in waiting this is fixed