Log4JCategoryLog does not implement Log
I am trying out my first maven build. It's a very simple maven.xml file using xdoclet. Here's the file: When I run "maven jar", I get the following exception: File.. file:/home/tmccune/.maven/plugins/maven-xdoclet-plugin-1.2b2/ Element... deploymentdescriptor Line.. 5419 Column 39 org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log It looks like there is a class-loading bug somewhere and maven is trying to use 2 different class loaders for Log and Log4JCategoryLog. Has anyone seen this before? I'm kind of surprised that I can't get such a simple build to work, so I'm guessing I must just be doing something stupid here... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Log4JCategoryLog does not implement Log
Can you raise this in Jira? -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/ Paul Libbrecht <[EMAIL PROTECTED]> wrote on 13/08/2003 01:32:08 AM: > I've had this problem and... guess what... it's a problem of > classloading. At least I'm pretty sure of it. > > I couldn't figure it out but I was implementing my own classloader which > was a new thing for me. > The same happens with sax create drivers methods... > > (I was doing this in jEdit). > > I would look forward to a solution! > > Paul > > > Simon Matic Langford wrote: > > I've not seen this with maven, but it certainly happens with graphical > > junit, I > > think this is a problem with commons-logging, as we're having to work > > around it > > on our current project: > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm > > l > > > > I'm not sure how you would fix it on maven tho, sorry. > > > > simon > > > > The information contained in this e-mail is intended only for the person > > or > > entity to which it is addressed and may contain confidential and/or > > privileged material. If You are not the intended recipient of this > > e-mail, > > the use of this information or any disclosure, copying or distribution > > is > > Prohibited and may be unlawful. If you received this in error, please > > contact the sender and delete the material from any computer. The views > > expressed in this e-mail may not necessarily be the views of The PCMS > > Group > > plc and should not be taken as authority to carry out any instruction > > contained. > > > > > > > >>-Original Message- > >>From: Tim McCune [mailto:[EMAIL PROTECTED] > >>Sent: 12 August 2003 16:02 > >>To: [EMAIL PROTECTED] > >>Subject: Log4JCategoryLog does not implement Log > >> > >> > >>I am trying out my first maven build. It's a very simple > >>maven.xml file > >>using xdoclet. Here's the file: > >> > >> > >> > >> > >> > >> > >> > >>When I run "maven jar", I get the following exception: > >> > >>File.. > >>file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ > >> > >>Element... deploymentdescriptor > >>Line.. 5419 > >>Column 39 > >>org.apache.commons.logging.LogConfigurationException: > >>org.apache.commons.logging.LogConfigurationException: Class > >>org.apache.commons.logging.impl.Log4JCategoryLog does not > >>implement Log > >> > >>It looks like there is a class-loading bug somewhere and > >>maven is trying > >>to use 2 different class loaders for Log and Log4JCategoryLog. Has > >>anyone seen this before? I'm kind of surprised that I can't > >>get such a > >>simple build to work, so I'm guessing I must just be doing something > >>stupid here... > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
RE: Log4JCategoryLog does not implement Log
I've not seen this with maven, but it certainly happens with graphical junit, I think this is a problem with commons-logging, as we're having to work around it on our current project: http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm l I'm not sure how you would fix it on maven tho, sorry. simon The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If You are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is Prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. The views expressed in this e-mail may not necessarily be the views of The PCMS Group plc and should not be taken as authority to carry out any instruction contained. > -Original Message- > From: Tim McCune [mailto:[EMAIL PROTECTED] > Sent: 12 August 2003 16:02 > To: [EMAIL PROTECTED] > Subject: Log4JCategoryLog does not implement Log > > > I am trying out my first maven build. It's a very simple > maven.xml file > using xdoclet. Here's the file: > > > > > > > > When I run "maven jar", I get the following exception: > > File.. > file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ > > Element... deploymentdescriptor > Line.. 5419 > Column 39 > org.apache.commons.logging.LogConfigurationException: > org.apache.commons.logging.LogConfigurationException: Class > org.apache.commons.logging.impl.Log4JCategoryLog does not > implement Log > > It looks like there is a class-loading bug somewhere and > maven is trying > to use 2 different class loaders for Log and Log4JCategoryLog. Has > anyone seen this before? I'm kind of surprised that I can't > get such a > simple build to work, so I'm guessing I must just be doing something > stupid here... > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Log4JCategoryLog does not implement Log
Well that sounds exactly it: the test is actually a reflection-based instanceof (Class.isAssignableFrom) which answers false hence complains... So the trick would be to load log4j in the same classloader as jakarta-log, is that correct ? Paul Tim McCune wrote: Here's a little more explanation on what I'm guessing is going on (I've been through this with JBoss in the past.) A class in Java is identified by the combination of the class name and the classloader that loaded it. Running maven with the -X switch seems to show 2 classloaders; the "ant loader" and the "parent loader". I see the line: [DEBUG] Class org.apache.commons.logging.Log loaded from ant loader But I don't get a debug line about which loader is being used to load Log4JCategoryLog. If that class is getting loaded by the parent loader, then I think we could end up with a ClassCastException somewhere like this: Log foo = (Log) new Log4JCategoryLog(); because Log4JCategoryLog implements (Log ^ parent) but not (Log ^ ant) (Using the notation (Class ^ ClassLoader)). Not that I've opened up a single line of code. This is just what it smells like. I'm still kind of shocked that the very first simple thing I ever tried with Maven is proving this difficult. :) On Tue, 2003-08-12 at 11:32, Paul Libbrecht wrote: I've had this problem and... guess what... it's a problem of classloading. At least I'm pretty sure of it. I couldn't figure it out but I was implementing my own classloader which was a new thing for me. The same happens with sax create drivers methods... (I was doing this in jEdit). I would look forward to a solution! Paul Simon Matic Langford wrote: I've not seen this with maven, but it certainly happens with graphical junit, I think this is a problem with commons-logging, as we're having to work around it on our current project: http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm l I'm not sure how you would fix it on maven tho, sorry. simon The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If You are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is Prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. The views expressed in this e-mail may not necessarily be the views of The PCMS Group plc and should not be taken as authority to carry out any instruction contained. -Original Message- From: Tim McCune [mailto:[EMAIL PROTECTED] Sent: 12 August 2003 16:02 To: [EMAIL PROTECTED] Subject: Log4JCategoryLog does not implement Log I am trying out my first maven build. It's a very simple maven.xml file using xdoclet. Here's the file: When I run "maven jar", I get the following exception: File.. file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ Element... deploymentdescriptor Line.. 5419 Column 39 org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log It looks like there is a class-loading bug somewhere and maven is trying to use 2 different class loaders for Log and Log4JCategoryLog. Has anyone seen this before? I'm kind of surprised that I can't get such a simple build to work, so I'm guessing I must just be doing something stupid here... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Log4JCategoryLog does not implement Log
Filed as MAVEN-678. On Tue, 2003-08-12 at 20:25, [EMAIL PROTECTED] wrote: > Can you raise this in Jira? > -- > dIon Gillard, Multitask Consulting > Blog: http://blogs.codehaus.org/people/dion/ > > > Paul Libbrecht <[EMAIL PROTECTED]> wrote on 13/08/2003 01:32:08 AM: > > > I've had this problem and... guess what... it's a problem of > > classloading. At least I'm pretty sure of it. > > > > I couldn't figure it out but I was implementing my own classloader which > > > was a new thing for me. > > The same happens with sax create drivers methods... > > > > (I was doing this in jEdit). > > > > I would look forward to a solution! > > > > Paul > > > > > > Simon Matic Langford wrote: > > > I've not seen this with maven, but it certainly happens with graphical > > > junit, I > > > think this is a problem with commons-logging, as we're having to work > > > around it > > > on our current project: > > > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm > > > l > > > > > > I'm not sure how you would fix it on maven tho, sorry. > > > > > > simon > > > > > > The information contained in this e-mail is intended only for the > person > > > or > > > entity to which it is addressed and may contain confidential and/or > > > privileged material. If You are not the intended recipient of this > > > e-mail, > > > the use of this information or any disclosure, copying or distribution > > > is > > > Prohibited and may be unlawful. If you received this in error, please > > > contact the sender and delete the material from any computer. The > views > > > expressed in this e-mail may not necessarily be the views of The PCMS > > > Group > > > plc and should not be taken as authority to carry out any instruction > > > contained. > > > > > > > > > > > >>-Original Message- > > >>From: Tim McCune [mailto:[EMAIL PROTECTED] > > >>Sent: 12 August 2003 16:02 > > >>To: [EMAIL PROTECTED] > > >>Subject: Log4JCategoryLog does not implement Log > > >> > > >> > > >>I am trying out my first maven build. It's a very simple > > >>maven.xml file > > >>using xdoclet. Here's the file: > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >>When I run "maven jar", I get the following exception: > > >> > > >>File.. > > >>file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ > > >> > > >>Element... deploymentdescriptor > > >>Line.. 5419 > > >>Column 39 > > >>org.apache.commons.logging.LogConfigurationException: > > >>org.apache.commons.logging.LogConfigurationException: Class > > >>org.apache.commons.logging.impl.Log4JCategoryLog does not > > >>implement Log > > >> > > >>It looks like there is a class-loading bug somewhere and > > >>maven is trying > > >>to use 2 different class loaders for Log and Log4JCategoryLog. Has > > >>anyone seen this before? I'm kind of surprised that I can't > > >>get such a > > >>simple build to work, so I'm guessing I must just be doing something > > >>stupid here... > > >> > > >>- > > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > > >>For additional commands, e-mail: [EMAIL PROTECTED] > > >> > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Log4JCategoryLog does not implement Log
Here's a little more explanation on what I'm guessing is going on (I've been through this with JBoss in the past.) A class in Java is identified by the combination of the class name and the classloader that loaded it. Running maven with the -X switch seems to show 2 classloaders; the "ant loader" and the "parent loader". I see the line: [DEBUG] Class org.apache.commons.logging.Log loaded from ant loader But I don't get a debug line about which loader is being used to load Log4JCategoryLog. If that class is getting loaded by the parent loader, then I think we could end up with a ClassCastException somewhere like this: Log foo = (Log) new Log4JCategoryLog(); because Log4JCategoryLog implements (Log ^ parent) but not (Log ^ ant) (Using the notation (Class ^ ClassLoader)). Not that I've opened up a single line of code. This is just what it smells like. I'm still kind of shocked that the very first simple thing I ever tried with Maven is proving this difficult. :) On Tue, 2003-08-12 at 11:32, Paul Libbrecht wrote: > I've had this problem and... guess what... it's a problem of > classloading. At least I'm pretty sure of it. > > I couldn't figure it out but I was implementing my own classloader which > was a new thing for me. > The same happens with sax create drivers methods... > > (I was doing this in jEdit). > > I would look forward to a solution! > > Paul > > > Simon Matic Langford wrote: > > I've not seen this with maven, but it certainly happens with graphical > > junit, I > > think this is a problem with commons-logging, as we're having to work > > around it > > on our current project: > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm > > l > > > > I'm not sure how you would fix it on maven tho, sorry. > > > > simon > > > > The information contained in this e-mail is intended only for the person > > or > > entity to which it is addressed and may contain confidential and/or > > privileged material. If You are not the intended recipient of this > > e-mail, > > the use of this information or any disclosure, copying or distribution > > is > > Prohibited and may be unlawful. If you received this in error, please > > contact the sender and delete the material from any computer. The views > > expressed in this e-mail may not necessarily be the views of The PCMS > > Group > > plc and should not be taken as authority to carry out any instruction > > contained. > > > > > > > >>-Original Message- > >>From: Tim McCune [mailto:[EMAIL PROTECTED] > >>Sent: 12 August 2003 16:02 > >>To: [EMAIL PROTECTED] > >>Subject: Log4JCategoryLog does not implement Log > >> > >> > >>I am trying out my first maven build. It's a very simple > >>maven.xml file > >>using xdoclet. Here's the file: > >> > >> > >> > >> > >> > >> > >> > >>When I run "maven jar", I get the following exception: > >> > >>File.. > >>file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ > >> > >>Element... deploymentdescriptor > >>Line.. 5419 > >>Column 39 > >>org.apache.commons.logging.LogConfigurationException: > >>org.apache.commons.logging.LogConfigurationException: Class > >>org.apache.commons.logging.impl.Log4JCategoryLog does not > >>implement Log > >> > >>It looks like there is a class-loading bug somewhere and > >>maven is trying > >>to use 2 different class loaders for Log and Log4JCategoryLog. Has > >>anyone seen this before? I'm kind of surprised that I can't > >>get such a > >>simple build to work, so I'm guessing I must just be doing something > >>stupid here... > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Log4JCategoryLog does not implement Log
I've had this problem and... guess what... it's a problem of classloading. At least I'm pretty sure of it. I couldn't figure it out but I was implementing my own classloader which was a new thing for me. The same happens with sax create drivers methods... (I was doing this in jEdit). I would look forward to a solution! Paul Simon Matic Langford wrote: I've not seen this with maven, but it certainly happens with graphical junit, I think this is a problem with commons-logging, as we're having to work around it on our current project: http://www.mail-archive.com/[EMAIL PROTECTED]/msg02939.htm l I'm not sure how you would fix it on maven tho, sorry. simon The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If You are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is Prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. The views expressed in this e-mail may not necessarily be the views of The PCMS Group plc and should not be taken as authority to carry out any instruction contained. -Original Message- From: Tim McCune [mailto:[EMAIL PROTECTED] Sent: 12 August 2003 16:02 To: [EMAIL PROTECTED] Subject: Log4JCategoryLog does not implement Log I am trying out my first maven build. It's a very simple maven.xml file using xdoclet. Here's the file: When I run "maven jar", I get the following exception: File.. file:/home/tmccune/.maven/plugins/maven-> xdoclet-plugin-1.2b2/ Element... deploymentdescriptor Line.. 5419 Column 39 org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log It looks like there is a class-loading bug somewhere and maven is trying to use 2 different class loaders for Log and Log4JCategoryLog. Has anyone seen this before? I'm kind of surprised that I can't get such a simple build to work, so I'm guessing I must just be doing something stupid here... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]