<!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="http://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;">
Exception when testing Oracle datasource connections
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/fibber">fibber</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/560339#560339">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>For JBoss AS 6.0.0 M4, using Java 1.6.0_21 running on Solaris 10:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When I create a new Oracle datasource, the first thing I do is the "Test Connection" function (from Datasources -> datasource_name -> Control tab).  For some reason, I'm getting a stack trace with a security exception in the server log, even though the admin console is telling me that the connection test was successful.  This exception occurs no matter how simple or complicated my datasource connection is.  For example:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>oracle-basic-ds.xml</strong></p><p><span style="font-family: courier new,courier;"><?xml version="1.0" encoding="UTF-8"?></span></p><p><span style="font-family: courier new,courier;"><datasources><br/></span></p><p><span style="font-family: courier new,courier;">  <local-tx-datasource></span></p><p><span style="font-family: courier new,courier;">    <jndi-name>OracleDS</jndi-name></span></p><p><span style="font-family: courier new,courier;">    <driver-class>oracle.jdbc.OracleDriver</driver-class><br/>    <connection-url>jdbc:oracle:thin:@10.0.0.0:1521:MYSID</connection-url><br/>    <user-name>the_user</user-name><br/>    <password>the_password</password></span></p><p><span style="font-family: courier new,courier;">  </local-tx-datasource><br/></datasources></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The admin console results show that the "Yes" radio button is selected in the Test Results section (for the item that says "Was a connection obtained").  I know the connection is working correctly because if I change the password in the *-ds.xml file, the "No" radio button is selected, along with an error being printed in the server log.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>After the successful test, I see this large stack trace in the server log, telling me the users.properties and defaultUsers.properties files cannot be found:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>0:38:45,020 ERROR [org.jboss.security.auth.spi.UsersRolesLoginModule] Failed to load users/passwords/role files: java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found<br/>        at org.jboss.security.auth.spi.Util.loadProperties(Util.java:201) [:3.0.0.Beta4]<br/>        at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186) [:3.0.0.Beta4]<br/>        at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200) [:3.0.0.Beta4]<br/>        at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127) [:3.0.0.Beta4]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br/>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br/>        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]<br/>        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756) [:1.6.0_21]<br/>        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186) [:1.6.0_21]<br/>        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683) [:1.6.0_21]<br/>        at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_21]<br/>        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680) [:1.6.0_21]<br/>        at javax.security.auth.login.LoginContext.login(LoginContext.java:579) [:1.6.0_21]<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:553) [:3.0.0.Beta4]<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:487) [:3.0.0.Beta4]<br/>        at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365) [:3.0.0.Beta4]<br/>        at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160) [:6.0.0.20100721-M4]<br/>        at org.jboss.security.integration.JBossSecuritySubjectFactory.createSubject(JBossSecuritySubjectFactory.java:90) [:6.0.0.20100721-M4]<br/>        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool.testConnection(JBossManagedConnectionPool.java:389) [:6.0.0.20100721-M4]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br/>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br/>        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]<br/>        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.Beta5]<br/>        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.Beta5]<br/>        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.Beta5]<br/>        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.Beta5]<br/>        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.Beta5]<br/>        at org.jboss.system.microcontainer.ServiceControllerContext.invoke(ServiceControllerContext.java:194) [:2.2.0.Alpha10]<br/>        at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:61) [jboss-kernel.jar:2.2.0.Alpha10]<br/>        at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus$1.dispatch(LifecycleAwareKernelBus.java:58) [jboss-kernel.jar:2.2.0.Alpha10]<br/>        at org.jboss.kernel.plugins.registry.basic.BasicKernelBus.execute(BasicKernelBus.java:71) [jboss-kernel.jar:2.2.0.Alpha10]<br/>        at org.jboss.kernel.plugins.registry.basic.LifecycleAwareKernelBus.invoke(LifecycleAwareKernelBus.java:57) [jboss-kernel.jar:2.2.0.Alpha10]<br/>        at org.jboss.profileservice.management.KernelBusRuntimeComponentDispatcher.invoke(KernelBusRuntimeComponentDispatcher.java:85) [:0.1.0.Alpha1]<br/>        at org.jboss.profileservice.plugins.management.util.AbstractManagedComponentRuntimeDispatcher.invoke(AbstractManagedComponentRuntimeDispatcher.java:135) [:0.1.0.Alpha1]<br/>        at org.jboss.profileservice.management.DelegatingComponentDispatcherImpl.invoke(DelegatingComponentDispatcherImpl.java:93) [:0.1.0.Alpha1]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br/>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br/>        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]<br/>        at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) [jboss-aop.jar:2.2.1.Alpha3]<br/>        at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) [:1.0.1.GA]<br/>        at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:99) [:6.0.0.20100721-M4]<br/>        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898) [:6.0.0.20100721-M4]<br/>        at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106) [:6.0.0.20100721-M4]<br/>        at org.jboss.remoting.Client.invoke(Client.java:1961) [:6.0.0.20100721-M4]<br/>        at org.jboss.remoting.Client.invoke(Client.java:804) [:6.0.0.20100721-M4]<br/>        at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60) [:1.0.1.GA]<br/>        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>        at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74) [:1.0.1.GA]<br/>        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>        at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65) [:1.0.1]<br/>        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>        at org.jboss.aop.generatedproxies.AOPProxy$1.invoke(AOPProxy$1.java) [:]<br/>        at org.jboss.profileservice.management.client.ManagedOperationDelegate.invoke(ManagedOperationDelegate.java:63) [:6.0.0.20100721-M4]<br/>        at org.rhq.plugins.jbossas5.ManagedComponentComponent.invokeOperation(ManagedComponentComponent.java:218)<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]<br/>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]<br/>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]<br/>        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]<br/>        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)<br/>        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_21]<br/>        at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_21]<br/>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]<br/>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]<br/>        at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>How can I get rid of this exception and stack trace?  I've already secured the JMX Console and JMX Invoker, but it didn't have any effect.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/560339#560339">going to Community</a></p>
<p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="http://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>