Re: [Dev] OSGI Issue when trying to use Script Mediator in APIM

2014-05-11 Thread Ruwan Yatawara
Hi All,

After much research, we rounded up the problem, this is caused by the API
Manager host object using both synapse and jaggery. As I explained in my
previous email, when we use two different bundles that use different
versions of the same package, inside the same class space, package use
conflicts are encountered.

As a remedy to this problem, we need to upgrade the org.mozilla.javascript
version used by jaggery to version 1.7.0. This will also involve a possible
upgrade of bsf versions / changing the synapse ScriptMediator to
accommodate for possible API changes.

Thanks much, Kisanthan, Ruchira and Manu for all your help.

Thanks and Regards,

Ruwan Yatawara

WSO2 Inc.

email : ruw...@wso2.com
mobile : +94 77 9110413
blog : http://thoughts.ruwan-ace.com/
www: :http://wso2.com



On Fri, May 9, 2014 at 10:56 AM, madhuka udantha
madhukaudan...@gmail.comwrote:

 Hi,

 This[1] can be helpful for such scenario,
 And you issue encounter is correct,
 *You can check some AS releases, where it also occurred and fixed as we
 added jaggery and mashup to AS.*

 [1]
 http://madhukaudantha.blogspot.com/2014/02/writing-hostobject-for-jaggery.html



 On Fri, May 9, 2014 at 8:53 AM, Ruchira Wageesha ruch...@wso2.com wrote:

 Please meet me in the office. Will be able to help you.

 /Ruchira


 On Fri, May 9, 2014 at 12:02 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 We ran in to $subject when trying to use the script mediator in API
 Manager.

 When trying to use script mediator in AM APIs the following error is
 thrown.

 *Caused by: java.lang.NoClassDefFoundError:
 com/sun/phobos/script/javascript/RhinoScriptEngineFactory*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initScriptEngine(ScriptMediator.java:472)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:338)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.init(ScriptMediator.java:148)*


 To the best of my understanding, following is whats happening here.

 The script mediator depends on the bsf-all_3.0.0.wso2v2, which needs
 org.mozilla.javascript; version=1.6.0 or above to function.

 Jaggery is built to support org.mozilla.javascript; version=1.7.0 and
 above, and the API Manager host object, depends on both jaggery and synapse
 to function. When all of this comes together, we believe synapse has a
 problem with wiring the correct bundles (package usage conflict), leading
 to above quoted error.

 To overcome this, there are two options, and both seem to have
 considerable consequences

 a) Update the BSF jar to use org.mozilla.javascript; version=1.7.0

 b) Update Synapse, restricting it to use org.mozilla.javascript;
 version=1.6.0, only and APIM host objects to use 1.7.0 specifically.


 Since Option A might require changes to ESB script mediator, as API
 changes may be in effect, we went ahead with option (b). This leads to
 errors in the API Manager Host objects and the bundle goes in to INSTALLED
 state. The following error is thrown, at startup and there are also errors
 when trying to invoke the API.

 *[2014-05-08 23:56:16,246] ERROR - ModuleManager Error while adding
 HostObject : APIStore org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 *java.lang.ClassNotFoundException:
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)*


 Has anyone encountered such an issue before? How should we go about
 fixing this? Your thoughts/ideas/suggestions are welcome.


 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Cheers,
 Madhuka Udantha
 http://madhukaudantha.blogspot.com

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Feature support in Validator Mediator

2014-05-11 Thread Sohani Weerasinghe
Hi All,

Is there any particular reason for not supporting the other features other
than  
XMLConstants.FEATURE_SECURE_PROCESSINGhttp://docs.oracle.com/javase/6/docs/api/javax/xml/XMLConstants.html#FEATURE_SECURE_PROCESSING
by
the Validator Mediator?

Regards,
Sohani

Sohani Weerasinghe
Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Mime message with Mailto Transport

2014-05-11 Thread Ivan Fontanals
Hi all,

Do you know if it is possible to catch  the original mime message using the
mailto transport when a mail is received via Pop3 listener?

I need to store the mime message but I could not find an easy way to get
the original message, so I had to use the PayloadFactory to build my custom
message.

Is it possible? I can read the whole body using the  $body tag, but not the
header...

Thank you very much and sorry for the inconvenience.

-- 
Ivan Fontanals
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Problem in sending a message in the payload of WSRequest in Jaggery

2014-05-11 Thread Tishan Dahanayakage
Hi Jayanga,
When using jaggery ws module you have to send content within body tags of
SOAP envelop as payload. You can refer this[1] blog post  for more details
and sample code.
[1]
http://madhukaudantha.blogspot.com/2013/02/invoke-web-service-with-jaggery-with.html


On Fri, Apr 25, 2014 at 5:23 PM, Jayanga Dissanayake jaya...@wso2.comwrote:

 Hi All,

 I am trying to send some payload in a Jaggey WSRequest, according to the
 sample in [1]. But this pay load is not received in the carbon admin server
 end.

 Following is how I am sending the message in the Jaggery App. But message
 is null in the action echoString.

 Any idea why message is null at the carbon admin service end?


 Jaggery Code
 
 var ws = require('ws');
 var options = new Array();
 options.useSOAP = false;
 options.action = 'urn:echoString';
 options.HTTPMethod = GET;
 options[HTTPHeaders] = [ { name : Authorization, value : Basic
 YWRtaW46YWRtaW4=} ];

 ws_request.open(options, node.adminServiceURL + services/
 OperationCenterAgentService/echoString, false);

 //var test = 'messageABC/message';
 var test = 'soap:Envelope xmlns:soap=
 http://www.w3.org/2003/05/soap-envelope; xmlns:ser=
 http://services.oc.carbon.wso2.org;soap:Header/'
+ 
 'soap:Bodyser:echoStringser:message![CDATA[metadata
 xmlns=http://org.wso2.carbon.oc.services/agents;namead/
 name/metadata]]/ser:message/ser:echoString'
+ '/soap:Body/soap:Envelope';
 ws_request.send(test);
 var result = ws_request.responseE4X;
 print(result);


 Admin Service
 -
 public String echoString(String message){
 System.out.println(===echoString=== [Message= + message + ]);
 return message;
 }


 [1] http://jaggeryjs.org/documentation.jag?api=ws


 *Jayanga Dissanayake*
 Senior Software Engineer
 WSO2 Inc. - http://wso2.com/
 lean . enterprise . middleware
 email: jaya...@wso2.com
 mobile: +94772207259

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Tishan Dahanayakage
Software Engineer
WSO2, Inc.
Mobile:+94 716481328

Disclaimer: This communication may contain privileged or other confidential
information and is intended exclusively for the addressee/s. If you are not
the intended recipient/s, or believe that you may have received this
communication in error, please reply to the sender indicating that fact and
delete the copy you received and in addition, you should not print, copy,
re-transmit, disseminate, or otherwise use the information contained in
this communication. Internet communications cannot be guaranteed to be
timely, secure, error or virus-free. The sender does not accept liability
for any errors or omissions.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Value too long for REG_VALUE issue in Registry

2014-05-11 Thread Nuwan Dias
Hi,

I have got around the problem by storing the content as a separate registry
resource. The only drawback in this case is that we'll have to write a
separate indexer for searching by content. The forum topic and other
metadata still reside within the artifact and therefore indexing/searching
is not a problem. So basically the problem is solved.

The problem I wanted to highlight.
-
As per my understanding the 'text' field and 'text-area' field in artifacts
have no differences. They both can store only a limited number of
characters. Am I right? If so, for someone using the registry to store
artifacts it looks misleading and makes them think that limiting a
text-area content length is wrong. I understand that this behavior is by
design and it is overly complicated to change this :).

Why we used the registry?
--
The registry already has in built capabilities for searching/indexing,
sorting, pagination, categorization through tags, artifact permissions,
etc. We also had the need of a permission model (coupled with APIs) for the
forum. And on top of that we needed to get this forum implemented pretty
fast (~2 weeks). When the registry already has all these capabilities, why
would we reinvent everything on top of something else? Besides, having it
in the registry makes it integrate with the API Store nicely since API
artifacts are anyway in the registry as well. So linking up API permission
rules with forum topics can be done seamlessly.

Having said that, this forum is not tightly coupled with the Registry. It
is exposed to the FE (UI) through a clearly defined API (interface). The
first cut implementation is a registry based implementation. But anyone
could implement this interface for anything else.

Thanks,
NuwanD.

On Sun, May 11, 2014 at 9:26 AM, Ruchira Wageesha ruch...@wso2.com wrote:

 Hi Senaka,

 Yes, UES team is supposed to do this and have already completed most of
 the base of it using cassandra. But, depending a AM's commitment, they
 wanted to implement something quickly, AFAIK, probably within 2 weeks.

 You can find the thread on that at @architecture [Architecture]
 Developer Forum for the API Store [1]

 [1] https://mail-archive.com/architecture%40wso2.org/msg03817.html


 On Sat, May 10, 2014 at 10:10 PM, Senaka Fernando sen...@wso2.com wrote:

 Hi all,

 I think we are heading in the wrong direction here. IIRC, we discussed to
 implement a social component. The UES guys are or will be working on this.
 The idea was to keep this outside of the registry. Can you'll chat with
 Ruchira as well and try to understand how all of this fits together. The AM
 and the ES and the rest of the social aspects have to line up or these will
 increasingly become incompatible.

 And, WRT Uvindra's case. That solution was a highly subjective one
 Uvindra. As Ajith says, we cannot make it a generic solution and be done
 with that. This has to be solved properly. But, for the scenario of a forum
 I don't think any of that was discussed here is going to work as I have
 explained above.

 Thanks,
 Senaka.


 On Sat, May 10, 2014 at 3:37 PM, Ajith Vitharana aji...@wso2.com wrote:

 Hi Nuwan,


 On Sat, May 10, 2014 at 6:54 AM, Nuwan Dias nuw...@wso2.com wrote:

  On Fri, May 9, 2014 at 9:25 PM, Ajith Vitharana aji...@wso2.comwrote:

 Hi Uvindra,


 On Fri, May 9, 2014 at 5:47 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This limitation was highlighted during the discussion we had with
 Ajith just before work on the API Store forum was started. As I mentioned
 we ran into the same limitation when developing the development 
 governance
 solution. The text area that was to store custom javascript rules could 
 not
 accommodate anything exceeding 1000 characters. In the end after 
 discussing
 with Senaka we solved the problem by increasing the column size of
 REG_VALUE to 5000 and changing the DB scripts that were shipped with the
 solution accordingly.


 So, what happen when the length is 5001 ? :)


 Yes, I think we should someday fix this rxt field to property mapping.
 Otherwise there's no point in having a field called 'text-area' in the rxt
 right? Its capabilities become limited to same as the 'text' field.
 Besides, from a user POV, there's no point in creating a property in the
 rxt for each field. And when you comes across the need to store more than
 1000 characters in an artifact, you're totally blocked from doing so and
 have to resort to other complicated measures.

 So I suggest that we make it a point to fix this urgently when
 appropriate. Kernel 4.3.0 or C5 at least. Sooner the better :)


 As I mentioned early, property is the storage model we used for RXT.
 Storing the whole content as XML  (BLOB) and  parsing XML each time is NOT
 a solution at all.
 Registry schema is a generic one to platform and it can't be change the
 with the requirement of all new features. So, what we can do is use the
 

Re: [Dev] Update on Gsoc Project - BAM Toolbox for WSO2 Business Process Server

2014-05-11 Thread Thilini Ishaka
Hi Pubudu,

Some more materials are given below.
Please update the thread with the current progress.





*Data Publisher1. https://docs.wso2.org/display/BAM241/Data+Publisher
https://docs.wso2.org/display/BAM241/Data+Publisher 2.
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/data-agents/org.wso2.carbon.bam.service.data.publisher/4.2.1/src/main/java/org/wso2/carbon/bam/service/data/publisher/publish/EventPublisher.java
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/data-agents/org.wso2.carbon.bam.service.data.publisher/4.2.1/src/main/java/org/wso2/carbon/bam/service/data/publisher/publish/EventPublisher.java
Sending event to BAM *
3. Through the REST API
https://docs.wso2.org/display/BAM241/Sending+Events+through+the+REST+API
4. Samples 
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/products/bps/3.2.0/modules/samples/product/



*Monitoring with BAM *5.
http://wso2.com/library/articles/2013/06/monitor-your-kpis-using-wso2-bam/
6.
https://docs.wso2.org/display/BAM240/Monitoring+key+Performance+Indicators
7. Creating a custom toolbox
https://docs.wso2.org/display/BAM241/Creating+a+Custom+Toolbox


Thanks
Thilini


On Wed, May 7, 2014 at 4:49 AM, Pubudu Gunatilaka pubudu...@gmail.comwrote:

 Hi Hasitha,

 Thank you for the information. I did not write a sample event listener
 yet. Still trying to get some idea about BPEL and Human task processes.

 I will work on what you have mentioned and let you know the progress.

 Thanks.

 On Wed, May 7, 2014 at 4:31 PM, Hasitha Aravinda hasi...@wso2.com wrote:

 Hi Pubudu,

 For BPEL processes, you can enable ODE events via deploy.xml. Please
 refer [1] for more information. Similar to HumanTask you can register ODE
 event listener to BPS using bps.xml.

 were you able to write a sample HumanTaskEventListener ?

 Also try to write sample BPELEventListener and see what kind of
 information you can get from events about HumanTask/BPEL instances. The
 idea is to identify data, which we are going to publish to the BAM.

 Also study about BAM data publishers. [2] will be a good point to start.

 Thanks,
 Hasitha.

 [1] - http://ode.apache.org/ode-execution-events.html
 [2] -
 http://wso2.com/library/articles/2012/07/creating-custom-agents-publish-events-bamcep/


 On Wed, May 7, 2014 at 1:47 PM, Pubudu Gunatilaka pubudu...@gmail.comwrote:

 Hi,

 These days I am working with samples that are in WSO2 BPS in order to
 get some idea about BPEL and Human task processes. Some of the processes
 generate events and some do not.

 For the processes which generate events can use HumanTaskEventListener
 and BPELEventListener classes to write a custom event listener. But for the
 processes that do not generate events have to do using ODE Execution
 events.

 According to [1] this component can be added separately to BPS.

 I would really appreciate if you can provide me some useful materials in
 order to move forward.


 [1]-
 http://tryitnw.blogspot.com/2013/05/humantask-event-listeners-wso2-bps.html
 --
 Regards
 P.C. Gunatilaka
 Undergraduate,
 Department of Computer Science And Engineering,
 University of Moratuwa, Sri Lanka.

 Web http://reddragonspace.blogspot.com/ , 
 Facebookhttps://www.facebook.com/djpc4everhttps://www.facebook.com/djpc4ever,
 LinkedIn http://lk.linkedin.com/pub/pubudu-gunatilaka/32/2b8/20b ,
 Google+ https://plus.google.com/113204823932612396731/posts , 
 Twitterhttp://twitter.com/#!/PubuduSpace ,
 About.me http://about.me/pubudugunatilaka




 --
 Hasitha Aravinda,
 Software Engineer,
 WSO2 Inc.
 Email: hasi...@wso2.com
 Mobile: +94 71 8 210 200




 --
 Regards
 P.C. Gunatilaka
 Undergraduate,
 Department of Computer Science And Engineering,
 University of Moratuwa, Sri Lanka.

 Web http://reddragonspace.blogspot.com/ , 
 Facebookhttps://www.facebook.com/djpc4everhttps://www.facebook.com/djpc4ever,
 LinkedIn http://lk.linkedin.com/pub/pubudu-gunatilaka/32/2b8/20b ,
 Google+ https://plus.google.com/113204823932612396731/posts , 
 Twitterhttp://twitter.com/#!/PubuduSpace ,
 About.me http://about.me/pubudugunatilaka




-- 
Thilini Ishaka
Senior Software Engineer
Phone: +94 11 214 5345
WSO2 Inc. http://wso2.com

blog: thiliniishaka.blogspot.com
linkedin: http://lk.linkedin.com/in/thiliniishaka
twitter: https://twitter.com/#!/ThiliniIsh
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] OSGI Issue when trying to use Script Mediator in APIM

2014-05-11 Thread Sumedha Rubasinghe
On Sun, May 11, 2014 at 11:32 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 After much research, we rounded up the problem, this is caused by the API
 Manager host object using both synapse and jaggery. As I explained in my
 previous email, when we use two different bundles that use different
 versions of the same package, inside the same class space, package use
 conflicts are encountered.

 As a remedy to this problem, we need to upgrade the org.mozilla.javascript
 version used by jaggery to version 1.7.0. This will also involve a possible
 upgrade of bsf versions / changing the synapse ScriptMediator to
 accommodate for possible API changes.


This would mean in future, when org.mozilla.javascript version increments,
both of these usage points should be updated. right? If so, can we have a
comment next to Jaggery's org.mozilla.javacript version element mentioning
this please.

That would save lot of time in future.




 Thanks much, Kisanthan, Ruchira and Manu for all your help.

 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com



 On Fri, May 9, 2014 at 10:56 AM, madhuka udantha madhukaudan...@gmail.com
  wrote:

 Hi,

 This[1] can be helpful for such scenario,
 And you issue encounter is correct,
 *You can check some AS releases, where it also occurred and fixed as we
 added jaggery and mashup to AS.*

 [1]
 http://madhukaudantha.blogspot.com/2014/02/writing-hostobject-for-jaggery.html



 On Fri, May 9, 2014 at 8:53 AM, Ruchira Wageesha ruch...@wso2.comwrote:

 Please meet me in the office. Will be able to help you.

 /Ruchira


 On Fri, May 9, 2014 at 12:02 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 We ran in to $subject when trying to use the script mediator in API
 Manager.

 When trying to use script mediator in AM APIs the following error is
 thrown.

 *Caused by: java.lang.NoClassDefFoundError:
 com/sun/phobos/script/javascript/RhinoScriptEngineFactory*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initScriptEngine(ScriptMediator.java:472)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:338)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.init(ScriptMediator.java:148)*


 To the best of my understanding, following is whats happening here.

 The script mediator depends on the bsf-all_3.0.0.wso2v2, which needs
 org.mozilla.javascript; version=1.6.0 or above to function.

 Jaggery is built to support org.mozilla.javascript; version=1.7.0 and
 above, and the API Manager host object, depends on both jaggery and synapse
 to function. When all of this comes together, we believe synapse has a
 problem with wiring the correct bundles (package usage conflict), leading
 to above quoted error.

 To overcome this, there are two options, and both seem to have
 considerable consequences

 a) Update the BSF jar to use org.mozilla.javascript; version=1.7.0

 b) Update Synapse, restricting it to use org.mozilla.javascript;
 version=1.6.0, only and APIM host objects to use 1.7.0 specifically.


 Since Option A might require changes to ESB script mediator, as API
 changes may be in effect, we went ahead with option (b). This leads to
 errors in the API Manager Host objects and the bundle goes in to INSTALLED
 state. The following error is thrown, at startup and there are also errors
 when trying to invoke the API.

 *[2014-05-08 23:56:16,246] ERROR - ModuleManager Error while adding
 HostObject : APIStore 
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 *java.lang.ClassNotFoundException:
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)*


 Has anyone encountered such an issue before? How should we go about
 fixing this? Your thoughts/ideas/suggestions are welcome.


 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com
 http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Cheers,
 Madhuka Udantha
 http://madhukaudantha.blogspot.com



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
/sumedha
m: +94 773017743
b :  bit.ly/sumedha
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] rg.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled is thrown when attempting to create an API on APIMan 140 with postgres

2014-05-11 Thread Sumedha Rubasinghe
On Fri, May 9, 2014 at 10:36 PM, Isuru Perera isu...@wso2.com wrote:

 AFAIK, relaxAutoCommit=true is applicable to only to MySQL. I'm not sure
 it will work for PostgreSQL

 With relaxAutoCommit=true, we just suppress the exception in MySQL.

 Ideally we should disable the auto commit from the data source
 configuration.

 Try adding
 defaultAutoCommitfalse/defaultAutoCommit.

 I'm not sure about the impact this will have in components other than API
 Manager. If other components rely on Auto Commit, there will be issues.

 APIM Team, how should this be handled in with other databases, such as
 PostgreSQL


We are not depending on autocommit within our DAO logic. We have explicit
transaction commit blocks. (This also applies to Registry and UM).
Hence autocommit should always be set to false as Nuwan has given.




 Docs Team, Important configurations such as defaultAutoCommit are missing
 in Carbon docs [1]. We need to add all configs, other than the elements we
 have master-datasources.xml by default.

 [1]
 https://docs.wso2.org/display/Carbon420/Configuring+master-datasources.xml


 On Fri, May 9, 2014 at 5:37 AM, Uvindra Dias Jayasinha 
 uvin...@wso2.comwrote:

 This is because auto commit is turned on by default in your installation.

 You need to append relaxAutoCommit=true to the end of the DB url in the
 master-datasources.xml file. Here is what an example with MySQL would look
 like,

 datasource
 nameWSO2AM_DB/name
 descriptionThe datasource used for API Manager
 database/description
 jndiConfig
 namejdbc/WSO2AM_DB/name
 /jndiConfig
 definition type=RDBMS
 configuration
 urlj
 dbc:mysql://localhost:3306/WSO2AM_DB?autoReconnect=trueamp;
 *relaxAutoCommit=true*/url
 usernamewso2carbon/username
 passwordwso2carbon/password

 driverClassNamecom.mysql.jdbc.Driver/driverClassName
 maxActive50/maxActive
 maxWait6/maxWait
 testOnBorrowtrue/testOnBorrow
 validationQuerySELECT 1/validationQuery
 validationInterval3/validationInterval
 /configuration
 /definition
 /datasource

 Add the same entry to your DB URL



 On Fri, May 9, 2014 at 5:49 PM, Shavantha Weerasinghe shavan...@wso2.com
  wrote:

 Hi All

 The below exception is thrown when I attempt to create an API on APIM140
 connected to postgress database





 [2014-05-09 17:46:15,721] ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@6a10eaec to the database
 org.postgresql.util.PSQLException: Cannot commit when autoCommit is
 enabled.
 at
 org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:705)
 at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
 at $Proxy13.commit(Unknown Source)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:3564)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:372)
 at
 org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:45)
 at
 org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_addAPI(APIProviderHostObject.java:397)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
 at
 

Re: [Dev] WSO2 ESB Connector Store Icons

2014-05-11 Thread Dushan Abeyruwan
Hi Chanaka,
 Additionally, we need icon for devloper studio as well ref
https://github.com/dushansachinda/esb-connectors/tree/master/salesforce/1.0.0/src/main/resources/icon

can we get icons as well for all the connectors (other than,
salesfoce,googlesh,twitter,twilio,jira)

Cheers,
Dushan




On Thu, May 8, 2014 at 11:23 AM, Chanaka Jayasena chan...@wso2.com wrote:

 580 x 300 banner
 220 x 200 icon thumb

 thanks,
 Chanaka


 On Thu, May 8, 2014 at 8:49 AM, Malaka Silva mal...@wso2.com wrote:

 Hi Chanaka,

 What is the resolution you have used for log and banner.

 We may need to use the same for other connectors?

 Best Regards,
 Malaka


 On Sun, May 4, 2014 at 11:26 AM, Chanaka Jayasena chan...@wso2.comwrote:

 Hi Dushan, the Google drive is updated with the latest.

 thanks,
 Chanaka


 On Fri, May 2, 2014 at 5:35 PM, Chanaka Jayasena chan...@wso2.comwrote:

 Noted. I will update and provide you with the remaining connector icons
 as well.

 Thanks,
 Chanaka


 On Fri, May 2, 2014 at 1:20 PM, Dushan Abeyruwan dus...@wso2.comwrote:

 Hi ChanakaJ

 On Fri, May 2, 2014 at 9:00 AM, Malaka Silva mal...@wso2.com wrote:

 Hi All,

 IMO we should not modify the backgroung color and layout outside what
 vendors(Third parties) are using.

 Eg: - Salesforce logo is in green color whereas standard is blue.


Yes, I feel the same as we should not modify exiting vendors layout
 colors, overall felt only salesforce has such issue.

 meantime, can we get the remaining connector images as well [1] shows
 you the connectors we have at the moment

 https://github.com/wso2-dev/esb-connectors

   we should add, facebook,gmail.amazon s3,google drive,suvaymonkey,
 sugerCRM.


 Best Regards,
 Malaka


 On Fri, May 2, 2014 at 8:08 AM, Chanaka Jayasena chan...@wso2.comwrote:

 Hi Dushan,

 [1] contains the images you requested for the Connector Store.
 Amazon s3 and Survey Monkey icons are missing. I will upload those ones
 they are done.

 1 -
 https://drive.google.com/a/wso2.com/folderview?id=0B_CCkDYHWyB9VGlJc0MzWnRpYkUusp=sharing#grid

 thanks,
 Chanaka

 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Dushan Abeyruwan | Associate Tech Lead
  Integration Technologies Team
 PMC Member Apache Synpase
 WSO2 Inc. http://wso2.com/
 Blog:http://dushansview.blogspot.com/
 Mobile:(0094)713942042




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print this
 email only if it is absolutely necessary.




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




-- 
Dushan Abeyruwan | Associate Tech Lead
Integration Technologies Team
PMC Member Apache Synpase
WSO2 Inc. http://wso2.com/
Blog:http://dushansview.blogspot.com/
Mobile:(0094)713942042
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] OSGI Issue when trying to use Script Mediator in APIM

2014-05-11 Thread Ruchira Wageesha
Hi Sumedha,

IMO, this is the first time, that one of our component used both Mozilla
Rhino(Jaggery) and Synapse core directly, which indirectly links BSF
embedded Rhino version too. Anyway, we will take this into consideration
when Rhino version of Jaggery is updated again.

/Ruchira


On Mon, May 12, 2014 at 2:28 AM, Sumedha Rubasinghe sume...@wso2.comwrote:

 On Sun, May 11, 2014 at 11:32 AM, Ruwan Yatawara ruw...@wso2.com wrote:

 Hi All,

 After much research, we rounded up the problem, this is caused by the API
 Manager host object using both synapse and jaggery. As I explained in my
 previous email, when we use two different bundles that use different
 versions of the same package, inside the same class space, package use
 conflicts are encountered.

 As a remedy to this problem, we need to upgrade the
 org.mozilla.javascript version used by jaggery to version 1.7.0. This will
 also involve a possible upgrade of bsf versions / changing the synapse
 ScriptMediator to accommodate for possible API changes.


 This would mean in future, when org.mozilla.javascript version increments,
 both of these usage points should be updated. right? If so, can we have a
 comment next to Jaggery's org.mozilla.javacript version element mentioning
 this please.

 That would save lot of time in future.




 Thanks much, Kisanthan, Ruchira and Manu for all your help.

 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com



 On Fri, May 9, 2014 at 10:56 AM, madhuka udantha 
 madhukaudan...@gmail.com wrote:

 Hi,

 This[1] can be helpful for such scenario,
 And you issue encounter is correct,
 *You can check some AS releases, where it also occurred and fixed as we
 added jaggery and mashup to AS.*

 [1]
 http://madhukaudantha.blogspot.com/2014/02/writing-hostobject-for-jaggery.html



 On Fri, May 9, 2014 at 8:53 AM, Ruchira Wageesha ruch...@wso2.comwrote:

 Please meet me in the office. Will be able to help you.

 /Ruchira


 On Fri, May 9, 2014 at 12:02 AM, Ruwan Yatawara ruw...@wso2.comwrote:

 Hi All,

 We ran in to $subject when trying to use the script mediator in API
 Manager.

 When trying to use script mediator in AM APIs the following error is
 thrown.

 *Caused by: java.lang.NoClassDefFoundError:
 com/sun/phobos/script/javascript/RhinoScriptEngineFactory*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initScriptEngine(ScriptMediator.java:472)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.initInlineScript(ScriptMediator.java:338)*
 * at
 org.apache.synapse.mediators.bsf.ScriptMediator.init(ScriptMediator.java:148)*


 To the best of my understanding, following is whats happening here.

 The script mediator depends on the bsf-all_3.0.0.wso2v2, which needs
 org.mozilla.javascript; version=1.6.0 or above to function.

 Jaggery is built to support org.mozilla.javascript; version=1.7.0
 and above, and the API Manager host object, depends on both jaggery and
 synapse to function. When all of this comes together, we believe synapse
 has a problem with wiring the correct bundles (package usage conflict),
 leading to above quoted error.

 To overcome this, there are two options, and both seem to have
 considerable consequences

 a) Update the BSF jar to use org.mozilla.javascript; version=1.7.0

 b) Update Synapse, restricting it to use org.mozilla.javascript;
 version=1.6.0, only and APIM host objects to use 1.7.0 specifically.


 Since Option A might require changes to ESB script mediator, as API
 changes may be in effect, we went ahead with option (b). This leads to
 errors in the API Manager Host objects and the bundle goes in to INSTALLED
 state. The following error is thrown, at startup and there are also errors
 when trying to invoke the API.

 *[2014-05-08 23:56:16,246] ERROR - ModuleManager Error while adding
 HostObject : APIStore 
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 *java.lang.ClassNotFoundException:
 org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)*
 * at
 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)*


 Has anyone encountered such an issue before? How should we go about
 fixing this? Your thoughts/ideas/suggestions are welcome.


 Thanks and Regards,

 Ruwan Yatawara

 WSO2 Inc.

 email : ruw...@wso2.com
 mobile : +94 77 9110413
 blog : http://thoughts.ruwan-ace.com/
 www: :http://wso2.com




 --

 *Ruchira Wageesha**Associate Technical Lead*
 *WSO2 Inc. - lean . enterprise . middleware |  wso2.com
 http://wso2.com*

 *email: ruch...@wso2.com ruch...@wso2.com,   blog:
 ruchirawageesha.blogspot.com http://ruchirawageesha.blogspot.com,
 mobile: +94 77 5493444 %2B94%2077%205493444*

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Cheers,
 Madhuka 

Re: [Dev] Build failure in Chunk-12 [cannot find symbol getCurrentUser() org.wso2.carbon.andes.stub.AndesAdminServiceStub]

2014-05-11 Thread Shammi Jayasinghe
Hi Janaka,

Sorry for the inconvenience caused , We have changed the access modifier
from public to private since we thought not to expose them via admin
service due to security reasons after talking to security team. Please
contact MB team if you face any issue with the above change. Apart from
that after discussing with Dimuthu, we agreed to keep getAccessToken method
with out any change.

Thanks
Shammi


On Sat, May 10, 2014 at 11:48 AM, Janaka Ranabahu jan...@wso2.com wrote:

 Hi Shammi,

 Chunk-12 build fails due to the following exception. Did you guys remove
 this method?

 [INFO]
 
 [INFO] BUILD FAILURE
 [INFO]
 
 [INFO] Total time: 1:15.688s
 [INFO] Finished at: Sat May 10 11:33:10 IST 2014
 [INFO] Final Memory: 238M/1635M
 [INFO]
 
 [ERROR] Failed to execute goal
 org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
 (default-compile) on project org.wso2.carbon.appfactory.eventing:
 Compilation failure
 [ERROR]
 /home/janaka/work/wso2/carbon/carbon_4/platform/branches/turing/components/appfac/org.wso2.carbon.appfactory.eventing/2.0.0/src/main/java/org/wso2/carbon/appfactory/eventing/jms/AndesAdminServiceClient.java:[59,23]
 cannot find symbol
 *[ERROR] symbol  : method getCurrentUser()*
 *[ERROR] location: class org.wso2.carbon.andes.stub.AndesAdminServiceStub*
 *[ERROR] - [Help 1]*
 [ERROR]
 [ERROR] To see the full stack trace of the errors, re-run Maven with the
 -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR]
 [ERROR] For more information about the errors and possible solutions,
 please read the following articles:
 [ERROR] [Help 1]
 http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
 [ERROR]
 [ERROR] After correcting the problems, you can resume the build with the
 command
 [ERROR]   mvn goals -rf :org.wso2.carbon.appfactory.eventing

 Thanks,
 Janaka
 --
 *Janaka Ranabahu*
 Senior Software Engineer; WSO2 Inc.; http://wso2.com


 * E-mail: jan...@wso2.com http://wso2.com**M: **+94 718370861
 %2B94%20718370861*

 Lean . Enterprise . Middleware




-- 
Best Regards,

*  Shammi Jayasinghe*
Associate Tech Lead
WSO2, Inc.; http://wso2.com,
mobile: +94 71 4493085
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 ESB Connector Store Icons

2014-05-11 Thread Chanaka Jayasena
Sure, Dushan. I will provide them by EOD.

thanks,
Chanaka


On Mon, May 12, 2014 at 7:49 AM, Dushan Abeyruwan dus...@wso2.com wrote:

 Hi Chanaka,
  Additionally, we need icon for devloper studio as well ref

 https://github.com/dushansachinda/esb-connectors/tree/master/salesforce/1.0.0/src/main/resources/icon

 can we get icons as well for all the connectors (other than,
 salesfoce,googlesh,twitter,twilio,jira)

 Cheers,
 Dushan




 On Thu, May 8, 2014 at 11:23 AM, Chanaka Jayasena chan...@wso2.comwrote:

 580 x 300 banner
 220 x 200 icon thumb

 thanks,
 Chanaka


 On Thu, May 8, 2014 at 8:49 AM, Malaka Silva mal...@wso2.com wrote:

 Hi Chanaka,

 What is the resolution you have used for log and banner.

 We may need to use the same for other connectors?

 Best Regards,
 Malaka


 On Sun, May 4, 2014 at 11:26 AM, Chanaka Jayasena chan...@wso2.comwrote:

 Hi Dushan, the Google drive is updated with the latest.

 thanks,
 Chanaka


 On Fri, May 2, 2014 at 5:35 PM, Chanaka Jayasena chan...@wso2.comwrote:

 Noted. I will update and provide you with the remaining connector
 icons as well.

 Thanks,
 Chanaka


 On Fri, May 2, 2014 at 1:20 PM, Dushan Abeyruwan dus...@wso2.comwrote:

 Hi ChanakaJ

 On Fri, May 2, 2014 at 9:00 AM, Malaka Silva mal...@wso2.com wrote:

 Hi All,

 IMO we should not modify the backgroung color and layout outside
 what vendors(Third parties) are using.

 Eg: - Salesforce logo is in green color whereas standard is blue.


Yes, I feel the same as we should not modify exiting vendors
 layout colors, overall felt only salesforce has such issue.

 meantime, can we get the remaining connector images as well [1] shows
 you the connectors we have at the moment

 https://github.com/wso2-dev/esb-connectors

   we should add, facebook,gmail.amazon s3,google drive,suvaymonkey,
 sugerCRM.


 Best Regards,
 Malaka


 On Fri, May 2, 2014 at 8:08 AM, Chanaka Jayasena 
 chan...@wso2.comwrote:

 Hi Dushan,

 [1] contains the images you requested for the Connector Store.
 Amazon s3 and Survey Monkey icons are missing. I will upload those ones
 they are done.

 1 -
 https://drive.google.com/a/wso2.com/folderview?id=0B_CCkDYHWyB9VGlJc0MzWnRpYkUusp=sharing#grid

 thanks,
 Chanaka

 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Dushan Abeyruwan | Associate Tech Lead
  Integration Technologies Team
 PMC Member Apache Synpase
 WSO2 Inc. http://wso2.com/
 Blog:http://dushansview.blogspot.com/
 Mobile:(0094)713942042




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




 --

 Best Regards,

 Malaka Silva
 Senior Tech Lead
 M: +94 777 219 791
 Tel : 94 11 214 5345
 Fax :94 11 2145300
 Skype : malaka.sampath.silva
 LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
 Blog : http://mrmalakasilva.blogspot.com/

 WSO2, Inc.
 lean . enterprise . middleware
 http://www.wso2.com/
 http://www.wso2.com/about/team/malaka-silva/http://wso2.com/about/team/malaka-silva/

 Save a tree -Conserve nature  Save the world for your future. Print
 this email only if it is absolutely necessary.




 --
 Chanaka Jayasena
 Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
 email: chan...@wso2.com; cell: +94 77 785 5565
 blog: http://chanaka3d.blogspot.com




 --
 Dushan Abeyruwan | Associate Tech Lead
 Integration Technologies Team
 PMC Member Apache Synpase
 WSO2 Inc. http://wso2.com/
 Blog:http://dushansview.blogspot.com/
 Mobile:(0094)713942042




-- 
Chanaka Jayasena
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
email: chan...@wso2.com; cell: +94 77 785 5565
blog: http://chanaka3d.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Build failure in Chunk-07

2014-05-11 Thread Thilini Shanika
Hi,
When I tried to build Chunk-07 in Carbon platform
(platform/turing-chunk09/product-releases/chunk-07), the build was failed
and got the following error.

Exception in thread main java.lang.NoSuchMethodError: method
java.util.regex.Pattern.quote with signature
(Ljava.lang.String;)Ljava.lang.String; was not found.
   at
org.wso2.carbon.automation.core.utils.fileutils.SuffixFilter.init(SuffixFilter.java:29)
   at
org.wso2.carbon.automation.core.utils.coreutils.CodeCoverageUtils.getAllCoverageEmFiles(CodeCoverageUtils.java:337)
   at
org.wso2.carbon.automation.core.utils.coreutils.CodeCoverageUtils.generateReports(CodeCoverageUtils.java:273)
   at
org.wso2.carbon.automation.core.tests.TestCoverageGenerator.main(TestCoverageGenerator.java:35)


[INFO] ESB UI Test Module  SUCCESS [0.716s]
[INFO] Integration Test Reporting  FAILURE [3.207s]
[INFO] WSO2 Carbon - Releases - products - Aggregator Module  SKIPPED
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 1:36.223s
[INFO] Finished at: Mon May 12 09:36:20 IST 2014
[INFO] Final Memory: 181M/1414M
[INFO]

[ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (my-exec) on project
org.wso2.carbon.esb.integration.reports: Command execution failed. Process
exited with an error: 1 (Exit value: 1) - [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR]   mvn goals -rf :org.wso2.carbon.esb.integration.reports



What can be the issue here and how to fix it?

Thanks.


-- 
Thilini Shanika
Software Engineer
WSO2, Inc.; http://wso2.com
20, Palmgrove Avenue, Colombo 3ied to build c

E-mail: tgtshan...@gmail.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] rg.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled is thrown when attempting to create an API on APIMan 140 with postgres

2014-05-11 Thread Uvindra Dias Jayasinha
Probably a good idea to have defaultAutoCommit configuration as part of
the existing data sources existing configs, then its obvious to anyone
looking at the configuration that Auto Commit can be toggled from this.
Currently unless you have prior knowledge of it, its not obvious that such
a configuration exists.

Also why isnt it available by default and always set to false in all data
sources? There is no reason to have auto commit turned on in this case.



On Mon, May 12, 2014 at 3:30 AM, Sumedha Rubasinghe sume...@wso2.comwrote:




 On Fri, May 9, 2014 at 10:36 PM, Isuru Perera isu...@wso2.com wrote:

 AFAIK, relaxAutoCommit=true is applicable to only to MySQL. I'm not sure
 it will work for PostgreSQL

 With relaxAutoCommit=true, we just suppress the exception in MySQL.

 Ideally we should disable the auto commit from the data source
 configuration.

 Try adding
 defaultAutoCommitfalse/defaultAutoCommit.

 I'm not sure about the impact this will have in components other than API
 Manager. If other components rely on Auto Commit, there will be issues.

 APIM Team, how should this be handled in with other databases, such as
 PostgreSQL


 We are not depending on autocommit within our DAO logic. We have explicit
 transaction commit blocks. (This also applies to Registry and UM).
 Hence autocommit should always be set to false as Nuwan has given.




 Docs Team, Important configurations such as defaultAutoCommit are missing
 in Carbon docs [1]. We need to add all configs, other than the elements we
 have master-datasources.xml by default.

 [1]
 https://docs.wso2.org/display/Carbon420/Configuring+master-datasources.xml


 On Fri, May 9, 2014 at 5:37 AM, Uvindra Dias Jayasinha 
 uvin...@wso2.comwrote:

 This is because auto commit is turned on by default in your installation.

 You need to append relaxAutoCommit=true to the end of the DB url in
 the master-datasources.xml file. Here is what an example with MySQL would
 look like,

 datasource
 nameWSO2AM_DB/name
 descriptionThe datasource used for API Manager
 database/description
 jndiConfig
 namejdbc/WSO2AM_DB/name
 /jndiConfig
 definition type=RDBMS
 configuration
 urlj
 dbc:mysql://localhost:3306/WSO2AM_DB?autoReconnect=trueamp;
 *relaxAutoCommit=true*/url
 usernamewso2carbon/username
 passwordwso2carbon/password

 driverClassNamecom.mysql.jdbc.Driver/driverClassName
 maxActive50/maxActive
 maxWait6/maxWait
 testOnBorrowtrue/testOnBorrow
 validationQuerySELECT 1/validationQuery
 validationInterval3/validationInterval
 /configuration
 /definition
 /datasource

 Add the same entry to your DB URL



 On Fri, May 9, 2014 at 5:49 PM, Shavantha Weerasinghe 
 shavan...@wso2.com wrote:

 Hi All

 The below exception is thrown when I attempt to create an API on
 APIM140 connected to postgress database





 [2014-05-09 17:46:15,721] ERROR - ApiMgtDAO Error while adding the API:
 org.wso2.carbon.apimgt.api.model.APIIdentifier@6a10eaec to the database
 org.postgresql.util.PSQLException: Cannot commit when autoCommit is
 enabled.
 at
 org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:705)
 at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
 at $Proxy13.commit(Unknown Source)
 at
 org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:3564)
 at
 org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:372)
 at
 

Re: [Dev] rg.postgresql.util.PSQLException: Cannot commit when autoCommit is enabled is thrown when attempting to create an API on APIMan 140 with postgres

2014-05-11 Thread Uvindra Dias Jayasinha
Also refer to [1] under *Installing and configuring the databases* section
3. b.

The documentation shows the MySQL specific relaxAutoCommit=true

There is no mention of the defaultAutoCommit config. This works since the
example uses MySQL but it does not communicate the important generic
configuration that will work with all DB's

[1] - https://docs.wso2.org/display/CLUSTER420/Clustering+API+Manager



On Mon, May 12, 2014 at 9:55 AM, Uvindra Dias Jayasinha uvin...@wso2.comwrote:

 Probably a good idea to have defaultAutoCommit configuration as part of
 the existing data sources existing configs, then its obvious to anyone
 looking at the configuration that Auto Commit can be toggled from this.
 Currently unless you have prior knowledge of it, its not obvious that such
 a configuration exists.

 Also why isnt it available by default and always set to false in all data
 sources? There is no reason to have auto commit turned on in this case.



 On Mon, May 12, 2014 at 3:30 AM, Sumedha Rubasinghe sume...@wso2.comwrote:




 On Fri, May 9, 2014 at 10:36 PM, Isuru Perera isu...@wso2.com wrote:

 AFAIK, relaxAutoCommit=true is applicable to only to MySQL. I'm not sure
 it will work for PostgreSQL

 With relaxAutoCommit=true, we just suppress the exception in MySQL.

 Ideally we should disable the auto commit from the data source
 configuration.

 Try adding
 defaultAutoCommitfalse/defaultAutoCommit.

 I'm not sure about the impact this will have in components other than
 API Manager. If other components rely on Auto Commit, there will be issues.

 APIM Team, how should this be handled in with other databases, such as
 PostgreSQL


 We are not depending on autocommit within our DAO logic. We have explicit
 transaction commit blocks. (This also applies to Registry and UM).
 Hence autocommit should always be set to false as Nuwan has given.




 Docs Team, Important configurations such as defaultAutoCommit are
 missing in Carbon docs [1]. We need to add all configs, other than the
 elements we have master-datasources.xml by default.

 [1]
 https://docs.wso2.org/display/Carbon420/Configuring+master-datasources.xml


 On Fri, May 9, 2014 at 5:37 AM, Uvindra Dias Jayasinha uvin...@wso2.com
  wrote:

 This is because auto commit is turned on by default in your
 installation.

 You need to append relaxAutoCommit=true to the end of the DB url in
 the master-datasources.xml file. Here is what an example with MySQL would
 look like,

 datasource
 nameWSO2AM_DB/name
 descriptionThe datasource used for API Manager
 database/description
 jndiConfig
 namejdbc/WSO2AM_DB/name
 /jndiConfig
 definition type=RDBMS
 configuration
 urlj
 dbc:mysql://localhost:3306/WSO2AM_DB?autoReconnect=trueamp;
 *relaxAutoCommit=true*/url
 usernamewso2carbon/username
 passwordwso2carbon/password

 driverClassNamecom.mysql.jdbc.Driver/driverClassName
 maxActive50/maxActive
 maxWait6/maxWait
 testOnBorrowtrue/testOnBorrow
 validationQuerySELECT 1/validationQuery
 validationInterval3/validationInterval
 /configuration
 /definition
 /datasource

 Add the same entry to your DB URL



 On Fri, May 9, 2014 at 5:49 PM, Shavantha Weerasinghe 
 shavan...@wso2.com wrote:

 Hi All

 The below exception is thrown when I attempt to create an API on
 APIM140 connected to postgress database





 [2014-05-09 17:46:15,721] ERROR - ApiMgtDAO Error while adding the
 API: org.wso2.carbon.apimgt.api.model.APIIdentifier@6a10eaec to the
 database
 org.postgresql.util.PSQLException: Cannot commit when autoCommit is
 enabled.
 at
 org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:705)
 at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
 org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153)
 at
 org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
 at
 

Re: [Dev] Value too long for REG_VALUE issue in Registry

2014-05-11 Thread Uvindra Dias Jayasinha
@Senaka and Ajith

Yes the current solution done for dev governance has an upper limit of 5000
characters, but keep in mind that we are not using the registry directly
like APIM, but are using ES which is using the registry underneath. So we
cant do any of the work arounds that have been suggested AFAIU. So anyone
using ES will also be affected by this rxt limitation.


On Sun, May 11, 2014 at 9:19 PM, Nuwan Dias nuw...@wso2.com wrote:

 Hi,

 I have got around the problem by storing the content as a separate
 registry resource. The only drawback in this case is that we'll have to
 write a separate indexer for searching by content. The forum topic and
 other metadata still reside within the artifact and therefore
 indexing/searching is not a problem. So basically the problem is solved.

 The problem I wanted to highlight.
 -
 As per my understanding the 'text' field and 'text-area' field in
 artifacts have no differences. They both can store only a limited number of
 characters. Am I right? If so, for someone using the registry to store
 artifacts it looks misleading and makes them think that limiting a
 text-area content length is wrong. I understand that this behavior is by
 design and it is overly complicated to change this :).

 Why we used the registry?
 --
 The registry already has in built capabilities for searching/indexing,
 sorting, pagination, categorization through tags, artifact permissions,
 etc. We also had the need of a permission model (coupled with APIs) for the
 forum. And on top of that we needed to get this forum implemented pretty
 fast (~2 weeks). When the registry already has all these capabilities, why
 would we reinvent everything on top of something else? Besides, having it
 in the registry makes it integrate with the API Store nicely since API
 artifacts are anyway in the registry as well. So linking up API permission
 rules with forum topics can be done seamlessly.

 Having said that, this forum is not tightly coupled with the Registry. It
 is exposed to the FE (UI) through a clearly defined API (interface). The
 first cut implementation is a registry based implementation. But anyone
 could implement this interface for anything else.

 Thanks,
 NuwanD.

 On Sun, May 11, 2014 at 9:26 AM, Ruchira Wageesha ruch...@wso2.comwrote:

 Hi Senaka,

 Yes, UES team is supposed to do this and have already completed most of
 the base of it using cassandra. But, depending a AM's commitment, they
 wanted to implement something quickly, AFAIK, probably within 2 weeks.

 You can find the thread on that at @architecture [Architecture]
 Developer Forum for the API Store [1]

 [1] https://mail-archive.com/architecture%40wso2.org/msg03817.html


 On Sat, May 10, 2014 at 10:10 PM, Senaka Fernando sen...@wso2.comwrote:

 Hi all,

 I think we are heading in the wrong direction here. IIRC, we discussed
 to implement a social component. The UES guys are or will be working on
 this. The idea was to keep this outside of the registry. Can you'll chat
 with Ruchira as well and try to understand how all of this fits together.
 The AM and the ES and the rest of the social aspects have to line up or
 these will increasingly become incompatible.

 And, WRT Uvindra's case. That solution was a highly subjective one
 Uvindra. As Ajith says, we cannot make it a generic solution and be done
 with that. This has to be solved properly. But, for the scenario of a forum
 I don't think any of that was discussed here is going to work as I have
 explained above.

 Thanks,
 Senaka.


 On Sat, May 10, 2014 at 3:37 PM, Ajith Vitharana aji...@wso2.comwrote:

 Hi Nuwan,


 On Sat, May 10, 2014 at 6:54 AM, Nuwan Dias nuw...@wso2.com wrote:

  On Fri, May 9, 2014 at 9:25 PM, Ajith Vitharana aji...@wso2.comwrote:

 Hi Uvindra,


 On Fri, May 9, 2014 at 5:47 PM, Uvindra Dias Jayasinha 
 uvin...@wso2.com wrote:

 This limitation was highlighted during the discussion we had with
 Ajith just before work on the API Store forum was started. As I 
 mentioned
 we ran into the same limitation when developing the development 
 governance
 solution. The text area that was to store custom javascript rules could 
 not
 accommodate anything exceeding 1000 characters. In the end after 
 discussing
 with Senaka we solved the problem by increasing the column size of
 REG_VALUE to 5000 and changing the DB scripts that were shipped with the
 solution accordingly.


 So, what happen when the length is 5001 ? :)


 Yes, I think we should someday fix this rxt field to property mapping.
 Otherwise there's no point in having a field called 'text-area' in the rxt
 right? Its capabilities become limited to same as the 'text' field.
 Besides, from a user POV, there's no point in creating a property in the
 rxt for each field. And when you comes across the need to store more than
 1000 characters in an artifact, you're totally blocked from doing so and
 have to resort to 

Re: [Dev] Build failure in Chunk-07

2014-05-11 Thread Rajeev Sampath
On Mon, May 12, 2014 at 9:56 AM, Thilini Shanika thili...@wso2.com wrote:

 Hi,
 When I tried to build Chunk-07 in Carbon platform
 (platform/turing-chunk09/product-releases/chunk-07), the build was failed
 and got the following error.

 Exception in thread main java.lang.NoSuchMethodError: method
 java.util.regex.Pattern.quote with signature
 (Ljava.lang.String;)Ljava.lang.String; was not found.
at
 org.wso2.carbon.automation.core.utils.fileutils.SuffixFilter.init(SuffixFilter.java:29)
at
 org.wso2.carbon.automation.core.utils.coreutils.CodeCoverageUtils.getAllCoverageEmFiles(CodeCoverageUtils.java:337)
at
 org.wso2.carbon.automation.core.utils.coreutils.CodeCoverageUtils.generateReports(CodeCoverageUtils.java:273)
at
 org.wso2.carbon.automation.core.tests.TestCoverageGenerator.main(TestCoverageGenerator.java:35)


Seems like an older java version is being used to compile. Try with a
version  1.5.


Thanks
Rajeev



 [INFO] ESB UI Test Module  SUCCESS [0.716s]
 [INFO] Integration Test Reporting  FAILURE [3.207s]
 [INFO] WSO2 Carbon - Releases - products - Aggregator Module  SKIPPED
 [INFO]
 
 [INFO] BUILD FAILURE
 [INFO]
 
 [INFO] Total time: 1:36.223s
 [INFO] Finished at: Mon May 12 09:36:20 IST 2014
 [INFO] Final Memory: 181M/1414M
 [INFO]
 
 [ERROR] Failed to execute goal
 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (my-exec) on project
 org.wso2.carbon.esb.integration.reports: Command execution failed. Process
 exited with an error: 1 (Exit value: 1) - [Help 1]
 [ERROR]
 [ERROR] To see the full stack trace of the errors, re-run Maven with the
 -e switch.
 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 [ERROR]
 [ERROR] For more information about the errors and possible solutions,
 please read the following articles:
 [ERROR] [Help 1]
 http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 [ERROR]
 [ERROR] After correcting the problems, you can resume the build with the
 command
 [ERROR]   mvn goals -rf :org.wso2.carbon.esb.integration.reports



 What can be the issue here and how to fix it?

 Thanks.


 --
 Thilini Shanika
 Software Engineer
 WSO2, Inc.; http://wso2.com
 20, Palmgrove Avenue, Colombo 3ied to build c

 E-mail: tgtshan...@gmail.com


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Rajeev Sampath
Senior Software Engineer
WSO2, Inc.; http://www.wso2.com.

Mobile:
* +94716265766*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev