You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jose Diaz <jd...@bluestarenergy.com> on 2007/10/31 00:50:56 UTC

Exception in this method

I am getting it error and no idea about  the solution.
This is the method:
public void commit() throws SQLException {
if (con == null) throw new SQLException(CLOSED);
if (((XAResourceImpl) xaCon.getXAResource()).isTransaction())
throw new SQLException("Cannot commit a transactional connection: See JDBC 2.0 Optional Package Specification section 7.1 (p25)");
try {
con.commit();
} catch (SQLException e) {
setError(e);
throw e;
}
}
 
Please, let me know if someone can help with it issue.
 
Regards
 
Jose.

Re: Exception in this method

Posted by Adrian Crum <ad...@hlmksw.com>.
You will need to provide more information. What were you doing when this exception occurred? Also, 
please include the full stack trace.

Jose Diaz wrote:

> I am getting it error and no idea about  the solution.
> This is the method:
> public void commit() throws SQLException {
> if (con == null) throw new SQLException(CLOSED);
> if (((XAResourceImpl) xaCon.getXAResource()).isTransaction())
> throw new SQLException("Cannot commit a transactional connection: See JDBC 2.0 Optional Package Specification section 7.1 (p25)");
> try {
> con.commit();
> } catch (SQLException e) {
> setError(e);
> throw e;
> }
> }
>  
> Please, let me know if someone can help with it issue.
>  
> Regards
>  
> Jose.
> 


Re: Exception in this method

Posted by BJ Freeman <bj...@free-man.net>.
my guess is that you have not connected to your DB at startup.
if (con == null) throw new SQLException(CLOSED)

this may be your entityengine.xml setup
or the DB, may not be running
or the DB is not accessible from this server.

please explain you specific setup. relative to the DB and ofbiz.

Jose Diaz sent the following on 10/30/2007 3:50 PM:
> I am getting it error and no idea about  the solution.
> This is the method:
> public void commit() throws SQLException {
> if (con == null) throw new SQLException(CLOSED);
> if (((XAResourceImpl) xaCon.getXAResource()).isTransaction())
> throw new SQLException("Cannot commit a transactional connection: See JDBC 2.0 Optional Package Specification section 7.1 (p25)");
> try {
> con.commit();
> } catch (SQLException e) {
> setError(e);
> throw e;
> }
> }
>  
> Please, let me know if someone can help with it issue.
>  
> Regards
>  
> Jose.
> 
> 
>