Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.naming.NameNotFoundException:UserTransaction not found

548630Jan 17 2007 — edited Jan 18 2007
Hi,<br>
<br>
What Iam using<br>
Server : Oracle Application Server 10g Release 3 <br>
Version : 10.1.3.1.0 SOA4<br>
Build : 061008.0900.00025<br>
Platform : Windows XP SP2<br>
<br>
Iam trying for CMP in OAS with EJB2.0 with an EAR which just has a Jar file.<br>
<br>
Hashtable envProps = new Hashtable(4);<br>
envProps.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");<br>
envProps.put(Context.PROVIDER_URL, "opmn:ormi://localhost:6003:home/CMT1");<br>
envProps.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");<br>
envProps.put(Context.SECURITY_CREDENTIALS, "welcome1");<br>
final InitialContext initialContext = new InitialContext(envProps);<br>
return initialContext.lookup("<font color="red">UserTransaction</font>");
<br><br>
Iam getting "javax.naming.NameNotFoundException:UserTransaction not found".<br><br>
My ejb-jar.xml has the following entries.<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"><br>
<ejb-jar id="ejb-jar_ID"><br>
 <enterprise-beans><br>
  <session><br>
   <small-icon></small-icon><br>
   <ejb-name>CMT1</ejb-name><br>
   <home>com.abc.def.CMT1_SH</home><br>
   <remote>com.abc.def.CMT1_SR</remote><br>
   <ejb-class>com.abc.def.CMT1</ejb-class><br>
   <session-type>Stateless</session-type><br>
   <transaction-type>Container</transaction-type><br>
  </session><br>
 </enterprise-beans><br>
 <assembly-descriptor ><br>
  <container-transaction><br>
   <method><br>
    <ejb-name>CMT1</ejb-name><br>
    <method-name>METHOD1</method-name><br>
   </method> <br>
   <trans-attribute>Supports</trans-attribute><br>
  </container-transaction><br>
 </assembly-descriptor><br>
</ejb-jar><br>
<br>
My datasources.xml is present within the ear itself.<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<data-sources><br>
 &nbsp;<managed-data-source user="username" password="password" connection-pool-name="CMT1ConnPool" jndi-name="CMT1DS" name="CMT1DS"/><br>
 &nbsp;&nbsp;<connection-pool name="CMT1ConnPool"><br>
&nbsp;&nbsp;&nbsp;<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="username" password="password" url="jdbc:oracle:thin:@//localhost:1521/ORCL"/><br>
 </connection-pool><br>
</data-sources><br>
<br>
I have given reference to my datasources.xml in my orion-application.xml.<br>
<?xml version="1.0"?><br>
<orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.1.0" default-data-source="jdbc/OracleDS" component-classification="external" schema-major-version="10" schema-minor-version="0"><br>
 <ejb-module remote="false" path="CMT1.jar"/><br>
 <persistence path="persistence"/><br>
 <principals path="principals.xml"/><br>
 <jazn provider="XML"/><br>
 <data-sources path="./data-sources.xml"/><br>
</orion-application><br>
<br>
Please let me know if Iam missing something here.<br>
Iam not able to understand how this works.<br>
Any pointers to online docs will be very much helpful.<br>
Please help me.<br>
<br>
Regards,<br>
<br>
Prashanth Babu.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2007
Added on Jan 17 2007
2 comments
704 views