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

11 comments
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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
Comment actions Permalink

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

1
Comment actions Permalink

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
Comment actions Permalink

Thanks Grupocodenome you are my hero

0

Please sign in to leave a comment.