[jboss-user] [JNDI/Naming/Network] - Re: Datasource is null

badam571 do-not-reply at jboss.com
Wed Aug 6 10:17:15 EDT 2008


hi itsme

Here is the jndi view:

java: Namespace
  +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
  +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
  +- comp (class: javax.naming.Context)


  +- JDBC (class: org.jnp.interfaces.NamingContext)
  |   +- SybaseDS (class: 
org.jboss.resource.adapter.jdbc.WrapperDataSource)

  +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
  +- jaas (class: javax.naming.Context)
  |   +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
  +- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
  +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
  +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
  +- Mail (class: javax.mail.Session)
  +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
  +- TransactionManager (class: org.jboss.tm.TxManager)

Here is the JBOSS.JDBC:
jboss.jdbc
datasource=SybaseDS,service=metadata 
service=SQLExceptionProcessor 
service=metadata 


however, one thing to note: my datasource lookup is as follows:
ds = (DataSource)ic.lookup("java:jdbc/SybaseDS"); 

and I have change: jndi name in
the jndi name on sybase-ds.xml is (I am using Sybase) 

<local-tx-datasource> 
<jndi-name>JDBC/SybaseDS</jndi-name> 

the database url: 
<connection-url>jdbc:sybase:Tds:wi3db1.caci.com:5000/SQ3XX</connection-url> 
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class> 

and the mapping is: 

<type-mapping>Sybase</type-mapping> 

key point:
I can bind the datasource to jndi -- since the catch for catching naming error is passed alright, but I caught the general exception.

thanks
badam571



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169057#4169057

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169057



More information about the jboss-user mailing list