'java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
I have an error when I'm trying to copy data from csv file into mysql database, but when I launch the temps.etl.xml file with java launcher, it gives me an error. I thank that this error occurs because of the csvConnection driver but I have no idea what to do to avoid it. THANK YOU for your help !!!!!
This is my code in temps.etl.xml
<!DOCTYPE etl SYSTEM "http://scriptella.org/dtd/etl.dtd">
<etl>
<description>Copie des csv dans le data warehouse</description>
<properties>
<include href="connexion.properties"/>
</properties>
<connection id="db_out" driver="auto" url="$url" user="$user" password="$password" classpath="~/Scriptella/lib/mysql-connector-java-5.1.39-bin.jar" />
<connection id="temps_csv_in" driver="csv" url="../data/temps.csv" />
<query connection-id="temps_csv_in">
<script connection-id="db_out">
INSERT INTO temps(annee,mois,jour) VALUES (?annee,?mois,?jour);
</script>
</query>
</etl>
And the error message is :
18 mars 2022 21:50:29 <INFO> Execution Progress.Initializing properties: 1%
18 mars 2022 21:50:29 <INFO> Using mysql driver for url jdbc:mysql://localhost:3306/dw_vente
18 mars 2022 21:50:29 <INFO> Execution Progress.Initialized connection id=db_out, JdbcConnection{com.mysql.jdbc.JDBC4Connection}, Dialect{MySQL 5.5.5-10.7.3-MariaDB}, properties {}: 3%
18 mars 2022 21:50:29 <INFO> Execution Progress.Initialized connection id=temps_csv_in, CsvConnection, Dialect{CSV 1.0}, properties {}: 5%
18 mars 2022 21:50:29 <INFO> Execution Progress./etl/query[1] prepared: 10%
18 mars 2022 21:50:29 <WARNING> Unable to rollback transaction for connection CsvConnection: Transactions are not supported by CsvConnection
18 mars 2022 21:50:29 <INFO> Execution Progress.Complete
18 mars 2022 21:50:29 <SEVERE> Script /home/tah/Scriptella/Projet_DW/etl/temps.etl.xml execution failed.
Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
18 mars 2022 21:50:29 <SEVERE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.2
Exception:
scriptella.execution.EtlExecutorException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:190)
at scriptella.tools.launcher.EtlLauncher.execute(EtlLauncher.java:291)
at scriptella.tools.launcher.EtlLauncher.launch(EtlLauncher.java:206)
at scriptella.tools.launcher.EtlLauncher.main(EtlLauncher.java:336)
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
at java.base/jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(CgroupV2Subsystem.java:81)
at java.base/jdk.internal.platform.CgroupSubsystemFactory.create(CgroupSubsystemFactory.java:113)
at java.base/jdk.internal.platform.CgroupMetrics.getInstance(CgroupMetrics.java:167)
at java.base/jdk.internal.platform.SystemMetrics.instance(SystemMetrics.java:29)
at java.base/jdk.internal.platform.Metrics.systemMetrics(Metrics.java:58)
at java.base/jdk.internal.platform.Container.metrics(Container.java:43)
at jdk.management/com.sun.management.internal.OperatingSystemImpl.<init>(OperatingSystemImpl.java:182)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl.getOperatingSystemMXBean(PlatformMBeanProviderImpl.java:280)
at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl$3.nameToMBeanMap(PlatformMBeanProviderImpl.java:199)
at java.management/java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$0(ManagementFactory.java:488)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.management/java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:489)
at scriptella.execution.JmxEtlManager.getMBeanServer(JmxEtlManager.java:118)
at scriptella.execution.JmxEtlManager.register(JmxEtlManager.java:86)
at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:181)
... 3 more
....
Solution 1:[1]
I had a similar phenomenon with Spring Boot Actuator. In my case the problem was that the cgroup2 memory controller was missing for some reason.
The jdk.internal.platform.CgroupSubsystemFactory#create method expects a memory entry. You can check it with
$ cat /proc/cgroups
it should contain a row starting with "memory"
After a kernel update the problem was gone
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |