[jboss-jira] [JBoss JIRA] (WFLY-2898) JNDI Name lookup of the DataSource returns NULL
Igor Shulika (JIRA)
issues at jboss.org
Thu Feb 13 12:59:28 EST 2014
[ https://issues.jboss.org/browse/WFLY-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12944395#comment-12944395 ]
Igor Shulika commented on WFLY-2898:
------------------------------------
Here is the MonitoringFilter debug logs (you would need to remove the additional javamelody.datasources JAVA parameter)
2014-02-13 09:50:45,801 DEBUG [net.bull.javamelody] (default task-8) JavaMelody filter init started
2014-02-13 09:50:45,806 DEBUG [net.bull.javamelody] (default task-8) OS: Windows 7 Service Pack 1, amd64/64
2014-02-13 09:50:45,807 DEBUG [net.bull.javamelody] (default task-8) Java: Java(TM) SE Runtime Environment, 1.7.0_45-b18
2014-02-13 09:50:45,808 DEBUG [net.bull.javamelody] (default task-8) Server: WildFly 8.0.0.Final-SNAPSHOT - 1.0.0.Final
2014-02-13 09:50:45,809 DEBUG [net.bull.javamelody] (default task-8) Webapp context: /test-webapp-1.0
2014-02-13 09:50:45,811 DEBUG [net.bull.javamelody] (default task-8) JavaMelody version: 1.48.0
2014-02-13 09:50:45,812 DEBUG [net.bull.javamelody] (default task-8) JavaMelody classes loaded from: vfs:/C:/8.0.0.Final/wildfly/bin/content/test-webapp-1.0.war/WEB-INF/lib/javamelody-core-1.48.0.jar
2014-02-13 09:50:45,815 DEBUG [net.bull.javamelody] (default task-8) Host: xxxxx at xxxxx
2014-02-13 09:50:45,816 DEBUG [net.bull.javamelody] (default task-8) parameter defined: log=false
2014-02-13 09:50:45,817 DEBUG [net.bull.javamelody] (default task-8) parameter defined: quartz-default-listener-disabled=true
2014-02-13 09:50:45,818 DEBUG [net.bull.javamelody] (default task-8) parameter defined: disabled=false
2014-02-13 09:50:45,830 DEBUG [net.bull.javamelody] (default task-8) log listeners initialized
2014-02-13 09:50:45,833 DEBUG [net.bull.javamelody] (default task-8) datasources found in JNDI: []
2014-02-13 09:50:45,840 DEBUG [net.bull.javamelody] (default task-8) counters initialized
2014-02-13 09:50:45,852 DEBUG [net.bull.javamelody] (default task-8) counters data read from files in C:\Users\xxxx
2014-02-13 09:50:45,914 DEBUG [net.bull.javamelody] (default task-8) collect task scheduled every 60s
2014-02-13 09:50:46,906 DEBUG [net.bull.javamelody] (default task-8) first collect of data done
2014-02-13 09:50:46,907 DEBUG [net.bull.javamelody] (default task-8) JavaMelody filter init done in 1106 ms
> 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, server.log, standalone.conf.bat, standalone.xml, test.zip
>
>
> 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