Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dataImport for Announcements #380

Open
bjagg opened this issue Dec 12, 2019 · 3 comments
Open

Fix dataImport for Announcements #380

bjagg opened this issue Dec 12, 2019 · 3 comments
Labels

Comments

@bjagg
Copy link
Member

bjagg commented Dec 12, 2019

Describe the bug
Currently, dataImport does not work for Announcements data files. DataInit does.

To Reproduce
Steps to reproduce the behavior:

  1. Start Hsql
  2. ./gradlew dataImport -Ddir data/quickstart/announcements/
  3. Check if import succeeded

Expected behavior
./gradlew dataImport -Ddir data/quickstart/announcements/ imports files in that directory

@bjagg bjagg added the bug label Dec 12, 2019
@remyjacob
Copy link

Is there a workaround for it ?

@jgribonvald
Copy link
Contributor

jgribonvald commented Jun 4, 2021

Is there a workaround for it ?

The workaround is to launch ./gradlew overlays:uPortal:dataImport -D..... when you don't need the announcement import

@jgribonvald
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants