You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Reul, Q. H." <q....@abdn.ac.uk> on 2008/09/09 11:26:08 UTC

log4j 1.2.15 + jar

Hi,

I have added the jar file to my manifest before making a jar of my application. I then tried to use the resulting Jar file but I get the following error.

P:\eclipse\workshop\OntologyAlignment>java -jar KOSAlign.jar parameters.txt Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/LogM anager
        at org.abdn.align.Aligner.<clinit>(Aligner.java:42)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.LogManager
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 1 more

The entry in the manifest is as follow:
Class-Path: lib/log4j-1.2.15.jar lib/owlapi-bin.jar lib/SKOS2OWL.jar lib/FaCTpp-JavaAPI-v1.1.11.jar lib/FaCTpp-OWLAPI-v1.1.11.jar lib/secondstring.jar

Does anyone know what could cause the problem?

Regards,

Quentin

******************************************
* Quentin H. Reul                        *
* PhD Research Student                   *
* Department of Computing Science        *
* University of Aberdeen, King's College *
* Room 238 in the Meston Building        *
* ABERDEEN AB24 3UE                      *
* Phone: +44 (0)1224 27 4485             *
* http://www.csd.abdn.ac.uk/~qreul       *
******************************************



The University of Aberdeen is a charity registered in Scotland, No SC013683.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: log4j 1.2.15 + jar

Posted by "Reul, Q. H." <q....@abdn.ac.uk>.
Hi,

The "LogM anager" is caused by LogManager to be written in two lines in my kernel. I have run the application without any problems within eclipse. The line 32 has the following statement:

        static Logger rootLogger = LogManager.getRootLogger();

I'm not sure why this problem only occurs with the jar file.

Cheers,

Quentin

-----Original Message-----
From: Curt Arnold [mailto:carnold@apache.org]
Sent: 09 September 2008 16:08
To: Log4J Users List
Subject: Re: log4j 1.2.15 + jar


On Sep 9, 2008, at 4:26 AM, Reul, Q. H. wrote:

> Hi,
>
> I have added the jar file to my manifest before making a jar of my
> application. I then tried to use the resulting Jar file but I get
> the following error.
>
> P:\eclipse\workshop\OntologyAlignment>java -jar KOSAlign.jar
> parameters.txt Exception in thread "main"
> java.lang.NoClassDefFoundError: org/apache/log4j/LogM anager
>        at org.abdn.align.Aligner.<clinit>(Aligner.java:42)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.log4j.LogManager
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>        ... 1 more
>
> The entry in the manifest is as follow:
> Class-Path: lib/log4j-1.2.15.jar lib/owlapi-bin.jar lib/SKOS2OWL.jar
> lib/FaCTpp-JavaAPI-v1.1.11.jar lib/FaCTpp-OWLAPI-v1.1.11.jar lib/
> secondstring.jar
>
> Does anyone know what could cause the problem?
>
> Regards,
>
> Quentin


There appears to be a stray blank in the class name "LogM anager" at
least in the stack trace as copied here.  What is at line 42 of
Aligner.java and is there any chance that the class name got mangled.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org



The University of Aberdeen is a charity registered in Scotland, No SC013683.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j 1.2.15 + jar

Posted by Curt Arnold <ca...@apache.org>.
On Sep 9, 2008, at 4:26 AM, Reul, Q. H. wrote:

> Hi,
>
> I have added the jar file to my manifest before making a jar of my  
> application. I then tried to use the resulting Jar file but I get  
> the following error.
>
> P:\eclipse\workshop\OntologyAlignment>java -jar KOSAlign.jar  
> parameters.txt Exception in thread "main"  
> java.lang.NoClassDefFoundError: org/apache/log4j/LogM anager
>        at org.abdn.align.Aligner.<clinit>(Aligner.java:42)
> Caused by: java.lang.ClassNotFoundException:  
> org.apache.log4j.LogManager
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>        ... 1 more
>
> The entry in the manifest is as follow:
> Class-Path: lib/log4j-1.2.15.jar lib/owlapi-bin.jar lib/SKOS2OWL.jar  
> lib/FaCTpp-JavaAPI-v1.1.11.jar lib/FaCTpp-OWLAPI-v1.1.11.jar lib/ 
> secondstring.jar
>
> Does anyone know what could cause the problem?
>
> Regards,
>
> Quentin


There appears to be a stray blank in the class name "LogM anager" at  
least in the stack trace as copied here.  What is at line 42 of  
Aligner.java and is there any chance that the class name got mangled.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org