How is your experience with the OutSystems Community?
3
Views
3
Comments
Solved
On deploy get "database is not defined for the following Foreign Entity" error
Application Type
Traditional Web

I'm getting the "database is not defined for the following Foreign Entity" error when deploying an application from Dev to Test.

  • Note the application works fine in Dev.
  • I've added the new Database Connection to Test and tested the connection (it says the test is successful)
  • During deployment it asks me to configure the database connections for each logical database. I've done that, saved and continued.

  • Deployment errors during Compiling Modules and gives errors like:

  • The from statement in the query has no join. It is just grabbing a view from the AS400data logical database. So, I don't see a problem there.
  • I've tried the Table of View Default Name both with and without the database name in the extension

Any ideas on what might be happening. Is this possibly a security issue? When I test the database connection, it works, so I was thinking it wouldn't be a security issue, but clearly something I haven't thought of is going on. 

I'll be grateful for any help.

UserImage.jpg
Kevin Martens
Solution

So, I decided to create the database objects in the Test version of the Extension and then publish there.

After doing that I tried deploying again from Dev and it succeeded without error.

Maybe doing this forced the system to recognize the database connection on Test. I don't know, but it worked.

2019-11-08 10-20-28
Huarlem Lima
Staff

I haven't seen this exact case documented, so take this as an educated guess. Since the error is raised while compiling the module that consumes the extension, I'd double-check two things. First, in Integration Studio, open each entity of the extension and look at its physical table/view name: the qualifier in [AS400_Tables].[dbo].[...] doesn't match the logical database name (AS400data), and it can end up being resolved against the wrong connection after deployment even if the mapping looks right in Test. Removing the qualifier on all entities, re-running the extension's dependencies and publishing it again may help. Second, make sure the user configured in the Test connection can actually read that view, since a successful "Test connection" doesn't guarantee permissions on every object.

UserImage.jpg
Kevin Martens

Thanks for your response. I posted a solution below.

UserImage.jpg
Kevin Martens
Solution

So, I decided to create the database objects in the Test version of the Extension and then publish there.

After doing that I tried deploying again from Dev and it succeeded without error.

Maybe doing this forced the system to recognize the database connection on Test. I don't know, but it worked.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.