[jboss-dev-forums] [JBoss AS7 Development] - Configured datasource not found via JNDI
mign
do-not-reply at jboss.com
Thu Sep 22 09:07:28 EDT 2011
mign [http://community.jboss.org/people/mign] created the discussion
"Configured datasource not found via JNDI"
To view the discussion, visit: http://community.jboss.org/message/628031#628031
--------------------------------------------------------------
The config looks like this:
<datasource jndi-name="jdbc/asepData" pool-name="asepData_Pool" enabled="true" jta="true" use-java-context="false" use-ccm="true">
<connection-url>...
</datasource>
Whatever I try to access does not find anything:
Context initialContext = new InitialContext();
ds = (DataSource) initialContext.lookup("jdbc/asepData");
or initialContext.lookup("java:env/comp/jdbc/asepData");
or initialContext.lookup("java:jdbc/asepData");
It just says:
javax.naming.NameNotFoundException: Name 'jdbc' not found in context ''
Executing /subsystem=naming:jndi-view in jboss-admin.sh does return
[standalone at localhost:9980 /] /subsystem=naming:jndi-view
{
"outcome" => "success",
"result" => {
"java: contexts" => {
"java:" => undefined,
"java:jboss" => {
"jaas" => {
"class-name" => "org.jboss.as.naming.context.ModularReference",
"children" => {"other" => {
"class-name" => "org.jboss.as.security.plugins.SecurityDomainContext",
"value" => "org.jboss.security.authentication.JBossCachedAuthenticationManager at 1317bfb"
}}
},
"TransactionManager" => {
"class-name" => "org.jboss.as.naming.context.ModularReference",
"value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate at b427c1"
},
"datasources" => {
"class-name" => "javax.naming.Context",
"children" => {"ExampleDS" => {
"class-name" => "org.jboss.as.naming.context.ModularReference",
"value" => "org.jboss.jca.adapters.jdbc.WrapperDataSource at 9c8834"
}}
},
"UserTransaction" => {
"class-name" => "org.jboss.as.naming.context.ModularReference",
"value" => "Transaction: unknown"
},
"TransactionSynchronizationRegistry" => {
"class-name" => "org.jboss.as.naming.context.ModularReference",
"value" => "com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple at 398896"
}
},
"java:global" => {"asepdemo-ear-1.1.0-SNAPSHOT" => {
"class-name" => "javax.naming.Context",
"children" => undefined
}}
},
"applications" => undefined
}
}
So my binding does not seem to be there in the context...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/628031#628031]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110922/2c46f62b/attachment.html
More information about the jboss-dev-forums
mailing list