You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ming Fai <mi...@hongkong.com> on 2001/11/10 10:40:05 UTC

JDBC exception

First of all, I have successfully setup a Turbine Web Application with
Microsoft SQL Server 2000 using JDBC drivers provided by MS. It works fine
for all tasks, such as authentication, edit member profile etc, but there
are two problems in creating new member as folloows:

1. DB Pool for transaction
Conf:		database.default.maxConnections=3
Problem:	Whenever I try to create a new member, I got the following error:
	java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Can't start a
cloned connection while in manual transaction mode.
My idea:	To my understanding, the process of creating a new member involves
a transaction. Turbine tries to make a second connection to work on the same
transaction but this is not allowed in 'manual transaction mode'. It seems I
got to make it 'automatic transaction mode'. But how to do it? which java
class do this job? (so i can look at it further)

2. Fail to create new user
Conf:		database.default.maxConnections=1
Note:		As a workaround for problem 1, I make the maxConnections to 1.
Problem:	I got the following error when new user request is submitted:
       java.lang.NullPointerException
	at
org.apache.turbine.om.peer.BasePeer.rollBackTransaction(BasePeer.java:373)
	at org.apache.turbine.util.db.IDBroker.storeIDs(IDBroker.java:585)
	at org.apache.turbine.util.db.IDBroker.getNextIds(IDBroker.java:377)
	at org.apache.turbine.util.db.IDBroker.getIdAsBigDecimal(IDBroker.java:291)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:776)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:687)
	at
org.apache.turbine.services.security.db.DBUserManager.createAccount(DBUserMa
nager.java:399)
rethrown as org.apache.turbine.util.security.DataBackendException: Failed to
create account 'newuser'
	at
org.apache.turbine.services.security.db.DBUserManager.createAccount(DBUserMa
nager.java:404)
	at
org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSecurit
yService.java:391)My idea:

>rethrown as org.apache.turbine.util.security.DataBackendException: Failed
to create account 'newuser'
Where should I look at to troubleshoot the problem?


Regards,
mingfai

p.s.
FYI: The SQL 2000 setup is not smooth. I am not able to run "ant init" to
create the table as it can't load JDBC driver even I've put them at the /lib
directory. So, I use ant to generate the create tables sql scripts and
manually create the table.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>