You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Sven Pfeiffer <sv...@innoface.de> on 2005/01/04 12:09:39 UTC

JAAS Login Modul,auto-create-users and No active transaction

Hi List

I am using the latest binary build of slide inside a JBoss with tomcat.

I want to use my own JAAS login module so I uncommented the <security-constraint> part of the web.xml-file.
I added
	<login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>my-login</realm-name>
    	</login-config>

in jboss-web.xml i added:
	<jboss-web>
    		<security-domain>java:/jaas/my-login</security-domain>
	</jboss-web>

Then I added
		<auto-create-users>true</auto-create-users>
            <auto-create-users-role>org.apache.slide.structure.SubjectNode</auto-create-users-role>
to Domain.xml.

Now authentification works fine.

But there is one odd behaviour.

When I create a new user and the user tries to logon for the first time using a browser (no matter whether IE or Mozilla/firefox),
the result is always

<snip>
2005-01-04 10:32:37,171 INFO  [STDOUT] 04 Jan 2005 10:32:37 - WARNING - WARNING: No active transaction
2005-01-04 10:32:37,187 INFO  [STDOUT] 04 Jan 2005 10:32:37 - org.apache.slide.store.txfile.AbstractTxFileStoreService - WARNING -
Thread Thread[TP-Processor4,5,jboss] marked transaction branch null for rollback. Cause: Not inside tx
2005-01-04 10:32:37,187 INFO  [STDOUT] TP-Processor4, 04-Jan-2005 10:32:37, otto, GET, 500 "Internal Server Error", 62 ms, /
</snip>

And no user is created.
When connecting to my slide ressource over Explorer everything works fine.

I found one difference, when connecting using a browser there is simply a GET, but when connecting using Explorer there is OPTIONS,
PROPFIND and then GET.

Is this a wanted behaviour or a bug?
And, is there a way to change it, so it works if the user just connects by a browser?

Thanks in advance

SVen


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: JAAS Login Modul,auto-create-users and No active transaction

Posted by Oliver Zeigermann <ol...@gmail.com>.
Great! This makes me feel good :)

Oliver

On Tue, 4 Jan 2005 15:09:20 +0100, Sven Pfeiffer
<sv...@innoface.de> wrote:
> Hi Oliver
> 
> I just missed that there is a 2.1 version, after using this, configuring it again, solving the jdom-problem and so on
> 
> it works fine.
> 
> thanks for your fast and helpful answer.
> 
> SVen
> 
> >-----Original Message-----
> >From: Oliver Zeigermann [mailto:oliver.zeigermann@gmail.com]
> >Sent: Tuesday, January 04, 2005 12:45 PM
> >To: Slide Developers Mailing List
> >Subject: Re: JAAS Login Modul,auto-create-users and No active
> >transaction
> >
> >
> >The problem is that no transaction has been started when doing a GET
> >on a collection as your browser does. However, one is needed in order
> >to create a user. The questions is why this is so. There used to be a
> >problem with the generation of the HTML for a collection being done
> >outside of a transaction, but this has been fixed. Are you sure you
> >are using Slide 2.1 *final*?
> >
> >Oliver
> >
> >On Tue, 4 Jan 2005 12:09:39 +0100, Sven Pfeiffer
> ><sv...@innoface.de> wrote:
> >> Hi List
> >>
> >> I am using the latest binary build of slide inside a JBoss with tomcat.
> >>
> >> I want to use my own JAAS login module so I uncommented the <security-constraint> part of the web.xml-file.
> >> I added
> >>         <login-config>
> >>         <auth-method>BASIC</auth-method>
> >>         <realm-name>my-login</realm-name>
> >>         </login-config>
> >>
> >> in jboss-web.xml i added:
> >>         <jboss-web>
> >>                 <security-domain>java:/jaas/my-login</security-domain>
> >>         </jboss-web>
> >>
> >> Then I added
> >>                 <auto-create-users>true</auto-create-users>
> >>             <auto-create-users-role>org.apache.slide.structure.SubjectNode</auto-create-users-role>
> >> to Domain.xml.
> >>
> >> Now authentification works fine.
> >>
> >> But there is one odd behaviour.
> >>
> >> When I create a new user and the user tries to logon for the first time using a browser (no matter whether IE or
> >Mozilla/firefox),
> >> the result is always
> >>
> >> <snip>
> >> 2005-01-04 10:32:37,171 INFO  [STDOUT] 04 Jan 2005 10:32:37 - WARNING - WARNING: No active transaction
> >> 2005-01-04 10:32:37,187 INFO  [STDOUT] 04 Jan 2005 10:32:37 - org.apache.slide.store.txfile.AbstractTxFileStoreService -
> >WARNING -
> >> Thread Thread[TP-Processor4,5,jboss] marked transaction branch null for rollback. Cause: Not inside tx
> >> 2005-01-04 10:32:37,187 INFO  [STDOUT] TP-Processor4, 04-Jan-2005 10:32:37, otto, GET, 500 "Internal Server Error", 62 ms, /
> >> </snip>
> >>
> >> And no user is created.
> >> When connecting to my slide ressource over Explorer everything works fine.
> >>
> >> I found one difference, when connecting using a browser there is simply a GET, but when connecting using Explorer there
> >is OPTIONS,
> >> PROPFIND and then GET.
> >>
> >> Is this a wanted behaviour or a bug?
> >> And, is there a way to change it, so it works if the user just connects by a browser?
> >>
> >> Thanks in advance
> >>
> >> SVen
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: NullPointerException in IndexTrigger

Posted by Stefan Lützkendorf <lu...@apache.org>.
I applied your fix. In the ctor of ContentEvent nulls are used for the 
revision descriptor so we have to expect it.
thanks, Stefan

Karl Øie wrote:
> Hi there, just got around a NPE in both slide-2.1 and slide-2.2pre that  
> is thrown in IndexTrigger upon drop/delete index.
> 
> i changed line 115 in IndexTrigger.java:
> 
> from :
> 
> indexers[j].dropIndex(
>     new Uri(delete[i].getNamespace(),
>     delete[i].getUri()),
>     delete[i].getRevisionDescriptor().getRevisionNumber()
> );
> 
> to :
> 
> indexers[j].dropIndex(
>     new Uri(delete[i].getNamespace(),
>     delete[i].getUri()),
>     delete[i].getRevisionDescriptor()==null?null: 
> delete[i].getRevisionDescriptor().getRevisionNumber()
> );
> 
> as you can see getRevisionDescriptor() returns NULL and throws a NPE  
> when we try to do getRevisionNumber() on it.
> 
> The thing is that im a complete newbie to Slide so i wonder if this is  
> just a problem with IndexTrigger or if this is supposed to be right  
> because the getRevisionDescriptor() shouldnt return NULL. My index only  
> needs the getUri() result but i just wanted to ask?
> 
> Mvh Karl Øie
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 
> 

-- 
Stefan Lützkendorf  --  luetzkendorf@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


NullPointerException in IndexTrigger

Posted by Karl Øie <ka...@gan.no>.
Hi there, just got around a NPE in both slide-2.1 and slide-2.2pre that  
is thrown in IndexTrigger upon drop/delete index.

i changed line 115 in IndexTrigger.java:

from :

indexers[j].dropIndex(
	new Uri(delete[i].getNamespace(),
	delete[i].getUri()),
	delete[i].getRevisionDescriptor().getRevisionNumber()
);

to :

indexers[j].dropIndex(
	new Uri(delete[i].getNamespace(),
	delete[i].getUri()),
	delete[i].getRevisionDescriptor()==null?null: 
delete[i].getRevisionDescriptor().getRevisionNumber()
);

as you can see getRevisionDescriptor() returns NULL and throws a NPE  
when we try to do getRevisionNumber() on it.

The thing is that im a complete newbie to Slide so i wonder if this is  
just a problem with IndexTrigger or if this is supposed to be right  
because the getRevisionDescriptor() shouldnt return NULL. My index only  
needs the getUri() result but i just wanted to ask?

Mvh Karl Øie

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Another question about IndexTrigger

Posted by Karl Øie <ka...@gan.no>.
Hi again. Just wondering why the IndexTrigger triggers the update event 
before the create event? If a resource is replaced with a new version 
only the update event is sent, so i just thought the order of the 
events looked a bit strange.

Can anybody tell me why the order of the events are "update,create, 
delete" instead of "create, update, delete"? Just wondering because 
when implementing the Index interface i must perform some checks about 
if im doing a create on a already created index or a update on a index 
that has not yet been created. No critic here, jsut want to know.

Mvh Karl Øie

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


RE: JAAS Login Modul,auto-create-users and No active transaction

Posted by Sven Pfeiffer <sv...@innoface.de>.
Hi Oliver

I just missed that there is a 2.1 version, after using this, configuring it again, solving the jdom-problem and so on

it works fine.

thanks for your fast and helpful answer.

SVen

>-----Original Message-----
>From: Oliver Zeigermann [mailto:oliver.zeigermann@gmail.com]
>Sent: Tuesday, January 04, 2005 12:45 PM
>To: Slide Developers Mailing List
>Subject: Re: JAAS Login Modul,auto-create-users and No active
>transaction
>
>
>The problem is that no transaction has been started when doing a GET
>on a collection as your browser does. However, one is needed in order
>to create a user. The questions is why this is so. There used to be a
>problem with the generation of the HTML for a collection being done
>outside of a transaction, but this has been fixed. Are you sure you
>are using Slide 2.1 *final*?
>
>Oliver 
>
>On Tue, 4 Jan 2005 12:09:39 +0100, Sven Pfeiffer
><sv...@innoface.de> wrote:
>> Hi List
>> 
>> I am using the latest binary build of slide inside a JBoss with tomcat.
>> 
>> I want to use my own JAAS login module so I uncommented the <security-constraint> part of the web.xml-file.
>> I added
>>         <login-config>
>>         <auth-method>BASIC</auth-method>
>>         <realm-name>my-login</realm-name>
>>         </login-config>
>> 
>> in jboss-web.xml i added:
>>         <jboss-web>
>>                 <security-domain>java:/jaas/my-login</security-domain>
>>         </jboss-web>
>> 
>> Then I added
>>                 <auto-create-users>true</auto-create-users>
>>             <auto-create-users-role>org.apache.slide.structure.SubjectNode</auto-create-users-role>
>> to Domain.xml.
>> 
>> Now authentification works fine.
>> 
>> But there is one odd behaviour.
>> 
>> When I create a new user and the user tries to logon for the first time using a browser (no matter whether IE or 
>Mozilla/firefox),
>> the result is always
>> 
>> <snip>
>> 2005-01-04 10:32:37,171 INFO  [STDOUT] 04 Jan 2005 10:32:37 - WARNING - WARNING: No active transaction
>> 2005-01-04 10:32:37,187 INFO  [STDOUT] 04 Jan 2005 10:32:37 - org.apache.slide.store.txfile.AbstractTxFileStoreService - 
>WARNING -
>> Thread Thread[TP-Processor4,5,jboss] marked transaction branch null for rollback. Cause: Not inside tx
>> 2005-01-04 10:32:37,187 INFO  [STDOUT] TP-Processor4, 04-Jan-2005 10:32:37, otto, GET, 500 "Internal Server Error", 62 ms, /
>> </snip>
>> 
>> And no user is created.
>> When connecting to my slide ressource over Explorer everything works fine.
>> 
>> I found one difference, when connecting using a browser there is simply a GET, but when connecting using Explorer there 
>is OPTIONS,
>> PROPFIND and then GET.
>> 
>> Is this a wanted behaviour or a bug?
>> And, is there a way to change it, so it works if the user just connects by a browser?
>> 
>> Thanks in advance
>> 
>> SVen
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>> 
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: JAAS Login Modul,auto-create-users and No active transaction

Posted by Oliver Zeigermann <ol...@gmail.com>.
The problem is that no transaction has been started when doing a GET
on a collection as your browser does. However, one is needed in order
to create a user. The questions is why this is so. There used to be a
problem with the generation of the HTML for a collection being done
outside of a transaction, but this has been fixed. Are you sure you
are using Slide 2.1 *final*?

Oliver 

On Tue, 4 Jan 2005 12:09:39 +0100, Sven Pfeiffer
<sv...@innoface.de> wrote:
> Hi List
> 
> I am using the latest binary build of slide inside a JBoss with tomcat.
> 
> I want to use my own JAAS login module so I uncommented the <security-constraint> part of the web.xml-file.
> I added
>         <login-config>
>         <auth-method>BASIC</auth-method>
>         <realm-name>my-login</realm-name>
>         </login-config>
> 
> in jboss-web.xml i added:
>         <jboss-web>
>                 <security-domain>java:/jaas/my-login</security-domain>
>         </jboss-web>
> 
> Then I added
>                 <auto-create-users>true</auto-create-users>
>             <auto-create-users-role>org.apache.slide.structure.SubjectNode</auto-create-users-role>
> to Domain.xml.
> 
> Now authentification works fine.
> 
> But there is one odd behaviour.
> 
> When I create a new user and the user tries to logon for the first time using a browser (no matter whether IE or Mozilla/firefox),
> the result is always
> 
> <snip>
> 2005-01-04 10:32:37,171 INFO  [STDOUT] 04 Jan 2005 10:32:37 - WARNING - WARNING: No active transaction
> 2005-01-04 10:32:37,187 INFO  [STDOUT] 04 Jan 2005 10:32:37 - org.apache.slide.store.txfile.AbstractTxFileStoreService - WARNING -
> Thread Thread[TP-Processor4,5,jboss] marked transaction branch null for rollback. Cause: Not inside tx
> 2005-01-04 10:32:37,187 INFO  [STDOUT] TP-Processor4, 04-Jan-2005 10:32:37, otto, GET, 500 "Internal Server Error", 62 ms, /
> </snip>
> 
> And no user is created.
> When connecting to my slide ressource over Explorer everything works fine.
> 
> I found one difference, when connecting using a browser there is simply a GET, but when connecting using Explorer there is OPTIONS,
> PROPFIND and then GET.
> 
> Is this a wanted behaviour or a bug?
> And, is there a way to change it, so it works if the user just connects by a browser?
> 
> Thanks in advance
> 
> SVen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org