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

Cannot compile autogenerated code because of multiple java errors #7684

Closed
saibotma opened this issue Jul 24, 2018 · 5 comments
Closed

Cannot compile autogenerated code because of multiple java errors #7684

saibotma opened this issue Jul 24, 2018 · 5 comments

Comments

@saibotma
Copy link

I used java --add-modules java.xml.bind -classpath jooq-3.11.3.jar;jooq-meta-3.11.3.jar;jooq-codegen-3.11.3.jar;postgresql-42.2.4.jar;. org.jooq.codegen.GenerationTool jooq.xml to autogenerate JOOQ code for my PostgreSQL 10 USER table.
pgadmin4_2018-07-24_08-08-49

The codegen tool finishes successfully however my program won´t compile because there are several Java syntax errors in the autogenerated code.

Some examples:
PgClass.java

/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public final TableField<PgClassRecord, Object> RELPARTBOUND = createField("relpartbound", , this, "");

idea64_2018-07-24_08-12-48

The compiler is telling me java: illigal start of expression

PgIndex.java:

/**
* The column <code>pg_catalog.pg_index.indoption</code>.
*/
public final TableField<PgIndexRecord, Object[]> INDOPTION = createField("indoption", .getArrayDataType(), this, "");

idea64_2018-07-24_08-15-31

The compiler is telling me java: as of release 8, 'this' is allowed as the parameter name for the receiver type only, which has to be the first parameter

  • jOOQ: 3.11.3
  • Java: 1.8.0_181
  • Database (include vendor): PostgreSQL 10
  • OS: Windows 10
@saibotma saibotma changed the title Multiple java: illigal start of expression in autogenerated code Multiple java errors in autogenerated code Jul 24, 2018
@saibotma saibotma changed the title Multiple java errors in autogenerated code Cannot compile autogenerated code because of multiple java errors Jul 24, 2018
@saibotma
Copy link
Author

@lukaseder
Copy link
Member

This issue is fixed through #7692

@lukaseder
Copy link
Member

Thanks for documenting this problem!

@lukaseder
Copy link
Member

@saibotma The fix for issue #7692 has been backported to version 3.11.4

@saibotma
Copy link
Author

Thanks! I appreciate that :)

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

No branches or pull requests

2 participants