[jboss-user] [Beginner's Corner] - javax.naming.NameNotFoundException: DefaultDS not bound

pippodev do-not-reply at jboss.com
Wed Feb 9 07:18:37 EST 2011


pippodev [http://community.jboss.org/people/pippodev] created the discussion

"javax.naming.NameNotFoundException: DefaultDS not bound"

To view the discussion, visit: http://community.jboss.org/message/586441#586441

--------------------------------------------------------------
well I put mysql-connector-java-5.1.14-bin.jar in default/lib  dir, 
created mysql-ds.xml in defautl/deploy

<?xml version="1.0" encoding="UTF-8"?>
<datasources>



          <local-tx-datasource>

                    <jndi-name>DefaultDS</jndi-name>

                    <connection-url>jdbc:mysql://localhost:3306/prova</connection-url>

                    <driver-class>com.mysql.jdbc.Driver</driver-class>

                    <user-name>root</user-name>

                    <password>root</password>

                    <!-- should only be used on drivers after 3.22.1 with "ping" support

    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>

    --> 



                    <metadata>

                                        <type-mapping>mySQL</type-mapping>

                    </metadata>

          </local-tx-datasource>

</datasources>





but I have the error  javax.naming.NameNotFoundException: DefaultDS not bound 
both I use 


ds = (DataSource)  PortableRemoteObject.narrow(ictx.lookup("java:DefaultDS"), DataSource.class);


or


ds = (DataSource)ictx.lookup("DefaultDS");
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/586441#586441]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110209/7fc74ec4/attachment.html 


More information about the jboss-user mailing list