cancel
Showing results for 
Search instead for 
Did you mean: 

Schema canot be resolved for respective table in Entity

Former Member
0 Kudos

Hi,

I am trying to develop a project in SAP NWDS 7.3 but my SAP Application Server is still Netweaver 7.0 EHP 1 . I succeded in developing Dictionary project with the name dict_pri but when i am trying to use the tables from the dictionary for generating entities I am getting this error

Schema "LocalDevelopmentdict_pridemo.sap.com" cannot be resolved for table "TEST_PRI_COURSE" TestPriCourse.java /LocalDevelopmentejb_pridemo.sap.com/ejbModule/com/apl/entities line 12 Validation Message

My Dictionary Project contains the mentioned table 'TEST_PRI_COURSE' and the same is visible in the database also

Please suggest what could be the issue and how the same can be resolved

Regards,

Smriti Garg

Edited by: Smriti_techno on Aug 8, 2011 7:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi guys,

I had the same problem and found a curious solution for it. Open the project prefs of the ejb (JPA) project, navigate to "Java Persistence" and change the following:

Mark the checkbox: "Override default schema from connection", in the schema drop down list, select your dictionary schema. e.g. "LocalDevelopment~yourdict~demo.sap.com"

Press the "Apply" Button and close the preferences dialog.

Now, you should clean the project: Project > Clean... (you can clean all).

The error should be fixed? It worked for me, please let me know if it works for you also.

Have a nice weekend, kind regards

Ben

patrickwenger
Participant
0 Kudos

Hi Ben

Sorry for the late response.

I've already "played around" with the options in the "Java Persistance" setting without success.

However, in our case the problem was a wrong @Table annotation in the respective class file. Instead of

@Table(name="TMP_EMPLOYEE");

we used

@Table(name="TMP_EMPLOYEE", schema = "\"LocalDevelopment~mydict~demo.sap.com\"");

This was done because eclipse marked the annotation (without explizit schema name - first sample) as an error (schema not found...). However, if my understanding is correct, it is important to use the default name for the schema because the schema name will be different when deployed to the target runtime. Therefor the schema must not be specified in the annotation. Although this results in an error in the local eclipse (NWDS) it is no problem to build, deploy and run the DCs. So we finally simply ignored the local error in eclipse.

Best regards,

Patrick

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

This one solved my problem:

"

Mark the checkbox: "Override default schema from connection", in the schema drop down list, select your dictionary schema. e.g. "LocalDevelopment~yourdict~demo.sap.com"

Press the "Apply" Button and close the preferences dialog.

"

Thanks.

Former Member
0 Kudos

For me this is the solution! Thanks!

Former Member
0 Kudos

worked for me too ! thanks !

Answers (1)

Answers (1)

patrickwenger
Participant
0 Kudos

Hi

Have you been able to solve this problem? I'm facing exactly the same problem. Any hint would be appreciated.

Thanks and best regards,

Patrick