java.lang.RuntimeException: java.lang.IllegalArgumentException: Trying to set foreign cookie

Atlassian JIRA | Nursihah Amir [Atlassian] | 3 years ago
  1. 0

    h3. Steps to reproduce # Create a new spreadsheet in Google Sheets. # Using a Cloud instance that's hooked into that same Google domain for user management, attempt to insert that new spreadsheet using the Google Spreadsheet macro. # You get a system error in the Preview window, and this stack trace in the logs: {code:none} 2014-12-24 09:54:17,224 ERROR [TP-Processor45] [[Catalina].[localhost].[/wiki].[servlet-module-container-servlet]] log Servlet.service() for servlet servlet-module-container-servlet threw exception java.lang.RuntimeException: java.lang.IllegalArgumentException: Trying to set foreign cookie at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1137) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2346) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:388) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:549) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535) at com.google.gdata.client.media.MediaService.getMediaResource(MediaService.java:234) at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:286) at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302) at com.atlassian.agmp.gdata.impl.AuthenticatedMediaServiceImpl.exportFile(AuthenticatedMediaServiceImpl.java:55) at com.atlassian.agmp.gdata.impl.DocsServiceImpl.exportSpreadsheet(DocsServiceImpl.java:45) at com.atlassian.agmp.gdata.servlet.GSpreadsheetServlet.export(GSpreadsheetServlet.java:48) at com.atlassian.agmp.gdata.servlet.GSpreadsheetServlet.export(GSpreadsheetServlet.java:13) at com.atlassian.agmp.gdata.servlet.BaseGDataDocServlet.doGet(BaseGDataDocServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:42) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:70) at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:78) [...] Caused by: java.lang.IllegalArgumentException: Trying to set foreign cookie at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookie.<init>(GoogleGDataRequest.java:166) at com.google.gdata.client.http.GoogleGDataRequest$GoogleCookieHandler.put(GoogleGDataRequest.java:399) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:710) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) ... 253 more {code} Older documents actually work fine, but newly-created documents all fail. I haven't been able to determine the exact cut-off. This does _not_ occur for Docs or Presentations, only Sheets. *EDIT 21/04/2015* We rolled out new set of macros for google drive integration. More details onto: - Confluence Server - https://confluence.atlassian.com/display/DOCM/Google+Drive+macros - Confluence Cloud - https://confluence.atlassian.com/display/ConfCloud/Google+Drive+macros Unfortunately we weren't able to do automatic migration from old macros to new macros. This needs to be done manually.

    Atlassian JIRA | 2 years ago | Nick Mason
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Trying to set foreign cookie
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    NullPointerException when reading API response code

    GitHub | 7 months ago | hermansc
    java.lang.RuntimeException: java.lang.NullPointerException
  4. 0

    Basic Auth in Maven Repository causes llegalArgumentException during build.

    GitHub | 4 years ago | neuhalje
    java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic am...kd9

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      java.lang.IllegalArgumentException: Trying to set foreign cookie

      at sun.net.www.protocol.http.HttpURLConnection.getInputStream0()
    2. Java RT
      HttpsURLConnectionImpl.getResponseCode
      1. sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1453)
      2. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
      3. sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2965)
      4. java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
      5. sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
      5 frames
    3. Google Data
      MediaService.getMedia
      1. com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:549)
      2. com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
      3. com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
      4. com.google.gdata.client.media.MediaService.getMediaResource(MediaService.java:234)
      5. com.google.gdata.client.media.MediaService.getMedia(MediaService.java:286)
      6. com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302)
      6 frames
    4. com.atlassian.agmp
      AuthenticatedMediaServiceImpl.exportFile
      1. com.atlassian.agmp.gdata.impl.AuthenticatedMediaServiceImpl.exportFile(AuthenticatedMediaServiceImpl.java:55)
      1 frame