You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Linus Kamb <li...@noaa.gov> on 2012/04/25 20:09:45 UTC

jetty logging error

Apologies for a "newbie" question...

I am getting a NoSuchMethodException trying to run a simple server
stand-alone within Eclipse.

I was wanting to get back in to using CXF for a new project, so I
downloaded the latest 2.6.0 release.

Since it's been a while since my last go with CXF, I tried starting with a
very basic "Hello, World" type echo server, running stand-alone from within
Eclipse.

However, I am getting the following exception:

Apr 25, 2012 10:31:48 AM org.apache.cxf.endpoint.ServerImpl initDestination

INFO: Setting the server's publish address to be http://localhost:9001/

Exception in thread "main" java.lang.NoSuchMethodError:
org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V

at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:601
)

at org.eclipse.jetty.util.log.JettyAwareLogger.warn(
JettyAwareLogger.java:425)

at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:64)

at org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed(
AbstractLifeCycle.java:199)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
AbstractLifeCycle.java:69)

at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(
JettyHTTPServerEngine.java:372)

at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(
JettyHTTPDestination.java:171)

at org.apache.cxf.transport.AbstractObservable.setMessageObserver(
AbstractObservable.java:48)

at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(
AbstractBaseBindingFactory.java:97)

at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)

at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(
JAXRSServerFactoryBean.java:185)

at gov.noaa.pmel.tsunami.server.admin.CxfServer.startup(CxfServer.java:25)

at gov.noaa.pmel.tsunami.server.admin.CxfServer.main(CxfServer.java:34)


(damn. sorry about the formatting.)


I tried going back to the 2.5 release, and I've tried using different
versions of jetty and slf4j, but I they have all ended with the same
exception.

Looking at jetty and slf4j source, something isn't right, as I don't find
either a use of the above method in jetty, or an slf4j version that *has*
that method.  (Not that I've looked at every version of each.)

I have tried to use just a minimal set of required jars from cxf, based on
the WHICH_JARS guide.


Any ideas?


thanks,

Linus

Re: jetty logging error

Posted by Linus Kamb <li...@noaa.gov>.
Hi Daniel.

Thanks for your response.

I guess I was confused by the method signature in the exception, in
particular the ...;ILjava/lang/String;... part.  I would have thought that
there should have been a semi-colon after the 'I', but perhaps that isn't
the case.  That would indeed match the interface method signature.

So I guess I don't  understand how/why it is failing.  Adding every jar in
the distro to the classpath doesn't help.  I suppose perhaps it's my
eclipse environment somehow, or some dumb thing I've done.

Oh well.  I'll try to figure it out later.  Sorry for the noise, and thanks
for your response.

Linus

On Wed, Apr 25, 2012 at 12:03 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> If I grab:
>
> http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-
> sources.jar
>
> and look at the LocationAwareLogger class in there, I do see:
>
> public void log(Marker marker, String fqcn, int level, String message,
> Object[] argArray, Throwable t);
>
> which would match that signature.   Thus, I'm not sure what you are seeing
> that would cause this.
>
> Dan
>
>
>
> On Wednesday, April 25, 2012 11:09:45 AM Linus Kamb wrote:
> > Apologies for a "newbie" question...
> >
> > I am getting a NoSuchMethodException trying to run a simple server
> > stand-alone within Eclipse.
> >
> > I was wanting to get back in to using CXF for a new project, so I
> > downloaded the latest 2.6.0 release.
> >
> > Since it's been a while since my last go with CXF, I tried starting with
> a
> > very basic "Hello, World" type echo server, running stand-alone from
> > within Eclipse.
> >
> > However, I am getting the following exception:
> >
> > Apr 25, 2012 10:31:48 AM org.apache.cxf.endpoint.ServerImpl
> > initDestination
> >
> > INFO: Setting the server's publish address to be http://localhost:9001/
> >
> > Exception in thread "main" java.lang.NoSuchMethodError:
> >
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;
> > ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> >
> > at
> > org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:601
> > )
> >
> > at org.eclipse.jetty.util.log.JettyAwareLogger.warn(
> > JettyAwareLogger.java:425)
> >
> > at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:64)
> >
> > at org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed(
> > AbstractLifeCycle.java:199)
> >
> > at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
> > AbstractLifeCycle.java:69)
> >
> > at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(
> > JettyHTTPServerEngine.java:372)
> >
> > at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(
> > JettyHTTPDestination.java:171)
> >
> > at org.apache.cxf.transport.AbstractObservable.setMessageObserver(
> > AbstractObservable.java:48)
> >
> > at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(
> > AbstractBaseBindingFactory.java:97)
> >
> > at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)
> >
> > at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(
> > JAXRSServerFactoryBean.java:185)
> >
> > at
> gov.noaa.pmel.tsunami.server.admin.CxfServer.startup(CxfServer.java:25)
> >
> > at gov.noaa.pmel.tsunami.server.admin.CxfServer.main(CxfServer.java:34)
> >
> >
> > (damn. sorry about the formatting.)
> >
> >
> > I tried going back to the 2.5 release, and I've tried using different
> > versions of jetty and slf4j, but I they have all ended with the same
> > exception.
> >
> > Looking at jetty and slf4j source, something isn't right, as I don't find
> > either a use of the above method in jetty, or an slf4j version that *has*
> > that method.  (Not that I've looked at every version of each.)
> >
> > I have tried to use just a minimal set of required jars from cxf, based
> on
> > the WHICH_JARS guide.
> >
> >
> > Any ideas?
> >
> >
> > thanks,
> >
> > Linus
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: jetty logging error

Posted by Daniel Kulp <dk...@apache.org>.
If I grab:

http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4-
sources.jar   

and look at the LocationAwareLogger class in there, I do see:

public void log(Marker marker, String fqcn, int level, String message, 
Object[] argArray, Throwable t);

which would match that signature.   Thus, I'm not sure what you are seeing 
that would cause this.

Dan



On Wednesday, April 25, 2012 11:09:45 AM Linus Kamb wrote:
> Apologies for a "newbie" question...
> 
> I am getting a NoSuchMethodException trying to run a simple server
> stand-alone within Eclipse.
> 
> I was wanting to get back in to using CXF for a new project, so I
> downloaded the latest 2.6.0 release.
> 
> Since it's been a while since my last go with CXF, I tried starting with a
> very basic "Hello, World" type echo server, running stand-alone from
> within Eclipse.
> 
> However, I am getting the following exception:
> 
> Apr 25, 2012 10:31:48 AM org.apache.cxf.endpoint.ServerImpl
> initDestination
> 
> INFO: Setting the server's publish address to be http://localhost:9001/
> 
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;
> ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
> 
> at
> org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:601
> )
> 
> at org.eclipse.jetty.util.log.JettyAwareLogger.warn(
> JettyAwareLogger.java:425)
> 
> at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:64)
> 
> at org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed(
> AbstractLifeCycle.java:199)
> 
> at org.eclipse.jetty.util.component.AbstractLifeCycle.start(
> AbstractLifeCycle.java:69)
> 
> at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(
> JettyHTTPServerEngine.java:372)
> 
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(
> JettyHTTPDestination.java:171)
> 
> at org.apache.cxf.transport.AbstractObservable.setMessageObserver(
> AbstractObservable.java:48)
> 
> at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(
> AbstractBaseBindingFactory.java:97)
> 
> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)
> 
> at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(
> JAXRSServerFactoryBean.java:185)
> 
> at gov.noaa.pmel.tsunami.server.admin.CxfServer.startup(CxfServer.java:25)
> 
> at gov.noaa.pmel.tsunami.server.admin.CxfServer.main(CxfServer.java:34)
> 
> 
> (damn. sorry about the formatting.)
> 
> 
> I tried going back to the 2.5 release, and I've tried using different
> versions of jetty and slf4j, but I they have all ended with the same
> exception.
> 
> Looking at jetty and slf4j source, something isn't right, as I don't find
> either a use of the above method in jetty, or an slf4j version that *has*
> that method.  (Not that I've looked at every version of each.)
> 
> I have tried to use just a minimal set of required jars from cxf, based on
> the WHICH_JARS guide.
> 
> 
> Any ideas?
> 
> 
> thanks,
> 
> Linus
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com