Hallo zusammen,
bin bei der Suche nach 'Docker' auf diesen Thread gestoßen und hoffe, dass ich den reaktivieren darf. Habe auch zig FirstSpirit-Instanzen in Docker-Containern laufen und will nun noch den Projektimport, die Installation von Modulen, das Einspielen von templates usw. automatisieren. Der Projektimport (des Mithras 2.0 Projekts) in FS 5.2.311 (andere Versionen habe ich nicht probiert) scheitert mit einer NPE, wenn ich das über die API durchführe:
12.02.2016 10:54:45.910 Converting schedule entry 'generate partly' (old id = 21364, new id = 11384)
12.02.2016 10:54:45.910 Converting schedule entry 'Full Deployment' (old id = 21365, new id = 11385)
12.02.2016 10:54:45.911 Converting schedule entry 'generate full' (old id = 21366, new id = 11386)
12.02.2016 10:54:45.911 Converting schedule entry 'Delta Deployment' (old id = 21360, new id = 11387)
12.02.2016 10:54:45.911 Converting schedule entry 'Repair references' (old id = 21361, new id = 11388)
12.02.2016 10:54:45.911 Converting schedule entry 'Teildeployment' (old id = 21362, new id = 11389)
12.02.2016 10:54:45.911 Converting schedule entry 'Rebuild search index' (old id = 21363, new id = 11390)
12.02.2016 10:54:45.914 Importing schedule storage
12.02.2016 10:54:45.921 Importing schedule storage
12.02.2016 10:54:45.922 Importing schedule storage
12.02.2016 10:54:45.922 Importing schedule statistics
12.02.2016 10:54:45.923 Importing schedule task templates
12.02.2016 10:54:45.924 Error importing project CMO Mithras 2.0 - java.lang.NullPointerException
12.02.2016 10:54:45.924 FSVersion=5.2.311.72449#4587;JDK=1.8.0_72 64bit Oracle Corporation;OS=Linux 3.16.7-29-desktop amd64;Date=12.02.2016 10:54:45
java.lang.NullPointerException
at de.espirit.firstspirit.server.export.importhandler.ScheduleImportHandler$Helper.importScheduleTaskTemplates(ScheduleImportHandler.java:101)
at de.espirit.firstspirit.server.export.importhandler.ScheduleImportHandler.transfer(ScheduleImportHandler.java:63)
at de.espirit.firstspirit.server.export.ProjectImporter.call(ProjectImporter.java:396)
at de.espirit.firstspirit.server.export.ProjectImporter.call(ProjectImporter.java:66)
at de.espirit.firstspirit.server.action.ServerActionManagerImpl$ServerActionCallableWrapper.call(ServerActionManagerImpl.java:415)
at de.espirit.firstspirit.server.action.ServerActionManagerImpl$ServerActionCallableWrapper.call(ServerActionManagerImpl.java:396)
at de.espirit.firstspirit.server.ExecutionManagerImpl$ExtendedCallable.call(ExecutionManagerImpl.java:600)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at de.espirit.common.util.BoundedExecutorService$RunnableWrapper.run(BoundedExecutorService.java:436)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at de.espirit.common.util.SuspendableThread.run(SuspendableThread.java:55)
Der Code:
...
upload = projectStorage.uploadExportFile(exportFile.getName(), fis);
if (upload != null) {
ProjectInfo projectInfo = projectStorage.getProjectInfo(upload);
Map<String, String> layerMapping = new HashMap<String, String>();
String layerName = "";
for (final Properties property : projectInfo.getUsedLayers()) {
layerName = property.getProperty("name");
layerMapping.put(layerName, null);
}
ImportParameters importParams = new ImportParameters(upload, projectInfo, projectName, projectDescription, layerMapping, new HashMap<Long, Long>());
importParams.setActivateDeployments(true);
importParams.setActivateProject(true);
ServerActionHandle<ImportProgress, Boolean> importHandle = projectStorage.startImport(importParams);
Ich hoffe, mir kann jemand eine Idee vermitteln, ob in unserem Code was fehlt oder was sonst die Ursache der NPE sein könnte.
Danke. Heiko