[jboss-jira] [JBoss JIRA] (WFLY-2898) JNDI Name lookup of the DataSource returns NULL
Eduardo Martins (JIRA)
issues at jboss.org
Wed Feb 12 12:37:28 EST 2014
[ https://issues.jboss.org/browse/WFLY-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12943996#comment-12943996 ]
Eduardo Martins commented on WFLY-2898:
---------------------------------------
Igor, we need to be able to reproduce your issue, with the information you shared that is not possible to do. Looking at the related code in NamingContext I see one JNDI property which may be in use, so the issue could also be a bad setup of JNDI (initial context env, system properties, a jndi.properties, etc etc) at your side, or by WildFly, but I'm just guessing, just like the fact that the log doesn't show any issue with the datasource setup, it doesn't ensure me that everything is ok there.
So either you find a way to reproduce the issue with a WildFly config setup not depending on 3rd party servers + a web app, and share these with us, or you need to start debug looking for the concrete issue.
PS: feel free to ping me at #wildfly in IRC
> JNDI Name lookup of the DataSource returns NULL
> -----------------------------------------------
>
> Key: WFLY-2898
> URL: https://issues.jboss.org/browse/WFLY-2898
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Naming, Web (Undertow)
> Affects Versions: 8.0.0.CR1, 8.0.0.Final
> Reporter: Igor Shulika
> Assignee: Eduardo Martins
> Attachments: 1.PNG, 2.PNG, 3.PNG, jaffa-oracle-driver-6.0.0.Alpha2-SNAPSHOT.jar
>
>
> Hi,
> I'm having a problem to obtain DataSource using JNDI Name lookup.
> Please see my code below:
> Connection connection = null;
> DataSource dataSource = null;
> try {
> final Context initContext = new InitialContext();
> dataSource = (DataSource) initContext.lookup("java:/MyDataSource"); connection = dataSource.getConnection();
> } catch (Exception e) {
> LOGGER.error(e);
> }
> I'm doing initContext.lookup from a servlet, everything is working on JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14).
> Also I can find and test connection of my “java:/MyDataSource” under the “Datasources” section of the WildFly Administration Console just fine(anoter word the datasource is there).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list