-
1. Re: Datasource is null
itsme Aug 5, 2008 1:54 PM (in response to badam571)Do you have verified, that the datasource is deployed correct by using the JndiView-Service. Please post the output of that.
-
2. Re: Datasource is null
badam571 Aug 6, 2008 10:17 AM (in response to badam571)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 -
3. Re: Datasource is null
itsme Aug 7, 2008 4:31 AM (in response to badam571)Try to chnage your lookup code to
... ds = (DataSource)ic.lookup("java:JDBC/SybaseDS"); ...
-
4. Re: Datasource is null
badam571 Aug 12, 2008 10:03 AM (in response to badam571)itsme
what is the difference between the three different jndi context:
java:, comp, and global jndi? do I need to move my context binding to the global context?
bada571