Hi!
Thx, I will try registry 3.6.0. The same problem exist in esb 3.0.1 when it's 
configured with Jdbc registry model. When it is planned to release next esb 
version which may include this fix also?

Sent from my iPad

On 07.01.2011, at 18:16, "Lahiru Gunathilake" 
<lah...@wso2.com<mailto:lah...@wso2.com>> wrote:

Hi Paul,

On Fri, Jan 7, 2011 at 7:37 PM, Hodchenkov, Paul 
<<mailto:paul.hodchen...@oxagile.com>paul.hodchen...@oxagile.com<mailto:paul.hodchen...@oxagile.com>>
 wrote:
Hi!
I am using Greg 3.5.1
Currently I workarounded this adding a ping task to esb which retrieves some 
resource from registry by rest every 5min.
We have a similar solution for this issue by adding validation query, but with 
G-Reg 3.5.1 there's minor bug with validation Query, We have a patch for this 
but it's not publicly available.

If you are going to use G-Reg 3.6.0, you will be able to use a simple 
validationQuery(SELECT 1) in registry.xml and user-mgt.xml and keep the 
connections live.

Regards
Lahiru

Sent from my iPad

On 03.01.2011, at 9:04, "Lahiru Gunathilake" 
<<mailto:lah...@wso2.com>lah...@wso2.com<mailto:lah...@wso2.com>> wrote:

Hi Paul,

What version of G-Reg are you using?

Regards
Lahiru

2010/12/20 Hodchenkov, Paul 
<<mailto:paul.hodchen...@oxagile.com><mailto:paul.hodchen...@oxagile.com>paul.hodchen...@oxagile.com<mailto:paul.hodchen...@oxagile.com>>
Hi!
I have configured registry with MySQL. All works fine until registry is idle 
for 20hours.
After that I when I try to use   RegistryClientUtils.importToRegistry I have 
‘User is not authorized to add the resource to /_system/governance/’ and in 
registry logs shows:

ERROR -  Failed to start new registry transaction. 
{org.wso2.carbon.registry.core.jdbc.Em
beddedRegistry}
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet 
successfully received from the server was
83,440,226 milliseconds ago.  The last packet sent successfully to the server 
was 83,440,226 milliseconds ago. is l
onger than the server configured value of 'wait_timeout'. You should consider 
either expiring and/or testing connec
tion validity before use in your application, increasing the server configured 
values for client timeouts, or using
the Connector/J connection property 'autoReconnect=true' to avoid this problem.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)


To workaround this I have tried to add autoReconnect=true:


<dbConfig name="wso2registry">
        
<url>jdbc:mysql://10.100.64.65:3306/registry?autoReconnect=true<http://10.100.64.65:3306/registry?autoReconnect=true></url>
        <userName>root</userName>
        <password>root</password>
        <driverName>com.mysql.jdbc.Driver</driverName>
        <maxActive>50</maxActive>
        <maxWait>60000</maxWait>
        <minIdle>5</minIdle>
<validationQuery>SELECT 1</validationQuery>
    </dbConfig>

And it’s work fine when database is restarted : I have ‘User is not authorized 
to add the resource’ only once and second attempt is successful.  But again, 
when 20hours passed I can not import nothing to registry using 
RegistryClientUtils even from 50th attempt:
FATAL -  Failed to add the root collection to the coreRegistry.
va.lang.NullPointerException
    at 
org.wso2.carbon.registry.core.jdbc.dao.ResourceDAO.getVersion(ResourceDAO.java:224)
    at 
org.wso2.carbon.registry.core.jdbc.dao.ResourceDAO.resourceExists(ResourceDAO.java:166)
    at 
org.wso2.carbon.registry.core.jdbc.dao.ResourceDAO.resourceExists(ResourceDAO.java:183)
    at 
org.wso2.carbon.registry.core.session.UserRegistry.addRootCollection(UserRegistry.java:301)
    at 
org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:240)
    at 
org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:187)
    at 
org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:122)

REST API becomes broken, but it is possible to manipulate with registry from 
GUI. The only solution which helps is to restart the registry.


1)      Does everyone know how to fix this?

2)      Why c3p0 pool is not used to handle this?

Thx!


_______________________________________________
Carbon-dev mailing list
<mailto:Carbon-dev@wso2.org><mailto:Carbon-dev@wso2.org>Carbon-dev@wso2.org<mailto:Carbon-dev@wso2.org>
<https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev><https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev>https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev




--
Lahiru Gunathilake
Senior Software Engineer - WSO2 Inc. <http://www.wso2.com> 
<http://www.wso2.com> www.wso2.com<http://www.wso2.com>

Email:lah...@wso2.com<mailto:email%3alah...@wso2.com> Blog: 
<http://www.lahiru.org> <http://www.lahiru.org> 
www.lahiru.org<http://www.lahiru.org>
Mobile: +94716381143

Lean . Enterprise . Middleware

_______________________________________________
Carbon-dev mailing list
<mailto:Carbon-dev@wso2.org>Carbon-dev@wso2.org<mailto:Carbon-dev@wso2.org>
<https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev>https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev

_______________________________________________
Carbon-dev mailing list
<mailto:Carbon-dev@wso2.org>Carbon-dev@wso2.org<mailto:Carbon-dev@wso2.org>
<https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev>https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev




--
Lahiru Gunathilake
Senior Software Engineer - WSO2 Inc. <http://www.wso2.com> 
www.wso2.com<http://www.wso2.com>

Email:lah...@wso2.com<mailto:email%3alah...@wso2.com> Blog: 
<http://www.lahiru.org> www.lahiru.org<http://www.lahiru.org>
Mobile: +94716381143

Lean . Enterprise . Middleware

_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org<mailto:Carbon-dev@wso2.org>
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to