Many of the test cases create tables with the same names. Most of the test cases also drop them before they finish, but some of them don't. This problem is only seen when the test cases are run in a particular order, with a test case that don't drop the tables it created before test cases that use the same table name. On phoneME, the test cases are run in the opposite order of how they appear in the source file. I haven't run the test on phoneME myself, but if I change suite() and force reversed order, I see the same errors on Java SE.
The attached patch adds DROP TABLE to those test cases missing it. Also, one of the test cases called rollback() at the end, but it had no effect because it was running with auto-commit, so I turned off auto-commit in that test case. That test case also dropped the function PADSTRING right before rollback(), which looked unnecessary, so I removed it (see also
DERBY-4524 about clean-up of PADSTRING).
Perhaps it would be better to move all the dropping of tables and other cleanup into a tearDown() method. But since doing the cleanup inside the test cases is the established pattern in this test, I'll just do this simple change to make the test internally consistent for now. If someone wants to write a proper tearDown(), feel free to open separate issue for that.