macklane / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
Other
0 stars 0 forks source link

user is null in Dispatcher.dispatch() #467

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Do a fresh installation of oryx using SVN ( 
http://code.google.com/p/oryx-editor/source/checkout )
2. deploy it and go to http://localhost:8080/backend/poem/repository
3.

What is the expected output?

What do you see instead?
After a fresh deployment, I get an interface similar to this one, except that I 
get error messages : 
http://oryx-project.org/backend/poem/repository

And after refreshing the page, I get this error : 

javax.servlet.ServletException: java.lang.NullPointerException
    org.b3mn.poem.Dispatcher.dispatch(Dispatcher.java:394)
    org.b3mn.poem.Dispatcher.doGet(Dispatcher.java:403)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.b3mn.poem.security.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:155)

cause mère ("Mother cause :")

java.lang.NullPointerException
    org.b3mn.poem.Dispatcher.dispatch(Dispatcher.java:373)
    org.b3mn.poem.Dispatcher.doGet(Dispatcher.java:403)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.b3mn.poem.security.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:155)

Please provide any additional information below.
While debugging, I see that in Dispatcher.java, line 334, this line returns 
null : 
User user = (User) request.getAttribute("user");

Original issue reported on code.google.com by florent....@gmail.com on 28 May 2011 at 3:17

GoogleCodeExporter commented 9 years ago
Found it is due to JDBC that cannot execute query.

In poem/security/filter/AuthentificationFilter.java, line 154, there is : 
catch (Exception e){

}

Why is the exception not rethrown ?

Original comment by florent....@gmail.com on 28 May 2011 at 3:40

GoogleCodeExporter commented 9 years ago
Did your db installed successfully?
I don't have more knowledge for postgresql, I also see your problem,and found 
that you should only use the version 8.3 of postgrsql.
But I want to custom it and use another db type, etc. MySql or Oracle, or 
non-sql.

Original comment by yuanqi...@gmail.com on 28 May 2011 at 4:26

GoogleCodeExporter commented 9 years ago
My DB installed successfully ... But as you pointed out, I don't use Postgre 
8.3, but the version 9.0 of it.

Original comment by florent....@gmail.com on 28 May 2011 at 4:36

GoogleCodeExporter commented 9 years ago
And are you sure, the init database successfully?
Can you import the data into db?

Original comment by yuanqi...@gmail.com on 29 May 2011 at 11:36

GoogleCodeExporter commented 9 years ago
You are right, I hadn't notices errors while executing db_schema.sql.

On debian, I had to install this packet : postgresql-plpython-9.0 ( apt-get 
install postgresql-plpython-9.0 )

Normally, it is OK now !

Thank you a lot :)

Original comment by florent....@gmail.com on 30 May 2011 at 9:07

GoogleCodeExporter commented 9 years ago
I'm getting the same exception as specified above.

Can you please let me know how to reolve that in ubuntu?

Thanks.

Original comment by periasam...@gmail.com on 2 Jun 2011 at 8:52

GoogleCodeExporter commented 9 years ago
I use Debian, thus the solution above may have to be adapted.

First, drop the table that you created for Oryx.If you don't know how to do it, 
and don't mind about clearing all your databse, just do it by that way : 
sudo apt-get remove --purge postgresql-*
NOTE : check that the packages to be removed are those YOU want to remove 
(those which belong to postgre)

Second, install postgresql-plpython-9.0 and postgresql-9.0 by this way : 
sudo apt-get install postgresql-plpython-9.0 postgresql-9.0

Finally, redo all the step named "Load Database Schema" of this tutorial : 
http://code.google.com/p/oryx-editor/wiki/SetupDevelopmentEnvironment

That should be OK :)

Original comment by florent....@gmail.com on 2 Jun 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Thats fine in case of Debian. But what is the fix for ubuntu?

It seems like, we cant install postgresql-plpython-9.0 in ubuntu.

Original comment by periasam...@gmail.com on 2 Jun 2011 at 11:03

GoogleCodeExporter commented 9 years ago
Perhaps your version of Ubuntu doesn't include postgresql-plpython-9.0. Is your 
system uptodate ?

Whatever your version is, look for postgresql-plpython by this way : 
     apt-cache search plpython
and install the version you will find!

Original comment by florent....@gmail.com on 2 Jun 2011 at 12:11

GoogleCodeExporter commented 9 years ago
Hey florent

Thank You. Your inputs worked like a charm!!!

Original comment by periasam...@gmail.com on 2 Jun 2011 at 1:50

GoogleCodeExporter commented 9 years ago
You're welcome, glad to have helped you :)

Original comment by florent....@gmail.com on 2 Jun 2011 at 1:53

GoogleCodeExporter commented 9 years ago
Issue 469 has been merged into this issue.

Original comment by philipp....@student.hpi.uni-potsdam.de on 10 Jun 2011 at 10:18

GoogleCodeExporter commented 9 years ago
Issue 458 has been merged into this issue.

Original comment by philipp....@student.hpi.uni-potsdam.de on 10 Jun 2011 at 10:19

GoogleCodeExporter commented 9 years ago
Worked for me as well. However you need to restart tomcat (and postgres maybe?) 
otherwise some things are cached somehow.

Original comment by cyril.ca...@gmail.com on 24 Apr 2012 at 9:45