Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D0DAD1001B for ; Thu, 24 Oct 2013 03:41:07 +0000 (UTC) Received: (qmail 73405 invoked by uid 500); 24 Oct 2013 03:41:01 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 73354 invoked by uid 500); 24 Oct 2013 03:41:00 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 73336 invoked by uid 99); 24 Oct 2013 03:40:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 03:40:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gunrockseenu@gmail.com designates 209.85.128.196 as permitted sender) Received: from [209.85.128.196] (HELO mail-ve0-f196.google.com) (209.85.128.196) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 03:40:50 +0000 Received: by mail-ve0-f196.google.com with SMTP id oz11so195395veb.7 for ; Wed, 23 Oct 2013 20:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=l6rWr6AH+Rn2acRbrbtAes+vYGsi3L6bbkjeZzFRBew=; b=emxYqnnxKrNZ53MmAs0E88cG99E+w0QqRRm9i9ySWw42tgimYBQ+vaSSIjAPFn6Ka7 kKd9euo0asTndbJuV7pYvAag23GVe8emRms5i68vvVlrXbZXfDpuTeh28BIkGD5GNXND yYEda2/biAov4H3PRnekaoHVI7a0sSZb9EewfyntQ/38GOOZyJTaswfTKl8ed6amiX50 WsLHMnky2Zw3HTxz/muYzpGYRj9hu1h/p2I/VqlesehnYK/4V17S9a+yJ6d8b2+T0UK6 oDBXBKCXBWsnTMFd9n24rMh35g6WFPgGFkMOAKt6fCWisfbXCSYpIL2EHL4weYQBP2BH fNVA== MIME-Version: 1.0 X-Received: by 10.58.23.33 with SMTP id j1mr249682vef.27.1382586029655; Wed, 23 Oct 2013 20:40:29 -0700 (PDT) Received: by 10.221.58.202 with HTTP; Wed, 23 Oct 2013 20:40:29 -0700 (PDT) In-Reply-To: References: <8D368CE3-316F-4FA8-AB1D-0310D68CA088@gmail.com> Date: Wed, 23 Oct 2013 23:40:29 -0400 Message-ID: Subject: Re: Maven - slf4j noclassdeffound error From: gunrock seenu To: Maven Users List Content-Type: multipart/alternative; boundary=047d7b339df92b4db104e9746508 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b339df92b4db104e9746508 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Also here is the source I see for RouteMatchFactory /* * Copyright 2011- Per Wendel * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package spark.route; /** * RouteMatcherFactory * * @author Per Wendel */ public final class RouteMatcherFactory { /** The logger. */ private static final org.slf4j.Logger LOG =3D org.slf4j.LoggerFactory.getLogger(RouteMatcherFactory.class); private static RouteMatcher routeMatcher =3D null; private RouteMatcherFactory() {} public static synchronized RouteMatcher get() { if (routeMatcher =3D=3D null) { LOG.debug("creates RouteMatcher"); routeMatcher =3D new SimpleRouteMatcher(); } return routeMatcher; } } On Wed, Oct 23, 2013 at 11:35 PM, gunrock seenu wro= te: > I tried this pom.xml, that did not help either its just seems to be > missing something . > > http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=3D"http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > > 4.0.0 > > com.tengen > M101J > 1.0-SNAPSHOT > jar > > M101J > http://maven.apache.org > > > UTF-8 > > > > > > org.mongodb > mongo-java-driver > 2.11.3 > > > > > > com.sparkjava > spark-core > 1.1 > > > > org.slf4j > slf4j-api > 1.7.5 > > > > > > junit > junit > 4.9 > test > > > > > > > > > On Wed, Oct 23, 2013 at 11:27 PM, Seenu wrote: > >> It is referenced by spark core >> >> I can see slf4j-API getting pulled by the project in IntelliJ >> >> I also tried including the dependency in the Pom.xml. >> >> The noclassdeffound is still showing. >> >> Sent from my iPhone >> >> On Oct 23, 2013, at 10:22 AM, Kevin Krumwiede wrote: >> >> > I don't see any reference to slf4j in your pom or your code. Are you >> > sure you posted the right thing? >> > >> > On 10/23/13, Seenu wrote: >> >> I am using intellij and maven, >> >> >> >> I have used the following pom.xml : >> >> >> >> > >> xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" >> >> >> >> xsi:schemaLocation=3D" >> http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0= .xsd >> "> >> >> >> >> 4.0.0 >> >> >> >> com.tengen >> >> M101J >> >> 1.0-SNAPSHOT >> >> jar >> >> >> >> M101J >> >> http://maven.apache.org >> >> >> >> >> >> UTF-8 >> >> >> >> >> >> >> >> >> >> >> >> org.mongodb >> >> mongo-java-driver >> >> 2.11.3 >> >> >> >> >> >> >> >> >> >> >> >> com.sparkjava >> >> spark-core >> >> 1.1 >> >> >> >> >> >> >> >> junit >> >> junit >> >> 4.9 >> >> test >> >> >> >> >> >> >> >> >> >> >> >> ------------------------------ >> >> >> >> package com.tengen; >> >> >> >> >> >> import spark.Request; >> >> import spark.Response; >> >> import spark.Route; >> >> import spark.Spark; >> >> >> >> /** >> >> * Created with IntelliJ IDEA. >> >> * User: seenu >> >> * Date: 10/19/13 >> >> * Time: 7:44 PM >> >> * To change this template use File | Settings | File Templates. >> >> */ >> >> public class HelloWorldSparkStyle { >> >> public static void main(String[] args){ >> >> Spark.get(new Route("/") { >> >> @Override >> >> public Object handle(Request request, Response response) { >> >> return "Hello World from Spark!"; //To change body of >> >> implemented methods use File | Settings | File Templates. >> >> } >> >> }); >> >> } >> >> } >> >> >> >> >> >> >> >> >> >> >> >> ---------------------------------- >> >> >> >> >> >> when I run, via intellij here is what I see, >> >> >> >> /usr/lib/jvm/jdk1.7.0_40/bin/java -Didea.launcher.port=3D7536 >> >> -Didea.launcher.bin.path=3D/home/sree/IDEA/idea-IC-129.1359/bin >> >> -Dfile.encoding=3DUTF-8 -classpath >> >> >> /usr/lib/jvm/jdk1.7.0_40/jre/lib/jfr.jar:/usr/lib/jvm/jdk1.7.0_40/jre/li= b/jsse.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/deploy.jar:/usr/lib/jvm/jdk1.7.= 0_40/jre/lib/javaws.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/management-agent.j= ar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.7.0_40/j= re/lib/jce.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/jfxrt.jar:/usr/lib/jvm/jdk1= .7.0_40/jre/lib/plugin.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/resources.jar:/= usr/lib/jvm/jdk1.7.0_40/jre/lib/rt.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext= /localedata.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/sunpkcs11.jar:/usr/lib= /jvm/jdk1.7.0_40/jre/lib/ext/dnsns.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext= /sunec.jar:/usr/lib/jvm/jdk1.7.0_40/jre/lib/ext/sunjce_provider.jar:/usr/li= b/jvm/jdk1.7.0_40/jre/lib/ext/zipfs.jar:/home/sree/M101J/out/production/mai= n:/home/sree/.m2/repository/org/mongodb/mongo-java-driver/2.11.3/mongo-java= -driver-2.11.3.jar:/home/sree/.m2/repository/com/sparkjava/spark-core/1.1/s= park-core-1.1.jar:/home/sree/IDEA/idea-IC-129.1359/lib/idea_rt.jar >> >> com.intellij.rt.execution.application.AppMain >> >> com.tengen.HelloWorldSparkStyle >> >> Exception in thread "main" java.lang.NoClassDefFoundError: >> >> org/slf4j/LoggerFactory >> >> at >> spark.route.RouteMatcherFactory.(RouteMatcherFactory.java:27) >> >> >> >> at spark.Spark.init(Spark.java:299) >> >> at spark.Spark.addRoute(Spark.java:282) >> >> at spark.Spark.get(Spark.java:168) >> >> at >> com.tengen.HelloWorldSparkStyle.main(HelloWorldSparkStyle.java:18) >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >> at >> >> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav= a:57) >> >> >> >> at >> >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor= Impl.java:43) >> >> >> >> at java.lang.reflect.Method.invoke(Method.java:606) >> >> at >> com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) >> >> >> >> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory >> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >> >> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >> >> at java.security.AccessController.doPrivileged(Native Method) >> >> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >> >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> >> ... 10 more >> >> >> >> Process finished with exit code 1 >> >> >> >> >> >> ----------------------------- >> >> >> >> >> >> what could be wrong here? can someone please point me whre to look? I >> was >> >> hoping maven would put the slf4j-api into the classpath when I add >> >> dependency but it is not. >> >> >> >> Sent from my iPhone >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> > For additional commands, e-mail: users-help@maven.apache.org >> > >> > > --047d7b339df92b4db104e9746508--