stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Udara Liyanage <ud...@wso2.com>
Subject Re: [Q?] Why do I get an error DELETE /applications/{applicationId}/domainMappings ?
Date Mon, 06 Apr 2015 06:26:01 GMT
HI Mari,

RemoveDomainMappings API requires type ApplicationDomainMappingsBean
payload. Could you try by adding the same payload provided when adding
domain mappings as payload and try.

Ideally the API patter should be as below

DELETE  applications/<application_id>/domainMappings/<domain>

On Mon, Apr 6, 2015 at 11:34 AM, Mariangela Hills <mariangela@wso2.com>
wrote:

> Hi Udara,
>
> I tried this command again and I still get an error. The full backend
> error message is as follows [1]. I tried without -H "Content-Type:
> application/json" header and I get an internal server error [2].
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
> [1]
>
> [2015-04-06 11:20:22,315]  WARN
> {org.apache.cxf.jaxrs.provider.AbstractJAXBProvider} -
>  javax.xml.stream.XMLStreamException: ParseError at [row,col]:[0,29]
> Message: Missing value. at character 29 of {"applicationDomainMappings":}
> at
> org.codehaus.jettison.mapped.MappedXMLInputFactory.createXMLStreamReader(MappedXMLInputFactory.java:51)
> at
> org.codehaus.jettison.AbstractXMLInputFactory.createXMLStreamReader(AbstractXMLInputFactory.java:116)
> at
> org.codehaus.jettison.AbstractXMLInputFactory.createXMLStreamReader(AbstractXMLInputFactory.java:103)
> at
> org.apache.cxf.jaxrs.provider.json.utils.JSONUtils.createStreamReader(JSONUtils.java:159)
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.createReader(JSONProvider.java:278)
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.createReader(JSONProvider.java:268)
> at
> org.apache.cxf.jaxrs.provider.json.JSONProvider.readFrom(JSONProvider.java:226)
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1288)
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(JAXRSUtils.java:1239)
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:790)
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:749)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:236)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:101)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doDelete(AbstractHTTPServlet.java:217)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:761)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
> at
> org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
> at
> org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
> at
> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
> at
> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
> at java.lang.Thread.run(Thread.java:695)
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
> [2]
> Air:artifacts Admin16$ curl -X DELETE -k -v -u admin:admin
> https://localhost:9443/api/applications/single-cartridge-app/domainMappings
> * About to connect() to localhost port 9443 (#0)
> *   Trying ::1...
> * connected
> * Connected to localhost (::1) port 9443 (#0)
> * SSLv3, TLS handshake, Client hello (1):
> * SSLv3, TLS handshake, Server hello (2):
> * SSLv3, TLS handshake, CERT (11):
> * SSLv3, TLS handshake, Server key exchange (12):
> * SSLv3, TLS handshake, Server finished (14):
> * SSLv3, TLS handshake, Client key exchange (16):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSLv3, TLS change cipher, Client hello (1):
> * SSLv3, TLS handshake, Finished (20):
> * SSL connection using DHE-RSA-AES256-SHA
> * Server certificate:
> *  subject: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost
> *  start date: 2010-02-19 07:02:26 GMT
> *  expire date: 2035-02-13 07:02:26 GMT
> *  common name: localhost (matched)
> *  issuer: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost
> *  SSL certificate verify result: unable to get local issuer certificate
> (20), continuing anyway.
> * Server auth using Basic with user 'admin'
> > DELETE /api/applications/single-cartridge-app/domainMappings HTTP/1.1
> > Authorization: Basic YWRtaW46YWRtaW4=
> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
> OpenSSL/0.9.8| zlib/1.2.5
> > Host: localhost:9443
> > Accept: */*
> >
> < HTTP/1.1 500 Internal Server Error
> < Date: Mon, 06 Apr 2015 05:57:43 GMT
> < Content-Type: application/json
> < Transfer-Encoding: chunked
> < Connection: close
> < Server: WSO2 Carbon Server
> <
> * Closing connection #0
> * SSLv3, TLS alert, Client hello (1):
> {"errorCode":500,"errorMessage":"Internal server error"}
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> Regards,
> Mariangela
>
>
>
>
> *--*
> Mariangela Hills
> Senior Technical Writer
>
> *WSO2, Inc.*lean.enterprise.middleware.
> m: +94 773 500185
> w: http://wso2.com
> <http://wso2.com/events/>
>
> On Mon, Apr 6, 2015 at 11:28 AM, Udara Liyanage <udara@wso2.com> wrote:
>
>> Hi Mari,
>>
>> Could you try without "Content-Type: application/json" header. I don't
>> think it will solve, but better to try.
>> Could you share the back end error message to analyze.
>>
>>
>> On Thu, Apr 2, 2015 at 6:19 PM, Mariangela Hills <mariangela@wso2.com>
>> wrote:
>>
>>> Hi Devs,
>>>
>>> I get an error [1] and log message [2] when trying to delete a domain
>>> mapping. Any idea why this is happening?
>>>
>>> [1]
>>> Admin16s-MacBook-Air:mock Admin16$ curl -X DELETE -H "Content-Type:
>>> application/json" -k -v -u admin:admin
>>> https://localhost:9443/api/applications/single-cartridge-app/domainMappings
>>> * About to connect() to localhost port 9443 (#0)
>>> *   Trying ::1...
>>> * connected
>>> * Connected to localhost (::1) port 9443 (#0)
>>> * SSLv3, TLS handshake, Client hello (1):
>>> * SSLv3, TLS handshake, Server hello (2):
>>> * SSLv3, TLS handshake, CERT (11):
>>> * SSLv3, TLS handshake, Server key exchange (12):
>>> * SSLv3, TLS handshake, Server finished (14):
>>> * SSLv3, TLS handshake, Client key exchange (16):
>>> * SSLv3, TLS change cipher, Client hello (1):
>>> * SSLv3, TLS handshake, Finished (20):
>>> * SSLv3, TLS change cipher, Client hello (1):
>>> * SSLv3, TLS handshake, Finished (20):
>>> * SSL connection using DHE-RSA-AES256-SHA
>>> * Server certificate:
>>> *  subject: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost
>>> *  start date: 2010-02-19 07:02:26 GMT
>>> *  expire date: 2035-02-13 07:02:26 GMT
>>> *  common name: localhost (matched)
>>> *  issuer: C=US; ST=CA; L=Mountain View; O=WSO2; CN=localhost
>>> *  SSL certificate verify result: unable to get local issuer
>>> certificate (20), continuing anyway.
>>> * Server auth using Basic with user 'admin'
>>> > DELETE /api/applications/single-cartridge-app/domainMappings HTTP/1.1
>>> > Authorization: Basic YWRtaW46YWRtaW4=
>>> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
>>> OpenSSL/0.9.8| zlib/1.2.5
>>> > Host: localhost:9443
>>> > Accept: */*
>>> > Content-Type: application/json
>>> >
>>> < HTTP/1.1 400 Bad Request
>>> < Date: Thu, 02 Apr 2015 11:54:29 GMT
>>> < Content-Type: application/json
>>> < Transfer-Encoding: chunked
>>> < Connection: close
>>> < Server: WSO2 Carbon Server
>>> <
>>> * Closing connection #0
>>> * SSLv3, TLS alert, Client hello (1):
>>> {"errorCode":400,"errorMessage":"javax.xml.stream.XMLStreamException:
>>> ParseError at [row,col]:[0,29]\nMessage: Missing value. at character 29 of
>>> {\"applicationDomainMappings\":}"}Admin16s-MacBook-Air:mock Admin16$
>>>
>>> ----------------
>>>
>>> [2]
>>> [2015-04-02 17:36:50,167]  WARN
>>> {org.apache.cxf.jaxrs.provider.AbstractJAXBProvider} -
>>>  javax.xml.stream.XMLStreamException: ParseError at [row,col]:[0,29]
>>> Message: Missing value. at character 29 of {"applicationDomainMappings":}
>>>
>>> Regards,
>>> Mariangela
>>>
>>>
>>>
>>>
>>> *--*
>>> Mariangela Hills
>>> Senior Technical Writer
>>>
>>> *WSO2, Inc.*lean.enterprise.middleware.
>>> m: +94 773 500185
>>> w: http://wso2.com
>>> <http://wso2.com/events/>
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Mime
View raw message