Thank you for your prompt reply. My project depends on 3.1.M1 release, I
removed
3.0 package. I unzip cayenne package and decompiled QueryLogger;
public static void setLogger(JdbcEventLogger logger)
{
logger = logger;
}
I see CommonsJdbcEventLogger is a JdbcEventLogger. There should'nt be any
error. I didnt understand. I may try on my other machine also ...
________________________________
From: Andrus Adamchik <[email protected]>
To: [email protected]
Sent: Tue, March 1, 2011 4:18:54 PM
Subject: Re: java.lang.NoSuchMethodError:
org.apache.cayenne.access.QueryLogger.setLogger(Lorg/apache/cayenne/log/JdbcEventLogger;)V
Are you sure you don't have Cayenne 3.0 in the classpath?
> ServerModule sends CommonsJdbcEventLogger but QueryLogger receives that param;
> public static void setLogger(JdbcEventLogger logger)
>
>
> But how the cayenne could be compiled is mystery for me. Any idea?
CommonsJdbcEventLogger implements JdbcEventLogger
Andrus
On Mar 1, 2011, at 4:15 PM, Erdinc wrote:
> Hi,
> I just downloaded v 3.1M1. When I try to create ServerRuntime with the
command;
>
> new ServerRuntime("cayenne.xml");
>
>
> It gives the error on the subject line;
>
> Caused by: java.lang.NoSuchMethodError:
>org.apache.cayenne.access.QueryLogger.setLogger(Lorg/apache/cayenne/log/JdbcEventLogger;)V
>V
>
> at
>org.apache.cayenne.configuration.server.ServerModule.configure(ServerModule.java:87)
>)
>
> at org.apache.cayenne.di.spi.DefaultInjector.<init>(DefaultInjector.java:65)
> at org.apache.cayenne.di.DIBootstrap.createInjector(DIBootstrap.java:38)
> at
> org.apache.cayenne.configuration.CayenneRuntime.<init>(CayenneRuntime.java:92)
> at
>org.apache.cayenne.configuration.server.ServerRuntime.<init>(ServerRuntime.java:50)
>)
>
>
> I think there is problem in ServerModule;
>
> CommonsJdbcEventLogger logger = new CommonsJdbcEventLogger();
> QueryLogger.setLogger(logger);
>
> ServerModule sends CommonsJdbcEventLogger but QueryLogger receives that param;
> public static void setLogger(JdbcEventLogger logger)
>
>
> But how the cayenne could be compiled is mystery for me. Any idea?
>
>
>
> ---------------------------------------------------
> http://www.nofailtime.com
> Application monitoring
> ---------------------------------------------------
>
>