Re: Error in beginTransaction!

2006-05-17 Thread Danilo Tommasina

Hi,

try to set also the following:

jdbc-level=3.0
driver=com.mysql.jdbc.Driver

and use the newest mysql JDBC driver

cheers,
danilo

Armin Waibel wrote:

Hi Marcel,

Marcel Souza wrote:


Hello folks,

I am stucked in a problem using OJB.
I am trying to use MySQL and OJB but it always happens an error during 
broker.beginTransaction() that says Can't lookup a connection.

Anyone has a sugestion to solve it???



Could you please post the whole stack trace - I can't find the root 
exception?


In your jdbc-connection-descriptor you set:

dbms=MySQL

please try to replace this by

platform=MySQL

For example the my local mapping for mysql look like this:

jdbc-connection-descriptor
   jcd-alias=default
   default-connection=true
   platform=MySQL
   jdbc-level=2.0
   driver=org.gjt.mm.mysql.Driver
   protocol=jdbc
   subprotocol=mysql
   dbalias=//localhost:3306/ojb
   username=root
   password=
   batch-mode=false
useAutoCommit=2
ignoreAutoCommitExceptions=false
 

regards,
Armin




Thanks in advance, Marcel.


15:33:01,390 INFO  [ObjectCacheFactory] Start creating new ObjectCache 
instance
15:33:01,390 INFO  [ObjectCacheFactory] Default ObjectCache class was 
org.apache

.ojb.broker.cache.ObjectCacheDefaultImpl
15:33:01,390 INFO  [CacheDistributor] Use property 
'descriptorBasedCaches' is se

t 'false'
15:33:01,390 INFO  [ObjectCacheFactory] Instantiate new 
org.apache.ojb.broker.ca

che.CacheDistributor class object
15:33:01,390 INFO  [ObjectCacheFactory] New ObjectCache instance was 
created
15:33:01,390 INFO  [ConnectionFactoryPooledImpl] Create new connection 
pool:org.

[EMAIL PROTECTED]
  jcd-alias=mysql
  default-connection=false
  dbms=MySQL
  jdbc-level=2.0
  driver=com.mysql.jdbc.Driver
  protocol=jdbc
  sub-protocol=mysql
  db-alias=//localhost:3306/lportal
  user=root
  password=*
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, max
Wait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, 
testWhileIdle=false
, minEvictableIdleTimeMillis=60, testOnReturn=false, 
logAbandoned=false, rem
oveAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}

  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
  sequenceDescriptor=null
]
15:33:01,390 INFO  [STDOUT] javax.portlet.PortletException: Erro 
DoViewPadrao -

Can't lookup a connection




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Error in beginTransaction!

2006-05-17 Thread Eric Kelm
I have used the Liferay Portal before. Here is a thought. I thought about
trying this myself but never got around to it. Liferay portal creates a
datasource is liferay.xml. In Tomcat this is
/%LIFERAY_HOME/conf/Catalina/localhost/liferay.xml

Why not have OJB use existing datasource for transactions?

http://db.apache.org/ojb/docu/guides/deployment.html#Configure+OJB+for+manag
ed+environments+considering+as+JBoss+example 

Regard, Eric

--Original Message-
-From: Marcel Souza [mailto:[EMAIL PROTECTED] 
-Sent: Wednesday, May 17, 2006 12:21 PM
-To: OJB Users List
-Subject: Re: Error in beginTransaction!
-
-Hello Armin,
-
-I am posting the whole trace.
-One strange fact: my application works perfectly fine using 
-Oracle but shows the error (Can't lookup a connection) using Mysql.
-I did the replacements in code you sugested, unfortunatelly 
-it keeps showing the same error message. :( Thanks for your help,
-
-marcel.
-
-14:06:56,203 INFO  [Server] JBoss (MX MicroKernel) [3.2.5 (build: 
-CVSTag=JBoss_3
-_2_5 date=200406251954)] Started in 1m:282ms
-14:06:56,203 INFO  [Tomcat5] Saw 
-org.jboss.system.server.started notification, s tarting 
-connectors 14:06:56,250 INFO  [Http11Protocol] Starting 
-Coyote HTTP/1.1 on
-http-0.0.0.0-808
-0
-14:06:56,500 INFO  [ChannelSocket] JK2: ajp13 listening on 
-/0.0.0.0:8009
-14:06:56,515 INFO  [JkMain] Jk running ID=0 time=0/109  config=null
-14:07:14,093 INFO  [STDOUT] [BOOT] ERROR:
-14:07:14,093 INFO  [STDOUT] The specified class 
-org.apache.ojb.broker.locking.L ockManagerInMemoryImpl does 
-not implement the interface org.apache.ojb.odmg.loc 
-king.LockManager, which is a requirement for the key 
-LockManagerClass. 
-Using d
-efault class class org.apache.ojb.odmg.locking.LockManagerDefaultImpl
-14:07:14,234 INFO  [PersistenceBrokerFactoryDefaultImpl] 
-Create PersistenceBroke r instance pool, pool configuration 
-was {whenExhaustedAction=0, maxIdle=-1, maxA ctive=100, 
-maxWait=2000, removeAbandoned=false, 
-numTestsPerEvictionRun=10, testW hileIdle=false, 
-minEvictableIdleTimeMillis=100, testOnReturn=false, 
-logAband oned=false, removeAbandonedTimeout=300, 
-timeBetweenEvictionRunsMillis=-1, testOn Borrow=false} 
-14:07:14,250 INFO  [RepositoryPersistor] OJB Descriptor Repository: 
-file:/C:/jbo
-ss-3.2.5/server/default/deploy/9audaces.war/WEB-INF/classes/re
-pository.xml
-14:07:14,250 INFO  [RepositoryPersistor] Building repository 
-from :file:/C:/jbos 
-s-3.2.5/server/default/deploy/9audaces.war/WEB-INF/classes/rep
-ository.xml
-14:07:14,562 INFO  [RepositoryPersistor] Read class 
-descriptors took 312 ms
-14:07:14,562 INFO  [RepositoryPersistor] OJB Descriptor Repository: 
-file:/C:/jbo
-ss-3.2.5/server/default/deploy/9audaces.war/WEB-INF/classes/re
-pository.xml
-14:07:14,578 INFO  [RepositoryPersistor] Building repository 
-from :file:/C:/jbos 
-s-3.2.5/server/default/deploy/9audaces.war/WEB-INF/classes/rep
-ository.xml
-14:07:14,609 INFO  [RepositoryPersistor] Read connection 
-repository took 47 ms
-14:07:14,703 INFO  [ObjectCacheFactory] Start creating new 
-ObjectCache instance
-14:07:14,703 INFO  [ObjectCacheFactory] Default ObjectCache 
-class was org.apache .ojb.broker.cache.ObjectCacheDefaultImpl
-14:07:14,703 INFO  [CacheDistributor] Use property 
-'descriptorBasedCaches' 
-is se
-t 'false'
-14:07:14,703 INFO  [ObjectCacheFactory] Instantiate new 
-org.apache.ojb.broker.ca che.CacheDistributor class object
-14:07:14,734 INFO  [ObjectCacheFactory] New ObjectCache 
-instance was created
-14:07:14,796 INFO  [ConnectionFactoryPooledImpl] Create new 
-connection pool:org.
-[EMAIL PROTECTED]
-  jcd-alias=default
-  default-connection=true
-  dbms=Oracle
-  jdbc-level=2.0
-  driver=oracle.jdbc.driver.OracleDriver
-  protocol=jdbc
-  sub-protocol=oracle
-  db-alias=thin:@192.168.0.5:1521:dbserver
-  user=tlportal
-  password=*
-  eager-release=false
-  ConnectionPoolDescriptor={whenExhaustedAction=2, 
-maxIdle=50, maxActive=100, ma xWait=5000, 
-removeAbandoned=false, numTestsPerEvictionRun=10, 
-testWhileIdle=fals e, minEvictableIdleTimeMillis=60, 
-testOnReturn=false, logAbandoned=false, re 
-moveAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
-testOnBorrow=true}
-  batchMode=false
-  useAutoCommit=AUTO_COMMIT_IGNORE_STATE
-  ignoreAutoCommitExceptions=false
-  
-sequenceDescriptor=org.apache.ojb.broker.metadata.SequenceDesc
-[EMAIL PROTECTED]
- sequenceManagerClass=class
-org.apache.ojb.broker.util.sequence.SequenceMana
-gerNextValImpl
- Properties={autoNaming=false}
-]
-]
-14:07:15,781 INFO  [ObjectCacheFactory] Start creating new 
-ObjectCache instance
-14:07:15,781 INFO  [ObjectCacheFactory] Default ObjectCache 
-class was org.apache .ojb.broker.cache.ObjectCacheDefaultImpl
-14:07:15,781 INFO  [CacheDistributor] Use property 
-'descriptorBasedCaches' 
-is se
-t 'false'
-14:07:15,781 INFO  [ObjectCacheFactory] Instantiate new 
-org.apache.ojb.broker.ca che.CacheDistributor class object
-14:07:15,781 INFO

Re: Error in beginTransaction!

2006-05-16 Thread Edson Carlos Ericksson Richter
I don't know if this affects you, but I have serious trouble with 
maxIdle  2... So I always set it to 2 or greather...
Since you configured to use TestOnBorrow, check query you are using to 
make this test. I use something like select 1 from DUAL in Oracle 
databases, and select 1 in MS SQL. I don't know what you can do in 
MySQL, but choose one very fast, because it could has heavy impact on 
your app later...



intl lang='pt_BR'

Olá!

Marcel, eu trabalho com o OJB a uns 4 anos... e não tenho problemas com 
beginTransaction. Porém, com o SapDB, notadamente, eu tinha problemas 
para obter conexões se eu deixasse o parametro maxIdle = 1 ou maxIdle = 
0... E o SapDB também tinha o péssimo hábito de fechar minhas conexões e 
não re-abrí-las. Então, eu sempre usei maxIdle = 2, e TestOnBorrow=true 
e ainda a query que eu usava para o teste (que não ví na tua 
configuração) era select 1 from DUAL, e no MS SQL é simplesmente 
select 1.


Eu até tinha esquecido deste parametro (maxIdle), e não mudei quando 
migrei de SapDB para Oracle e posteriormente para MS SQL...


Espero que isto ajude.

/intl


Richter


Marcel Souza escreveu:

Hello folks,

I am stucked in a problem using OJB.
I am trying to use MySQL and OJB but it always happens an error during 
broker.beginTransaction() that says Can't lookup a connection.
Anyone has a sugestion to solve it???

Thanks in advance, Marcel.


15:33:01,390 INFO  [ObjectCacheFactory] Start creating new ObjectCache instance
15:33:01,390 INFO  [ObjectCacheFactory] Default ObjectCache class was org.apache
.ojb.broker.cache.ObjectCacheDefaultImpl
15:33:01,390 INFO  [CacheDistributor] Use property 'descriptorBasedCaches' is se
t 'false'
15:33:01,390 INFO  [ObjectCacheFactory] Instantiate new org.apache.ojb.broker.ca
che.CacheDistributor class object
15:33:01,390 INFO  [ObjectCacheFactory] New ObjectCache instance was created
15:33:01,390 INFO  [ConnectionFactoryPooledImpl] Create new connection pool:org.
[EMAIL PROTECTED]
  jcd-alias=mysql
  default-connection=false
  dbms=MySQL
  jdbc-level=2.0
  driver=com.mysql.jdbc.Driver
  protocol=jdbc
  sub-protocol=mysql
  db-alias=//localhost:3306/lportal
  user=root
  password=*
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, maxActive=21, max
Wait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, testWhileIdle=false
, minEvictableIdleTimeMillis=60, testOnReturn=false, logAbandoned=false, rem
oveAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, testOnBorrow=true}
  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
  sequenceDescriptor=null
]
15:33:01,390 INFO  [STDOUT] javax.portlet.PortletException: Erro DoViewPadrao -
Can't lookup a connection


  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Error in beginTransaction!

2006-05-16 Thread Marcel Souza

I tried your suggestions but unfortunatelly it did not work. :(
Thanks even though.

intl lang='pt_BR'
Carlos,
Estou usando OJB em conjunto com portlets.
Tudo tava funcionando bem em meus testes com o pluto + OJB + mysql.
Ai quando coloquei no portal definitivo liferay + OJB + mysql não funcionou 
mais!
To achando que é alguma incompatibilidade do liferay com mysql se bem que 
nao deveria dar problema... É muito estranho, pq quando a base é oracle 
funciona.

Bem, muito obrigado pela sua ajuda, grande abraco,
marcel.


- Original Message - 
From: Edson Carlos Ericksson Richter [EMAIL PROTECTED]

To: OJB Users List ojb-user@db.apache.org
Sent: Tuesday, May 16, 2006 2:20 PM
Subject: Re: Error in beginTransaction!



I don't know if this affects you, but I have serious trouble with
maxIdle  2... So I always set it to 2 or greather...
Since you configured to use TestOnBorrow, check query you are using to
make this test. I use something like select 1 from DUAL in Oracle
databases, and select 1 in MS SQL. I don't know what you can do in
MySQL, but choose one very fast, because it could has heavy impact on
your app later...


intl lang='pt_BR'

Olá!

Marcel, eu trabalho com o OJB a uns 4 anos... e não tenho problemas com
beginTransaction. Porém, com o SapDB, notadamente, eu tinha problemas
para obter conexões se eu deixasse o parametro maxIdle = 1 ou maxIdle =
0... E o SapDB também tinha o péssimo hábito de fechar minhas conexões e
não re-abrí-las. Então, eu sempre usei maxIdle = 2, e TestOnBorrow=true
e ainda a query que eu usava para o teste (que não ví na tua
configuração) era select 1 from DUAL, e no MS SQL é simplesmente
select 1.

Eu até tinha esquecido deste parametro (maxIdle), e não mudei quando
migrei de SapDB para Oracle e posteriormente para MS SQL...

Espero que isto ajude.

/intl


Richter


Marcel Souza escreveu:

Hello folks,

I am stucked in a problem using OJB.
I am trying to use MySQL and OJB but it always happens an error during 
broker.beginTransaction() that says Can't lookup a connection.

Anyone has a sugestion to solve it???

Thanks in advance, Marcel.


15:33:01,390 INFO  [ObjectCacheFactory] Start creating new ObjectCache 
instance
15:33:01,390 INFO  [ObjectCacheFactory] Default ObjectCache class was 
org.apache

.ojb.broker.cache.ObjectCacheDefaultImpl
15:33:01,390 INFO  [CacheDistributor] Use property 
'descriptorBasedCaches' is se

t 'false'
15:33:01,390 INFO  [ObjectCacheFactory] Instantiate new 
org.apache.ojb.broker.ca

che.CacheDistributor class object
15:33:01,390 INFO  [ObjectCacheFactory] New ObjectCache instance was 
created
15:33:01,390 INFO  [ConnectionFactoryPooledImpl] Create new connection 
pool:org.

[EMAIL PROTECTED]
  jcd-alias=mysql
  default-connection=false
  dbms=MySQL
  jdbc-level=2.0
  driver=com.mysql.jdbc.Driver
  protocol=jdbc
  sub-protocol=mysql
  db-alias=//localhost:3306/lportal
  user=root
  password=*
  eager-release=false
  ConnectionPoolDescriptor={whenExhaustedAction=0, maxIdle=-1, 
maxActive=21, max
Wait=5000, removeAbandoned=false, numTestsPerEvictionRun=10, 
testWhileIdle=false
, minEvictableIdleTimeMillis=60, testOnReturn=false, 
logAbandoned=false, rem
oveAbandonedTimeout=300, timeBetweenEvictionRunsMillis=-1, 
testOnBorrow=true}

  batchMode=false
  useAutoCommit=AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE
  ignoreAutoCommitExceptions=false
  sequenceDescriptor=null
]
15:33:01,390 INFO  [STDOUT] javax.portlet.PortletException: Erro 
DoViewPadrao -

Can't lookup a connection














-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]