Command line launcher for sparklr and tonr not working #164
Comments
So it turns out that if I give the following command (tomcat7 instead of tomcat): then the UI that comes up for tonr2 is a bit richer and seems to be using CSS. But the startup log has following exception and at the UI level earlier mentioned issues persist: SEVERE: IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.springframework.security.oauth2.client.OAuth2RestTemplate |
I think that serialization issue is just Tomcat saying it can't re-create the dead sessions from your last startup. Ignorable. We had to switch to tomcat7 (since we no longer have a web.xml) and the Maven support is quite different as you have found. I haven't found the right incantation yet to get the sparklr war to deploy as well from the command line (if you can figure it out please do). You can build the wars and install them in tomcat, or you can run from an IDE (what I normally do). |
Thanks Dave. After your changes, it is working through the command line with "mvn integration-test -P integration" command (even if not through 'run'), given within the tonr directory and the sample actually works as well. So, in a way, I can successfully replicate the use-case. |
Works for me:
|
Ok, so I got the latest zip today. I do 'mvn install -P bootstrap' from the parent directory (parent of samples) and everything works. 'mvn tomcat7: run' runs successfully. The embedded server starts up. I can access both sparklr2 and tonr2. To execute the use-case, I go to tonr2. Click on the top left 'Sparklr pics' tab. I am then taken to the login screen for Sparklr with user=Marissa and password (koala now, not wombat). I click login and I see 2 buttons for Authorize and Deny. This is different from what I was seeing before, small dialog with radio buttons. Anyway, I click Authorize and fails and I get the following error: type Exception report message Request processing failed; nested exception is error="access_denied", error_description="User denied access", state="Ng6UVY" description The server encountered an internal error that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is error="access_denied", error_description="User denied access", state="Ng6UVY" I apologize if I have misunderstood something. I first thought that they you are saying that with tomcat7 it is not possible to deploy both apps through command line (mvn tomcat7:run), but from your latest comment it seemed to me it is? |
Yes it is possible, as you have verified. The error is expected (tonr is not very friendly to its users), since you didn't approve the access (the default radio button setting is deny all). |
I downloaded the project from https://github.com/spring-projects/spring-security-oauth/archive/2.0.0.M4.tar.gz
I then did 'mvn install -P bootstrap' at the base directory. It builds an installed everything with success. (I do see some test failures when sparklr is accessed though, "http://localhost:8080/sparklr2/login.jsp": Connection refused", but then these tests are skipped and everything seems OK at the end.)
Then I went in to the following directories one by one (not simultaneously as they share the tomcat port 8080) and start the webapp by executing 'mvn tomcat:run'
/samples/oauth2/sparklr
/samples/oauth2/tonr
Both apps were accessible through the browser individually:
localhost:8080/tonr2
localhost:8080/sparklr2
Now to access them both at the same time, I followed the instructions in the README.md file which states that do not run /samples/oauth2/sparklr but run from within /samples/oauth2/tonr. I did that using 'mvn tomcat:run' in this directory. The tonr webapp comes up!
Now on localhost:8080/tonr2 when I click on any of the Sparklr links for facebook I get an error.
If I click 'Facebook friends', it tries to go to http://localhost:8080/tonr2/sparklr/photos and fails (404)
If I click Sparklr, I get blank page.
If I click on login on the tonr page, I do see marissa's credentials but when I click the button, it tries to go to http://localhost:8080/tonr2/login.do and I get 404.
What am I missing?
Thanks lot.
The text was updated successfully, but these errors were encountered: