abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasn...@gmail.com
Subject Re: Missing constructor in LRUCacheFactory?
Date Fri, 22 May 2009 14:54:50 GMT
Hmmm sorry about that. For now, adding the do nothing constructor is the way to go. Next week
I will make the discover code a bit more intelligent. 
------Original Message------
From: Ugo Cei
To: dev@abdera.apache.org
ReplyTo: dev@abdera.apache.org
Subject: Missing constructor in LRUCacheFactory?
Sent: May 22, 2009 1:19 AM

I have the following problem while trying to instantiate AbderaClient,  
using the latest svn trunk checkout (r777425):

Caused by: java.lang.NoSuchMethodException:  
org 
.apache 
.abdera 
.protocol.client.cache.LRUCacheFactory.<init>(org.apache.abdera.Abdera)
	at java.lang.Class.getConstructor0(Class.java:2678)
	at java.lang.Class.getConstructor(Class.java:1629)
	at org.apache.abdera.util.Discover.load(Discover.java:218)
	at org.apache.abdera.util.Discover.locate(Discover.java:47)
	... 197 more

Apparently, the following method in AbderaClient will use reflection  
to locate a constructor for LRUCacheFactory that takes Abdera as an  
agument:

   private CacheFactory initCacheFactory() {
     CacheFactory cacheFactory =
       (CacheFactory)Discover.locate(
         CacheFactory.class.getName(),
         LRUCacheFactory.class.getName(),
         abdera);
     return cacheFactory;
   }

However, there is no such constructor in the current version of  
LRUCacheFactory. I added one as a workaround, which does nothing, but  
it does not look like the optimal solution. Any hints?

	Ugo




Sent from my Verizon Wireless BlackBerry
Mime
View raw message