<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Oracle datasource configuration with jboss 5.1
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/rukia">rukia</a> in <i>Datasource Configuration</i> - <a href="https://community.jboss.org/message/737685#737685">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><table border="0" cellpadding="0" cellspacing="0" class="forumline" id="postTable" style="width: 100%;"><tbody><tr class="firstRowOfPost"><td align="left" class="row2 userPostInfo" rowspan="2" style="border:0px solid black;" valign="top"><span class="gensmall"><br/> Posts: 2 <br/>   </span>  </td><td class="row2" style="border:0px solid black;" valign="top"><p class="postinfo row2" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div class="date"> <a href="http://www.coderanch.com/forums/posts/list/581141#2648333"> <span> http://www.coderanch.com/templates/default/images/icon_minipost_new.gif </span></a><span class="postdetails">posted Today 15:43:55</span>  <p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p class="action" style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div class="likesHiddenDiv" id="like_message_2648333"> <a href="http://www.coderanch.com/templates/default/images/thumbs-up.gif"><span> http://www.coderanch.com/templates/default/images/thumbs-up.gif </span></a><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p> <a href="http://www.coderanch.com/forums/posts/quote/0/2648333"><span> http://www.coderanch.com/templates/default/images/icon_quote.gif </span></a>  <a href="http://www.coderanch.com/forums/jforum?module=posts&action=edit&post_id=2648333&start=0"><span> http://www.coderanch.com/templates/default/images/icon_edit.gif </span></a>      </div></div></td></tr><tr class="messageRow"><td class="row2 postbody" id="post_text_2648333" style="border:0px solid black;" valign="top"> <span class="postbody"> <p class="edit_area" id="2648333">Hello, <br/> <br/> Actuallly i am unable to configure correctly a new oracle datasource, i spent a week trying to make it work but no way!! <br/> <br/> I need to define a new oracle datasource, i am using Oracle 11g , Jboss 5.1 <br/> <br/> My oracle-ds.xml <br/> [code=java] <br/> [b]<?xml version="1.0" encoding="UTF-8"?> <br/> <datasources> <br/> <local-tx-datasource> <br/> <jndi-name>OracleDS</jndi-name> <br/> <use-java-context>false</use-java-context> <br/> <!--<connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url> --> <br/> <connection-url>jdbc:oracle:thin:@localhost:1521:iamsaas</connection-url> <br/> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <br/> <user-name>ADMIAMSAAS</user-name> <br/> <password>iamsaas</password> <br/> <br/> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <br/> <min-pool-size>5</min-pool-size> <br/> <max-pool-size>200</max-pool-size> <br/> <idle-timeout-minutes>5</idle-timeout-minutes> <br/> <blocking-timeout-millis>10000</blocking-timeout-millis> <br/> <br/> <metadata> <type-mapping>Oracle9i</type-mapping> </metadata> <br/> <br/> <br/> </local-tx-datasource> <br/> </datasources>[/b][color=red] [/color] <br/> [/code] <br/> <br/> My persistence.xml <br/> [code=java] <br/><span> <persistence xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" </span><br/><span> xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span> </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><span>" version="1.0"> </span><br/> <br/>   <persistence-unit name="IAMPersistance" transaction-type="JTA"> <br/>     <jta-data-source>java:/OracleDS</jta-data-source> <br/> <br/>         <properties> <br/>          <property name="hibernate.hbm2ddl.auto" value="update"/> <br/>         </properties> <br/> <br/>  </persistence-unit> <br/> </persistence>  [color=red] [/color] <br/> [/code] <br/> <br/> when i deploy my ejb project on jboss i get these errors, <br/> <br/> [b]2012-05-24 15:37:07,908 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] (main) Starting persistence unit persistence.unit:unitName=#IAMPersistance <br/> 2012-05-24 15:37:07,908 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=persistence.unit:unitName=#IAMPersistance state=Create <br/> javax.naming.NameNotFoundException: OracleDS not bound[/b][color=red] [/color] <br/> <br/> <br/> [b]DEPLOYMENTS MISSING DEPENDENCIES: <br/>   Deployment "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3" is missing the following dependencies: <br/>     Dependency "<UNKNOWN jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#IAMPersistance' **") <br/>   Deployment "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3_endpoint" is missing the following dependencies: <br/>     Dependency "jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall") <br/> <br/> DEPLOYMENTS IN ERROR: <br/>   Deployment "<UNKNOWN jboss.j2ee:jar=IAMPersistence2.jar,name=RequestBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#IAMPersistance' ** <br/>   Deployment "persistence.unit:unitName=#IAMPersistance" is in error due to the following reason(s): javax.naming.NameNotFoundException: OracleDS not bound[/b][color=red] [/color] <br/> <br/> <br/> but in the JMX console i can see my beans! <br/> <br/> Please can anyone help me, i really need it :s ???</p> </span></td></tr></tbody></table></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/737685#737685">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>