Adalennis opened a new issue, #9386:
URL: https://github.com/apache/hop/issues/9386

   ### Apache Hop version?
   
   2.20.0
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   Reproduced on 2.20.0; the code involved is unchanged on main.
   
   `PGBulkLoaderMeta.check()` and `MySqlBulkLoaderMeta.check()` look up the 
connection with `findDatabase()` and only test that the connection name is not 
null. When no connection with that name exists, they create `new 
Database(loggingObject, variables, null)`, which throws:
   
   ```
   java.lang.NullPointerException: Cannot invoke 
"org.apache.hop.core.database.DatabaseMeta.getName()" because 
"this.databaseMeta" is null
        at org.apache.hop.core.database.Database.<init>
        at 
org.apache.hop.pipeline.transforms.pgbulkloader.PGBulkLoaderMeta.check
        at org.apache.hop.pipeline.transform.TransformMeta.check
        at org.apache.hop.pipeline.PipelineMeta.checkTransforms
   ```
   
   `PipelineMeta.checkTransforms()` then fails as a whole ("Error checking 
pipeline"), so the other remarks of the pipeline are lost too. The same method 
is behind Verify in Hop Gui.
   
   The samples `transforms/postgresql-bulk-loader.hpl` and 
`transforms/mysql-bulk-loader.hpl` use the connections `postgresql` and 
`mysql`, which are not in the samples project:
   
   - `hop lint` on either file prints `Error: Error checking pipeline`, writes 
no report and exits 1.
   - `hop lint` on the samples project reports both files as `SYSTEM-001 Failed 
to process file: Error checking pipeline`. The 15 other transforms in samples 
whose connection doesn't exist get a normal `CONNECTION_DOES_NOT_EXIST` remark.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Transforms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to