I'm getting the "database is not defined for the following Foreign Entity" error when deploying an application from Dev to Test.
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.
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.
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.
Thanks for your response. I posted a solution below.