Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Java Development
- :
- Re: Spring Heroku Canavs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Spring Heroku Canavs
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-21-2012 08:40 AM
Hello,
I want try to develop a heroku app with spring (eclipse template) but i does not work.
i get a error access token expiered or oauth is invlaid.
how can i build a spring app on heroku that's connect salesforce and integrate with canvas
when i use the jsp with a decode function it work ?
chris
Re: Spring Heroku Canavs
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-21-2012 08:47 AM
stacktrace:
8+00:00 app[web.1]: INFO: Starting ProtocolHandler ["http-bio-34344"]
2012-10-21T15:43:45+00:00 app[web.1]: 29133 [http-bio-34344-exec-4] ERROR com.force.sdk.springsecurity.OAuthAuthenticationPr
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.authentication.Abstra
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.springsecurity.AuthenticationProcess
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.springsecurity.AuthenticationProcess
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.authentication.lo
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.authentication.Ab
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.context.SecurityC
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:43:45+00:00 app[web.1]: java.io.IOException: {"error":"invalid_grant","error_description":"expi
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.oauth.connector.TokenRetrievalServic
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.oauth.connector.TokenRetrievalServic
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.oauth.connector.ForceOAuthConnector.
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.oauth.connector.ForceOAuthConnector.
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.springsecurity.OAuthAuthenticationPr
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.authentication.Provid
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy.
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.web.filter.DelegatingFilterPro
2012-10-21T15:43:45+00:00 app[web.1]: at org.springframework.web.filter.DelegatingFilterPro
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.authenticator.AuthenticatorBas
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.StandardHostValve.invoke(
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.valves.ErrorReportValve.invoke
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.coyote.AbstractProtocol$AbstractConnect
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.tomcat.util.net.JIoEndpoint$SocketProce
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.StandardEngineValve.invok
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.connector.CoyoteAdapter.servic
2012-10-21T15:43:45+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor.runWorker(
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.coyote.http11.AbstractHttp11Processor.p
2012-10-21T15:43:45+00:00 app[web.1]: at java.util.concurrent.ThreadPoolExecutor$Worker.run
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.in
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.do
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.StandardWrapperValve.invo
2012-10-21T15:43:45+00:00 app[web.1]: at org.apache.catalina.core.StandardContextValve.invo
2012-10-21T15:43:45+00:00 app[web.1]: at java.lang.Thread.run(Thread.java:636)
2012-10-21T15:43:45+00:00 app[web.1]: Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://login.salesforce.com/services/oauth2/token
2012-10-21T15:43:45+00:00 app[web.1]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream
2012-10-21T15:43:45+00:00 app[web.1]: at com.force.sdk.oauth.connector.TokenRetrievalServic
2012-10-21T15:43:45+00:00 app[web.1]: at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInput
2012-10-21T15:43:45+00:00 app[web.1]: ... 31 more
2012-10-21T15:43:45+00:00 app[web.1]: INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2012-10-21T15:43:45+00:00 app[web.1]: Oct 21, 2012 3:43:45 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
2012-10-21T15:44:49+00:00 app[web.1]: 93159 [http-bio-34344-exec-8] ERROR com.force.sdk.springsecurity.OAuthAuthenticationPr
2012-10-21T15:44:49+00:00 app[web.1]: java.io.IOException: Missing refresh token on response
2012-10-21T15:44:49+00:00 app[web.1]: at com.force.sdk.oauth.connector.ForceOAuthConnector.
2012-10-21T15:44:49+00:00 app[web.1]: at com.force.sdk.oauth.connector.ForceOAuthConnector.
2012-10-21T15:44:49+00:00 app[web.1]: at com.force.sdk.springsecurity.OAuthAuthenticationPr
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.authentication.Provid
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.authentication.Abstra
2012-10-21T15:44:49+00:00 app[web.1]: at com.force.sdk.springsecurity.AuthenticationProcess
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.authentication.Ab
2012-10-21T15:44:49+00:00 app[web.1]: at com.force.sdk.springsecurity.AuthenticationProcess
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.authentication.lo
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.context.SecurityC
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy$
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.security.web.FilterChainProxy.
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.web.filter.DelegatingFilterPro
2012-10-21T15:44:49+00:00 app[web.1]: at org.springframework.web.filter.DelegatingFilterPro
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.in
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.ApplicationFilterChain.do
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.StandardWrapperValve.invo
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.StandardContextValve.invo
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.authenticator.AuthenticatorBas
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.StandardHostValve.invoke(
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.valves.ErrorReportValve.invoke
2012-10-21T15:44:49+00:00 app[web.1]: at org.apache.catalina.core.StandardEngineValve.invok
Re: Spring Heroku Canavs
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-23-2012 03:53 PM
Chris,
With Force.com Canvas, there are two ways to deliver a authentication token to your spring applications (through a signed request, or through OAuth). The default is signed request and delivers the context as a POST messgae when you click the App from inside of salesforce.
The stack trace you are using below seems to indicate that you are not using the Canvas methods of authentication, but perhaps using the methods from a different SDK? The error indicates that the authorization code (a short lived code used to get an authorization into salesforce) is expired. You wil have to make sure you are either using the token from canvas (if you are trying top expose in canvas) or that you are using a freshly delivered authorization code (if you are using a different authentication outside of Canvas)
Hope this helps.
Jay

