Hello there,
Our application should work twenty-for seven. Suddenly an exception occurs. This exception isn't caught in the application, instead I see it on the console. (At the moment we start the application from the console).
For example I see:
... WARN: Validation query for connection failed. ...
Nested Exception
unexpected end of input stream
...
After that the application doesn't work anymore. It seems like I can no longer establish a connection to the database. The only way to get the application running again is the comlete new start.
We use the following classes:
-----------------------begin
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
-----------------------end
The repository.xml looks like this for example:
--------------------------begin
<class-descriptor class="de.softenery.wis.mydata" table="mydata" > <field-descriptor id="1" name="id" column="mydata_id" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="readonly" /> <field-descriptor id="2" name="weaId" column="w_id" jdbc-type="INTEGER" /> <field-descriptor id="22" name="modifikation" column="modifikation" jdbc-type="TIMESTAMP" conversion="de.mhr.wis.DBAdapter.ojbAdapter.Calendar2Timestamp" /> <field-descriptor id="23" name="timestamp" column="zeitstempel" jdbc-type="TIMESTAMP" conversion="de.mhr.wis.DBAdapter.ojbAdapter.Calendar2Timestamp" /> </class-descriptor>
---------------end
The repository_database.xml looks like this:
------------------begin
<jdbc-connection-descriptor jcd-alias="sow" default-connection="true" platform="MySQL" jdbc-level="2.0" driver="org.gjt.mm.mysql.Driver" protocol="jdbc" subprotocol="mysql" dbalias="//192.99.90.199:3306/sow" username="gogo" password="45jdkekdl" eager-release="false" batch-mode="false" useAutoCommit="1" ignoreAutoCommitExceptions="false" >
<connection-pool whenExhaustedAction="2" maxActive="21" validationQuery="select count(*) from datenklasse" />
<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNativeImpl"> </sequence-manager> </jdbc-connection-descriptor>
---------------end
And the code looks like this:
----------------------begin
try { broker = PersistenceBrokerFactory.defaultPersistenceBroker(); broker.beginTransaction();
[...] broker.getObjectByQuery(query); [...]
broker.store(data); } broker.commitTransaction();
} catch (TransactionInProgressException e) { logger.error(e); } catch (TransactionAbortedException e) { logger.error(e); } catch (TransactionNotInProgressException e) { logger.error(e); } catch (PBFactoryException e) { logger.error(e); } catch (PersistenceBrokerException e) { logger.error(e); } catch (Exception e) { logger.error(e); } finally { if (broker != null) { broker.clearCache(); broker.close(); } }
----------------end
Can anyone give me any help on this?
regards
Thomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]