Hi,
   I am migrating security module to M2 (rev 382374).
Some tests are failing. These tests pass with M1
build.
:-------------------------------------------------------------------------------
Battery:
org.apache.geronimo.security.jaas.LoginKerberosTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Time elapsed:
0.437 sec 

testLogin(org.apache.geronimo.security.jaas.LoginKerberosTest)
 Time elapsed: 0.406 sec  <<< ERROR!

[ stdout ]
---------------------------------------------------------------



[ stderr ]
---------------------------------------------------------------



[ stacktrace ]
-----------------------------------------------------------

java.lang.SecurityException: Unable to locate a login
configuration
        at
com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at ...............................
      The login.config in  m1 build is defined by
project.properties as :
maven.junit.jvmargs=-Djava.security.auth.login.config=src/test-data/data/login.config
     I have set this property in pom.xml (attached).
    What is missing here?

Thanks
Anita

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------------------------------------------------------------------------
Battery: org.apache.geronimo.security.jaas.LoginKerberosTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.437 sec 

testLogin(org.apache.geronimo.security.jaas.LoginKerberosTest)  Time elapsed: 
0.406 sec  <<< ERROR!

[ stdout ] ---------------------------------------------------------------



[ stderr ] ---------------------------------------------------------------



[ stacktrace ] -----------------------------------------------------------

java.lang.SecurityException: Unable to locate a login configuration
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at javax.security.auth.login.Configuration$3.run(Configuration.java:221)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
javax.security.auth.login.Configuration.getConfiguration(Configuration.java:215)
        at javax.security.auth.login.LoginContext$1.run(LoginContext.java:170)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.init(LoginContext.java:167)
        at javax.security.auth.login.LoginContext.<init>(LoginContext.java:292)
        at 
org.apache.geronimo.security.jaas.LoginKerberosTest.testLogin(LoginKerberosTest.java:87)
        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:324)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        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:324)
        at 
org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)
        at 
org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216)
        at org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
        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:324)
        at 
org.apache.maven.surefire.SurefireBooter.runTestsInProcess(SurefireBooter.java:304)
        at org.apache.maven.surefire.SurefireBooter.run(SurefireBooter.java:220)
        at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:368)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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:324)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.io.IOException: Unable to locate a login configuration
        at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
        at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
        ... 60 more


<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

    Copyright 2006 The Apache Software Foundation

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!-- $Revision$ $Date$ -->

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.geronimo</groupId>
    <artifactId>geronimo</artifactId>
    <version>1.2-SNAPSHOT</version>
  </parent>
  <groupId>org.apache.geronimo</groupId>
  <artifactId>geronimo-security</artifactId>
  <version>${geronimoVersion}</version>
  <packaging>jar</packaging>
  <name>Geronimo :: Security</name>
  <build>
      <!-- read property file -->      
      <testResources>
           <testResource>
                <directory>src/test-data</directory>
            </testResource>
       </testResources>
      <plugins>
<!--      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <forkMode>pertest</forkMode>
        </configuration>
      </plugin> -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-test-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <loadfile property="log4j.configuration"
                          srcFile="log4j.properties"/>
                <!-- login configuration -->
                <property  name="java.security.auth.login.config"                                       value="src/test-data/data/login.config"/>
                <!-- Create the test databases directory -->
                <delete dir="target/database"/>
                <delete dir="target/database"/>
              </tasks>
            </configuration>
          </execution>
        </executions>
        </plugin>
        </plugins>    
  </build>
  <dependencies>

    <!-- Spec Dependencies -->

        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
            <version>${geronimoSpecJ2eeJaccVersion}</version>
        </dependency>

    <!-- geronimo jars -->

        <dependency>
            <groupId>org.apache.geronimo</groupId>
            <artifactId>geronimo-common</artifactId>
        </dependency>
        <!-- interceptor uses dependencies.dependency.version -->
        <dependency>
            <groupId>org.apache.geronimo</groupId>
            <artifactId>geronimo-interceptor</artifactId>
            <version>${geronimoVersion}</version>

        </dependency>

        <dependency>
             <groupId>org.apache.geronimo</groupId>
             <artifactId>geronimo-j2ee</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.geronimo</groupId>
            <artifactId>geronimo-kernel</artifactId>
        </dependency>
        <dependency>
             <groupId>org.apache.geronimo</groupId>
             <artifactId>geronimo-management</artifactId>

        </dependency>

        <dependency>
            <groupId>org.apache.geronimo</groupId>
            <artifactId>geronimo-system</artifactId>
        </dependency>

    <!-- Thirdparty -->

    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>

    <dependency>
      <groupId>mx4j</groupId>
      <artifactId>mx4j</artifactId>
    </dependency>

        <dependency>
            <groupId>concurrent</groupId>
            <artifactId>concurrent</artifactId>
            <version>${concurrentVersion}</version>
        </dependency>

        <dependency>
            <groupId>activeio</groupId>
            <artifactId>activeio</artifactId>
            <version>${activeIoVersion}</version>
        </dependency>


    <!--  test database -->
        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldbVersion}</version>
        </dependency>   

        <dependency>
            <groupId>regexp</groupId>
            <artifactId>regexp</artifactId>
            <version>${regexpVersion}</version>
        </dependency>

    </dependencies>

</project>

Reply via email to