Problems with log4j

Al Niessner Al.Niessner@jpl.nasa.gov
Wed Jan 3 20:12:00 GMT 2007


I am trying to build up a standalone executable with gcj 4.1.0. I am in
the process of building all of the JAR files that I include in my
classpath when I do a 'java -cp ... MyClass' where 'java -version' gives
me:

java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

Knowing that I have all that I need from a Java perspective, I then try
to compile the JAR files that are in my class path. The first one
compiles just fine because it depends on nothing else. The second one is
log4j (1.2.8) and I get this error:
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.MBeanRegistration
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.DynamicMBean
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.DynamicMBean
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.DynamicMBean
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.MBeanRegistration
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.MBeanRegistration
org/apache/log4j/jmx/AbstractDynamicMBean.java: In class
'org.apache.log4j.jmx.AbstractDynamicMBean':
org/apache/log4j/jmx/AbstractDynamicMBean.java: In method
'org.apache.log4j.jmx.AbstractDynamicMBean.getAttributes(java.lang.String[])':
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: error: cannot find
file for class javax.management.RuntimeOperationsException
org/apache/log4j/jmx/AbstractDynamicMBean.java:0: confused by earlier
errors, bailing out

So, I installed a "newer" version (1.2.12) of the same library and now
get:
org/apache/log4j/net/SMTPAppender.java: In class
'org.apache.log4j.net.SMTPAppender':
org/apache/log4j/net/SMTPAppender.java: In method
'org.apache.log4j.net.SMTPAppender.activateOptions()':
org/apache/log4j/net/SMTPAppender.java:0: error: cannot find file for
class javax.mail.internet.MimeMessage
org/apache/log4j/net/SMTPAppender.java:0: confused by earlier errors,
bailing out

Has anyone compiled log4j with gcj and, if so, which version of log4j
and gcj?

I know this is not a gcj problem directly, but I was hoping that someone
on this group may be using the new log4j with gcj and would lend some
guidance.

-- 
Al Niessner
818.354.0859

All opinions stated above are mine and do not necessarily reflect those
of JPL or NASA.

--------
|  dS  | >= 0
--------




More information about the Java mailing list