Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

javax.servlet.ServletException: was already commited (code=403). This might result in lost log messages #335

Open

Description

@wangzilong

When I add this in web.xml

<security-constraint>
        <web-resource-collection>
            <web-resource-name>rest</web-resource-name>
            <url-pattern>/rest/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

develop server always throw exception:

javax.servlet.ServletException: Response for request to '/rest/swagger.json' was already commited (code=403). This might result in lost log messages.'
[INFO]  at com.google.apphosting.vmruntime.jetty9.VmRuntimeWebAppContext.doScope(VmRuntimeWebAppContext.java:312)
[INFO]  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO]  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
[INFO]  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
[INFO]  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
[INFO]  at org.eclipse.jetty.server.Server.handle(Server.java:497)
[INFO]  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
[INFO]  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
[INFO]  at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
[INFO]  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
[INFO]  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
[INFO]  at java.lang.Thread.run(Thread.java:745)

Please help me.

Thanks

Activity

  1. self-assigned this
    on Nov 22, 2016
  2. janbartel commented on Nov 22, 2016

    @janbartel
    Contributor

    @wangzilong which environment are you using? Is it appengine standard, or compat? Do you have an app.yaml, and if so, do you have "env:flex" set? Do you have a custom docker file, if so, what is it based off?

  3. wangzilong commented on Nov 23, 2016

    @wangzilong
    Author

    I use App Engine Flexible Environment
    I have no custom docker file.
    My app.yaml

    runtime: java7
    vm: True
    manual_scaling:
      instances: 1
    inbound_services:
    - warmup
    threadsafe: True
    auto_id_policy: default
    beta_settings:
      'machine_type': 'n1-standard-1'
      'source_reference': 'ssh://gitosis@192.168.222.170:iDigiSign.git#5184d3e9af81f64882464e39ade45a20696fb5c4'
    health_check:
      enable_health_check: True
    api_version: '1.0'
    handlers:
    - url: (/rest/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: always
    - url: (/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/rest/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: always
    - url: (/typings/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/rest/.*\.html)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: always
    - url: (/typings/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/js/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/typings/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/js/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/swagger/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/js/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/swagger/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/node_modules/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/swagger/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/node_modules/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/assets/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/node_modules/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/assets/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/app/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/assets/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/.*\.html)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/app/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/.*/)
      static_files: __static__\1index.html
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: (/app/.*)
      static_files: __static__\1
      upload: __NOT_USED__
      require_matching_file: True
      login: optional
      secure: optional
    - url: /rest
      script: unused
      login: optional
      secure: always
    - url: /rest/.*
      script: unused
      login: optional
      secure: always
    - url: /.*
      script: unused
      login: optional
      secure: optional
    
    
  4. meltsufin commented on Nov 23, 2016

    @meltsufin
    Contributor

    @wangzilong Please try replacing vm: True with env: flex.
    Also, unless Java 7 is a requirement for you, please change runtime: java7 to runtime: java.

  5. wangzilong commented on Dec 1, 2016

    @wangzilong
    Author

    I can not test on flexible environment.
    Because Objectify be used in my project.
    Project throw " java.lang.NullPointerException: No API environment is registered for this thread."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions