Hi,

  I just wanted to post that I found the solution to my problem, and the
issue was actually with JBuilders jar utility.  It was adding log4j
stuff
to my ae.jar file, even though I have explicitly told it not to.  I am
sorry that I didn't unzip my jar files earlier, but I figured checking
JBuilders jar gui screen was enough.
So Chalk one up for open source!  It was a JBuilder bug.

Also I just wanted to make a note to the question.

Why are the JBoss tomcat jars in Tomcat?
I am instantiating my ejb session bean as a local class in my web app so
that I don't have to set
 up a jboss container for this development session.  The idea here is that
I can decide at
deployment time how many tiers that my application should use.


i.e...
5 tiers
------------------
1 database
2 ejb
3 ejb query template (parses the query language [ejb-ql in this case])
4 web app
5 html browser
--------------
(Note this could be a 4 tier model as well by combining 2 and 3 to the
same ejb container)


or 3 tiers (the model that I am using in my )
----------------
1 database
2 web app (parses the query language [sql in this case])
3 html browser
--------------

If you check out my example code at www.adligo.com this will make more sense.

Thanks Again,
Scott

>
> I'm still unable to comprehend why you have jboss-specific jars in
> Tomcat???
>
> Also, the only thing that needs to go in the common/endorsed directory
> is  the XML parser.  "endorsed" means that it overrides existing
> libraries in  the JDK.  Only the xerces jar needs to go in
> common/endorsed because it  contains endorsed libraries such as
> org.xml.*, javax.xml.*, and
> org.w3c.dom.*.  Make sure to remove xmlParserAPIs.jar and xercesImpl.jar
> if  you put xerces-1.4.4.jar there.
>
> Any other jars that are needed can go in either common/lib or
> shared/lib.  shared/lib makes libraries available to apps, but not the
> container itself.  common/lib is available to both the container and
> apps.  If the container doesn't need to see it, you probably shouldn't
> put  it there.
>
> Make sure another version of Log4j.jar wasn't added to JAVA_HOME/lib/ext
> or  something like that.  The obvious problem is that another version of
> the  log4j library is somewhere on the classpath.  It could be
> incorporated in  any of the jars you have such as the jboss jars.  Make
> sure they don't have  org.apache.log4j.* in them.
>
> Oh.... there could be one other thing.  Since Tomcat-4.1.27 contains
> commons-logging in common/lib, you might need to move log4j.jar to
> common/lib and remove log4j.jar and commons-logging.jar from
> WEB-INF/lib.   If this was the problem, it would be the fault of
> commons-logging, not log4j.  It uses some funky class loading gimmicks
> that  mess a lot of things up.
>
> Jake
>
> At 03:43 PM 9/13/2003 -0500, you wrote:
>>OK,
>>
>>   I moved out several jar files but still get the same log4j error.
>>
>>In WEB-INF/lib I now have.
>>
>>     ae.jar  (mine no log4j stuff in here I checked )
>>      ae_ejb.jar (mine no log4j stuff in here I checked )
>>      beandt.jar  (JBuilder log4j stuff in here)
>>      commons-beanutils.jar (struts1.1\contrib\struts-el\lib)
>>      commons-collections.jar (struts1.1\contrib\struts-el\lib)
>>      commons-digester.jar (struts1.1\contrib\struts-el\lib)
>>      commons-logging.jar (struts1.1\contrib\struts-el\lib)
>>      dbswing.jar  (JBuilder no log4j stuff in here)
>>      dx.jar   (JBuilder no log4j stuff in here)
>>      jstl.jar (struts1.1\contrib\struts-el\lib)
>>      log4j-1.2.8.jar (struts1.1\contrib\struts-el\lib)
>>      standard.jar (struts1.1\contrib\struts-el\lib)
>>      struts.jar (struts1.1\contrib\struts-el\lib)
>>      struts-el.jar   (struts1.1\contrib\struts-el\lib)
>>
>>In CATALINA_HOME/common/endorsed I have
>>
>>      jboss-client.jar  (Jboss 3.0.4)
>>      jboss-common.jar  (Jboss 3.0.4)
>>      jboss-j2ee.jar  (Jboss 3.0.4 also tried with out this file)
>> jbosssx-client.jar  (Jboss 3.0.4)
>>      jnp-client.jar (Jboss 3.0.4)
>>      jnpserver.jar (Jboss 3.0.4)
>>      xerces.jar (1.4.4)
>>      commons-httpclient-2.0-rc1.jar
>>
>>Thanks again,
>>Scott
>>
>> >
>> > You can't put endorsed libraries under WEB-INF/lib.  This includes
>> both JDK  endorsed libraries (such as javax.xml.*, org.w3c.dom.*,
>> org.xml.*) and  libraries which Tomcat treats specially such as the
>> servlet API and xml  parsers (Xerces).  Why do you need the j2ee jar
>> there anyway? Tomcat  provides that for you.  And you shouldn't need
>> many of the other jars you  have in there such as the jboss jars and
>> the xerces1 jar (put that in  CATALINA_HOME/common/endorsed in place
>> of the existing xerces jars).
>> >
>> > You are drowning in libraries.  You need to figure out what you
>> actually
>> >  need there and get rid of the rest.
>> >
>> > Jake
>> >
>> > At 02:19 PM 9/13/2003 -0500, you wrote:
>> >>Hey I think I found something that help!
>> >>
>> >>When tomcat loads the jar files it prints the following message;
>> >>
>> >>WebapClassLoader:
>> >>validateJarFile<C:\java\jakarta-tomcat-4.1.27\webapps\ae_http\WEB-INF\li
>>
>> b\j2ee.jar>
>> >> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending
>> class: javax/servlet/Servlet.class
>> >>
>> >>I am digging to try to figure out why this is,
>> >>
>> >>Thanks again,
>> >>Scott
>> >>
>> >> > Sure JBuilder5,
>> >> > tomcat 4.1.27 log4j 1.2.8 struts 1.1
>> >> > Jdk 1.3.0_02
>> >> >
>> >> > Here is a list of the jar files in my WEB-INF/lib
>> >> >
>> >> > ae.jar  (mine no log4j stuff in here I checked )
>> >> > ae_ejb.jar (mine no log4j stuff in here I checked )
>> >> > beandt.jar  (JBuilder log4j stuff in here)
>> >> > commons-beanutils.jar (struts1.1\contrib\struts-el\lib)
>> >> > commons-collections.jar (struts1.1\contrib\struts-el\lib)
>> >> > commons-digester.jar (struts1.1\contrib\struts-el\lib)
>> >> > commons-logging.jar (struts1.1\contrib\struts-el\lib)
>> >> > dbswing.jar  (JBuilder no log4j stuff in here)
>> >> > dx.jar   (JBuilder no log4j stuff in here)
>> >> > j2ee.jar  (Sun 1.3.1)
>> >> > jboss-client.jar  (Jboss 3.0.4)
>> >> > jboss-common.jar  (Jboss 3.0.4)
>> >> > jboss-j2ee.jar  (Jboss 3.0.4)
>> >> > jbosssx-client.jar  (Jboss 3.0.4)
>> >> > jnp-client.jar (Jboss 3.0.4)
>> >> > jnpserver.jar (Jboss 3.0.4)
>> >> > jstl.jar (struts1.1\contrib\struts-el\lib)
>> >> > log4j-1.2.8.jar (struts1.1\contrib\struts-el\lib)
>> >> > standard.jar (struts1.1\contrib\struts-el\lib)
>> >> > struts.jar (struts1.1\contrib\struts-el\lib)
>> >> > struts-el.jar   (struts1.1\contrib\struts-el\lib)
>> >> > xerces.jar (1.4.4)
>> >> >
>> >> > The WEB-INF/classes directory has only classes in the com
>> namespace.
>> >> >
>> >> >   Also I did a search for log4j in my jakarta-tomcat-4.1.27
>> >> directory
>> >> > and the only log4j that shows up is the one in WEB-INF/lib.
>> >> >
>> >> > When I run the thing from JBuilder the same jars are in my
>> required
>> >> libraries.
>> >> >
>> >> > The other weird thing that I should note is that the original
>> stack
>> >> trace that I mentioned was returned as html to my browser.  In the
>> tomcat console nothing
>> >> > is printed.
>> >> >
>> >> > Thanks again,
>> >> > Scott
>> >> >
>> >> >
>> >> >
>> >> >
>> >> >>
>> >> >> There is something fishy about the stack trace. The following is
>> >> from your  stack trace:
>> >> >>   at org.apache.log4j.Category.callAppenders(Category.java:190)
>> >> >>
>> >> >> If you look at the code of log4j 1.2.8, Category.java, line 190,
>> >> you will  see that the line consists of a 'break' statement, not an
>> invocation of  AppenderAttachableImpl.appendLoopOnAppenders, as the
>> stack trace suggests.
>> >> >>
>> >> >> The evidence presented so far suggests that you are running two
>> >> different  versions of log4j simultaneously.
>> >> >>
>> >> >> Can you tell more about your environment? JBuilder, JDK, JBoss,
>> >> Tomcat versions?
>> >> >>
>> >> >>
>> >> >> At 11:11 AM 9/13/2003 -0500, Scott Morgan wrote:
>> >> >>>Hi Ceki,
>> >> >>>
>> >> >>>      I am using the pre compiled versions from the Jakarta
>> >> download
>> >> >>>binaries site for all of the libraries.   After my .war files
>> >> unwars
>> >> >>> the log4j-1.2.8.jar is in my lib directory with all the other
>> >> jars, suns j2ee.jar (1.3.1), jboss-j2ee.jar (3.0.4), exc.  Also I
>> mention that I have two j2ee.jar implementations in my path
>> >> because it wasn't working without the sun j2ee.jar since that is
>> necessary for the
>> >> >>>log4j stuff and I am connecting to a jboss 3.0.4 server to get
>> my
>> >> data
>> >> >>> objects.
>> >> >>>
>> >> >>>Thanks for responding!
>> >> >>>Scott
>> >> >>>
>> >> >>> >
>> >> >>> > - Are you compiling log4j yourself using JBulder?
>> >> >>> >
>> >> >>> > - Do you have older versions of log4j lying around?
>> >> >>> >
>> >> >>> > At 02:57 PM 9/12/2003 -0500, you wrote:
>> >> >>> >>Hi,
>> >> >>> >>
>> >> >>> >>    I am trying to get log4j to work in the following
>> >> environment;
>> >> >>> >>tomcat 4.1.27 log4j 1.2.8 struts 1.1
>> >> >>> >>
>> >> >>> >>I have been able to get it working through invoking tomcat
>> >> through
>> >> >>> >> JBuilder.  However when I run it with the startup.bat file I
>> >> get a
>> >> >>> weird error. I have a log4j.xml file that works fine in my
>> swing
>> >> applet, and the JBuilder tomcat arena, logs messages , prints to
>> the console nothing fancy.
>> >> >>> >>
>> >> >>> >><?xml version="1.0" encoding="UTF-8" ?>
>> >> >>> >><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>> >> >>> >>
>> >> >>> >><log4j:configuration
>> >> >>> xmlns:log4j="http://jakarta.apache.org/log4j/";>
>> >> >>> >>   <appender name="X"
>> class="org.apache.log4j.ConsoleAppender">
>> >> >>> >>     <layout class="org.apache.log4j.PatternLayout">
>> >> >>> >>       <param name="ConversionPattern" value="%d{hh:mm:ss} %c
>> %M
>> >> %t
>> >> >>> %p
>> >> >>> >>line
>> >> >>> >>%L -%m%n"/>
>> >> >>> >>     </layout>
>> >> >>> >>   </appender>
>> >> >>> >>   <logger name="com.adligo.systems.ae.ui.http"
>> >> additivity="false">
>> >> >>> >>     <level value="DEBUG"/>
>> >> >>> >>     <appender-ref ref="X"/>
>> >> >>> >>   </logger>
>> >> >>> >>   <root>
>> >> >>> >>     <priority value="WARN"/>
>> >> >>> >>     <appender-ref ref="X" />
>> >> >>> >>   </root>
>> >> >>> >></log4j:configuration>
>> >> >>> >>
>> >> >>> >>When I use this same file with struts and log4j, I am able to
>> >> get
>> >> >>> the
>> >> >>> >> file to load ok, I verified this with some
>> System.out.printlns.
>> >> >>> The
>> >> >>> code also correctly checks and finds the debug levels when
>> >> calling; logger.isDebugEnabled() or logger.isInfoEnabled()
>> >> >>> >>
>> >> >>> >>However the code crashes when I try to call;
>> >> >>> >>logger.debug("foo") or logger.info("foo") at
>> >> >>> >>com.adligo.systems.ae.ui.http.LoginAction.execute(LoginAction.jav
>>
>> a:34)
>> >> >>> >>
>> >> >>> >>The following is the whole error.
>> >> >>> >>
>> >> >>> >>java.lang.NoSuchMethodError:
>> >> >>> >>org.apache.log4j.spi.LoggingEvent.getLevel()Lorg/apache/log4j/Level;
>> >> >>> >>         at
>> >> >>> >>org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:
>>
>> 206)
>> >> >>> >> at
>> >> >>> >>
>> >> >>>
>> >>
>> org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
>> >> >>> >>         at
>> >> >>> org.apache.log4j.Category.callAppenders(Category.java:190)
>> >> >>> >> at org.apache.log4j.Category.forcedLog(Category.java:375) at
>> >> >>> org.apache.log4j.Category.debug(Category.java:244)
>> >> >>> >>         at
>> >> >>> >>com.adligo.systems.ae.ui.http.LoginAction.execute(LoginAction.jav
>>
>> a:34)
>> >> >>> >> at
>> >> >>> >>org.apache.struts.action.RequestProcessor.processActionPerform(Reque
>> >>
>> >> stPr
>> >> >>>
>> >> >>> ocessor.java:484)
>> >> >>> >>         at
>> >> >>> >>org.apache.struts.action.RequestProcessor.process(RequestProcessor.j
>> >>
>> >> ava:
>> >> >>>
>> >> >>> 274)
>> >> >>> >>         at
>> >> >>> >>org.apache.struts.action.ActionServlet.process(ActionServlet.java
>>
>> :1482)
>> >> >>> >> at
>> >> >>> >>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:
>>
>> 525)
>> >> >>> >> at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>> >> >>> >>         at
>> >> >>> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> >> >>> >>
>> >> >>> >>Any help here would be greatly appreciated!
>> >> >>> >>--
>> >> >>> >>Scott Morgan
>> >> >>> >>President Adligo Inc.
>> >> >>> >>Ph:  773-758-8735
>> >> >>> >>Fax: 773-632-0568
>> >> >>> >>http://www.adligo.com
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>
>> >> >>> >>-----------------------------------------------------------------
>>
>> ----
>> >> >>> >> To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> >>> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >> >>> >
>> >> >>> > --
>> >> >>> > Ceki Gülcü
>> >> >>> >
>> >> >>> >       For log4j documentation consider "The complete log4j
>> >> manual"
>> >> >>> ISBN:
>> >> >>> > 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
>> >> >>> >
>> >> >>> >       import org.apache.Facetime;
>> >> >>> >       ApacheCon US 2003, 18-21 November http://apachecon.com/
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> >> >>> >
>> ---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >> >>>
>> >> >>>
>> >> >>>--
>> >> >>>Scott Morgan
>> >> >>>President Adligo Inc.
>> >> >>>Ph:  773-758-8735
>> >> >>>Fax: 773-632-0568
>> >> >>>http://www.adligo.com
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>---------------------------------------------------------------------
>> >> >>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >> >>
>> >> >> --
>> >> >> Ceki Gülcü
>> >> >>
>> >> >>       For log4j documentation consider "The complete log4j
>> manual"
>> >> >> ISBN:
>> >> >> 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
>> >> >>
>> >> >>       import org.apache.Facetime;
>> >> >>       ApacheCon US 2003, 18-21 November http://apachecon.com/




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to