JBOSS on the iSeries - SQL0518
The iSeries is capable of running JBOSS as a web-application server. Recently, an application that worked correctly for a couple of weeks, started to fail with the following message when accessing certain files:
java.sql.SQLException: [SQL0518] Prepared statement QZ9071F13D66785000 not found.
The information on the internet was at best very limited, and no action on our side could resolve the issue. We have tried each of the following in order to get the problem resolved:
- Added the EAR file into JBOSS again: File loads correctly, but the application still failed.
- Loaded a completely new EAR file into JBOSS: File loads correctly, but the application still failed.
- Checked authorities on the files in question: No problems found.
- Checked JBOSS profile if it is disabled: No problem found.
- Restored the JBOSS environment, as well as all the data files onto the original system: Restore was successful, but application still failed.
- Restored the JBOSS environment, as well as all data libaries onto another iSeries system: Application worked fine. Now we were confused.
After two weeks of pull-your-hair-out, we finally resolved it. We were checking to see if there were any SQL packages on the iSeries for our application, and saw a peculiar looking SQL package, called JBOSS699, sitting under QGPL. The date and time-stamp on the object was at least a month old, but since nobody created the object, it was assumed that JBOSS itself created the package.
Since we did not have anything to loose, we deleted the JBOSS699 object, and restarted JBOSS. Problem was solved.
Follow-up on the issue
The issue was eventually pinned down as being related to the data-source XML. We had the following entry in the data-source:
<connection-url>jdbc:as400://xx.xx.xx.xx:50008/DBNAME;block size=128;extended dynamic=true;package=JBOSS;package cache=true;
After changing the "package cache" to false, the problem was permanently resolved.