cancel
Showing results for 
Search instead for 
Did you mean: 

SQLJ in Session EJB DC - table unknown

darren_hague
Contributor
0 Kudos

Hi all,

I am in the process of migrating a Session EJB project into JDI. This project has a session bean who's methods call methods on a SQLJ class. There is an accompanying dictionary project which defines the tables being accessed.

This all works fine as individual projects in Developer Studio.

I have migrated the dictionary project and the Session EJB project into JDI, and made the resulting Dictionary DC a "used DC" of the Session EJB DC.

Unfortunately, when I try and build the Session EJB DC, it fails with messages like:

DataAccess.sqlj: table "VF_BUSINESS_ROLE" unknown

DataAccess.sqlj is my SQLJ file, and VF_BUSINESS_ROLE is one of the tables. I get a message like this for every table access.

Does anyone know how I can get the SQLJ in the DC to pick up the existence of the tables in the dictionary project?

Cheers,

Darren

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

How exactly did you define the Used DC... Which checkboxes did you enable? Is your table in the used public part?

darren_hague
Contributor
0 Kudos

It seems to be working now. I did two things - first, I made the used DC refer to the Public Part of the dictionary DC, not to the DC itself.

Second - and this seems to be what made the difference - I created a new VfCtx.sqlj to replace the old Ctx.sqlj (and identical copy) and replaced the references in the .sqlj files. This seems to have triggered a rebuild at a different level, and now I get no errors.

Pascal - thanks for pointing me in a useful direction.

Answers (1)

Answers (1)

darren_hague
Contributor
0 Kudos

OK, it's not working as well as I hoped.

Although the DC now builds OK in Developer Studio, I still get "table xxx unknown" error messages from the build job in CBS.

Relevant parts of the build log:


DC Model check:
		[dcmake] All used DCs are available locally
		[dcmake] validating dependency to  public part "RoleManager_DB" of DC "axon/RoleManager_DB"
		[dcmake] DC model check OK
...
compile:
      [echo] Start SQLJ Pre-processing
      [sqlj] Using catalog:xml/file//usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/opensql/_comp/gen/default/public/default/lib/java/opensql.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/opensql/_comp/gen/default/public/default/lib/java/sqljapi.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/tc/logging/_comp/gen/default/public/default/lib/java/logging.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/tc/logging/_comp/gen/default/public/default/lib/java/logging.perf.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/jms/_comp/gen/default/public/default/lib/java/jms.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/axon/RoleManager_DB/_comp/gen/default/public/RoleManager_DB/lib/java/axon~RoleManager_DB~RoleManager_DB.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/ejb20/_comp/gen/default/public/default/lib/java/ejb20.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/com.sap.tc.Logging/_comp/gen/default/public/default/lib/java/loggingStandard.jar:/usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/sap.com/jdbc20/_comp/gen/default/public/default/lib/java/jdbc.jar
      [sqlj] error: 40/3-41/39: file /usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/axon/TechBusRoleEJB/_comp/ejbModule/com/vodafone/persistence/sqlj/DataAccess.sqlj: table "VF_BUSINESS_ROLE" unknown
      [sqlj] error: 61/3-62/48: file /usr/sap/K46/JC72/j2ee/cluster/server0/temp/CBS/1b/.B/9785/DCs/axon/TechBusRoleEJB/_comp/ejbModule/com/vodafone/persistence/sqlj/DataAccess.sqlj: table "VF_BUS_TECH_MAP" unknown
...
Build finished with ERROR

Message was edited by:

Darren Hague

Former Member
0 Kudos

Which options did you check for the Used DC definition to axon/RoleManager_DB?

darren_hague
Contributor
0 Kudos

"Build time" was checked by default, and I also checked "Design time".

"Deploy time" and "Run time" are unchecked, and the runtime quality dropdown is set to blank.

- Darren