[jboss-jira] [JBoss JIRA] Commented: (JBAS-4286) users.properties file not being correctly located in CustomSecurityManagerTestCase

Richard Achmatowicz (JIRA) jira-events at lists.jboss.org
Mon Apr 2 16:27:58 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBAS-4286?page=comments#action_12358157 ] 
            
Richard Achmatowicz commented on JBAS-4286:
-------------------------------------------

I ran the test standalone on Windows and on RHEL and the Windows failures persist.

I did a diff of the two deploy directories and they match, so the lack of [copy] messages in Windows may not be a problem.
The output.log logs are identiical, up until the point where the custom-secmgrtests.ear is started:

Windows
========
12:54:16,266 INFO  [EARDeployer] Started J2EE application: file:/C:/JBPAPP/JBPAPP-03-30-07-alpha4-x86-BEA/src/testsuite/output/lib/custom-secmgrtests.ear

12:54:16,953 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files

java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found

	at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)

	at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)

	at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)

	at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


15:24:21,502 INFO  [EARDeployer] Started J2EE application: file:/qa/services/dtf-admin/JBPAPP-04-02-07/src/testsuite/output/\
lib/custom-secmgrtests.ear
15:24:22,307 ERROR [LogInterceptor] EJBException in method: public abstract java.lang.String org.jboss.test.security.interfa\
ces.StatelessSession.echo(java.lang.String) throws java.rmi.RemoteException, causedBy:
java.rmi.AccessException: SecurityException; nested exception is:
        java.lang.SecurityException: Insufficient method permissions, principal=null, ejbName=Entity, method=findByPrimaryKe\
y, interface=HOME, requiredRoles=[Echo], principalRoles=null
        at org.jboss.test.security.ejb.StatelessSessionBean2.echo(StatelessSessionBean2.java:91)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)

I also noticed the propetries files:
            <include name="custom-users.properties"/>
            <include name="custom-roles.properties"/>
included in the custom-secmgrtests.jar file, which is included in the custom-secmgrtests.ear file which is deployed. Are these the properties files which are intended to be picked up?


> users.properties file not being correctly located in CustomSecurityManagerTestCase
> ----------------------------------------------------------------------------------
>
>                 Key: JBAS-4286
>                 URL: http://jira.jboss.com/jira/browse/JBAS-4286
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Security
>    Affects Versions: JBossAS-4.2.0.CR1
>         Environment: Windows 2003, x86_64, x86, BEA JVM
>            Reporter: Richard Achmatowicz
>         Assigned To: Anil Saldhana
>         Attachments: output.log, server.log
>
>
> The following tests are failing due to a common error:
> testGetCallerPrinciple, testStatefulCreateCaller, testMethodAccess, testDomainMethodAccess
> testMethodAccess2, testLocalMethodAccess, testUncheckedRemote, testRemoteUnchecked, testUnchecked
> testUncheckedWithLogin, testExcluded, testRunAs, testDeepRunAs
> and others
> The common error is:
> Suite: org.jboss.test.security.test.CustomSecurityManagerTestCase(custom-secmgr)
> Test: testDomainMethodAccess
> Type: error
> Exception: java.rmi.AccessException
> Message: SecurityException; nested exception is: javax.security.auth.login.LoginException: Missing users.properties file.
> ---------------------------------
> The test case CunstomSecurityManagerTestCase is a subclass of the test case EJBSpecUnitTestCase.
> EJBSpecUnitTestCase deploys the jar security-spec.jar which contains users.properties and roles.properties files, but these seem not to be located.
> From the output.log, it seems that the security-spec.jar is not being deployed before the custom-secmgrtests.ear. I have attached the log. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list