I found a way to get around this problem. I copied the prvtaqal.plb script from an old OracleXE 10g install over and ran that in the OracleXE 11g instance. Types are available and all is good.
Cannot enable JMS types in OracleXE 11g - component 'CONSTRUCT' must be declared
Question
We have a set of automated tests for an Oracle database that we run on a CI server using OracleXE. Some of the tests use the AQ$_JMS_TEXT_MESSAGE type like so:
msg SYS.AQ$_JMS_TEXT_MESSAGE;
BEGIN
msg := SYS.AQ$_JMS_TEXT_MESSAGE.construct;
msg.set_text(pMessage);
In the past we have used OracleXE 10g, but I am trying to upgrade to XE 11g to match the normal Oracle servers this database runs on. Unfortunately, I cannot seem to enable those types in OracleXE 11g. I get the following errors trying to compile those packages using it:
1797/5 PL/SQL: Statement ignored
1797/37 PLS-00302: component 'CONSTRUCT' must be declared
1798/5 PL/SQL: Statement ignored
1798/9 PLS-00302: component 'SET_TEXT' must be declared
1799/5 PL/SQL: Statement ignored
OracleXE did not have these types installed by default in 10g either, which we remedied by executing this script found in the install:
RDBMS\ADMIN\prvtaqal.plb
Even after running that in OracleXE 11g though, the types still cannot be resolved. I also searched the contents of other files in the same location related to JMS and found these two:
RDBMS\ADMIN\dbmsaqad.sql
RDBMS\ADMIN\prvtaqji.plb
Installing those also had no effect.
Has anyone been able to use the AQ$_JMS_TEXT_MESSAGE type in OracleXE 11g and know how to work around this? Or was the ability to work around it in XE10g a hole that they have now plugged?
Solution