<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Servlets - DB connect</title><link>https://community.appian.com/discussions/f/plug-ins/9092/servlets---db-connect</link><description>Hello All, I am trying to insert a data in db when calling the servlet, it is working fine when in the code i use the connection string of mysql. But it is not connecting to db, when using the datasource defined in the admin console eg: jdbc/test Please</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40587?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 08:08:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8544de83-f5a3-412c-b5a2-49d8d17c7ada</guid><dc:creator>ravinderl352</dc:creator><description>Hey Sandeep,  If you want to use data source in servlets/outside Appian, you will have to create the data source in the Jboss. I don&amp;#39;t think the data source you have created in Appian admin console can be used in servlet.&lt;br /&gt;You can replicate this issue while defining the DS in appian-ds.xml/through Jboss admin console and then you can verify your servlet code.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40585?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 07:40:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c5d881e-6281-4ba9-a6c2-4f3c643d255a</guid><dc:creator>sandeepg138</dc:creator><description>datasource name is correct jdbc/test, as for same we are able to insert data throughprocess&lt;br /&gt;So do we need to use this DataSource dataSource = (DataSource) context.lookup(&amp;quot;jdbc/test&amp;quot;);&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40581?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 06:21:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ff5ede8-b61a-4e99-b717-502336e13c8a</guid><dc:creator>ravinderl352</dc:creator><description>Looks like your not using right/correct data source name. Can you attach the data source settings screen shot from admin console ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40578?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 05:39:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1103d9ee-3aa5-43db-9aa8-12d7c4cd9d47</guid><dc:creator>sandeepg138</dc:creator><description>the error we are seeing in JBOSS server log is Unable to find the datasource jdbc/test.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40568?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 01:32:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8dffa3b3-374a-4dc0-becd-66a6409c44f0</guid><dc:creator>ravinderl352</dc:creator><description>What is the error are you getting and what is the name of the datasource name defined in your environment ?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servlets - DB connect</title><link>https://community.appian.com/thread/40566?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 01:23:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c6e5920f-73bc-4134-af81-6ad2989b11b3</guid><dc:creator>ravinderl352</dc:creator><description>Update your context.loop to : jdbc/test&lt;br /&gt;&lt;br /&gt; DataSource dataSource = (DataSource) context.lookup(&amp;quot;jdbc/test&amp;quot;);&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>