Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException on Oracle WebLogic 12c #520

Closed
gitblit opened this issue Aug 12, 2015 · 5 comments
Closed

ClassCastException on Oracle WebLogic 12c #520

gitblit opened this issue Aug 12, 2015 · 5 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 224

What steps will reproduce the problem?
1. Update gitblit-1.2.1.war per issue 199
2. Deploy war to WebLogic 12c using WebLogic administration console
3. Go to web interafce and create a repository
4. Attempt to push from a client

What is the expected output? What do you see instead?

Push should work but produces an server error 500 on the client. In the server log
is this...

java.lang.ClassCastException: com.gitblit.AuthenticationFilter$AuthenticatedRequest
cannot be cast to weblogic.servlet.internal.ServletRequestImpl
    at weblogic.servlet.internal.ServletRequestImpl.getOriginalRequest(ServletRequestImpl.java:1468)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:71)
    at com.gitblit.AccessRestrictionFilter.doFilter(AccessRestrictionFilter.java:227)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)


What version of the product are you using? On what operating system?

Gitblit 1.2.1
Oracle WebLogic 12c on Windows Server 2012

Please provide any additional information below.


Reported by phil@boutrosfamily.com on 2013-03-19 17:28:29

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

That's not an easy fix.

Reported by James.Moger on 2013-03-19 17:38:50

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

One would expect that since AuthenticatedRequest extends ServletRequestWrapper that
everything would be all right but apparently ServletRequestWrapper is not sufficient.
I'll report to the WebLogic team also.  

Reported by phil@boutrosfamily.com on 2013-03-19 17:45:39

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Fixed for WebLogic 12c by replacing...
AuthenticatedRequest extends ServletRequestWrapper
...with...
AuthenticatedRequest extends javax.servlet.http.HttpServletRequestWrapper

It's unclear if simply using javax.servlet.ServletRequestWrapper instead of gitblit's
own ServletRequestWrapper would have also worked. 

Reported by phil@boutrosfamily.com on 2013-03-21 16:01:24

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Thanks for the report and the workaround.  Fixed on master.

Reported by James.Moger on 2013-03-29 12:41:47

  • Status changed: Queued
  • Labels added: Milestone-1.3.0

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Fix or enhancement released in v1.3.0

Reported by James.Moger on 2013-07-14 16:52:58

  • Status changed: Fixed

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.3.0 Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants