Patrice Fleurier wrote:


Without Tomcat (client server mode) and the parameter min-limit, I have
the same problem. (See TRACE 1).

If I note minLimit in the "xml" file, the parameter is accepted
(getDatabase and begin are executed) but I have other error on execute
query (See TRACE 2). Note: After the begin operation, there is no physical connection to the
database.



Patrice Fleurier
Labtech SA


-----Message d'origine-----
De : Werner Guttmann [mailto:[EMAIL PROTECTED] Envoy� : vendredi 5 mars 2004 10:32
� : Fleurier Patrice
Cc : [EMAIL PROTECTED]
Objet : Re: [castor-dev] Problem with connections pooling for Oracle



Patrice,


I had a look at the stack trace, and it's a bit of a mistery to me ...
;-). The original message from the SQLException


cause m�re org.xml.sax.SAXException: unable to add attribute "min-limit" to
'oracle.jdbc.pool.OracleConnectionCacheImpl' due to the following error:


org.exolab.castor.mapping.MappingRuntimeException: Nested error:
java.sql.SQLException: Les informations d'identification et de connexion
de l'utilisateur ne correspondent pas � celles existante


seems to indicate that you are trying to create a new connection when
the pool has already been setup with different credentials than what you
are supplying in the database.xml file.


Given that you are using Tomcat (Catalina), have you configured a pool
already, eg. in Tomcat's server.xml file or in one of the webapps
directly. If so, can you please post the relevant details for this declaration ? ANd if
so, I'd stronly advise you to switch to the <jndi> element to instruct
Castor JDO to obtain connections from an connection pool initialized by the
application server (web container).


Regards
Werner


On Fri, 5 Mar 2004 09:49:04 +0100, Patrice Fleurier wrote:



Werner,

The stack trace is attached.

Patrice

-----Message d'origine-----
De : Werner Guttmann [mailto:[EMAIL PROTECTED] Envoy� : jeudi 4 mars 2004 22:36
� : Fleurier Patrice
Cc : [EMAIL PROTECTED]
Objet : Re: [castor-dev] Problem with connections pooling for Oracle



Patrice,


can I please see the complete exception stack trace ?

Werner

On Thu, 4 Mar 2004 15:14:03 +0100, Patrice Fleurier wrote:


Werner,

I have an error with your correction.

The error is:
javax.servlet.ServletException: Nested error:

org.xml.sax.SAXException:


unable to add attribute "min-limit" to
'oracle.jdbc.pool.OracleConnectionCacheImpl' due to the following

error:


org.exolab.castor.mapping.MappingRuntimeException: Nested error:
java.sql.SQLException

In this case my xml file is:
<?xml version="1.0"?>
<database name="osame" engine="oracle" >
  <data-source
class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
    <params URL="jdbc:oracle:thin:@ myServer:1521:myBase " user="
user" password=" pwd " min-limit="5" max-limit="10"
cache-scheme="OracleConnectionCacheImpl.DYNAMIC_SCHEME"/>
  </data-source>
  <mapping href="osameMapping.xml" />
</database>

I have tested other syntax without error.
But, in this case, the pool is not active.

Which imho is correct, as Castor by default during unmarshalling will
translate the name of the XML attribute (min-limit) to a Java property
name minLimit, hence correctly calling setMinLimit (int) on the DataSource
implementation. At least in theory, that is ....


Btw, I have posted a <data-source> sample teh other day that uses DBCP
with mySQL, adn here I am using the same syntax for bespoke properties.


One Oracle physical connection is created only for the execute query,
not for begin transaction.
Is it normal?

For this case, my xml file is:
<?xml version="1.0"?>
<database name="myBase" engine="oracle" >
  <data-source
class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
    <params URL="jdbc:oracle:thin:@myServer:1521:myBase" user="user"
password="pwd" minLimit="5" maxLimit="10"
cacheScheme="OracleConnectionCacheImpl.DYNAMIC_SCHEME"/>
  </data-source>
  <mapping href="Mapping.xml" />
</database>

Patrice


-----Message d'origine-----
De : Werner Guttmann [mailto:[EMAIL PROTECTED] Envoy� : jeudi 4 mars 2004 12:27
� : [EMAIL PROTECTED]; Patrice Fleurier; [EMAIL PROTECTED]
Objet : Re: [castor-dev] Problem with connections pooling for Oracle


Patrice,

please make this

<?xml version="1.0"?>
<database name="myBase" engine="oracle" >
   <data-source
class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">
      <params user="user" password="pwd" min-limit="5"

max-limit="10"


cache-scheme="OracleConnectionCacheImpl.DYNAMIC_SCHEME"  .... />
   </data-source>
   <mapping href="Mapping.xml" />
</database>

and things should work.

Werner

On Thu, 04 Mar 2004 03:02:46 -0700, Bruce Snyder wrote:


Werner Guttmann wrote:


Patrice,

I have just been pointed to online documentation for this Oracle

class mentioned below. As OracleConnectionCacheImpl implements


javax.sql.DataSource, you will have to use the <data-source>

element


to configure all this. Please note that due to still existing
inconsistencies you will


have to use a different syntax, though.

<?xml version="1.0"?>
<database name="myBase" engine="oracle" >
   <data-source

class-name="oracle.jdbc.pool.OracleConnectionCacheImpl">


<params user="user" password="pwd" minLimit="5" maxLimit="10"

cacheScheme="OracleConnectionCacheImpl.DYNAMIC_SCHEME" .... />


   </data-source>
   <mapping href="Mapping.xml" />
</database>

Until your fix is checked in this will not work. Castor will not set

the


minLimit, maxLimit or cachSchema variables because it has no prior knowledge of these variables.

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





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004


--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004


--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004





----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.610 / Virus Database: 390 - Release Date: 03/03/2004



------------------------------------------------------------------------


org.xml.sax.SAXException: unable to add attribute "min-limit" to 'oracle.jdbc.pool.OracleConnectionCacheImpl' due to the following error: org.exolab.castor.mapping.MappingRuntimeException: Nested error: java.sql.SQLException: Les informations d'identification et de connexion de l'utilisateur ne correspondent pas � celles existantes
at org.exolab.castor.xml.UnmarshalHandler.processAttributes(UnmarshalHandler.java:2224)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1922)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1149)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:583)
at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:246)
at org.exolab.castor.jdo.JDO.getDatabase(JDO.java:583)
at TestCastor.main(TestCastor.java:22)
Exception in thread "main"



------------------------------------------------------------------------


ava.sql.SQLException: Les informations d'identification et de connexion de l'utilisateur ne correspondent pas � celles existantes
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:541)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:404)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:298)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:268)
at org.exolab.castor.jdo.engine.DatabaseRegistry.createConnection(DatabaseRegistry.java:404)
at org.exolab.castor.jdo.engine.TransactionContextImpl.getConnection(TransactionContextImpl.java:212)
at org.exolab.castor.persist.TransactionContext.query(TransactionContext.java:718)
at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:522)
at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:488)
at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:453)
at TestCastor.main(TestCastor.java:34)
Exception in thread "main"

Does Oracle have internationalized exception messages? I have never seen anything other than english in their exception messages before. Is this an Oracle message or one which you have created in your code because of another exception or cause? Do you have the orginal Oracle message logged any where else? If this is the original oracle message, ten can you please translate? I can make out parts of the message, but not enough for it to be useful for me to try to help out any.


Wade

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to