ojb 1.0.4 and org.apache.ojb.broker.PBFactoryException: There was no 'default-connection'...

2006-03-15 Thread Dino Di Cola
Dear Armin and all OJB users,
long time has passed since my last help request and
ojb worked gracefully till now.

I am porting my j2ee application correctly deployed in
oracle as oc4j 9.0.4.x.x 
to oracle as oc4j 10.1.2.x.x. At the beginning I was
using db-ojb-1.0.3.jar but 
now I moved to the db-ojb-1.0.4.jar version. During DB
opening I can see the following 
org.apache.ojb.broker.PBFactoryException: There was no
'default-connection' 
attribute enabled in the jdbc connection descriptor...

Clearly the 'default-connection' attribute is set to
*true* in the repository_database.xml:





  
  
  




I also updated all the other configuration files from
db-ojb-1.0.4 distribution.
Here below the OJB.properties.

#
# OJB.properties -- configuration of the OJB runtime
environment
# Version: 1.0
# (c) 2001, 2002, 2003 Apache Software Foundation
# Author: Thomas Mahler and many others
# @version $Id: OJB.properties,v 1.75.2.13 2005/10/12
00:06:49 arminw Exp $
#
#
# repository file settings
#
# The repositoryFile entry tells OJB to use this file
as as its standard mapping
# repository. The file is looked up from the
classpath.
#
repositoryFile=repository.xml
#
# If the useSerializedRepository entry is set to true,
OJB tries to load a
# serialized version of the repository for performance
reasons.
# if set to false, OJB always loads the xml file.
# Setting this flag to true will accelerate the
startup sequence of OJB.
# If set to true changes to the repository.xml file
will only be detected
# after maually deleting the repository.xml.serialized
file.
useSerializedRepository=false
#
# If Repository serialization is used the entry
serializedRepositoryPath defines the
# directory where the Repository is written to and
read from.
# this entry is used only when the
useSerializedRepository flag is set to true
#
serializedRepositoryPath=.
#
#
# PersistenceBrokerFactory / PersistenceBroker
#
# The PersistenceBrokerFactoryClass entry decides
which concrete
# PersistenceBrokerFactory implemention is to be used.
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
# If in managed environment *only* the PB-api was used
it's recommended to use this factory
# to enable the PersistenceBroker instances to
participate in the JTA transaction. This makes
# e.g. PBStateListener work properly in managed
environments.
#PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
#
#
# The PersistenceBrokerClass entry decides which
concrete PersistenceBroker
# implementation is to be served by the
PersistenceBrokerFactory.
# This is the singlevm implementation:
PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
#
# This is an implementation that uses Prevayler
(prevayler.sf.net) as the persistent storage.
# Using this implementation OJB works as a simple
OODBMS
#PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
#
#
# This setting can be helpful during development if
the PersistenceBroker transaction
# demarcation was used (this is true in most cases).
If set 'true' on PB#store(...)
# and PB#delete(...) methods calls OJB check for
active PB-tx and if no active tx is
# found a error is logged. This can help to avoid
store/delete calls without a running
# PB-tx while development. Default setting is 'false'.
(Note: When using OJB in a managed
# environment *without* OJB-caching, it's valid to use
store/delete calls without a running PB-tx)
TxCheck=false
#
#
# PersistenceBroker pool
#
# PersistenceBroker pool configuration
# This pool uses the jakarta-commons-pool api.
# There you can find things described in detail.
#
# maximum number of brokers that can be borrowed from
the
# pool at one time. When non-positive, there is no
limit.
maxActive=100
#
# controls the maximum number of brokers that can sit
idle in the
# pool (per key) at any time. When non-positive, there
is no limit
maxIdle=-1
#
# max time block to get broker instance from pool,
after that exception is thrown.
# When non-positive, block till last judgement
maxWait=2000
#
# indicates how long the eviction thread should sleep
before "runs" of examining
# idle objects. When non-positive, no eviction thread
will be launched.
timeBetweenEvictionRunsMillis=-1
#
# specifies the minimum amount of time that an broker
may sit idle
# in the pool before it is eligable for eviction due
to idle time.
# When no

Re: ojb 1.0.4 and org.apache.ojb.broker.PBFactoryException: There was no 'default-connection'...

2006-03-15 Thread Dino
After some alignments on OJB configuration files and libraries dependencies the
problem below seems to be fixed. However another problem arises with the
following exception: org.odmg.TransactionNotInProgressException: No external
transaction found.

I am going to open another thread.


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



oc4j 9.0.4.0.1 : PersistenceBrokerException - java.lang.AbstractMethodError

2006-02-22 Thread Dino Di Cola
Dear all, 
I am working on a j2ee web application using OJB
(db-ojb-1.0.2) as persistence layer. 
The application server is oracle oc4j. The application
is perfectly working on 
oc4j v9.0.3.0.0 and v9.0.4.0.0 (both enterprise and
standalone versions). If I try to deploy 
the application on oc4j v9.0.4.0.0 O I get the
following error as soon as I access a resource (not
necessarily protected).
I have no clue on what happens in this new version and
if there is a OJB problem related to jdbc connection
(here below the repository_database.xml used):









Below is the error traced on my log files.
Any help is really appreciated.

Thanks.
--

Transaction was rolled back:
org.apache.ojb.broker.PersistenceBrokerException:
java.lang.AbstractMethodError:
com.evermind.sql.OrclCMTConnection.setStatementCacheSize(I)V;
nested exception is: 
org.apache.ojb.broker.PersistenceBrokerException:
java.lang.AbstractMethodError:
com.evermind.sql.OrclCMTConnection.setStatementCacheSize(I)V
com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.apache.ojb.broker.PersistenceBrokerException:
java.lang.AbstractMethodError:
com.evermind.sql.OrclCMTConnection.setStatementCacheSize(I)V
at
NoticeBoardController_StatelessSessionBeanWrapper14.getPublishedDemands(NoticeBoardController_StatelessSessionBeanWrapper14.java:3335)
at
xx..xxx.ejb.actions.noticeboard.GetPublishedDemandsEJBAction.perform(GetPublishedDemandsEJBAction.java:24)
at
xx..xxx.framework.j2ee.controller.ejb.StateMachine.processEvent(StateMachine.java:99)
at
xx..xxx.framework.j2ee.controller.ejb.EJBControllerBean.processEvent(EJBControllerBean.java:54)
at
EjbController_StatefulSessionBeanWrapper12.processEvent(EjbController_StatefulSessionBeanWrapper12.java:409)
at
xx..xxx.web.WebController.handleEvent(WebController.java:57)
at
xx..xxx.framework.j2ee.controller.web.RequestProcessor.processRequest(RequestProcessor.java:114)
at
xx..xxx.framework.j2ee.controller.web.MainController.processRequest(MainController.java:117)
at
xx..xxx.framework.j2ee.controller.web.MainController.doGet(MainController.java:245)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
xx..xxx.web.LoginFilter.doFilter(LoginFilter.java:142)
at
com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at
xx..xxx.web.LoginFilter.doFilter(LoginFilter.java:142)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)

Nested exception is:
org.apache.ojb.broker.PersistenceBrokerException:
java.lang.AbstractMethodError:
com.evermind.sql.OrclCMTConnection.setStatementCacheSize(I)V
at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:259)
at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryReferenceBroker.java:271)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(PersistenceBrokerImpl.java:1367)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(DelegatingPersistenceBroker.java:338)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionByQuery(DelegatingPersistenceBroker.java:338)
at
xx..xxx.ojb.manager.NoticeBoardManager.getPublishedDemands(NoticeBoardManager.java:177)
at
xx..xxx.ejb.noticeboard.NoticeBoardControllerBean.getPublishedDemands(NoticeBoardControllerBean.java:618)
at
NoticeBoardController_StatelessSessionBeanWrapper14.getPublishedDemands(NoticeBoardController_StatelessSessionBeanWrapper14.java:3290)
at
xx..xxx.ejb.actions.noticeboard.GetPublishedDemandsEJBAction.perform(GetPublishedDemandsEJBAction.java:24)
at
xx..xxx.framework.j2ee.controller.ejb.StateMachine.processEvent(StateMachine.java:99)
at
xx..xxx.framework.j2ee.controller.ejb.EJBControllerBean.processEvent(EJBControllerBean.java:54)
at
EjbController_StatefulSessionBeanWrapper12.processEvent(EjbController_StatefulSessionBeanWrapper12.java:409)
at
xx..xxx.we

Re: Problems with TM in ejbCreate() --- continued

2004-08-12 Thread Dino Di Cola
Armin,
This problem was driving me crazy... finally I
rightfully decided to ask for your support again.

I really Hope to find a solution by tomorrow ;)
cause I am getting too late with this matter :(

Thanks in advance!

d.
--
> Hi Dino,
> 
> I'm working on this, the patch has some unexpected
> side-effects in 
> managed environments ;-)
> Hope to find a solution till tomorrow.
> 
> regards,
> Armin
> 
> Dino Di Cola wrote:
> > Dear Armin,
> > 
> > I am testing your patch on
> > ImplementationJTAImpl#registerOpenDatabase.
> > The problems regarding the ejbCreate() method
> > disappeared. Unfortunately I got some problems
> with
> > the org.odmg.Database#deletePersistent now.
> > Again this problem is related to Transaction
> > Management and was not present with the previous
> > Oracle9iAS 9.0.2.2 version. 
> > 
> > The test case I present here is again a simple
> J2EE
> > application made up of a test stateless session
> bean
> > with a single business method invoked via RMI.
> > The configuration is the same of the previous
> e-mail.
> > What I am trying to do is basically to lookup for
> an
> > object (es. SentMail) and deleting it with the
> > Database#deletePersistent method:
> > 
> > /* this is done in ejbCreate()... */
> > org.odmg.Implementation odmg =
> OJB.getInstance();
> > org.odmg.Database db = odmg.newDatabase();
> > db.open(DEF_DATABASE_NAME,
> > Database.OPEN_READ_WRITE);
> > [...]
> > 
> > /* this is done in the business method... */
> > SentMail objSentMail = (SentMail)
> > lookupObject(SentMail.class, 4);
> > db.deletePersistent(objSentMail);
> > 
> > The object is actually found on the DB but when I
> try
> > to delete it I got the following exception:
> > 
> >  [exec] The following exception has been
> catched:
> > Transaction was rolled back:
> > org.odmg.TransactionNotInProgressException: No
> > transaction in progress, cannot delete persistent;
> > nested exception is:
> >  [exec]
> > com.evermind.server.rmi.OrionRemoteException:
> > Transaction was rolled back:
> > org.odmg.TransactionNotInProgressException: No
> > transaction in progress, cannot delete persistent
> >  [exec]
> > org.odmg.TransactionNotInProgressException: No
> > transaction in progress, cannot delete persistent
> >  [exec] at
> >
>
OJB_Tx_StatelessSessionBeanWrapper76.test(OJB_Tx_StatelessSessionBeanWrapper76.java:164)
> >  [exec] at
> > java.lang.reflect.Method.invoke(Native Method)
> >  [exec] at
> >
>
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
> >  [exec] at
> >
>
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
> >  [exec] at
> >
>
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:804)
> >  [exec] at
> > java.lang.Thread.run(Thread.java:479)
> >  [exec] at connection to
> c-01-091/10.2.20.20
> > as admin
> >  [exec] at
> >
>
com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1576)
> >  [exec] at
> >
>
com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1529)
> >  [exec] at
> >
>
com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
> >  [exec] at
> >
>
com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
> >  [exec] at
> >
>
com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:50)
> >  [exec] at __Proxy5.test(Unknown Source)
> >  [exec] at
> >
>
it.enidata.psv.test.ejb.client.TestOJB_Tx.main(TestOJB_Tx.java:45)
> >  [exec]
> >  [exec] Nested exception is:
> >  [exec]
> > org.odmg.TransactionNotInProgressException: No
> > transaction in progress, cannot delete persistent
> >  [exec] at
> >
>
org.apache.ojb.odmg.DatabaseImpl.deletePersistent(Unknown
> > Source)
> >  [exec] at
> >
>
it.enidata.psv.test.ejb.OJB_TxBean.test(OJB_TxBean.java:144)
> >  [exec] at
> >
>
OJB_Tx_StatelessSessionBeanWrapper76.test(OJB_Tx_StatelessSessionBeanWrapper76.java:115)
> >  [exec] at
> > java.lang.reflect.Method.invoke(Native Method)
> >  [exec] at
> >
>
com.evermind.server.rmi.RMICa

Re: Problems with TM in ejbCreate() --- continued

2004-08-12 Thread Dino Di Cola
Dear Armin,

I am testing your patch on
ImplementationJTAImpl#registerOpenDatabase.
The problems regarding the ejbCreate() method
disappeared. Unfortunately I got some problems with
the org.odmg.Database#deletePersistent now.
Again this problem is related to Transaction
Management and was not present with the previous
Oracle9iAS 9.0.2.2 version. 

The test case I present here is again a simple J2EE
application made up of a test stateless session bean
with a single business method invoked via RMI.
The configuration is the same of the previous e-mail.
What I am trying to do is basically to lookup for an
object (es. SentMail) and deleting it with the
Database#deletePersistent method:

/* this is done in ejbCreate()... */
org.odmg.Implementation odmg = OJB.getInstance();
org.odmg.Database db = odmg.newDatabase();
db.open(DEF_DATABASE_NAME,
Database.OPEN_READ_WRITE);
[...]

/* this is done in the business method... */
SentMail objSentMail = (SentMail)
lookupObject(SentMail.class, 4);
db.deletePersistent(objSentMail);

The object is actually found on the DB but when I try
to delete it I got the following exception:

 [exec] The following exception has been catched:
Transaction was rolled back:
org.odmg.TransactionNotInProgressException: No
transaction in progress, cannot delete persistent;
nested exception is:
 [exec]
com.evermind.server.rmi.OrionRemoteException:
Transaction was rolled back:
org.odmg.TransactionNotInProgressException: No
transaction in progress, cannot delete persistent
 [exec]
org.odmg.TransactionNotInProgressException: No
transaction in progress, cannot delete persistent
 [exec] at
OJB_Tx_StatelessSessionBeanWrapper76.test(OJB_Tx_StatelessSessionBeanWrapper76.java:164)
 [exec] at
java.lang.reflect.Method.invoke(Native Method)
 [exec] at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
 [exec] at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
 [exec] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:804)
 [exec] at
java.lang.Thread.run(Thread.java:479)
 [exec] at connection to c-01-091/10.2.20.20
as admin
 [exec] at
com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1576)
 [exec] at
com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1529)
 [exec] at
com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
 [exec] at
com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
 [exec] at
com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:50)
 [exec] at __Proxy5.test(Unknown Source)
 [exec] at
it.enidata.psv.test.ejb.client.TestOJB_Tx.main(TestOJB_Tx.java:45)
 [exec]
 [exec] Nested exception is:
 [exec]
org.odmg.TransactionNotInProgressException: No
transaction in progress, cannot delete persistent
 [exec] at
org.apache.ojb.odmg.DatabaseImpl.deletePersistent(Unknown
Source)
 [exec] at
it.enidata.psv.test.ejb.OJB_TxBean.test(OJB_TxBean.java:144)
 [exec] at
OJB_Tx_StatelessSessionBeanWrapper76.test(OJB_Tx_StatelessSessionBeanWrapper76.java:115)
 [exec] at
java.lang.reflect.Method.invoke(Native Method)
 [exec] at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
 [exec] at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
 [exec] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:804)
 [exec] at
java.lang.Thread.run(Thread.java:479)
 [exec] at connection to
c-01-091.prirm.pride.it/10.2.20.20
 [exec] at
com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
 [exec] at
com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1691)
 [exec] at
com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:532)
 [exec] at
com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:275)
 [exec] at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:798)
 [exec] at
java.lang.Thread.run(Thread.java:484)

You can find the complete source code for the
OJB_TxBean here below. 

I am again in your hands... ;) 
Thanks in advance.

Regards,


Dino.


ps. (from previous thread...)
>> 3. I commented out the beginInternTransaction()
>> invocation. Clearly this method is equally invoked
>> following another code flow. Does it mean it was
called twice before your patch?
>
>this could be the case, but it doesn't matter,
because 
>beginInternTransaction() take care of this.
>
>nearly all operations of the odmg-api have to b

Re: Problems with TM in ejbCreate()

2004-08-06 Thread =?iso-8859-1?q?Dino=20Di=20Cola?=
Dear Armin,
first of all thanks for your prompt reply!

I applied the change to the
ImplementationJTAImpl#registerOpenDatabase and
executed the test from scratch. 
My simple test application works fine now.
I deployed also the main J2EE application and works
also there at first sight.

I would like to have more insight from you regarding
the patch you proposed to apply in
ImplementationJTAImpl class.

1. You wrote the following: "OJB always lookup a
running JTA-transaction this can't be successful when
db.open(...) is called on ejbCreate()".
   Could you please give me more info? I cannot see
the problem with ejbCreate(). Thanks!

2. You wrote me it could be a "bug" in odmg
implementation. And clearly you seems right. 
   I cannot understand however why it was successfully
running on previous versions of ora9ias!?!

3. I commented out the beginInternTransaction()
invocation. Clearly this method is equally invoked
following another code flow. 
   Does it mean it was called twice before your patch?

4. My Session Bean is substantially very close to
src\ejb\org\apache\ojb\ejb\odmg\ODMGSessionBean.java
(taken from the db-ojb-1.0.rc7 distribution).
   The only difference I note is on the "Required"
attribute marked in the ODMGSessionBean.java javadoc.
I use "NotSupported" instead. 
   Have I to change the attribute to "Required"?

5. I am quite sure about this bug (anyway I will check
it more and more and I will keep you informed). 
   If you are certain of this bug too, in what release
do you think to fix it? 
   Have you planned a target release date for next OJB
release?
   What can I do in the meantime a new release will be
officially distributed? 

Armin, I really appreciated your help.
Hope you will answer to all my questions without
getting bored :)

Thanks, 

d.
--








Yahoo! Companion - Scarica gratis la toolbar di Ricerca di Yahoo! 
http://companion.yahoo.it

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



Problems with Transaction Management in ejbCreate()

2004-08-06 Thread Dino
Dear all,
I encountered some problems with Transaction Management porting my J2EE 
application from Ora9ias 9.0.2 to Ora9ias 9.0.3 platform.
I tried to reproduce the problem with a simple J2EE application made up of a 
test stateless session bean with a single business method.
This very simple J2EE application is deployed successfully both in Ora9ias 
9.0.2 and Ora9ias 9.0.3.
The business method (test_odmg()) can be successfully invoked by a RMI client 
on the Ora9ias 9.0.2 deployment.
On the Ora9ias 9.0.3 deployment however I get the following error:

The following exception has been catched: Error in ejbCreate(): No external 
transaction found; nested exception is:
org.odmg.TransactionNotInProgressException: No external transaction 
found
com.evermind.server.rmi.OrionRemoteException: Error in ejbCreate(): No 
external transaction found
at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance
(StatelessSessionEJBHome.java:267)
at OJBTest_ODMG_StatelessSessionBeanWrapper52.test_odmg
(OJBTest_ODMG_StatelessSessionBeanWrapper52.java:83)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
at connection to c99-012.prirm.pride.it/10.2.21.8 as admin
at 
com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERV
ER(RMIConnection.java:1558)
at com.evermind.server.rmi.RMIConnection.invokeMethod
(RMIConnection.java:1511)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke
(RemoteInvocationHandler.java:55)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke
(RecoverableRemoteInvocationHandler.java:22)
at 
com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke
(StatelessSessionRemoteInvocationHandler.java:50)
at __Proxy4.test_odmg(Unknown Source)
at it.enidata.psv.ejb.client.TestOJB_ODMG.main(TestOJB_ODMG.java:45)

Nested exception is:
org.odmg.TransactionNotInProgressException: No external transaction 
found
at org.apache.ojb.odmg.JTATxManager.registerTx(Unknown Source)
at org.apache.ojb.odmg.TransactionImpl.begin(Unknown Source)
at org.apache.ojb.odmg.ImplementationJTAImpl.beginInternTransaction
(Unknown Source)
at org.apache.ojb.odmg.ImplementationJTAImpl.registerOpenDatabase
(Unknown Source)
at org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source)
at it.enidata.psv.ejb.account.OJBTest_ODMGBean.init
(OJBTest_ODMGBean.java:99)
at it.enidata.psv.ejb.account.OJBTest_ODMGBean.ejbCreate
(OJBTest_ODMGBean.java:41)
at OJBTest_ODMGHome_StatelessSessionHomeWrapper53.callCreate
(OJBTest_ODMGHome_StatelessSessionHomeWrapper53.java:145)
at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance
(StatelessSessionEJBHome.java:254)
at OJBTest_ODMG_StatelessSessionBeanWrapper52.test_odmg
(OJBTest_ODMG_StatelessSessionBeanWrapper52.java:83)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
at connection to c99-012.prirm.pride.it/10.2.21.8
at com.evermind.server.rmi.OrionRemoteException.receive
(OrionRemoteException.java:130)
at com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse
(RMIConnection.java:1673)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:532)
at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run
(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:484)

The error arises in the ejbCreate() as soon as the db.open() is invoked. 
- If I move the OJB initialization into the business method (leaving the EJB 
as "stateless") the error disappears.
- If I change the deployment descriptor from "stateless" to "stateful" 
(leaving the OJB initialization into the ejbCreate()) the error disappears.
What is the rationale behind this behaviour?

Here below you will find 
- the source code of the test session bean
- the deployment descriptor
- the OJB.properties

Any assitance in the matter would be great. 
Thanks in advance.

Regards,


Dino.
--

***
 Source code for the session bean *
**

Problems with TM in ejbCreate()

2004-08-06 Thread =?iso-8859-1?q?Dino=20Di=20Cola?=
Dear all,
I encountered some problems with Transaction
Management porting my J2EE application from Ora9ias
9.0.2 to Ora9ias 9.0.3 platform.
I tried to reproduce the problem with a simple J2EE
application made up of a test stateless session bean
with a single business method.
This very simple J2EE application is deployed
successfully both in Ora9ias 9.0.2 and Ora9ias 9.0.3.
The business method (test_odmg()) can be successfully
invoked by a RMI client on the Ora9ias 9.0.2
deployment.
On the Ora9ias 9.0.3 deployment however I get the
following error:

The following exception has been catched: Error in
ejbCreate(): No external transaction found; nested
exception is:
org.odmg.TransactionNotInProgressException: No
external transaction found
com.evermind.server.rmi.OrionRemoteException: Error
in ejbCreate(): No external transaction found
at
com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:267)
at
OJBTest_ODMG_StatelessSessionBeanWrapper52.test_odmg(OJBTest_ODMG_StatelessSessionBeanWrapper52.java:83)
at java.lang.reflect.Method.invoke(Native
Method)
at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
at connection to c99-012.prirm.pride.it/10.2.21.8 as
admin
at
com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1558)
at
com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1511)
at
com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
at
com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
at
com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:50)
at __Proxy4.test_odmg(Unknown Source)
at
it.enidata.psv.ejb.client.TestOJB_ODMG.main(TestOJB_ODMG.java:45)

Nested exception is:
org.odmg.TransactionNotInProgressException: No
external transaction found
at
org.apache.ojb.odmg.JTATxManager.registerTx(Unknown
Source)
at
org.apache.ojb.odmg.TransactionImpl.begin(Unknown
Source)
at
org.apache.ojb.odmg.ImplementationJTAImpl.beginInternTransaction(Unknown
Source)
at
org.apache.ojb.odmg.ImplementationJTAImpl.registerOpenDatabase(Unknown
Source)
at
org.apache.ojb.odmg.DatabaseImpl.open(Unknown Source)
at
it.enidata.psv.ejb.account.OJBTest_ODMGBean.init(OJBTest_ODMGBean.java:99)
at
it.enidata.psv.ejb.account.OJBTest_ODMGBean.ejbCreate(OJBTest_ODMGBean.java:41)
at
OJBTest_ODMGHome_StatelessSessionHomeWrapper53.callCreate(OJBTest_ODMGHome_StatelessSessionHomeWrapper53.java:145)
at
com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:254)
at
OJBTest_ODMG_StatelessSessionBeanWrapper52.test_odmg(OJBTest_ODMG_StatelessSessionBeanWrapper52.java:83)
at java.lang.reflect.Method.invoke(Native
Method)
at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at
com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
at connection to c99-012.prirm.pride.it/10.2.21.8
at
com.evermind.server.rmi.OrionRemoteException.receive(OrionRemoteException.java:130)
at
com.evermind.server.rmi.RMIConnection.handleMethodInvocationResponse(RMIConnection.java:1673)
at
com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:532)
at
com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:275)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:484)

The error arises in the ejbCreate() as soon as the
db.open() is invoked. 
- If I move the OJB initialization into the business
method (leaving the EJB as "stateless") the error
disappears.
- If I change the deployment descriptor from
"stateless" to "stateful" (leaving the OJB
initialization into the ejbCreate()) the error
disappears.
What is the rationale behind this behaviour?

Here below you will find 
- the source code of the test session bean
- the deployment descriptor
- the OJB.properties

Any assitance in the matter would be great. 
Thanks in advance.

Regards,


Dino.
--

***
 Source code for the session bean
*
***
public class OJBTest_O