zillo32 / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
0 stars 0 forks source link

PluginResourceDaoImpl bug found #534

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I cannot speak English well. ^^;

When using multiple plugins, NoClassDefFoundError exceptions may occur in 
PluginClassLoader.

The reason is that the cache.
AAA plugin's cached some class may be loaded from BBB plugin's 
PluginClassLoader.

- original code
public PluginResourceEntity getByUrl(String plugin, String url) {
    Query q = newQuery();
    q.addFilter("url", FilterOperator.EQUAL, url);
    q.addFilter("pluginName", FilterOperator.EQUAL, plugin);
    return selectOne(q, "getByUrl", params(url));
}

- modify code
public PluginResourceEntity getByUrl(String plugin, String url) {
    Query q = newQuery();
    q.addFilter("url", FilterOperator.EQUAL, url);
    q.addFilter("pluginName", FilterOperator.EQUAL, plugin);
    return selectOne(q, "getByUrl", params(plugin,url)); //changed
}

Original issue reported on code.google.com by leecj...@gmail.com on 22 Dec 2011 at 2:13

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1112.

Original comment by kinyelo@gmail.com on 24 Dec 2011 at 4:01