Re: Sybase DB Failure

2005-05-20 Thread Ed Robbins
I haven't done this in a long time, but Sybase has a utility, a SQL 
script if I recall, that will configure the DB to allow you to connect 
via JDBC.  I believe it comes with the JConnect distribution, which you 
can download from Sybase.

Ed
Jim Henderson wrote:
I am trying to use the UserDatabaseRealm connecting to a Sybase DB server.
I get the following error:

---
May 20, 2005 11:17:34 AM org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (JZ0SJ: Metadata accessor information was not
found on this database. Please install the required tables as mentioned in
the jConnect documentation.)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:855)

---

I looked up the error on Sybases's documentation and the message is:
Metadata accessor information was not found on this database.
Action: Install metadata information before making metadata calls.

--
Any suggestions?  There seem to be many references to the same error on the
WEB but they are not answered.
What metadata are thy talking about

-
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]


Sybase DB Failure

2005-05-20 Thread Jim Henderson
I am trying to use the UserDatabaseRealm connecting to a Sybase DB server.
I get the following error:


---
May 20, 2005 11:17:34 AM org.apache.catalina.realm.DataSourceRealm open
SEVERE: Exception performing authentication
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (JZ0SJ: Metadata accessor information was not
found on this database. Please install the required tables as mentioned in
the jConnect documentation.)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:855)

---



I looked up the error on Sybases's documentation and the message is:


Metadata accessor information was not found on this database.
Action: Install metadata information before making metadata calls.

--

Any suggestions?  There seem to be many references to the same error on the
WEB but they are not answered.

What metadata are thy talking about



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



Re: Sybase

2004-09-21 Thread QM
On Tue, Sep 21, 2004 at 10:12:38AM +0200, Marek W?jtowicz wrote:
: Do you know if there is A "howto Linux+Tomcat+Apache httpd+ Sybase" in 
: the net?

1/ please post a *new* message when writing to the list.  Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).

2/ There are myriad Apache/Linux/Tomcat tutorials out there.  Check with
Sybase to determine what JDBC they offer and whether they're stable.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Sybase

2004-09-21 Thread Marek Wójtowicz
Hello,
Do you know if there is A "howto Linux+Tomcat+Apache httpd+ Sybase" in 
the net?

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


RE: Sybase and Tomcat 5, Possible Problem

2004-06-24 Thread Matt Anderson
I use Sybase ASE12.5 along with Tomcat 5.0.24

I place the JConnect (jconn2d.jar) file in the %tomcathome%/common/lib
directory. Sybase and Tomcat 5.0.24 can work together. I don't have my
web.xml or root.xml (I use virtual hosting) here however I can provide them
tomorrow once I am at work.

Matt Anderson


-Original Message-
From: Jeff Sexton [mailto:[EMAIL PROTECTED]
Sent: Friday, June 18, 2004 1:40 AM
To: [EMAIL PROTECTED]
Subject: Sybase and Tomcat 5, Possible Problem


After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).

The exception is:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: null

META-INF/context.xml is:

   
   
   

 From conf/server.xml contains:

   
 
 
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 username
 excalibur
   
   
 password
 mypassword
   
   
 driverClassName
 com.sybase.jdbc2.jdbc.SybDriver
   

  driverName
  jdbc:sybase:Tds:pdxax12:4100

   
 url
 jdbc:sybase:Tds:pdxax12:4100
   
   
 maxActive
 5
   
 
   

web.xml contains:


 
 
 ProvCICS
 
 
 com.ods.forte.cics.servlet.ProvCICS
 
 1
 

 
   ProvCICS
   /ProvCICS
 

 
   odsdb03 Connection Pool
   jdbc/odsdb03
   javax.sql.DataSource
   Container
 



I have also tried working with the  placed in server.xml
and with the  defined in the context, all combinations
yield the same behavior.

*Tomcat does actually log into the database server when it starts*

I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:

Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
 at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
 at java.sql.DriverManager.getDriver(DriverManager.java:249)
 at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:743)
 ...

So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?

Ideas?

Should I rollback to TC 4x for awhile?

--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.


-
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: Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Jeff Sexton
Shapira, Yoav wrote:
Hi,
Hmm... It's good you can verify the login on the DB side.  You should
try to debug this in tomcat 5 rather than rolling back, if possible.
Where is the driver jar located in your server?
I've been trying to stick with common/lib.  That seems to work.
Since I was able to get a version 4.1.30 to work, I started over,
using those elements, on the 5.0.24 server.  I was able to get the
5.0.24 server to work this time!  Not sure why, however.
I imagine that the original exception was a red herring and my problem
was really some misplaced tags or typo.  I guess.  It all still
seems much harder than it should be.  But once it works, it's rock
solid.
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Jeff Sexton
After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).
The exception is:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null', cause: null

META-INF/context.xml is:
  
  
  
From conf/server.xml contains:
  


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
username
excalibur
  
  
password
mypassword
  
  
driverClassName
com.sybase.jdbc2.jdbc.SybDriver
  
   
 driverName
 jdbc:sybase:Tds:pdxax12:4100
   
  
url
jdbc:sybase:Tds:pdxax12:4100
  
  
maxActive
5
  

  
web.xml contains:



ProvCICS


com.ods.forte.cics.servlet.ProvCICS

1


  ProvCICS
  /ProvCICS


  odsdb03 Connection Pool
  jdbc/odsdb03
  javax.sql.DataSource
  Container


I have also tried working with the  placed in server.xml
and with the  defined in the context, all combinations
yield the same behavior.
*Tomcat does actually log into the database server when it starts*
I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
at java.sql.DriverManager.getDriver(DriverManager.java:249)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
...

So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?
Ideas?
Should I rollback to TC 4x for awhile?
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Sybase and Tomcat 5, Possible Problem

2004-06-18 Thread Shapira, Yoav

Hi,
Hmm... It's good you can verify the login on the DB side.  You should
try to debug this in tomcat 5 rather than rolling back, if possible.

Where is the driver jar located in your server?

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Jeff Sexton [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 17, 2004 12:35 PM
>To: [EMAIL PROTECTED]
>Subject: Sybase and Tomcat 5, Possible Problem
>
>After a lot of effort, I feel there may be some reason that the Sybase
>JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for
my
>Sybase driven apps quite a bit).
>
>The exception is:
>
>org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
>class '' for connect URL 'null', cause: null
>
>META-INF/context.xml is:
>
>
>  type="javax.sql.DataSource"/>
>
>
>  From conf/server.xml contains:
>
>
>  auth="Container"
>type="javax.sql.DataSource"/>
>  
>
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>
>  username
>  excalibur
>
>
>  password
>  mypassword
>
>
>  driverClassName
>  com.sybase.jdbc2.jdbc.SybDriver
>
> 
>   driverName
>   jdbc:sybase:Tds:pdxax12:4100
> 
>
>  url
>  jdbc:sybase:Tds:pdxax12:4100
>
>
>  maxActive
>  5
>
>  
>
>
>web.xml contains:
>
>
>  
>  
>  ProvCICS
>  
>  
>  com.ods.forte.cics.servlet.ProvCICS
>  
>  1
>  
>
>  
>ProvCICS
>/ProvCICS
>  
>
>  
>odsdb03 Connection Pool
>jdbc/odsdb03
>javax.sql.DataSource
>Container
>  
>
>
>
>I have also tried working with the  placed in server.xml
>and with the  defined in the context, all combinations
>yield the same behavior.
>
>*Tomcat does actually log into the database server when it starts*
>
>I can see it from the database side.  Therefore I know the jdbc
>jar file is loaded and the connection specification correct and
working.
>In addition, the stack trace in catalina.out includes a point
>in Sybase code:
>
>Cannot create JDBC driver of class '' for connect URL 'null'
>java.lang.NullPointerException
>  at
com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
>  at java.sql.DriverManager.getDriver(DriverManager.java:249)
>  at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>va:743)
>  ...
>
>So can I conclude that the app is actually linked to the resource?  If
>so then the problem seems to be that the information required somehow
>does not reach down the driver?
>
>Ideas?
>
>Should I rollback to TC 4x for awhile?
>
>--
>The ODS Companies
>Jeff Sexton
>Information Services
>(503) 228-6554   x1026
>http://www.odscompanies.com
>
>This message is intended for the sole use of the individual and entity
>to whom it is addressed, and may contain information that is
privileged,
>confidential and exempt from disclosure under applicable law. If you
are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose
>or distribute to anyone the message or any information contained in the
>message. If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.
>
>
>--
>The ODS Companies
>Jeff Sexton
>Information Services
>(503) 228-6554   x1026
>http://www.odscompanies.com
>
>This message is intended for the sole use of the individual and entity
>to whom it is addressed, and may contain information that is
privileged,
>confidential and exempt from disclosure under applicable law. If you
are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose
>or distribute to anyone the message or any information contained in the
>message. If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.
>
>
>-
>To unsubscribe, e-mail: 

Sybase and Tomcat 5, Possible Problem

2004-06-17 Thread Jeff Sexton
After a lot of effort, I feel there may be some reason that the Sybase
JConnect JDBC driver doesn't work in Tomcat 5.0.24 (I use Tomcat 4 for my
Sybase driven apps quite a bit).
The exception is:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: null
META-INF/context.xml is:
   
   
   
 From conf/server.xml contains:
   
 
 
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 username
 excalibur
   
   
 password
 mypassword
   
   
 driverClassName
 com.sybase.jdbc2.jdbc.SybDriver
   

  driverName
  jdbc:sybase:Tds:pdxax12:4100

   
 url
 jdbc:sybase:Tds:pdxax12:4100
   
   
 maxActive
 5
   
 
   
web.xml contains:

 
 
 ProvCICS
 
 
 com.ods.forte.cics.servlet.ProvCICS
 
 1
 
 
   ProvCICS
   /ProvCICS
 
 
   odsdb03 Connection Pool
   jdbc/odsdb03
   javax.sql.DataSource
   Container
 

I have also tried working with the  placed in server.xml
and with the  defined in the context, all combinations
yield the same behavior.
*Tomcat does actually log into the database server when it starts*
I can see it from the database side.  Therefore I know the jdbc
jar file is loaded and the connection specification correct and working.
In addition, the stack trace in catalina.out includes a point
in Sybase code:
Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.NullPointerException
 at com.sybase.jdbc2.jdbc.SybDriver.acceptsURL(SybDriver.java:197)
 at java.sql.DriverManager.getDriver(DriverManager.java:249)
 at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
 ...
So can I conclude that the app is actually linked to the resource?  If
so then the problem seems to be that the information required somehow
does not reach down the driver?
Ideas?
Should I rollback to TC 4x for awhile?
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
--
The ODS Companies
Jeff Sexton
Information Services
(503) 228-6554   x1026
http://www.odscompanies.com
This message is intended for the sole use of the individual and entity
to whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


can't get (Sybase ASE 12.5) database connection, maybe prob with tomcat config?

2003-12-12 Thread Alan Czajkowski
i'm having some trouble setting up a datasource on apache/tomcat that 
comes bundled with sun's solaris 9

i copied the jConnect5.5 jconn2.jar file to /usr/apache/tomcat/common/lib

i pasted the new context (for connecting to the database) into the server.xml file in 
/var/apache/tomcat/conf

the directory tree for the webapps looks like so:
/var/apache/tomcat/webapps/sybase/jsp/sybase.jsp
/var/apache/tomcat/webapps/sybase/WEB-INF/web.xml
/var/apache/tomcat/webapps/sybase/WEB-INF/jsp/

i then stopped and then re-started apache

when i call /var/apache/tomcat/webapps/sybase/jsp/sybase.jsp (it's a connection test 
file that Sybase provides) through http://hostname:port/sybase/jsp/sybase.jsp
i get this error:
Start of Test 
initCtx = new InitialContext() : successful 
[EMAIL PROTECTED] 
envCtx = initCtx.lookup(java:comp/env) : successful 
[EMAIL PROTECTED] 
Trying ds=(DataSource)envCtx.lookup(jdbc/a_sybase_datasource) 
Datasource lookup failed 
javax.naming.NamingException: Cannot create resource instance
DataSource null 
Inside catch(Exception e)
null java.lang.NullPointerException 
End of Test 

any ideas?

context in server.xml
--

 

 

 


 

factory
org.apache.commons.dbcp.BasicDataSourceFactory

 

maxActive
10

 

maxIdle
5

 

maxWait
1

 

driverClassName
com.sybase.jdbc2.jdbc.SybDriver

 

url
jdbc:sybase:Tds:10.34.34.34:4300/mydb?JCONNECT_VERSION=6

 

username
myuser

 

password
mypasswd

 


 

-


Thanks,

Alan Czajkowski
-
Database Administrator
BMO Financial Group
Decision Support Services
3300 Bloor Street West
14th Floor, West Tower
Toronto, Ontario, M8X 2X2
Tel: 416.232.8736
-

Data BAse connectivity with Sybase SQL Anywhere

2003-01-19 Thread usha nair
Dear friends,
 plz. help me with the database connectivity of Sybase SQLAnywhere 5.0, 1.i have 
downloaded the Jconnect versions (4.5/5.5) 
2.Platform is win 98
3.the front end is JSP, the web application server is tomcat 3.3.1,
4.what is the URL for the sybase database in SQLAnywhere 5.0,

the URL is of the form jdbc:sybase:hostname or ip address:port no.
how can i get the port no, and host name
 
5.where should i put the jconnect folder (preferably 5.5)
6.how should i configure it so that i can successfully get the database connectivity 
from a JSP page or java code. 

**Jconnect is a type 3/4 driver of sybase.
regards



Get 25MB of email storage with Lycos Mail Plus!
Sign up today -- http://www.mail.lycos.com/brandPage.shtml?pageId=plus 

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




Unable to connect to Sybase 11.9.2 server -Help please

2003-01-17 Thread Krishna_R . _Nagaraj




Hello Everyone,

I am trying to connect to sybase 11.9.2 database server. Has anyone
encountered this error. Your help on this will be greatly appreciated.

I have created a datasource in Tomcat 4.1.18.
I have the jconn2.jar file in webapps/ROOT/WEB_INF/classes/jconn2.jar
I have the jconn2.jar file in c:/tomcat4/commons/lib/jconn2.jar

However I get this error.

java.sql.SQLException: Cannot load JDBC driver class 'null'
  at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
  at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
  at SecurityCheckServlet.getConnection(SecurityCheckServlet.java:83)
  at SecurityCheckServlet.doGet(SecurityCheckServlet.java:37)

I have the following entries in the server.xml

 



  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  




  
username
jgf
  
  
password
mypassword
  
 
  
driverClassName
com.sybase.jdbc2.jdbc.SybDriver
  
  
url
jdbc:sybase:Tds:192.168.7.42:4100/mydatabase
  
  
maxActive
6
  
  
maxWait
5000
  
  
maxIdle
2
  

  

I have the following entries in the web.xml file

  
  DB Connection
  jdbc/MBSDB
  javax.sql.DataSource
  Container
  


Re: Setting up a JNDI entry for Sybase

2003-01-04 Thread Paul Carpenter
Whoops...small piece of mis-information in the first post:

I get the following error at line 33:
java.sql.SQLException: Cannot load JDBC driver class 'null'

When I change the code thus:
  Context initCtx = new InitialContext();
  if(initCtx == null )
throw new Exception("Boom - No Initial Context");

  Context envCtx = (Context) initCtx.lookup("java:comp/env");
  if(envCtx == null )
throw new Exception("Boom - No Environmental Context");

  DataSource ds = (DataSource)  
initCtx.lookup("java:comp/env/jdbc/DBmultileague");

  if (ds != null) {
Connection conn = ds.getConnection();


Which tells me two things (I think?):
1. An InitialContext is special and different from a plan old Context,  
despite the type-casting.
2. Both Context lookups work, but when you reference java:comp:env from  
the envCtx, for some reason that will not work.

But I still don't know why the ds.getConnection doesn't fails?  
Confused...

Paul

On Saturday, January 4, 2003, at 05:55  PM, Paul Carpenter wrote:

Hi

Has anyone managed to get Tomcat talking to Sybase via a JNDI resource?

I'm very close, following the MySQL examples I can find, and of  
course, the Tomcat documentation...

But I get the following two errors at present:
javax.naming.NameNotFoundException: Name java:comp is not bound in  
this Context
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at com.pec.DBmultileague.testDB.init(testDB.java:30)

java.sql.SQLException: Cannot load JDBC driver class 'null'
at  
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc 
e.java:529)
at  
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j 
ava:312)
at com.pec.DBmultileague.testDB.init(testDB.java:30)

Where the code looks like this (line 30 is the last presented here):
  Context ctx = new InitialContext();
  if(ctx == null )
throw new Exception("Boom - No Initial Context");

  Context envCtx = (Context)ctx.lookup("java:comp/env");
  if(envCtx == null )
throw new Exception("Boom - No Environmental Context");

  DataSource ds =  
(DataSource)envCtx.lookup("java:comp/env/jdbc/DBmultileague");


I'm sure I'm close, and my server.xml and web.xml both seem to comply  
to the rules. Is there something I need to do to have InitialContext  
java:comp/env recognised?

Thanks
Paul

FYI
Tomcat 4.1.12
Sybase 12.5
MAC OSX 10.2.3
jconn2.jar in place $CATALINA_HOME/common/lib (as well as the DBCP,  
etc, jars)

Setting up a JNDI entry for Sybase

2003-01-04 Thread Paul Carpenter
Hi

Has anyone managed to get Tomcat talking to Sybase via a JNDI resource?

I'm very close, following the MySQL examples I can find, and of course,  
the Tomcat documentation...

But I get the following two errors at present:
javax.naming.NameNotFoundException: Name java:comp is not bound in this  
Context
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at  
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at com.pec.DBmultileague.testDB.init(testDB.java:30)

java.sql.SQLException: Cannot load JDBC driver class 'null'
at  
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource 
.java:529)
at  
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja 
va:312)
at com.pec.DBmultileague.testDB.init(testDB.java:30)

Where the code looks like this (line 30 is the last presented here):
  Context ctx = new InitialContext();
  if(ctx == null )
throw new Exception("Boom - No Initial Context");

  Context envCtx = (Context)ctx.lookup("java:comp/env");
  if(envCtx == null )
throw new Exception("Boom - No Environmental Context");

  DataSource ds =  
(DataSource)envCtx.lookup("java:comp/env/jdbc/DBmultileague");


I'm sure I'm close, and my server.xml and web.xml both seem to comply  
to the rules. Is there something I need to do to have InitialContext  
java:comp/env recognised?

Thanks
Paul

FYI
Tomcat 4.1.12
Sybase 12.5
MAC OSX 10.2.3
jconn2.jar in place $CATALINA_HOME/common/lib (as well as the DBCP,  
etc, jars)

Can Tomcat Using SYBASE_CTLIB connect to Sybase by JNDI ?

2002-08-29 Thread huangzh

Hi:

   I am trying to use the Sybase Open client to connect to the backend Sybase Sql 
server,can tomcat using the SYBASE_CTLIB Driver to connect to the Sybase ?
If it is possible to do it,I will try to go ahead.

Any advise is welcome.

Jackson Huang



JDBC Relam, Tomcat 4.0.1, JDK1.3.1_02, Sybase issues?

2002-03-01 Thread julie . f . mccabe

Hello,

I am using Tomcat 4.0.1,  JDK1.3.1_02, Sybase for user authenication, when
I start Transmit I receive the following error from the jdbc driver

java.sql.SQLException: JZ001: User name property 'user_dbo:password=pass_dbo' too 
long. Maximum length is 30.

In the server.xml I have

 


I have done some searches on this but found little - any ideas?

Thanks
Julie.



This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Sybase TDSTunnelServlet performance.

2001-10-03 Thread Denis Putnam

I am trying to use the Sybase TDS tunnel servlet provided in jConnect5_2 and
I have installed it into the Jakarta-tomcat webapps directory, but I am
getting very poor performance compared to the jserv method.  Can anyone help
me to improve the performance in Jakarta-tomcat container?  Is there some
configuration or environment variable that I need to set or to make some
buffer larger, or anything in that regard?

Sincerely,
Denis M. Putnam
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 



 winmail.dat


jConnect5.2 with Tomcat 3.2 , Apache and Sybase

2001-03-22 Thread Manish

Hi,

I was wondering of there is a way of me achieving connection pooling 
using jConnect 5.2 and not have to use LDAP as the service provider. Is 
there a way where I can save my DB properties in a normal text file and 
use it as a context.

TIA

-- 
Manish Poddar




AW: Sybase (ASA7.0.2) connection question

2001-03-04 Thread Ralph Einfeldt

Try jdbc:sybase:Tds:localhost:2638?ServiceName=asademo

> -Ursprüngliche Nachricht-
> Von: Wong, Connie [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 2. März 2001 19:38
> An: [EMAIL PROTECTED]
> Betreff: Sybase (ASA7.0.2) connection question
 
> Case 1. Set URL = "jdbc:sybase:Tds:localhost:2638"

> Case 2: same URL (URL = "jdbc:sybase:Tds:localhost:2638")

> Case 3: set URL = "jdbc:sybase:asademo"


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




Re: Sybase (ASA7.0.2) connection question

2001-03-03 Thread anonymous

I don't know if this helps, since I use ASE on Linux not ASA on NT but here
goes:

import com.sybase.jdbcx.*;
   // 
public String sServer = "198.151.254.121:1433";
  // ...
public String url = "jdbc:sybase:Tds:"; // + sServer

The only real difference I can see between my code and your code is you're
using "localhost" whereas I supply a real IP address.  The only other
suggestion is check the port # that ASA is listening on.  I've usually only
seen tcp endpoint errors when a client app is unable to establish a
connection on with a server app because of socket# or ip addr issues.  I've
used this code for ASE & web server running on one machine and ASE & web
server on separate machines.

- Original Message -
From: "Wong, Connie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 10:37 AM
Subject: Sybase (ASA7.0.2) connection question


> Hi,
>
> I have trouble using the URL on Sybase. I hope someone can help me.
>
> Configurations:
>
> NT
> Sybase ASA7.0.2
> Tomcat 3.1
> DriverName = "com.sybase.jdbc2.jdbc.SybDriver"
>
> The following files are in my CLASSPATH:
>   c:\Program Files\Sybase\SQL Anywhere 7\jConnect\classes
>   c:\Program Files\Sybase\SQL Anywhere 7\java\jdbcdrv.zip
>   c:\Program Files\Sybase\Shared\jConnect-5_2\classes\jconn2.jar
>
>
> Scenarios:
>
> Case 1. Set URL = "jdbc:sybase:Tds:localhost:2638"
>
>  I got the IOException error:
>
> java.sql.SQLException: JZ006: Caught IOException:
java.net.ConnectException:
> Connection refused: no further information at
> com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
> com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2780) at
> com.sybase.jdbc2.tds.Tds.login(Tds.java:338) at
> com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:213) at
> com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:190)
> at com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:169) at
> com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:122) at
> com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:175) at
> java.sql.DriverManager.getConnection(DriverManager.java:517) at
> java.sql.DriverManager.getConnection(DriverManager.java:146) at
> Benchmark_sybase.query(Benchmark_sybase.java:94) at
> Benchmark_sybase.doGet(Benchmark_sybase.java:48) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
> at
> org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:160) at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
> ) at java.lang.Thread.run(Thread.java:484)
>
>
>
> Case 2: same URL (URL = "jdbc:sybase:Tds:localhost:2638"), I have to
> connect the database from Sybase central in order for my program to run.
>
>
> Case 3: set URL = "jdbc:sybase:asademo"  -- I created my table in asademo
> database.
>
>I got the following Exception.:
>
> java.sql.SQLException: JZ0D5: Error loading protocol
> com.sybase.jdbc2.asademo.asademo. at
> com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
>
com.sybase.jdbc2.jdbc.ProtocolManager.getProtocol(ProtocolManager.java:102)
> at
com.sybase.jdbc2.jdbc.SybUrlManager.loadProtocol(SybUrlManager.java:191)
> at com.sybase.jdbc2.jdbc.SybUrlManager.init(SybUrlManager.java:133) at
> com.sybase.jdbc2.jdbc.SybUrlManager.getUrlProvider(SybUrlManager.java:110)
> at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:167) at
> java.sql.DriverManager.getConnection(DriverManager.java:517) at
> java.sql.DriverManager.getConnection(DriverManager.java:146) at
> Benchmark_sybase.query(Benchmark_sybase.java:99) at
> Benchmark_sybase.doGet(Benchmark_sybase.java:53) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
> at
> org.apache.tomcat.servlets.InvokerServlet.serv

Sybase (ASA7.0.2) connection question

2001-03-02 Thread Wong, Connie

Hi,

I have trouble using the URL on Sybase. I hope someone can help me.

Configurations:

NT 
Sybase ASA7.0.2
Tomcat 3.1 
DriverName = "com.sybase.jdbc2.jdbc.SybDriver"

The following files are in my CLASSPATH:
  c:\Program Files\Sybase\SQL Anywhere 7\jConnect\classes
  c:\Program Files\Sybase\SQL Anywhere 7\java\jdbcdrv.zip
  c:\Program Files\Sybase\Shared\jConnect-5_2\classes\jconn2.jar


Scenarios:

Case 1. Set URL = "jdbc:sybase:Tds:localhost:2638"

 I got the IOException error:

java.sql.SQLException: JZ006: Caught IOException: java.net.ConnectException:
Connection refused: no further information at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2780) at
com.sybase.jdbc2.tds.Tds.login(Tds.java:338) at
com.sybase.jdbc2.jdbc.SybConnection.tryLogin(SybConnection.java:213) at
com.sybase.jdbc2.jdbc.SybConnection.regularConnect(SybConnection.java:190)
at com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:169) at
com.sybase.jdbc2.jdbc.SybConnection.(SybConnection.java:122) at
com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:175) at
java.sql.DriverManager.getConnection(DriverManager.java:517) at
java.sql.DriverManager.getConnection(DriverManager.java:146) at
Benchmark_sybase.query(Benchmark_sybase.java:94) at
Benchmark_sybase.doGet(Benchmark_sybase.java:48) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160) at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
) at java.lang.Thread.run(Thread.java:484) 



Case 2: same URL (URL = "jdbc:sybase:Tds:localhost:2638"), I have to
connect the database from Sybase central in order for my program to run. 


Case 3: set URL = "jdbc:sybase:asademo"  -- I created my table in asademo
database.
   
   I got the following Exception.:

java.sql.SQLException: JZ0D5: Error loading protocol
com.sybase.jdbc2.asademo.asademo. at
com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:423) at
com.sybase.jdbc2.jdbc.ProtocolManager.getProtocol(ProtocolManager.java:102)
at com.sybase.jdbc2.jdbc.SybUrlManager.loadProtocol(SybUrlManager.java:191)
at com.sybase.jdbc2.jdbc.SybUrlManager.init(SybUrlManager.java:133) at
com.sybase.jdbc2.jdbc.SybUrlManager.getUrlProvider(SybUrlManager.java:110)
at com.sybase.jdbc2.jdbc.SybDriver.connect(SybDriver.java:167) at
java.sql.DriverManager.getConnection(DriverManager.java:517) at
java.sql.DriverManager.getConnection(DriverManager.java:146) at
Benchmark_sybase.query(Benchmark_sybase.java:99) at
Benchmark_sybase.doGet(Benchmark_sybase.java:53) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597)
at
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160) at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
) at java.lang.Thread.run(Thread.java:484) 
 
Thanks,
Connie





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