I'm supposed to convert this huge list of CSV files into PX files (as in "PC Axis files"). In order to do this, I'm supposed to run a groovy script, which has been working for my predecessor without issues.
I follow the instructions and place the CSV-files in the in-directory. I'm supposed to just run the Windows Batch File in the folder below.
This does not work however, so I run the command prompt and change my directory to the folder above. I then type
mvn clean compile gplus:execute -Pprod
And I get an error message complaining that a certain file ("inputFiles.lst") can't be deleted.
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ se.fohm.pxweb ---
[INFO] Deleting C:\Repos\folkhalsodata\pxjobbrunner\groovy\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.703 s
[INFO] Finished at: 2023-03-20T10:22:18+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project se.fohm.pxweb: Failed to clean project: Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status\maven-compiler-plugin\compile\default-compile\inputFiles.lst -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
So I delete this file manually and it immediatly start complaining about another file
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< pxjobrunner:se.fohm.pxweb >----------------------
[INFO] Building pxjobrunner 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ se.fohm.pxweb ---
[INFO] Deleting C:\Repos\folkhalsodata\pxjobbrunner\groovy\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.750 s
[INFO] Finished at: 2023-03-20T10:23:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project se.fohm.pxweb: Failed to clean project: Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status\maven-compiler-plugin\compile\default-compile\createdFiles.lst -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
If i delete "that", it starts complaining about not being able to delete the whole directory. If I delete "that" it starts to complain about the parent directory and so forth.
I then try telling the command prompt to ignore these errors. I type
mvn clean compile gplus:execute -Pprod -Dmaven.clean.failOnError=false
I am now rewarded with an absolutely huge list of files which fails to get deleted (I only include a sample due to lack of space):
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< pxjobrunner:se.fohm.pxweb >----------------------
[INFO] Building pxjobrunner 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ se.fohm.pxweb ---
[INFO] Deleting C:\Repos\folkhalsodata\pxjobbrunner\groovy\target
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status\maven-compiler-plugin\compile\default-compile
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status\maven-compiler-plugin\compile
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status\maven-compiler-plugin
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\maven-status
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\MailClient.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\JobHelper.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\InjectionType.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\IndicatorHelper.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\Indicator.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\FileUtils.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\Constants.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\Configuration.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\CommandHelper.java
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob
[WARNING] Failed to delete C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm
[WARNING] Failed to delete
At the end of the log I find several other errors, seeming to claim folders can't be written to since access has been denied (again I can include only a sample):
[INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------ [INFO] Total time: 02:06 min
[INFO] Finished at: 2023-03-20T10:52:42+01:00
[INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.5:generateStubs (default) on project se.fohm.pxweb: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed: [ERROR] General error during conversion: C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\Configuration.java (Access is denied)
[ERROR]
[ERROR] java.io.FileNotFoundException: C:\Repos\folkhalsodata\pxjobbrunner\groovy\target\generated-sources\groovy-stubs\main\se\fohm\pxjob\Configuration.java (Access is denied) [ERROR] at java.io.FileOutputStream.open0(Native Method) [ERROR] at java.io.FileOutputStream.open(FileOutputStream.java:270) [ERROR] at java.io.FileOutputStream.<init>(FileOutputStream.java:213) [ERROR] at java.io.FileOutputStream.<init>(FileOutputStream.java:162) [ERROR] at org.codehaus.groovy.tools.javac.JavaStubGenerator.generateClass(JavaStubGenerator.java:104)
[ERROR] at org.codehaus.groovy.tools.javac.JavaStubCompilationUnit$2.call(JavaStubCompilationUnit.java:73)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1055)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
[ERROR] at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
[ERROR] at org.codehaus.groovy.tools.javac.JavaStubCompilationUnit.compile(JavaStubCompilationUnit.java:93)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498) [ERROR] at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:118)
[ERROR] at org.codehaus.gmavenplus.mojo.AbstractGenerateStubsMojo.doStubGeneration(AbstractGenerateStubsMojo.java:184)
[ERROR] at org.codehaus.gmavenplus.mojo.GenerateStubsMojo.execute(GenerateStubsMojo.java:58)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[UPDATE 1]
If I delete the entire target folder the script runs, but no px files are created in the out-folder. Near the end I find a note about non-valid indicators.
2023-03-20 12:16:27 INFO JobHelper:? - 29 csv file(s) found
2023-03-20 12:16:27 INFO JobHelper:? - Indicators to be updated:a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,ea
2023-03-20 12:16:27 DEBUG JobHelper:? - 0 valid indicators:
2023-03-20 12:16:27 DEBUG JobHelper:? - 17 invalid indicators: g, n, e, b, h, c, j, f, i, o, ea, d, m, l, k, p, a
2023-03-20 12:16:27 DEBUG JobHelper:? - [g: no set/ini file can be found for the indicator!, g: no header file can be found for the indicator!, g: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [n: no set/ini file can be found for the indicator!, n: no header file can be found for the indicator!, n: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [e: no set/ini file can be found for the indicator!, e: no header file can be found for the indicator!, e: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [b: no set/ini file can be found for the indicator!, b: no header file can be found for the indicator!, b: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [h: no set/ini file can be found for the indicator!, h: no header file can be found for the indicator!, h: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [c: no set/ini file can be found for the indicator!, c: no header file can be found for the indicator!, c: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [j: no set/ini file can be found for the indicator!, j: no header file can be found for the indicator!, j: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [f: no set/ini file can be found for the indicator!, f: no header file can be found for the indicator!, f: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [i: no set/ini file can be found for the indicator!, i: no header file can be found for the indicator!, i: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [o: no set/ini file can be found for the indicator!, o: no header file can be found for the indicator!, o: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [ea: no set/ini file can be found for the indicator!, ea: no header file can be found for the indicator!, ea: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [d: no set/ini file can be found for the indicator!, d: no header file can be found for the indicator!, d: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [m: no set/ini file can be found for the indicator!, m: no header file can be found for the indicator!, m: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [l: no set/ini file can be found for the indicator!, l: no header file can be found for the indicator!, l: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [k: no set/ini file can be found for the indicator!, k: no header file can be found for the indicator!, k: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [p: no set/ini file can be found for the indicator!, p: no header file can be found for the indicator!, p: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - [a: no set/ini file can be found for the indicator!, a: no header file can be found for the indicator!, a: no deployed px file path defined for the indicator!]
2023-03-20 12:16:27 DEBUG JobHelper:? - No valid indicator to update
2023-03-20 12:16:27 INFO JobHelper:? - End of job
2023-03-20 12:16:27 INFO JobHelper:? - List of erroneous files:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.782 s
[INFO] Finished at: 2023-03-20T12:16:27+01:00
[INFO] ------------------------------------------------------------------------
I don't code in groovy/maven/java at all, but I figure this might be a permission error somehow. I've contacted IT in order to be able to run the command prompt in administrator mode and/or kick out my predecessor if he's still somehow logged into the system (According to some of these answers, that might be an issue.
Apart from this I'm not really sure what to do. Any ideas?
I don't really have access (at least to my knowledge) to some kind of fancy point-and-click interface, I have access the command prompt and that's it.
[UPDATE 2]
I managed to get administrator rights. That suppresses the first error, but the px-files still aren't generated. I get the same notes about invalid ini- and header files as above.