change this: datasource = (DataSource) ic.lookup("ds.Freqs");
to:
datasource = (DataSource) ic.lookup("java:/ds.Freqs");




Slattery, Tim - BLS wrote:

Once more for a Jboss newby please?

I can't get connected to my database. The sybase-ds.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>

<!-- =====================================================================
-->
<!--
-->
<!--  JBoss Server Configuration
-->
<!--
-->
<!-- New ConnectionManager setup for Sybase ASE/ASA jConnect driver
-->
<!-- Thanks to Marc Zampetti <[EMAIL PROTECTED]>
-->
<!-- This is a minimal example.  See the generic example for other stuff
-->
<!-- =====================================================================
-->

<!-- $Id: sybase-ds.xml,v 1.1.2.2 2003/09/05 16:38:24 patriot1burke Exp $
-->


<datasources>
<local-tx-datasource>
<jndi-name>ds.Freqs</jndi-name>
<!-- Sybase jConnect URL for the database. NOTE: The hostname and port are made up values. The optional
database name is provided, as well as some additinal Driver
parameters.
-->
<connection-url>jdbc:sybase:Tds:146.142.44.41:4100</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDriver</driver-class>
<user-name>Slattery_T</user-name>
<password>xxxxxxx</password>


<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseEx
ceptionSorter</exception-sorter-class-name>
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       -->

<!-- sql to call on an existing pooled connection when it is
obtained from pool <check-valid-connection-sql>some arbitrary
sql</check-valid-connection-sql>
-->


 </local-tx-datasource>

</datasources>


The Java code in my app is:

           InitialContext ic = new InitialContext();
           datasource  = (DataSource) ic.lookup("ds.Freqs");

This throws a NamingException with this message: ds.Freqs not bound

The server log seems to show ds.Freqs being created.

Any clues?


-- Tim Slattery [EMAIL PROTECTED]


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