In the future, please start by indicating the exactjboss version you are
using.

In jboss 3, the attribute name="RARDeployer" is not used. take it out.

If it is 3.0 alpha, you need to rename the oracle driver file ***.jar from
***.zip, and you need to change the depends optional-attribute-name= tags
to mbean-ref name=, and the object names inside these tags need to match
the actual object names: they start e.g. JCA: rather than jboss.jca.

If it is 3.0 from cvs, except for the extra "RARDeployer", this looks ok.  

If this does not clear up the problem look at your server log carefully. It
should tell you what is happening and what if anything is going wrong with
the deployment.  If you still have problems post the relevant parts of the
log.

david  jencks

On 2002.02.08 07:21:18 -0500 Anna Verena Linder wrote:
> Hi,
> 
> I am trying to set up JBoss so I can connect to a database from a session
> bean. When I run JBoss, it starts up without problems, but the
> ConnectionFactory doesn't get bound under JNDI. Can anybody help? I'm at
> the
> end of my wits.
> 
> Thanks a lot in advance!
> Anna Verena Linder
> -------------------------------------
> Here is a description of my configuration:
> 
> I have the oracle jdbc driver zip under JBOSS/lib/ext.
> 
> The entry in ejb-jar.xml is:
> 
> <resource-ref>
>    <description>Oracle User Data</description>
>    <res-ref-name>jdbc/OracleUser</res-ref-name>
>    <res-type>javax.sql.DataSource</res-type>
>    <res-auth>Application</res-auth>
> </resource-ref>
> 
> and the entries in jboss.xml are:
> 
> <resource-ref>
>    <res-ref-name>jdbc/OracleUser</res-ref-name>
>    <resource-name>OracleUser</resource-name>
> </resource-ref>
> 
> and
> 
> <resource-managers>
>     <resource-manager res-class="">
>        <res-name>OracleUser</res-name>
>        <res-jndi-name>java:/OracleUser</res-jndi-name>
>     </resource-manager>
> </resource-managers>
> 
> The Namespace of my bean contains an entry java:comp/env/jdbc/OracleUser,
> which points to java:/OracleUser, but in the java: Namespace, there is no
> OracleUser entry.
> 
> The mbean entry in my jboss.jcml looks like this:
> 
> <mbean code="org.jboss.resource.ConnectionFactoryLoader"
>          name="jboss.jca:service=ConnectionFactoryLoader,name=OracleUser">
>     <attribute name="JndiName">OracleUser</attribute>
>     <attribute name="FactoryName">OracleUser</attribute>
>     <attribute
> name="TransactionManagerName">java:/TransactionManager</attribute>
> 
>     <attribute name="RARDeployerName">JCA:service=RARDeployer</attribute>
>     <depends optional-attribute-name="ResourceAdapterName">
>         jboss.jca:service=RARDeployment,name=Minerva JDBC
> LocalTransaction
> ResourceAdapter
>     </depends>
>     <attribute name="ConnectionManagerFactoryName">
>       MinervaNoTransCMFactory
>     </attribute>
> 
>     <attribute name="ManagedConnectionFactoryProperties">
>       ConnectionURL=jdbc:oracle:thin:@diablo:1521:olga
>       Driver=oracle.jdbc.driver.OracleDriver
>       TransactionIsolation=TRANSACTION_NONE
>     </attribute>
> 
>     <depends optional-attribute-name="ConnectionManagerFactoryLoaderName">
> 
> jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaNoTransCMFactor
> y
>     </depends>
> 
>     <attribute name="ConnectionManagerProperties">
>       MinSize=0
>       MaxSize=10
>       BlockingTimeoutMillis=50000
>       IdleTimeoutMinutes=30
>       CleanupIntervalMinutes=10
>       MaxIdleTimeoutPercent=1.0
>     </attribute>
>     <attribute name="PrincipalMappingClass">
>       org.jboss.resource.security.ManyToOnePrincipalMapping
>     </attribute>
>     <attribute name="PrincipalMappingProperties">
>         userName=myuser
>         password=mypasswd
>     </attribute>
> </mbean>
> 
> In the session bean, I call
> 
> InitialContext jndiContext = new InitialContext();
>          DataSource source = (DataSource)
>                     jndiContext.lookup("java:comp/env/jdbc/OracleUser");
> 
> which throws me a NameNotFoundException: "OracleUser not bound".
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> 
> 
> <META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
> <BODY>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002>Hi,</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>I am trying
> to set 
> up JBoss so I can connect to a database from a session bean. When I run
> JBoss, 
> it starts up without problems, but the ConnectionFactory doesn't get
> bound under 
> JNDI. Can anybody help? I'm at the end of my wits.</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>Thanks a lot
> in 
> advance!</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>Anna Verena 
> Linder</SPAN></FONT></DIV>
> <DIV><SPAN class=654355509-08022002></SPAN><FONT size=2><FONT
> face=Arial>-<SPAN 
> 
>class=654355509-08022002>------------------------------------</SPAN></FONT></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>Here is a 
> description of my configuration:</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>I have the
> oracle 
> jdbc driver&nbsp;zip under JBOSS/lib/ext.&nbsp;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>The entry in 
> ejb-jar.xml is:</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002>&lt;resource-ref&gt;<BR>&nbsp;&nbsp; 
> &lt;description&gt;Oracle User 
> 
>Data&lt;/description&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;res-ref-name&gt;jdbc/OracleUser&lt;/res-ref-name&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;res-auth&gt;Application&lt;/res-auth&gt;<BR>&lt;/resource-ref&gt;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>and the
> entries in 
> jboss.xml are:</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002>&lt;resource-ref&gt;<BR>&nbsp;&nbsp; 
> 
>&lt;res-ref-name&gt;jdbc/OracleUser&lt;/res-ref-name&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;resource-name&gt;OracleUser&lt;/resource-name&gt;<BR>&lt;/resource-ref&gt;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002>and</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002>&lt;resource-managers&gt;<BR>&nbsp;&nbsp;&nbsp; 
> &lt;resource-manager res-class=""&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> &lt;res-name&gt;OracleUser&lt;/res-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> 
>&lt;res-jndi-name&gt;java:/OracleUser&lt;/res-jndi-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/resource-manager&gt;<BR>&lt;/resource-managers&gt;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>The Namespace
> of my 
> bean contains an entry java:comp/env/jdbc/OracleUser, which points to 
> java:/OracleUser, but in the java: Namespace, there is no OracleUser 
> entry.</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>The mbean
> entry in 
> my&nbsp;jboss.jcml looks like this:</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>&lt;mbean 
> 
>code="org.jboss.resource.ConnectionFactoryLoader"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> 
>name="jboss.jca:service=ConnectionFactoryLoader,name=OracleUser"&gt;<BR>&nbsp;&nbsp;&nbsp;
> 
> &lt;attribute 
> name="JndiName"&gt;OracleUser&lt;/attribute&gt;<BR>&nbsp;&nbsp;&nbsp; 
> &lt;attribute 
> name="FactoryName"&gt;OracleUser&lt;/attribute&gt;<BR>&nbsp;&nbsp;&nbsp; 
> &lt;attribute 
> 
>name="TransactionManagerName"&gt;java:/TransactionManager&lt;/attribute&gt;</SPAN></FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>&nbsp;&nbsp;&nbsp;
> 
> &lt;attribute 
> 
>name="RARDeployerName"&gt;JCA:service=RARDeployer&lt;/attribute&gt;<BR>&nbsp;&nbsp;&nbsp;
> 
> &lt;depends 
> 
>optional-attribute-name="ResourceAdapterName"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction 
> ResourceAdapter<BR>&nbsp;&nbsp;&nbsp;
> &lt;/depends&gt;<BR>&nbsp;&nbsp;&nbsp; 
> &lt;attribute 
> name="ConnectionManagerFactoryName"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> MinervaNoTransCMFactory<BR>&nbsp;&nbsp;&nbsp; 
> &lt;/attribute&gt;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>&nbsp;&nbsp;&nbsp;
> 
> &lt;attribute 
> name="ManagedConnectionFactoryProperties"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> ConnectionURL=jdbc:oracle:thin:@diablo:1521:olga<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> Driver=oracle.jdbc.driver.OracleDriver<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> TransactionIsolation=TRANSACTION_NONE<BR>&nbsp;&nbsp;&nbsp; 
> &lt;/attribute&gt;</SPAN></FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>&nbsp;&nbsp;&nbsp;
> 
> &lt;depends 
> 
>optional-attribute-name="ConnectionManagerFactoryLoaderName"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> 
>jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaNoTransCMFactory<BR>&nbsp;&nbsp;&nbsp;
> 
> &lt;/depends&gt;</SPAN></FONT></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>&nbsp;&nbsp;&nbsp;
> 
> &lt;attribute 
> name="ConnectionManagerProperties"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> MinSize=0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> MaxSize=10<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> BlockingTimeoutMillis=50000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> IdleTimeoutMinutes=30<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> CleanupIntervalMinutes=10<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> MaxIdleTimeoutPercent=1.0<BR>&nbsp;&nbsp;&nbsp; 
> &lt;/attribute&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;attribute 
> name="PrincipalMappingClass"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> org.jboss.resource.security.ManyToOnePrincipalMapping<BR>&nbsp;&nbsp;&nbsp;
> 
> &lt;/attribute&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;attribute 
> name="PrincipalMappingProperties"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> userName=myuser<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> password=mypasswd<BR>&nbsp;&nbsp;&nbsp; 
> &lt;/attribute&gt;<BR>&lt;/mbean&gt;</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>In the
> session bean, 
> I call </SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>InitialContext
> 
> jndiContext = new 
> InitialContext();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> DataSource 
> source = 
> 
>(DataSource)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 
> jndiContext.lookup("java:comp/env/jdbc/OracleUser");</SPAN></FONT></DIV>
> <DIV><FONT face=Arial size=2><SPAN 
> class=654355509-08022002></SPAN></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2><SPAN class=654355509-08022002>which throws
> me a 
> NameNotFoundException: "OracleUser not
> bound".</SPAN></FONT></DIV></BODY></HTML>
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to