JPA: Cannot resolve Table 'xxxx'

Why does IntelliJ give me this error if I have the generateDdl option configured for jpaVendorAdapter. Why is there even a dependency on this that is causing my compile to fail. I'm new to IntelliJ and all I'm trying to do is build a war file

0
Avatar
Permanently deleted user

Setting DataSource Annotation problems to warnings in the projects settings did not resolve this.

0
Avatar
Permanently deleted user

Here is a concrete example.

@Column( name = "modifiedDate", updatable = true, nullable = false )

modifiedDate does not exist. This table should be generated on deployment but IntelliJ is failing to compile my war even though I tried to change the datasource error to warning. What is up with this?

0

Hello Samuel,

Setting DataSource Annotation problems to warnings in the projects
settings did not resolve this.


Try to set "Validate JPA model on compilation" = Off in JPA facet settings.

Alexander.


0
Avatar
Permanently deleted user

Sorry , I am a newbie , where can I set JPA facet setting ?

0
Avatar
Permanently deleted user

I don't know about JPA in particular, but in general, facets show up in the Project Settings within the particular module that contains the code to which the facet pertains.

RRS

0
Avatar
Permanently deleted user

thank man , I did really headache with this problem but now , it's run

0
Avatar
Permanently deleted user

I got around this issue by changing the Severity in Preferences->Inspections->JavaEE Issues->Persistence QL Problems from 'As Error' to 'As Warning'

0
Avatar
Permanently deleted user

Sometimes the problem is, that your datasource is not configured correctly. Normally it's useful to have it configured so that an error is shown when using wrong table names.
For me, the problem was, that the datasource was not selected for the JPA facet for my module. You should make sure:

  • Datasource is configured correctly in the datasources window: Tools->Datasources
  • Select the Datasource in your JPA fracet for your modules: Project Structure->Facets->JPA->[your module] then select a previously configured database in the 'Data Source Mappings' table.


Cheers ;-)
Felix

1
Avatar
Permanently deleted user

Thanks Felix!  Not only did that solve the problem it added a nice helpful feature I didn't realize was there!

1
Avatar
Permanently deleted user

I had this annoying problem! But, it is possible to solve by going to Settings -> Inspections and unchecking the option as seen in the image below ...

 


4

请先登录再写评论。