SYLVIE PALLUEL wrote:
Hi,
My database is Oracle 9i, and the application server is Oracle 9ias.
Everything was ok. But a developer added an access to the database (via Castor jdo) via a new Thread. The method TableParamMetierImpl.donneListe(....,database) is called without any Database value. So it has to do a jdo.getDatabase() - jdo has been initialized and stored in a static attribute just before the thread has been started - but the following exception is thrown :
2004-07-22 09:36:33,331 [ERROR] fr.cnam.scapin.util.exception.ApplicationException - nestedException = org.exolab.castor.jdo.DatabaseNotFoundException: Nested error: javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created threads javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created threads at com.evermind.server.PreemptiveApplicationContext.getContext(PreemptiveApplic ationContext.java:34) at com.evermind.naming.FilterContext.lookup(FilterContext.java:138) at javax.naming.InitialContext.lookup(InitialContext.java:359) at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry. java:301) at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:603) at fr.cnam.scapin.metier.impl.tablesParam.TableParamMetierImpl.donneListe(Unkno wn Source) at fr.cnam.scapin.metier.impl.util.ListesReferenceMetierImpl.obtenirListeNonTri ee(Unknown Source) at fr.cnam.scapin.util.GestionnaireListesProduits.chargerProduitsNationaux(Unkn own Source) at fr.cnam.scapin.util.ChargementListesProduits.run(Unknown Source) at java.lang.Thread.run(Thread.java:512)
When the same call is made outside the thread, it's ok.
Is there something special to do ?
Sylvie,
This is quite clearly a problem with OC4J/Orion. The message stating:
'javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created threads'
is telling you the problem and how to get around it. You even said that if this call is not made within a separate thread that everything is OK. Just try starting OC4J with the -userThreads option.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\\"F9E<G)E=\\$\\!F<FEI+F-O;0\\`\\`");'
The Castor Project http://www.castor.org/
Apache Geronimo http://incubator.apache.org/projects/geronimo.html
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
