You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2014/12/11 07:10:04 UTC

Cartridge Definition - Category Field

Hi,

I'm seeing the below error when deploying a cartridge without having a
category defined:

[2014-12-11 11:36:39,794] ERROR
{org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
-  Internal server error
java.lang.NullPointerException
at
org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.createCartridgeDefinition(StratosApiV41Utils.java:98)
at
org.apache.stratos.rest.endpoint.api.StratosApiV41.createCartridgeDefinition(StratosApiV41.java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
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)

Thanks

-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Cartridge Definition - Category Field

Posted by Dakshika Jayathilaka <da...@wso2.com>.
Hi Devs,

AFAIK latest changes are not added to schema yet.

components/org.apache.stratos.rest.endpoint/src/main/webapp/api/WEB-INF/schemas/schema.xsd

Its better to add new changes since i'm using same schema on console app
JSON validation.

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Thu, Dec 11, 2014 at 11:51 AM, Shiroshica Kulatilake <sh...@wso2.com>
wrote:

> Shouldn't this get validated at cxf level itself ? Json against schema
>
> Have we decided to disable that level of validation ?
>
> On Thu, Dec 11, 2014 at 11:44 AM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> Hi Imesh,
>>
>> Is category a new field to define the cartridge (such as framework,
>> application, etc.)? If its mandatory IMHO we should validate it and throw
>> an error if the category is not there without failing with an NPE, wdyt?
>>
>> On Thu, Dec 11, 2014 at 7:10 AM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm seeing the below error when deploying a cartridge without having a
>>> category defined:
>>>
>>> [2014-12-11 11:36:39,794] ERROR
>>> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
>>> -  Internal server error
>>> java.lang.NullPointerException
>>> at
>>> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.createCartridgeDefinition(StratosApiV41Utils.java:98)
>>> at
>>> org.apache.stratos.rest.endpoint.api.StratosApiV41.createCartridgeDefinition(StratosApiV41.java:146)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at
>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
>>> at
>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
>>> at
>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
>>> at
>>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
>>> 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)
>>>
>>> Thanks
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> Shiroshica Kulatilake
>
> Architect,
> WSO2, Inc. http://wso2.com/
> Phone: +94 776523867
>

Re: Cartridge Definition - Category Field

Posted by Shiroshica Kulatilake <sh...@wso2.com>.
Shouldn't this get validated at cxf level itself ? Json against schema

Have we decided to disable that level of validation ?

On Thu, Dec 11, 2014 at 11:44 AM, Isuru Haththotuwa <is...@apache.org>
wrote:

> Hi Imesh,
>
> Is category a new field to define the cartridge (such as framework,
> application, etc.)? If its mandatory IMHO we should validate it and throw
> an error if the category is not there without failing with an NPE, wdyt?
>
> On Thu, Dec 11, 2014 at 7:10 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi,
>>
>> I'm seeing the below error when deploying a cartridge without having a
>> category defined:
>>
>> [2014-12-11 11:36:39,794] ERROR
>> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
>> -  Internal server error
>> java.lang.NullPointerException
>> at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.createCartridgeDefinition(StratosApiV41Utils.java:98)
>> at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41.createCartridgeDefinition(StratosApiV41.java:146)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
>> at
>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
>> at
>> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
>> at
>> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
>> 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)
>>
>> Thanks
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Shiroshica Kulatilake

Architect,
WSO2, Inc. http://wso2.com/
Phone: +94 776523867

Re: Cartridge Definition - Category Field

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Imesh,

Is category a new field to define the cartridge (such as framework,
application, etc.)? If its mandatory IMHO we should validate it and throw
an error if the category is not there without failing with an NPE, wdyt?

On Thu, Dec 11, 2014 at 7:10 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi,
>
> I'm seeing the below error when deploying a cartridge without having a
> category defined:
>
> [2014-12-11 11:36:39,794] ERROR
> {org.apache.stratos.rest.endpoint.handlers.CustomThrowableExceptionMapper}
> -  Internal server error
> java.lang.NullPointerException
> at
> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.createCartridgeDefinition(StratosApiV41Utils.java:98)
> at
> org.apache.stratos.rest.endpoint.api.StratosApiV41.createCartridgeDefinition(StratosApiV41.java:146)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
> 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)
>
> Thanks
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>