You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by anita kulshreshtha <a_...@yahoo.com> on 2006/03/03 15:42:50 UTC

Help! Security Module

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 

Re: Help! Security Module

Posted by anita kulshreshtha <a_...@yahoo.com>.
  And surefire plugin must be commented out.
Thanks
Anita

--- anita kulshreshtha <a_...@yahoo.com> wrote:

> Prasad, 
>    The file I am using is attached. I will create a
> patch later and attach it to the jira. I have tried
> with maven-2.0.3-SNAPSHOT without any luck. I get
> the
> same error. The pom.xml in the repo is not deleting
> and creating the database.
> 
> Thanks
> Anita
> 
> --- Prasad Kashyap <go...@gmail.com>
> wrote:
> 
> > Anita,
> > 
> > In the top down m2 build of the 383564 revision I
> > did this morning,
> > security tests failed again.
> > 
> > I have updated my maven to version 2.1-SNAPSHOT. I
> > also have the
> > <prerequisites> block in my pom.xml.
> > 
> > See the attached log for more details.
> > 
> > Cheers
> > Prasad
> > 
> > On 3/4/06, Jacek Laskowski <el...@gmail.com>
> > wrote:
> > > 2006/3/3, anita kulshreshtha
> > <a_...@yahoo.com>:
> > > >   I am able to build successfully (all test
> > pass)
> > > > using :
> > > > mvn -o
> > > >
> >
>
-Djava.security.auth.login.config=src/test-data/data/login.config
> > > > -Dlog4j.configuration=file:log4j.properties
> > install
> > > >    I need to set these properties. network.log
> > defined
> > > > in log4j.properties is not being created.
> > >
> > > As a temporary solution we could inject these
> > properties in setUp of
> > > the respective tests and clean it in tearDown,
> > afterwards. However,
> > > I'm somehow convinced that environmentVariables
> > will work ;)
> > >
> > > > Anita
> > >
> > > Jacek
> > >
> > > --
> > > Jacek Laskowski
> > > http://www.laskowski.org.pl
> > >
> > 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com > <?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>
>       <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>
>  <!--             
> <argLine>-enableassertions</argLine> -->
>                 <systemProperties>      
>                   <property>
>                    
> <name>java.security.auth.login.config</name>        
>                             
> <value>src/test-data/data/login.config</value>  
>                   </property>                
> <property> 
>                      
> <name>log4j.configuration</name>
>                      
> <value>file:log4j.properties</value>
>                   </property> 
>          </systemProperties>
>         </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>
>                 <!-- Create the test databases
> directory -->                                     
> <delete dir="target/database"/>
>                 <mkdir 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>
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Help! Security Module

Posted by anita kulshreshtha <a_...@yahoo.com>.
Prasad, 
   The file I am using is attached. I will create a
patch later and attach it to the jira. I have tried
with maven-2.0.3-SNAPSHOT without any luck. I get the
same error. The pom.xml in the repo is not deleting
and creating the database.

Thanks
Anita

--- Prasad Kashyap <go...@gmail.com>
wrote:

> Anita,
> 
> In the top down m2 build of the 383564 revision I
> did this morning,
> security tests failed again.
> 
> I have updated my maven to version 2.1-SNAPSHOT. I
> also have the
> <prerequisites> block in my pom.xml.
> 
> See the attached log for more details.
> 
> Cheers
> Prasad
> 
> On 3/4/06, Jacek Laskowski <el...@gmail.com>
> wrote:
> > 2006/3/3, anita kulshreshtha
> <a_...@yahoo.com>:
> > >   I am able to build successfully (all test
> pass)
> > > using :
> > > mvn -o
> > >
>
-Djava.security.auth.login.config=src/test-data/data/login.config
> > > -Dlog4j.configuration=file:log4j.properties
> install
> > >    I need to set these properties. network.log
> defined
> > > in log4j.properties is not being created.
> >
> > As a temporary solution we could inject these
> properties in setUp of
> > the respective tests and clean it in tearDown,
> afterwards. However,
> > I'm somehow convinced that environmentVariables
> will work ;)
> >
> > > Anita
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.laskowski.org.pl
> >
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Help! Security Module

Posted by Prasad Kashyap <go...@gmail.com>.
Anita,

In the top down m2 build of the 383564 revision I did this morning,
security tests failed again.

I have updated my maven to version 2.1-SNAPSHOT. I also have the
<prerequisites> block in my pom.xml.

See the attached log for more details.

Cheers
Prasad

On 3/4/06, Jacek Laskowski <el...@gmail.com> wrote:
> 2006/3/3, anita kulshreshtha <a_...@yahoo.com>:
> >   I am able to build successfully (all test pass)
> > using :
> > mvn -o
> > -Djava.security.auth.login.config=src/test-data/data/login.config
> > -Dlog4j.configuration=file:log4j.properties install
> >    I need to set these properties. network.log defined
> > in log4j.properties is not being created.
>
> As a temporary solution we could inject these properties in setUp of
> the respective tests and clean it in tearDown, afterwards. However,
> I'm somehow convinced that environmentVariables will work ;)
>
> > Anita
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.laskowski.org.pl
>

Re: Help! Security Module

Posted by Jacek Laskowski <el...@gmail.com>.
2006/3/3, anita kulshreshtha <a_...@yahoo.com>:
>   I am able to build successfully (all test pass)
> using :
> mvn -o
> -Djava.security.auth.login.config=src/test-data/data/login.config
> -Dlog4j.configuration=file:log4j.properties install
>    I need to set these properties. network.log defined
> in log4j.properties is not being created.

As a temporary solution we could inject these properties in setUp of
the respective tests and clean it in tearDown, afterwards. However,
I'm somehow convinced that environmentVariables will work ;)

> Anita

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl

Re: Help! Security Module

Posted by Prasad Kashyap <go...@gmail.com>.
That's right. surefire-plugin either needs the properties injected or
set as system properties.

Henri & I found out from the maven guys that a maven 2.0.3-snapshot is
planned to be released in a few more days. That should solve the
problem.

http://jira.codehaus.org/browse/MSUREFIRE-64
http://jira.codehaus.org/browse/MSUREFIRE-61

Cheers
Prasad

On 3/3/06, Henri Yandell <fl...@gmail.com> wrote:
> Thanks Anita, sorry for not noticing that your first mail had the pom attached.
>
> To me (and I'm no expert) it looks like we should be doing:
>
> (http://maven.apache.org/plugins/maven-surefire-plugin/howto.html)
>
>   <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <configuration>
>         <systemProperties>
>           <property>
>             <name>java.security.auth.login.config</name>
>             <value>src/test-data/data/login.config</value>
>           </property>
>           <property>
>             <name>log4j.configuration</name>
>             <value>file:log4j.properties</value>
>           </property>
>         </systemProperties>
>       </configuration>
>     </plugin>
>
> but that fails to work, I get NPEs at the sys-prop setting level.
> Asking the Maven guys if maybe it's changed or I'm just being an
> idiot.
>
> (http://www.rafb.net/paste/results/dPbO1l16.html)
>
> Hen
>
> On 3/3/06, anita kulshreshtha <a_...@yahoo.com> wrote:
> >   I am able to build successfully (all test pass)
> > using :
> > mvn -o
> > -Djava.security.auth.login.config=src/test-data/data/login.config
> > -Dlog4j.configuration=file:log4j.properties install
> >    I need to set these properties. network.log defined
> > in log4j.properties is not being created. Need to
> > figure out why?
> >
> > Thanks
> > Anita
> > --- Henri Yandell <fl...@gmail.com> wrote:
> >
> > > *sigh* need sugar.
> > >
> > > 'mail me the pom file'.
> > >
> > > Hen
> > >
> > > On 3/3/06, Henri Yandell <fl...@gmail.com> wrote:
> > > > Could you the pom file you made so I can sit and
> > > stare at the errors too? :)
> > > >
> > > > Hen
> > > >
> > > > On 3/3/06, anita kulshreshtha
> > > <a_...@yahoo.com> wrote:
> > > > >    That did not help. I am loading all the
> > > properties
> > > > > defined in log4j.configuration via ant
> > > > > <property file="log4j.properties"/>
> > > > >    Do I need to set the property
> > > log4j.configuration?
> > > > > to file:log4j.properties? Maven/ant does not
> > > like ":".
> > > > >
> > > > > Thanks
> > > > > Anita
> > > > >
> > > > > --- anita kulshreshtha <a_...@yahoo.com>
> > > wrote:
> > > > >
> > > > > > Never mind... I just saw 2 delete dir lines!
> > > no
> > > > > > mkdir
> > > > > > :(
> > > > > >
> > > > > > Thanks
> > > > > > Anita
> > > > > >
> > > > > > --- anita kulshreshtha <a_...@yahoo.com>
> > > wrote:
> > > > > >
> > > > > > > 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)
> > >
> > === message truncated ===
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> >
>

Re: Help! Security Module

Posted by Jacek Laskowski <el...@gmail.com>.
2006/3/3, Henri Yandell <fl...@gmail.com>:

>   <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <configuration>
>         <systemProperties>
>           <property>
>             <name>java.security.auth.login.config</name>
>             <value>src/test-data/data/login.config</value>
>           </property>
>           <property>
>             <name>log4j.configuration</name>
>             <value>file:log4j.properties</value>
>           </property>
>         </systemProperties>
>       </configuration>
>     </plugin>
>
> but that fails to work, I get NPEs at the sys-prop setting level.

Could you give it a try again with environmentVariables instead of
systemProperties? It seems that systemProperties is not initialized
properly by the plugin and thus the exception.

> Hen

Jacek

--
Jacek Laskowski
http://www.laskowski.org.pl

Re: Help! Security Module

Posted by Henri Yandell <fl...@gmail.com>.
Thanks Anita, sorry for not noticing that your first mail had the pom attached.

To me (and I'm no expert) it looks like we should be doing:

(http://maven.apache.org/plugins/maven-surefire-plugin/howto.html)

  <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <systemProperties>
          <property>
            <name>java.security.auth.login.config</name>
            <value>src/test-data/data/login.config</value>
          </property>
          <property>
            <name>log4j.configuration</name>
            <value>file:log4j.properties</value>
          </property>
        </systemProperties>
      </configuration>
    </plugin>

but that fails to work, I get NPEs at the sys-prop setting level.
Asking the Maven guys if maybe it's changed or I'm just being an
idiot.

(http://www.rafb.net/paste/results/dPbO1l16.html)

Hen

On 3/3/06, anita kulshreshtha <a_...@yahoo.com> wrote:
>   I am able to build successfully (all test pass)
> using :
> mvn -o
> -Djava.security.auth.login.config=src/test-data/data/login.config
> -Dlog4j.configuration=file:log4j.properties install
>    I need to set these properties. network.log defined
> in log4j.properties is not being created. Need to
> figure out why?
>
> Thanks
> Anita
> --- Henri Yandell <fl...@gmail.com> wrote:
>
> > *sigh* need sugar.
> >
> > 'mail me the pom file'.
> >
> > Hen
> >
> > On 3/3/06, Henri Yandell <fl...@gmail.com> wrote:
> > > Could you the pom file you made so I can sit and
> > stare at the errors too? :)
> > >
> > > Hen
> > >
> > > On 3/3/06, anita kulshreshtha
> > <a_...@yahoo.com> wrote:
> > > >    That did not help. I am loading all the
> > properties
> > > > defined in log4j.configuration via ant
> > > > <property file="log4j.properties"/>
> > > >    Do I need to set the property
> > log4j.configuration?
> > > > to file:log4j.properties? Maven/ant does not
> > like ":".
> > > >
> > > > Thanks
> > > > Anita
> > > >
> > > > --- anita kulshreshtha <a_...@yahoo.com>
> > wrote:
> > > >
> > > > > Never mind... I just saw 2 delete dir lines!
> > no
> > > > > mkdir
> > > > > :(
> > > > >
> > > > > Thanks
> > > > > Anita
> > > > >
> > > > > --- anita kulshreshtha <a_...@yahoo.com>
> > wrote:
> > > > >
> > > > > > 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)
> >
> === message truncated ===
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>

Re: Help! Security Module

Posted by anita kulshreshtha <a_...@yahoo.com>.
  I am able to build successfully (all test pass)
using :
mvn -o
-Djava.security.auth.login.config=src/test-data/data/login.config
-Dlog4j.configuration=file:log4j.properties install
   I need to set these properties. network.log defined
in log4j.properties is not being created. Need to
figure out why?

Thanks
Anita 
--- Henri Yandell <fl...@gmail.com> wrote:

> *sigh* need sugar.
> 
> 'mail me the pom file'.
> 
> Hen
> 
> On 3/3/06, Henri Yandell <fl...@gmail.com> wrote:
> > Could you the pom file you made so I can sit and
> stare at the errors too? :)
> >
> > Hen
> >
> > On 3/3/06, anita kulshreshtha
> <a_...@yahoo.com> wrote:
> > >    That did not help. I am loading all the
> properties
> > > defined in log4j.configuration via ant
> > > <property file="log4j.properties"/>
> > >    Do I need to set the property
> log4j.configuration?
> > > to file:log4j.properties? Maven/ant does not
> like ":".
> > >
> > > Thanks
> > > Anita
> > >
> > > --- anita kulshreshtha <a_...@yahoo.com>
> wrote:
> > >
> > > > Never mind... I just saw 2 delete dir lines!
> no
> > > > mkdir
> > > > :(
> > > >
> > > > Thanks
> > > > Anita
> > > >
> > > > --- anita kulshreshtha <a_...@yahoo.com>
> wrote:
> > > >
> > > > > 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)
> 
=== message truncated ===

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Help! Security Module

Posted by Henri Yandell <fl...@gmail.com>.
*sigh* need sugar.

'mail me the pom file'.

Hen

On 3/3/06, Henri Yandell <fl...@gmail.com> wrote:
> Could you the pom file you made so I can sit and stare at the errors too? :)
>
> Hen
>
> On 3/3/06, anita kulshreshtha <a_...@yahoo.com> wrote:
> >    That did not help. I am loading all the properties
> > defined in log4j.configuration via ant
> > <property file="log4j.properties"/>
> >    Do I need to set the property log4j.configuration?
> > to file:log4j.properties? Maven/ant does not like ":".
> >
> > Thanks
> > Anita
> >
> > --- anita kulshreshtha <a_...@yahoo.com> wrote:
> >
> > > Never mind... I just saw 2 delete dir lines! no
> > > mkdir
> > > :(
> > >
> > > Thanks
> > > Anita
> > >
> > > --- anita kulshreshtha <a_...@yahoo.com> wrote:
> > >
> > > > 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)
> > >
> > === message truncated ===
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>

Re: Help! Security Module

Posted by Henri Yandell <fl...@gmail.com>.
Could you the pom file you made so I can sit and stare at the errors too? :)

Hen

On 3/3/06, anita kulshreshtha <a_...@yahoo.com> wrote:
>    That did not help. I am loading all the properties
> defined in log4j.configuration via ant
> <property file="log4j.properties"/>
>    Do I need to set the property log4j.configuration?
> to file:log4j.properties? Maven/ant does not like ":".
>
> Thanks
> Anita
>
> --- anita kulshreshtha <a_...@yahoo.com> wrote:
>
> > Never mind... I just saw 2 delete dir lines! no
> > mkdir
> > :(
> >
> > Thanks
> > Anita
> >
> > --- anita kulshreshtha <a_...@yahoo.com> wrote:
> >
> > > 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)
> >
> === message truncated ===
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Re: Help! Security Module

Posted by anita kulshreshtha <a_...@yahoo.com>.
   That did not help. I am loading all the properties
defined in log4j.configuration via ant
<property file="log4j.properties"/>
   Do I need to set the property log4j.configuration?
to file:log4j.properties? Maven/ant does not like ":".

Thanks
Anita

--- anita kulshreshtha <a_...@yahoo.com> wrote:

> Never mind... I just saw 2 delete dir lines! no
> mkdir
> :(
> 
> Thanks
> Anita
> 
> --- anita kulshreshtha <a_...@yahoo.com> wrote:
> 
> > 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)
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Help! Security Module

Posted by anita kulshreshtha <a_...@yahoo.com>.
Never mind... I just saw 2 delete dir lines! no mkdir
:(

Thanks
Anita

--- anita kulshreshtha <a_...@yahoo.com> wrote:

> 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>
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com