Sebb,

I should have included the error trace in my last email, apologies for that.
Here it is.

2008/02/22 14:59:31 WARN  - jmeter.protocol.jdbc.config.DataSourceElement:
Could not close connection java.sql.SQLException: Protocol violation
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207)
        at oracle.jdbc.driver.T4C7Ocommoncall.receive(T4C7Ocommoncall.java:149)
        at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:464)
        at
oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:1202)
        at
org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.dispose(Abstra
ctJdbcConnection.java:317)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.avalon.excalibur.datasource.AbstractJdbcConnection.invoke(Abstrac
tJdbcConnection.java:357)
        at $Proxy0.dispose(Unknown Source)
        at
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.decommission(Jd
bcConnectionFactory.java:248)
        at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.removePoolable(Resourc
eLimitingPool.java:697)
        at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.permanentlyRemovePoola
ble(ResourceLimitingPool.java:639)
        at
org.apache.avalon.excalibur.pool.ResourceLimitingPool.dispose(ResourceLimiti
ngPool.java:518)
        at
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.dispos
e(ResourceLimitingJdbcDataSource.java:442)
        at
org.apache.jmeter.protocol.jdbc.config.DataSourceElement.testEnded(DataSourc
eElement.java:75)
        at
org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfEnd(Stand
ardJMeterEngine.java:246)
        at
org.apache.jmeter.engine.StandardJMeterEngine$StopTest.run(StandardJMeterEng
ine.java:321)
        at java.lang.Thread.run(Thread.java:595)

Thanks again,

Simon

-----Original Message-----
From: Simon Payne [mailto:[EMAIL PROTECTED]
Sent: 22 February 2008 14:54
To: jmeter-user@jakarta.apache.org
Subject: RE: error when trying to use TNSNAMES entry in JMeter database
connect string


Hi again Sebb

Thanks for your suggestions. Here are my replies to your replies.

Firstly, the reason I can't use the EzConnect string is because I want to
use the TNSNAMES entry to specify things like SERVER=SHARED as against
SERVER=DEDICATED.
Secondly, you are right - I didn't read the Oracle docs closely enough.
Setting the Oracle system parameter got rid of the invalid host error.

I am still getting problems, however, and can I just bend your ear one more
time?  I am now able to _connect_ to the database using TNSNAMES, but unable
to _close_ the connection.  I don't have this problem on every database, but
only on ones remote to my box.  Although it may be an Oracle problem, to
debug it, I wrote a simple JDBC client to confirm that the problem also
happens there.  But it doesn't.

While JMeter does no parsing of the connect string, nevertheless, probably
in the Excalibur code, it is doing something on connection closure that is
unhelpful.    Is there anything more you can advise me in respect of this?

Is anyone else using JMeter for database testing, and has seen problems like
this?

Regards

Simon

-----Original Message-----
From: sebb
Sent: 20 February 2008 13:33
To: JMeter Users List
Subject: Re: error when trying to use TNSNAMES entry in JMeter database
connect string


On 20/02/2008, Simon Payne <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I am using JMeter v. 2.3 to run some load tests on an Oracle 10g2
database.
>
>  However, JMeter is unable to connect using a TNSNAMES.ORA entry. JMeter
>  _can_ connect with this EZConnect string:
>
>         jdbc:oracle:thin:@localhost/ORCL
>

So why not use that?

>  but not with this one:
>
>         jdbc:oracle:thin:@ORCL
>

Did you set the system property:

oracle.net.tns_admin

as per the Oracle page?

>  NB the relevant TNSNAMES entry for this is pretty standard:
>
>  ORCL =
>   (DESCRIPTION =
>     (ADDRESS_LIST =
>       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
>     )
>     (CONNECT_DATA =
>       (SERVER = SHARED)
>       (SID = ORCL)
>     )
>   )
>
>  The error I get with the above example, from jmeter.log, is:
>
>  2008/02/18 15:47:55 WARN  -
jmeter.protocol.jdbc.config.DataSourceElement:
>  Could not return Connection java.sql.SQLException: Io exception: Unknown
>  host specified
>         at
>
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
>         at
>
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
>         at
>
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:254)
>         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
>         at
>  oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:438)
>         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
>         at
>
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:
>  34)
>         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
>         at java.sql.DriverManager.getConnection(DriverManager.java:525)
>         at java.sql.DriverManager.getConnection(DriverManager.java:171)
>         at
>
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(Jdb
>  cConnectionFactory.java:185)
>         at
>
org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLi
>  mitingPool.java:672)
>         at
>
org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(V
>  alidatedResourceLimitingPool.java:178)
>         at
>
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.ne
>  wPoolable(ResourceLimitingJdbcConnectionPool.java:123)
>         at
>
org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPo
>  ol.java:402)
>         at
>
org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(Validated
>  ResourceLimitingPool.java:130)
>         at
>
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getCon
>  nection(ResourceLimitingJdbcDataSource.java:222)
>         at
>
org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponent
>  Impl.getConnection(DataSourceElement.java:281)
>         at
>
org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataS
>  ourceElement.java:151)
>         at
>
org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:
>  153)
>         at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:300)
>         at java.lang.Thread.run(Thread.java:595)
>
>  It seems to me that JMeter is parsing the Database URL incorrectly,
assuming
>  that "ORCL" is the first part of a machine name. Since there's no host
>  called ORCL on the domain, it throws an error.  How can I configure
JMeter
>  to accept this for what it is, i.e. a TNSNAMES entry, not part of a full
>  connect string?

JMeter does not parse the connect string. I don't know whether Excalibur
does.

>  The Oracle docs state that I should be able to use a TNSNAMES entry with
the
>  Type 4 driver from 10.2.0.1.0 upwards. See for this:
>
>
http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/urls.htm#BEIJFH
>  HB
>
>  for supported database specifiers.
>
>  Here is my test configuration:
>
>  Test Plan
>         -> Thread Group
>                 -> Counter
>                 -> JDBC Connection Configuration
>                 -> User Parameters
>                 -> JDBC Request
>                 -> Response Assertion
>                 -> View Results in Table
>
>  JDBC Connection Config is:
>         Database URL: jdbc:oracle:thin:@ORCL
>         JDBC driver class: oracle.jdbc.driver.OracleDriver
>         (username and password withheld, but it's a valid schema)
>
>
>  Environment:
>         I am running JMeter on Windows XP v. 2002 SP2, using a Sun JVM as
follows:
>         Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_06-b05), Java
>  HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
>         My Oracle driver is the Type 4 one, Oracle JDBC Driver version -
>  "10.2.0.3.0",
>         (I have also found the same issue with the 10.2.0.1.0 version).
>         Oracle database is v. 10.2.0.1.0.
>
>  Thanks for your help.
>
>  Regards,
>
>  Simon Payne
>
>
>  ---------------------------------------------------------------------
>  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]

Reply via email to