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

init_script.sql causes error with Oracle Database #8373

Closed
hyder opened this issue Feb 13, 2024 · 2 comments · Fixed by #8426
Closed

init_script.sql causes error with Oracle Database #8373

hyder opened this issue Feb 13, 2024 · 2 comments · Fixed by #8426
Assignees
Labels

Comments

@hyder
Copy link

hyder commented Feb 13, 2024

Environment Details

  • Helidon Version: 4.0.5
  • Helidon SE or Helidon MP: MP
  • JDK version: 21
  • OS: Ubuntu
  • Docker version (if applicable):

Problem Description

init_script.sql are generated with a ; at the end e.g.

INSERT INTO CUSTOMERS (id, name, email) VALUES (1, 'user1', '[email protected]');

This causes an error with the Oracle Database:

Caused by: Error : 933, Position : 90, Sql = INSERT INTO CUSTOMERS (id, name, email) VALUES (1, 'user1', '[email protected]');, OriginalSql = INSERT INTO CUSTOMERS (id, name, email) VALUES (1, 'user1', '[email protected]');, Error Msg = ORA-00933: SQL command not properly ended

Steps to reproduce

@m0mus m0mus added the P2 label Feb 15, 2024
@tomas-langer tomas-langer self-assigned this Feb 15, 2024
@tomas-langer tomas-langer removed their assignment Feb 15, 2024
@m0mus m0mus added the 4.x Version 4.x label Feb 15, 2024
@tvallin
Copy link
Member

tvallin commented Feb 20, 2024

Hi,
I tried to reproduce your issue but I couldn't. Can you share a reproducer ?

@hyder
Copy link
Author

hyder commented Feb 26, 2024

Sorry I've updated the issue. There should be a semi-colon at the end. It's just what was generated when creating a new project e.g. the following is the generated SQL for pokemon:

INSERT INTO POKEMONTYPE VALUES (1, 'Normal');
INSERT INTO POKEMONTYPE VALUES (2, 'Fighting');
INSERT INTO POKEMONTYPE VALUES (3, 'Flying');
INSERT INTO POKEMONTYPE VALUES (4, 'Poison');
INSERT INTO POKEMONTYPE VALUES (5, 'Ground');
INSERT INTO POKEMONTYPE VALUES (6, 'Rock');
INSERT INTO POKEMONTYPE VALUES (7, 'Bug');
INSERT INTO POKEMONTYPE VALUES (8, 'Ghost');
INSERT INTO POKEMONTYPE VALUES (9, 'Steel');
INSERT INTO POKEMONTYPE VALUES (10, 'Fire');
INSERT INTO POKEMONTYPE VALUES (11, 'Water');
INSERT INTO POKEMONTYPE VALUES (12, 'Grass');
INSERT INTO POKEMONTYPE VALUES (13, 'Electric');
INSERT INTO POKEMONTYPE VALUES (14, 'Psychic');
INSERT INTO POKEMONTYPE VALUES (15, 'Ice');
INSERT INTO POKEMONTYPE VALUES (16, 'Dragon');
INSERT INTO POKEMONTYPE VALUES (17, 'Dark');
INSERT INTO POKEMONTYPE VALUES (18, 'Fairy');

INSERT INTO POKEMON VALUES (1, 'Bulbasaur', 12);
INSERT INTO POKEMON VALUES (2, 'Charmander', 10);
INSERT INTO POKEMON VALUES (3, 'Squirtle', 11);
INSERT INTO POKEMON VALUES (4, 'Caterpie', 7);
INSERT INTO POKEMON VALUES (5, 'Weedle', 7);
INSERT INTO POKEMON VALUES (6, 'Pidgey', 3);

The ; causes the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants