You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Lo...@log-net.com on 2006/02/21 18:21:20 UTC

Re: JBoss 4 vs FOP commons logging clash - solved

Thanks for the direction and the JCL wiki.  It helped in debugging what 
was going on.

OK, I have made some progress and have gotten them to work together.  My 
java classpath when running JBoss now looks like this (omitting 
unneccessary jars):

\prod_jars_091_14\avalon-framework-4.2.0.jar;\prod_jars_091_14\batik-all-1.6.jar;\prod_jars_091_14\serializer-2.7.0.jar;\prod_jars_091_14\xalan-2.7.0.jar;\prod_jars_091_14\xercesImpl-2.7.1.jar;\prod_jars_091_14\xml-apis-1.3.02.jar;\prod_jars_091_14\fop.jar;C:\jdk14\lib\tools.jar;C:\jboss-4.0.3SP1\bin\\run.jar;;\prod_jars_091_14\commons-io-1.1.jar;\prod_jars_091_14\commons-logging-1.0.4.jar;C:\jboss-4.0.3SP1\lib\log4j-boot.jar

The final change that seemed to fix this is the addition of the 
log4j-boot.jar directly to the classpath.  It exists in the root lib 
directory and the server's lib directory has the additional log4j.jar.

I have not tried any different ordering, but at least this gets it to boot 
and I can now render PDFs under 0.91.  I can probably move the commons and 
log4j jars before the tools.jar, but I have not had a chance to experiment 
with it. 

I'm not saying that this is the best solution, but it seems to be a 
solution.  If I find anything else I will post it.

-Lou


Jeremias Maerki <de...@jeremias-maerki.ch> wrote on 02/17/2006 15:37:03:

> Have a look at the JCL Wiki. Maybe that'll help you. There's something
> specific to JBoss. It's probably all about the right placement of the
> JARs.
> http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions
> 
> I've heard a number of time that some people talk bad about JCL because
> of class loading problems. I'm not familiar with the details. Maybe you
> stumbled upon one of these problems.
> 
> Please keep us informed about any solutions you find for this. Maybe I
> have some time on Sunday to download, install and try JBoss.
> 
> On 17.02.2006 20:28:12 Louis.Masters wrote:
> > I'm running into a strange logging jar file issue when trying to run 
FOP 
> > 0.91 under JBoss 4.0.3.  If I include the FOP logging jar 
> > (commons-logging-1.0.4.jar) in my java classpath and then boot JBoss, 
I 
> > get the following boot error:
> > 
> > <snip/>
> > Caused by: org.apache.commons.logging.LogConfigurationException: 
> > org.apache.commons.logging.LogConfigurationException: No suitable Log 
> > constructor [Ljava.lang.Class;@c789fb for 
> > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by 
> > org.apache.commons.logging.LogConfigurationException: No suitable Log 
> > constructor [Ljava.lang.Class;@c789fb for 
> > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > java.lang.NoClassDefFoundError: org/apache/log4j/Category))
> >         at 
> > org.apache.commons.logging.impl.LogFactoryImpl.
> newInstance(LogFactoryImpl.java:543)
> >         at 
> > org.apache.commons.logging.impl.LogFactoryImpl.
> getInstance(LogFactoryImpl.java:235)
> > <snip/>
> > 
> > When I use JBoss's logging jar (1.0.3) and omit the two 
commons-logging 
> > jars from my classpath, JBoss boots OK, but I get the following error 
from 
> > FOP:
> > 
> > <snip/>
> > at 
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> processConnection(Http11Protocol.java:744)
> >     at 
> > org.apache.tomcat.util.net.PoolTcpEndpoint.
> processSocket(PoolTcpEndpoint.java:527)
> >     at 
> > org.apache.tomcat.util.net.MasterSlaveWorkerThread.
> run(MasterSlaveWorkerThread.java:112)
> >     at java.lang.Thread.run(Thread.java:536)Caused by: 
> > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> >     at org.apache.fop.render.RendererFactory.(RendererFactory.java:47)
> >     at org.apache.fop.apps.FOUserAgent.(FOUserAgent.java:83)
> >     at com.lognet.reports.engine.FOPGenerator.(FOPGenerator.java:68)
> >     at 
com.lognet.reports.engine.LNReport.renderReport(LNReport.java:1058)
> > <snip/>
> > 
> > Does someone know how to get the two implementations to "play nice" 
with 
> > one another?  I'm not that familiar with commons logging so I am a bit 

> > lost.
> > 
> > Thanks,
> > Lou
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

Re: JBoss 4 vs FOP commons logging clash - solved

Posted by Lo...@log-net.com.
The extra '/' is from JBoss, but the extra ';' is from my poor cutting and 
pasting skills.

I have rearranged the jars so they look nice and have run some tests on 
it.  Most of the issues come from either my non-compliance to the FO spec 
or minor migration pains.  Once I have sorted that out, I'm going to do 
some hefty regression testing to evaluate 0.20.3 versus 0.91 performance. 
So far so good.

As for the wiki, I would be glad to do it.

-Lou


Clay Leeds <we...@mac.com> wrote on 02/21/2006 13:01:14:

> I noticed that there/s an extra / and a ; here:
> 
> C:\jboss-4.0.3SP1\bin\\run.jar;;\
> 
> I don't know if it affects anything, but thought I should point it out.
> 
> Also, once you iron out the details, it would be great if you could 
> add a HowTo page to the FOP wiki:
> 
> http://wiki.apache.org/xmlgraphics-fop/
> 
> Thanks!
> 
> Web Maestro Clay
> 
> On Feb 21, 2006, at 9:21 AM, Louis.Masters@log-net.com wrote:
> Thanks for the direction and the JCL wiki.  It helped in debugging 
> what was going on. 
> 
> OK, I have made some progress and have gotten them to work together.
>  My java classpath when running JBoss now looks like this (omitting 
> unneccessary jars): 
> 
> \prod_jars_091_14\avalon-framework-4.2.0.jar;
> \prod_jars_091_14\batik-all-1.6.jar;\prod_jars_091_14\serializer-2.
> 7.0.jar;\prod_jars_091_14\xalan-2.7.0.jar;
> \prod_jars_091_14\xercesImpl-2.7.1.jar;\prod_jars_091_14\xml-apis-1.
> 3.02.jar;\prod_jars_091_14\fop.jar;C:\jdk14\lib\tools.jar;C:
> \jboss-4.0.3SP1\bin\\run.jar;;\prod_jars_091_14\commons-io-1.1.jar;
> \prod_jars_091_14\commons-logging-1.0.4.jar;C:\jboss-4.0.
> 3SP1\lib\log4j-boot.jar 
> 
> The final change that seemed to fix this is the addition of the 
> log4j-boot.jar directly to the classpath.  It exists in the root lib
> directory and the server's lib directory has the additional log4j.jar. 
> 
> I have not tried any different ordering, but at least this gets it 
> to boot and I can now render PDFs under 0.91.  I can probably move 
> the commons and log4j jars before the tools.jar, but I have not had 
> a chance to experiment with it. 
> 
> I'm not saying that this is the best solution, but it seems to be a 
> solution.  If I find anything else I will post it. 
> 
> -Lou 
> 
> 
> Jeremias Maerki <de...@jeremias-maerki.ch> wrote on 02/17/2006 15:37:03:
> 
> > Have a look at the JCL Wiki. Maybe that'll help you. There's something
> > specific to JBoss. It's probably all about the right placement of the
> > JARs.
> > 
http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions
> > 
> > I've heard a number of time that some people talk bad about JCL 
because
> > of class loading problems. I'm not familiar with the details. Maybe 
you
> > stumbled upon one of these problems.
> > 
> > Please keep us informed about any solutions you find for this. Maybe I
> > have some time on Sunday to download, install and try JBoss.
> > 
> > On 17.02.2006 20:28:12 Louis.Masters wrote:
> > > I'm running into a strange logging jar file issue when trying to run 
FOP 
> > > 0.91 under JBoss 4.0.3.  If I include the FOP logging jar 
> > > (commons-logging-1.0.4.jar) in my java classpath and then boot 
JBoss, I 
> > > get the following boot error:
> > > 
> > > <snip/>
> > > Caused by: org.apache.commons.logging.LogConfigurationException: 
> > > org.apache.commons.logging.LogConfigurationException: No suitable 
Log 
> > > constructor [Ljava.lang.Class;@c789fb for 
> > > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > > java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused 
by 
> > > org.apache.commons.logging.LogConfigurationException: No suitable 
Log 
> > > constructor [Ljava.lang.Class;@c789fb for 
> > > org.apache.commons.logging.impl.Log4JLogger (Caused by 
> > > java.lang.NoClassDefFoundError: org/apache/log4j/Category))
> > >         at 
> > > org.apache.commons.logging.impl.LogFactoryImpl.
> > newInstance(LogFactoryImpl.java:543)
> > >         at 
> > > org.apache.commons.logging.impl.LogFactoryImpl.
> > getInstance(LogFactoryImpl.java:235)
> > > <snip/>
> > > 
> > > When I use JBoss's logging jar (1.0.3) and omit the two 
commons-logging 
> > > jars from my classpath, JBoss boots OK, but I get the following 
> error from 
> > > FOP:
> > > 
> > > <snip/>
> > > at 
> > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> > processConnection(Http11Protocol.java:744)
> > >     at 
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.
> > processSocket(PoolTcpEndpoint.java:527)
> > >     at 
> > > org.apache.tomcat.util.net.MasterSlaveWorkerThread.
> > run(MasterSlaveWorkerThread.java:112)
> > >     at java.lang.Thread.run(Thread.java:536)Caused by: 
> > > java.lang.NoClassDefFoundError: 
org/apache/commons/logging/LogFactory
> > >     at 
org.apache.fop.render.RendererFactory.(RendererFactory.java:47)
> > >     at org.apache.fop.apps.FOUserAgent.(FOUserAgent.java:83)
> > >     at com.lognet.reports.engine.FOPGenerator.(FOPGenerator.java:68)
> > >     at 
com.lognet.reports.engine.LNReport.renderReport(LNReport.java:1058)
> > > <snip/>
> > > 
> > > Does someone know how to get the two implementations to "play nice" 
with 
> > > one another?  I'm not that familiar with commons logging so I am a 
bit 
> > > lost.
> > > 
> > > Thanks,
> > > Lou
> > 
> > 
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> 
> Clay Leeds
> webmaestro@mac.com
> 
> My religion is simple. My religion is kindness.
> -- HH Dalai Lama of Tibet

Re: JBoss 4 vs FOP commons logging clash - solved

Posted by Clay Leeds <we...@mac.com>.
I noticed that there/s an extra / and a ; here:

C:\jboss-4.0.3SP1\bin\\run.jar;;\

I don't know if it affects anything, but thought I should point it out.

Also, once you iron out the details, it would be great if you could  
add a HowTo page to the FOP wiki:

http://wiki.apache.org/xmlgraphics-fop/

Thanks!

Web Maestro Clay

On Feb 21, 2006, at 9:21 AM, Louis.Masters@log-net.com wrote:
> Thanks for the direction and the JCL wiki.  It helped in debugging  
> what was going on.
>
> OK, I have made some progress and have gotten them to work  
> together.  My java classpath when running JBoss now looks like this  
> (omitting unneccessary jars):
>
> \prod_jars_091_14\avalon-framework-4.2.0.jar;\prod_jars_091_14 
> \batik-all-1.6.jar;\prod_jars_091_14\serializer-2.7.0.jar; 
> \prod_jars_091_14\xalan-2.7.0.jar;\prod_jars_091_14 
> \xercesImpl-2.7.1.jar;\prod_jars_091_14\xml-apis-1.3.02.jar; 
> \prod_jars_091_14\fop.jar;C:\jdk14\lib\tools.jar;C:\jboss-4.0.3SP1 
> \bin\\run.jar;;\prod_jars_091_14\commons-io-1.1.jar; 
> \prod_jars_091_14\commons-logging-1.0.4.jar;C:\jboss-4.0.3SP1\lib 
> \log4j-boot.jar
>
> The final change that seemed to fix this is the addition of the  
> log4j-boot.jar directly to the classpath.  It exists in the root  
> lib directory and the server's lib directory has the additional  
> log4j.jar.
>
> I have not tried any different ordering, but at least this gets it  
> to boot and I can now render PDFs under 0.91.  I can probably move  
> the commons and log4j jars before the tools.jar, but I have not had  
> a chance to experiment with it.
>
> I'm not saying that this is the best solution, but it seems to be a  
> solution.  If I find anything else I will post it.
>
> -Lou
>
>
> Jeremias Maerki <de...@jeremias-maerki.ch> wrote on 02/17/2006 15:37:03:
>
> > Have a look at the JCL Wiki. Maybe that'll help you. There's  
> something
> > specific to JBoss. It's probably all about the right placement of  
> the
> > JARs.
> > http://wiki.apache.org/jakarta-commons/Logging/ 
> FrequentlyAskedQuestions
> >
> > I've heard a number of time that some people talk bad about JCL  
> because
> > of class loading problems. I'm not familiar with the details.  
> Maybe you
> > stumbled upon one of these problems.
> >
> > Please keep us informed about any solutions you find for this.  
> Maybe I
> > have some time on Sunday to download, install and try JBoss.
> >
> > On 17.02.2006 20:28:12 Louis.Masters wrote:
> > > I'm running into a strange logging jar file issue when trying  
> to run FOP
> > > 0.91 under JBoss 4.0.3.  If I include the FOP logging jar
> > > (commons-logging-1.0.4.jar) in my java classpath and then boot  
> JBoss, I
> > > get the following boot error:
> > >
> > > <snip/>
> > > Caused by: org.apache.commons.logging.LogConfigurationException:
> > > org.apache.commons.logging.LogConfigurationException: No  
> suitable Log
> > > constructor [Ljava.lang.Class;@c789fb for
> > > org.apache.commons.logging.impl.Log4JLogger (Caused by
> > > java.lang.NoClassDefFoundError: org/apache/log4j/Category)  
> (Caused by
> > > org.apache.commons.logging.LogConfigurationException: No  
> suitable Log
> > > constructor [Ljava.lang.Class;@c789fb for
> > > org.apache.commons.logging.impl.Log4JLogger (Caused by
> > > java.lang.NoClassDefFoundError: org/apache/log4j/Category))
> > >         at
> > > org.apache.commons.logging.impl.LogFactoryImpl.
> > newInstance(LogFactoryImpl.java:543)
> > >         at
> > > org.apache.commons.logging.impl.LogFactoryImpl.
> > getInstance(LogFactoryImpl.java:235)
> > > <snip/>
> > >
> > > When I use JBoss's logging jar (1.0.3) and omit the two commons- 
> logging
> > > jars from my classpath, JBoss boots OK, but I get the following  
> error from
> > > FOP:
> > >
> > > <snip/>
> > > at
> > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> > processConnection(Http11Protocol.java:744)
> > >     at
> > > org.apache.tomcat.util.net.PoolTcpEndpoint.
> > processSocket(PoolTcpEndpoint.java:527)
> > >     at
> > > org.apache.tomcat.util.net.MasterSlaveWorkerThread.
> > run(MasterSlaveWorkerThread.java:112)
> > >     at java.lang.Thread.run(Thread.java:536)Caused by:
> > > java.lang.NoClassDefFoundError: org/apache/commons/logging/ 
> LogFactory
> > >     at org.apache.fop.render.RendererFactory. 
> (RendererFactory.java:47)
> > >     at org.apache.fop.apps.FOUserAgent.(FOUserAgent.java:83)
> > >     at com.lognet.reports.engine.FOPGenerator. 
> (FOPGenerator.java:68)
> > >     at com.lognet.reports.engine.LNReport.renderReport 
> (LNReport.java:1058)
> > > <snip/>
> > >
> > > Does someone know how to get the two implementations to "play  
> nice" with
> > > one another?  I'm not that familiar with commons logging so I  
> am a bit
> > > lost.
> > >
> > > Thanks,
> > > Lou
> >
> >
> >
> > Jeremias Maerki
> >
> >
> >  
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users- 
> help@xmlgraphics.apache.org
> >


Clay Leeds
webmaestro@mac.com

My religion is simple. My religion is kindness.
-- HH Dalai Lama of Tibet