APEX 5.0.2 has been released. This is, for the most part, a bug-fix release; all the really cool stuff is still going through the pipeline for version 5.1. Most of the packaged apps are not touched by this patch; the exceptions are:
- Data Reporter
- Application Standards Tracker
- Sample Reporting
- Live Poll
In the release notes, we mention that there’s a known issue with the first four of these. It’s an oddball, doesn’t-reproduce-on-most-systems bug, but if you run into it, it can be annoying.
Basically, if you had one of these packaged apps installed in 5.0, upgrading to the version included in 5.0.1 could fail with compilation errors (the same errors would occur if you uninstalled the packaged application and then tried to reinstall it). The issue is caused by the fact that these packaged applications include a PL/SQL package which includes a pipelined function returning a type defined in the package, and when the database tries to drop or update the package, it may–under some configurations; we haven’t been able to determine the exact recipe–not drop the correct objects, resulting in an “ORA-04043: object SYS_PLSQL_D8210ED9_307_1 does not exist” error. For more details, check out the “Issue 3” on this page; they explain it better than I can.
The good news: if you have one of the affected packaged apps installed, you can upgrade to the 5.0.2 version and all will work. The bad news: if you uninstalled one of the relevant apps and then tried (and failed) to install it, the 5.0.2 version won’t work–we discovered this right before release. It’ll be fixed in 5.1, sorry.
However, if you’ve run into this bug and you’re impatient, there is a workaround. After uninstalling Data Reporter, look to see if the package EBA_DP_FILTER_FW still exists (for P-Track, the package would be EBA_PROJ_FILTER_FW; for Application Standards Tracker, EBA_STDS_FILTER_FW; and for Sample Reporting, EBA_DEMO_IR_FILTER_FW). If it doesn’t, you’re fine and can go on with your life. If it’s still hanging around, though, you need to identify the “ghost” type and drop it. To do this, try to manually drop the package; you’ll get an error message like the one I reproduced above. Then take the name of the object it complains about (SYS_PLSQL_D8210ED9_307_1, in my example) and replace the number before the “_1” with the word “DUMMY”, and drop that type:
drop type SYS_PLSQL_D8210ED9_DUMMY_1;
At this point, you should be able to drop the EBA_DP_FILTER_FW package, and then reinstall the new version of Data Reporter.
For other developers, the “fix” for this is to declare the type returned by the pipelined function as a SQL type outside of the package, rather than a PL/SQL type in the package. There’s some loss of functionality–you can’t specify default values for the elements in the type or use booleans, for instance–but at least it avoids running into a versioned types bug.