Hi Damian, I changed the code from your idea with "select 1", but I still have errors ( There is already an object named '#NNodeQuads' in the database).
:( I have to go up in the SDB functionality and trace the connection, since is the only one passed in the whole chain. regards, Adrian On Wed, May 16, 2012 at 11:53 AM, Damian Steer <[email protected]>wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 16/05/12 06:42, Adrian Paleacu wrote: > > Damian, > > > > > [5/15/12 8:20:14:731 MDT] FFDC Exception:java.sql.SQLException > > SourceId:com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.execute > > ProbeId:296 > > Reporter:com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@38273827 > > java.sql.SQLException: There is already an object named > > '#NNodeQuads' in the database. > > > > I tried to use Optimistic or Pessimistic ensureTempTablesX but it > > fails within these two lines of code. > > > > if (!TableUtils.hasTable(connection().getSqlConnection(), > > getNodeLoader())) connection().execSilent(getCreateTempNodes()); > > > > Right now I'm investigating this problem but any help will be > > appreciated. > > hasTable uses JDBC metadata to work out whether a table exists. Given > the ... indifferent ... implementation of this is some drivers perhaps > it would be more robust to provide a fallback like: > > try { "SELECT 1 FROM <tablename>" } catch { return false } > > (will that query do the trick? something along those lines anyway) > > Trouble is that it can mask errors, since the exception is just a > generic sql exception, rather than 'table not there'. However it might > be better than nothing. > > How does that sound? > > Damian > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+zawMACgkQAyLCB+mTtyl12ACg3u+cjJ8eoZWBRB/JDnJMCELk > LVMAoLg08jZeGq58Rhekpsa01BTFWpDu > =aWkW > -----END PGP SIGNATURE----- >
