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

[Bug]: MS Access output transform doesn't set the text field length right #2867

Closed
KBoersch opened this issue Apr 26, 2023 · 0 comments · Fixed by #2876
Closed

[Bug]: MS Access output transform doesn't set the text field length right #2867

KBoersch opened this issue Apr 26, 2023 · 0 comments · Fixed by #2876
Assignees
Labels
bug P2 Default Priority Transforms
Milestone

Comments

@KBoersch
Copy link

KBoersch commented Apr 26, 2023

Apache Hop version?

2.4.0

Java version?

OpenJDK 11.0.16.1

Operating system

Windows

What happened?

When I try to load some data in a access-db via ms access output transform, the transform will set the field length for text fields to 1, no matter what length is set in the row-meta-data before. That causes the following error:

2023/04/26 11:13:45 - Microsoft Access output.0 - ERROR: Error closing the database: com.healthmarketscience.jackcess.BatchUpdateException: Failed adding rows (Db=test.accdb;Table=test): com.healthmarketscience.jackcess.InvalidValueException: Text is wrong length for TEXT column, max 1, min 0, got 15 (Db=test.accdb;Table=test;Column=test1)

To give you a simple example, I just generated some rows and tried to put them into a accdb-file. Pipeline and generated db are attached.

Also after the first creation of the db, hop throws the following error, when I try to run the pipeline again, immediately after deleting the db. I've to wait some time, until it works again. Seems to me, that hop doesn't close the connection after executing the pipeline.

2023/04/26 11:11:37 - Microsoft Access output.0 - Writing access database to file 'P:/Entwicklung/projects/HOP-AT\test.accdb'.
2023/04/26 11:11:37 - Microsoft Access output.0 - ERROR: An error occurred intialising this transformation: P:\Entwicklung\projects\HOP-AT\test.accdb
2023/04/26 11:11:37 - Microsoft Access output.0 - ERROR: There was an unexpected error while creating a table: java.lang.NullPointerException: Cannot invoke "com.healthmarketscience.jackcess.Database.getTable(String)" because "this.data.db" is null.
2023/04/26 11:11:37 - Microsoft Access output.0 - ERROR: java.lang.NullPointerException: Cannot invoke "com.healthmarketscience.jackcess.Database.getTable(String)" because "this.data.db" is null
2023/04/26 11:11:37 - Microsoft Access output.0 - at org.apache.hop.pipeline.transforms.accessoutput.AccessOutput.writeToTable(AccessOutput.java:117)
2023/04/26 11:11:37 - Microsoft Access output.0 - at org.apache.hop.pipeline.transforms.accessoutput.AccessOutput.processRow(AccessOutput.java:83)
2023/04/26 11:11:37 - Microsoft Access output.0 - at org.apache.hop.pipeline.transform.RunThread.run(RunThread.java:55)
2023/04/26 11:11:37 - Microsoft Access output.0 - at java.base/java.lang.Thread.run(Thread.java:833)
2023/04/26 11:11:37 - Microsoft Access output.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)

accessExamples.zip

Issue Priority

Priority: 2

Issue Component

Component: Transforms

@github-actions github-actions bot added P2 Default Priority Transforms labels Apr 26, 2023
@nadment nadment self-assigned this Apr 27, 2023
@nadment nadment added this to the 2.5 milestone Apr 27, 2023
hansva added a commit that referenced this issue May 2, 2023
MS Access output transform doesn't set the text field length right #2867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P2 Default Priority Transforms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants