This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Bug 1189 is not fixed in 2.7.3

6 replies
Florian Hars
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.

Since trac is down (infinite redirect loop after logging in), I
post my report here.

The problem in https://lampsvn.epfl.ch/trac/scala/ticket/1189
seems to be still present in 2.7.3.

If I have a JAX-RS ressource like

package test.annotation

import _root_.javax.ws.rs._
import _root_.javax.ws.rs.core._
import _root_.javax.servlet.ServletContext

@Path("res1")
class Res1 {

@Context var ctx : ServletContext = _

@GET
@Produces(Array("text/html"))
def get() = ctx is { ctx }.toString
}

it will always have a ServletContext injected, it displays something like
"ctx is org.apache.catalina.core.ApplicationContextFacade@299264e3".

If I instead split it like this:

package test.annotation

import _root_.javax.ws.rs._
import _root_.javax.ws.rs.core._
import _root_.javax.servlet.ServletContext

trait ResTrait {

@Context var ctx : ServletContext = _

}

package test.annotation

import _root_.javax.ws.rs._
import _root_.javax.ws.rs.core._

@Path("res2")
class Res2 extends ResTrait {

@GET
@Produces(Array("text/html"))
def get() = ctx is { ctx }.toString
}

the ServletContext is injected into res2 after a clean compile,
but if I just recompile Res2 and redeploy, the Context is not injected.
It will just display "ctx is".

I put a complete compilable project at
http://www.bik-gmbh.de/tmp/test-annotation.tar.gz
After adjusting the paths in ant.properties you should be able to compile
it and to drop the resulting war into your servlet container (if it has
jersey installed).

- Florian.

Chris Twiner
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: Bug 1189 is not fixed in 2.7.3

re trac: I have only got this to work for a period of about a month,
after that redirect loop. I've read lots of other posts with people
having problem with it.

to epflers / trac users: Do these redirects represent normal behaviour
for trac or is it truly down so frequently?

On Wed, Mar 18, 2009 at 8:57 AM, Florian Hars wrote:
> Since trac is down (infinite redirect loop after logging in), I
> post my report here.
>
> The problem in https://lampsvn.epfl.ch/trac/scala/ticket/1189
> seems to be still present in 2.7.3.
>
> If I have a JAX-RS ressource like
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
> import _root_.javax.servlet.ServletContext
>
> @Path("res1")
> class Res1 {
>
>  @Context var ctx :  ServletContext = _
>
>  @GET
>  @Produces(Array("text/html"))
>  def get() = ctx is { ctx }.toString
> }
>
> it will always have a ServletContext injected, it displays something like
> "ctx is org.apache.catalina.core.ApplicationContextFacade@299264e3".
>
> If I instead split it like this:
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
> import _root_.javax.servlet.ServletContext
>
> trait ResTrait {
>
>  @Context var ctx :  ServletContext = _
>
> }
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
>
> @Path("res2")
> class Res2 extends ResTrait {
>
>  @GET
>  @Produces(Array("text/html"))
>  def get() = ctx is { ctx }.toString
> }
>
>
> the ServletContext is injected into res2 after a clean compile,
> but if I just recompile Res2 and redeploy, the Context is not injected.
> It will just display "ctx is".
>
> I put a complete compilable project at
> http://www.bik-gmbh.de/tmp/test-annotation.tar.gz
> After adjusting the paths in ant.properties you should be able to compile
> it and to drop the resulting war into your servlet container (if it has
> jersey installed).
>
> - Florian.
>
>

ijuma
Joined: 2008-08-20,
User offline. Last seen 22 weeks 2 days ago.
Re: Bug 1189 is not fixed in 2.7.3

On Wed, 2009-03-18 at 09:44 +0100, Chris Twiner wrote:
> re trac: I have only got this to work for a period of about a month,
> after that redirect loop. I've read lots of other posts with people
> having problem with it.
>
> to epflers / trac users: Do these redirects represent normal behaviour
> for trac or is it truly down so frequently?

Not a EPFLer, but I rarely have issues accessing Trac and I believe that
is also the case for many others. So, I would say neither. It seems that
some network configurations trigger the problems.

Best,
Ismael

Carsten Saager
Joined: 2008-12-19,
User offline. Last seen 42 years 45 weeks ago.
Re: Bug 1189 is not fixed in 2.7.3
Trac isn't down, the problem is only when you login - it looks like it wants to redirect to an "update account" page and plays ping-pong with the login afterwards

-Carsten

On Wed, Mar 18, 2009 at 9:44 AM, Chris Twiner <chris.twiner@gmail.com> wrote:
re trac: I have only got this to work for a period of about a month,
after that redirect loop.  I've read lots of other posts with people
having problem with it.

to epflers / trac users: Do these redirects represent normal behaviour
for trac or is it truly down so frequently?

On Wed, Mar 18, 2009 at 8:57 AM, Florian Hars <hars@bik-gmbh.de> wrote:
> Since trac is down (infinite redirect loop after logging in), I
> post my report here.
>
> The problem in https://lampsvn.epfl.ch/trac/scala/ticket/1189
> seems to be still present in 2.7.3.
>
> If I have a JAX-RS ressource like
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
> import _root_.javax.servlet.ServletContext
>
> @Path("res1")
> class Res1 {
>
>  @Context var ctx :  ServletContext = _
>
>  @GET
>  @Produces(Array("text/html"))
>  def get() = <html><body>ctx is { ctx }</body></html>.toString
> }
>
> it will always have a ServletContext injected, it displays something like
> "ctx is org.apache.catalina.core.ApplicationContextFacade@299264e3".
>
> If I instead split it like this:
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
> import _root_.javax.servlet.ServletContext
>
> trait ResTrait {
>
>  @Context var ctx :  ServletContext = _
>
> }
>
> package test.annotation
>
> import _root_.javax.ws.rs._
> import _root_.javax.ws.rs.core._
>
> @Path("res2")
> class Res2 extends ResTrait {
>
>  @GET
>  @Produces(Array("text/html"))
>  def get() = <html><body>ctx is { ctx }</body></html>.toString
> }
>
>
> the ServletContext is injected into res2 after a clean compile,
> but if I just recompile Res2 and redeploy, the Context is not injected.
> It will just display "ctx is".
>
> I put a complete compilable project at
> http://www.bik-gmbh.de/tmp/test-annotation.tar.gz
> After adjusting the paths in ant.properties you should be able to compile
> it and to drop the resulting war into your servlet container (if it has
> jersey installed).
>
> - Florian.
>
>

Florian Hars
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.
trac (was: Bug 1189 is not fixed in 2.7.3)

Ismael Juma schrieb:
> Not a EPFLer, but I rarely have issues accessing Trac and I believe that
> is also the case for many others. So, I would say neither. It seems that
> some network configurations trigger the problems.

Here is the HTTP conversation I get if I try to log in:

https://lampsvn.epfl.ch/trac/scala/login

GET /trac/scala/login HTTP/1.1

Host: lampsvn.epfl.ch

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: https://lampsvn.epfl.ch/trac/scala

Cookie: trac_form_token=279...; trac_session=83d...

HTTP/1.x 401 Authorization Required

Date: Wed, 18 Mar 2009 09:02:55 GMT

Server: Apache

WWW-Authenticate: Basic realm="Scala project"

Content-Length: 467

Keep-Alive: timeout=15, max=94

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------

https://lampsvn.epfl.ch/trac/scala/login

GET /trac/scala/login HTTP/1.1

Host: lampsvn.epfl.ch

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: https://lampsvn.epfl.ch/trac/scala

Cookie: trac_form_token=279...; trac_session=83d...

Authorization: Basic X...

HTTP/1.x 302 Found

Date: Wed, 18 Mar 2009 09:03:15 GMT

Server: Apache

Location: https://lampsvn.epfl.ch/trac/scala

Pragma: no-cache

Cache-Control: no-cache

Expires: Fri, 01 Jan 1999 00:00:00 GMT

Set-Cookie: trac_auth=96e...; Path=/trac/scala;

Set-Cookie: trac_session=83d...; expires=Wed, 18-Mar-2009 09:03:16 GMT; Path=/trac/scala;

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/plain; charset=UTF-8

----------------------------------------------------------

https://lampsvn.epfl.ch/trac/scala

GET /trac/scala HTTP/1.1

Host: lampsvn.epfl.ch

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: https://lampsvn.epfl.ch/trac/scala

Cookie: trac_form_token=279...; trac_session=83d...; trac_auth=96e...

HTTP/1.x 302 Found

Date: Wed, 18 Mar 2009 09:03:16 GMT

Server: Apache

Location: https://lampsvn.epfl.ch/trac/scala/prefs/account

Pragma: no-cache

Cache-Control: no-cache

Expires: Fri, 01 Jan 1999 00:00:00 GMT

Set-Cookie: trac_session=83d...; expires=Wed, 18-Mar-2009 09:03:16 GMT; Path=/trac/scala;

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/plain; charset=UTF-8

----------------------------------------------------------

https://lampsvn.epfl.ch/trac/scala/prefs/account

GET /trac/scala/prefs/account HTTP/1.1

Host: lampsvn.epfl.ch

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: https://lampsvn.epfl.ch/trac/scala

Cookie: trac_form_token=279...; trac_auth=96e
Authorization: Basic X...

HTTP/1.x 302 Found

Date: Wed, 18 Mar 2009 09:03:16 GMT

Server: Apache

Location: https://lampsvn.epfl.ch/trac/scala/prefs/account

Pragma: no-cache

Cache-Control: no-cache

Expires: Fri, 01 Jan 1999 00:00:00 GMT

Keep-Alive: timeout=15, max=100

Connection: Keep-Alive

Transfer-Encoding: chunked

Content-Type: text/plain; charset=UTF-8

After that, it is 302 to https://lampsvn.epfl.ch/trac/scala/prefs/account until
the lizard becomes bored.

- Florian

Antonio Cunei 2
Joined: 2008-12-20,
User offline. Last seen 42 years 45 weeks ago.
Re: trac

Florian,

I asked our sysadmin about this problem, this is what he had to say:

Fabien Salvi wrote:
> I already tried many things, and it looks Ok since I updated trac and
> trac-account plugin.
> Last time I tried other solutions from the bug page :
> http://trac-hacks.org/ticket/3233
> it was even worse (showing bugs instead of removing them) :(
>
> I tried all possible workflows and can't reproduce the bug myself now.
>
> I think the best is that they give us their usernames and I will remove
> them so that they can create a new fresh account after cleaning their
> browser cache and cookies...

Therefore you can either supply your current Trac account, so we can try
re-creating it as Fabien suggested, or alternatively, after emptying
browser cache & cookies, you can try to create a fresh test account to see
if you still see the issue. Please get in touch so that we can gather more
data about the matter.
Thanks!
Toni

Florian Hars wrote:
> Ismael Juma schrieb:
>> Not a EPFLer, but I rarely have issues accessing Trac and I believe that
>> is also the case for many others. So, I would say neither. It seems that
>> some network configurations trigger the problems.
>
> Here is the HTTP conversation I get if I try to log in:
>
> https://lampsvn.epfl.ch/trac/scala/login
>
>
>
> GET /trac/scala/login HTTP/1.1
>
> Host: lampsvn.epfl.ch
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> Accept-Language: en-us,en;q=0.5
>
> Accept-Encoding: gzip,deflate
>
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>
> Keep-Alive: 300
>
> Connection: keep-alive
>
> Referer: https://lampsvn.epfl.ch/trac/scala
>
> Cookie: trac_form_token=279...; trac_session=83d...
>
>
>
> HTTP/1.x 401 Authorization Required
>
> Date: Wed, 18 Mar 2009 09:02:55 GMT
>
> Server: Apache
>
> WWW-Authenticate: Basic realm="Scala project"
>
> Content-Length: 467
>
> Keep-Alive: timeout=15, max=94
>
> Connection: Keep-Alive
>
> Content-Type: text/html; charset=iso-8859-1
>
> ----------------------------------------------------------
>
> https://lampsvn.epfl.ch/trac/scala/login
>
>
>
> GET /trac/scala/login HTTP/1.1
>
> Host: lampsvn.epfl.ch
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> Accept-Language: en-us,en;q=0.5
>
> Accept-Encoding: gzip,deflate
>
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>
> Keep-Alive: 300
>
> Connection: keep-alive
>
> Referer: https://lampsvn.epfl.ch/trac/scala
>
> Cookie: trac_form_token=279...; trac_session=83d...
>
> Authorization: Basic X...
>
>
> HTTP/1.x 302 Found
>
> Date: Wed, 18 Mar 2009 09:03:15 GMT
>
> Server: Apache
>
> Location: https://lampsvn.epfl.ch/trac/scala
>
> Pragma: no-cache
>
> Cache-Control: no-cache
>
> Expires: Fri, 01 Jan 1999 00:00:00 GMT
>
> Set-Cookie: trac_auth=96e...; Path=/trac/scala;
>
> Set-Cookie: trac_session=83d...; expires=Wed, 18-Mar-2009 09:03:16 GMT; Path=/trac/scala;
>
> Keep-Alive: timeout=15, max=100
>
> Connection: Keep-Alive
>
> Transfer-Encoding: chunked
>
> Content-Type: text/plain; charset=UTF-8
>
> ----------------------------------------------------------
>
> https://lampsvn.epfl.ch/trac/scala
>
>
>
> GET /trac/scala HTTP/1.1
>
> Host: lampsvn.epfl.ch
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> Accept-Language: en-us,en;q=0.5
>
> Accept-Encoding: gzip,deflate
>
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>
> Keep-Alive: 300
>
> Connection: keep-alive
>
> Referer: https://lampsvn.epfl.ch/trac/scala
>
> Cookie: trac_form_token=279...; trac_session=83d...; trac_auth=96e...
>
> HTTP/1.x 302 Found
>
> Date: Wed, 18 Mar 2009 09:03:16 GMT
>
> Server: Apache
>
> Location: https://lampsvn.epfl.ch/trac/scala/prefs/account
>
> Pragma: no-cache
>
> Cache-Control: no-cache
>
> Expires: Fri, 01 Jan 1999 00:00:00 GMT
>
> Set-Cookie: trac_session=83d...; expires=Wed, 18-Mar-2009 09:03:16 GMT; Path=/trac/scala;
>
> Keep-Alive: timeout=15, max=100
>
> Connection: Keep-Alive
>
> Transfer-Encoding: chunked
>
> Content-Type: text/plain; charset=UTF-8
>
> ----------------------------------------------------------
>
> https://lampsvn.epfl.ch/trac/scala/prefs/account
>
>
>
> GET /trac/scala/prefs/account HTTP/1.1
>
> Host: lampsvn.epfl.ch
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.7) Gecko/2009030423 Ubuntu/1.0.4 (hardy) Firefox/3.0.7
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> Accept-Language: en-us,en;q=0.5
>
> Accept-Encoding: gzip,deflate
>
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>
> Keep-Alive: 300
>
> Connection: keep-alive
>
> Referer: https://lampsvn.epfl.ch/trac/scala
>
> Cookie: trac_form_token=279...; trac_auth=96e
> Authorization: Basic X...
>
>
>
> HTTP/1.x 302 Found
>
> Date: Wed, 18 Mar 2009 09:03:16 GMT
>
> Server: Apache
>
> Location: https://lampsvn.epfl.ch/trac/scala/prefs/account
>
> Pragma: no-cache
>
> Cache-Control: no-cache
>
> Expires: Fri, 01 Jan 1999 00:00:00 GMT
>
> Keep-Alive: timeout=15, max=100
>
> Connection: Keep-Alive
>
> Transfer-Encoding: chunked
>
> Content-Type: text/plain; charset=UTF-8
>
>
> After that, it is 302 to https://lampsvn.epfl.ch/trac/scala/prefs/account until
> the lizard becomes bored.
>
> - Florian
>

Florian Hars
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.
Re: trac

Antonio Cunei schrieb:
> Please get in touch so that we can gather more data about the matter.

OK, i created a new account (florian instead of fhars) from the same browser with
a clean cache, and i can log in. A still can't log in as fhars, so there seems to
be something wrong with that account.

- Florian.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland