[Dev] Attaching life cycle name to appinfo artifact when creating an application in AF(for custom life cycles)

2015-10-26 Thread Bimali Dayananda
Hi,

This is regarding adding custom life cycles for applications in AF. [1]

Currently in AF the life cycle is attached to the application version
artifact at the creation of application versions. If the app is uploaded
then it attaches 'UploadableApplicationLifeCycle' and if the app is created
then it  attaches 'ApplicationLifecycle'.

It doesn't store life cycle in 'appinfo' artifact.

But when changing life cycle name of an application, the current way of
attaching life cycle is not applicable.

The solution I found is attaching life cycle name to  'appinfo' artifact
when creating an application and do a data migration for old tenants.

Is it okay if I use the solution I suggested?

Your comments are highly valued.

[1] Please prefer Configurable Lifecycle Stages for AppFactory in
Architecture mailing list for details.

Thanks.

-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] h2 databses are not created while running a local setup with -Dsetup

2015-09-21 Thread Bimali Dayananda
Hi,

I deleted all the h2 databases in the local setup and tried to run it with
-Dsetup. But the databases in repository/database are not created.

Any idea about this issue?

Thanks.
-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] org.h2.jdbc.JdbcSQLException: File corrupted while reading record

2015-09-16 Thread Bimali Dayananda
d(SCRManager.java:222)
at
org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
at
org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
at
org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:70)
at
org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

What could be the cause for this?

Thanks.
-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Exception is caught when Exception is not thrown

2015-08-13 Thread Bimali Dayananda
Hi,

Problem solved.
Before checking through FindBugs I didn't build the project. That was the
issue.
Thanks all.

On Wed, Aug 12, 2015 at 3:39 PM, Nirmal Fernando  wrote:

>
>
> On Wed, Aug 12, 2015 at 3:39 PM, Nirmal Fernando  wrote:
>
>>
>>
>> On Wed, Aug 12, 2015 at 12:44 PM, Bimali Dayananda 
>> wrote:
>>
>>> Hi,
>>>
>>> My code is as below.
>>>
>>> try{
>>>  configurationElement = AXIOMUtil.stringToOM(xmlFile);
>>> }catch (XMLStreamException e) {
>>> log.error("Unable to load files ");
>>> }
>>>
>>> When I analyze it through FindBugs I get the following bug report.
>>>
>>>  "Exception is caught when the exception is not caught.
>>>
>>>This method uses a try-catch block that catches Exception
>>> objects, but Exception is not thrown within the try block, and
>>> RuntimeException is not explicitly caught. It is a common bug pattern to
>>> say try { ... } catch (Exception e) { something } as a shorthand for
>>> catching a number of types of exception each of whose catch blocks is
>>> identical, but this construct also accidentally catches RuntimeException as
>>> well, masking potential bugs.
>>>
>>> A better approach is to either explicitly catch the specific exceptions
>>> that are thrown, or to explicitly catch RuntimeException exception, rethrow
>>> it, and then catch all non-Runtime Exceptions, as shown below:
>>>
>>>   try {
>>> ...
>>>   } catch (RuntimeException e) {
>>> throw e;
>>>   } catch (Exception e) {
>>> ... deal with all non-runtime exceptions ...
>>>   }"
>>>
>>> I tried the solution they have suggested. But it is not working.
>>>
>>> Any idea of this?
>>>
>>>
>> Why do you need to catch RuntimeExceptions ?
>>
>> It's an anti-pattern to catch generic Exception class, if no Exception is
>> thrown from the method, don't catch.
>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Bimali Dayananda
>>> Intern-Software Engineering
>>> Mobile : +94(77) 571 6618
>>> bim...@wso2.com
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Thanks & regards,
>> Nirmal
>>
>> Team Lead - WSO2 Machine Learner
>> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
>> Mobile: +94715779733
>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Exception is caught when Exception is not thrown

2015-08-12 Thread Bimali Dayananda
Hi,

My code is as below.

try{
 configurationElement = AXIOMUtil.stringToOM(xmlFile);
}catch (XMLStreamException e) {
log.error("Unable to load files ");
}

When I analyze it through FindBugs I get the following bug report.

 "Exception is caught when the exception is not caught.

   This method uses a try-catch block that catches Exception objects,
but Exception is not thrown within the try block, and RuntimeException is
not explicitly caught. It is a common bug pattern to say try { ... } catch
(Exception e) { something } as a shorthand for catching a number of types
of exception each of whose catch blocks is identical, but this construct
also accidentally catches RuntimeException as well, masking potential bugs.

A better approach is to either explicitly catch the specific exceptions
that are thrown, or to explicitly catch RuntimeException exception, rethrow
it, and then catch all non-Runtime Exceptions, as shown below:

  try {
...
  } catch (RuntimeException e) {
throw e;
  } catch (Exception e) {
... deal with all non-runtime exceptions ...
  }"

I tried the solution they have suggested. But it is not working.

Any idea of this?

Thanks.







-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Input parameter values are not assigning in the server side (using SoapUI)

2015-07-20 Thread Bimali Dayananda
Hi,

Problem solved. It was with the media type.

Thanks all.

On Mon, Jul 20, 2015 at 12:31 PM, Lakshani Gamage  wrote:

> Hi Bimali,
>
> Can you please attach the wadl file and a screen shot soapUI request?
>
> Thank You.
>
> On Mon, Jul 20, 2015 at 11:34 AM, Bimali Dayananda 
> wrote:
>
>> Hi,
>>
>> I'm testing a jax-rs web service (GET method) using SoapUI. I set
>> parameter values in the request.
>> But from the server side it always takes null values as parameter values.
>>
>> Any idea about this problem?
>>
>> Thanks.
>>
>> --
>> Bimali Dayananda
>> Intern-Software Engineering
>> Mobile : +94(77) 571 6618
>> bim...@wso2.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Lakshani Gamage
>
> *Software Engineer*
> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194>
>



-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Input parameter values are not assigning in the server side (using SoapUI)

2015-07-19 Thread Bimali Dayananda
Hi,

I'm testing a jax-rs web service (GET method) using SoapUI. I set parameter
values in the request.
But from the server side it always takes null values as parameter values.

Any idea about this problem?

Thanks.

-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Create WADL for jax-rs services

2015-07-08 Thread Bimali Dayananda
Hi,

I have implemented a jax-rs service interface in my project (using
IntelliJ) and I want to create the WADL for services. I found some methods
but all seems not working.
What is the best way to do this?

Thanks.

-- 
Bimali Dayananda
Intern-Software Engineering
Mobile : +94(77) 571 6618
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] (no subject)

2015-05-13 Thread Bimali Dayananda
bim...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev