Cluster and commons-logging jar LogConfigurationException
Hi,
My configuration:
-OAS 10.1.3.1 on 2 machines with oracle cluster configuration (discovery).
My app:
-ear which includes simple ejb3 module with commons-logging-1.1.jar lib (Jakarta commons logging)
-clustering and replication is configured (in orion-application.xml):
<cluster allow-colocation="false">
<replication-policy trigger="onSetAttribute" scope="allAttributes" />
<flow-control-policy enabled="false" />
<protocol>
<peer>
<opmn-discovery />
</peer>
</protocol>
</cluster>
When I'm trying to deploy my application I always get an error during deployment:
[19-Jun-2007 16:46:44] Initializing ClassLoader(s)
[01-Jan-1970 01:00:00] Error deserializing return-value: org.apache.commons.logging.LogConfigurationException; nested exception is: java.lang.ClassNotFoundException: org.apache.commons.logging.LogConfigurationException
It doesn't matter if I try to deploy it on one or both machines. The exception is always the same on each machine.
When I get rid of clustering/replication configuration (from orion-application.xml or during deployment) application is deployed without any problem.
Also when I remove commons-logging-1.1.jar application is deployed.
I know that there is already apache.commons.logging 1.0.4 in OAS shared libraries by it's not selected in "Configure Class Loading" by default.
I also tried use the same version (1.0.4) in my app - didn't help.
I can also deploy without any problem war file or ear file with web module, which has commons-logging-1.1.jar. But not ejb!
Any advice?
Thanks
darek
Hey Darek -- I just gave it a quick try -- the ListQueries query works as expected.
This is how I executed it and the results it returned.
d:\java\oc4j-10131-prod\j2ee\home>java -Doc4j.start.query=ListQueries+Exit -jar oc4j.jar
07/06/25 00:51:41 Shutting down OC4J...
AuditLoader - Performs various diagnostics on the contents of the speci
fied loader(s).
Callers - List all classes that call the specified method(s).
ClassLoadMetrics - Report metrics from specified loader(s) or all if none specified.
ClassPath - List the code-sources in use.
Dependencies - List the dependencies of the specified class.
Depends - List all classes that depend on the specified class(s).
DuplicateClasses - List duplicate classes, both loaded and in code-sources.
DuplicateCodeSources - List code-sources that have more than 1 subscriber, or the same name.
Exit - Exits the process (does shutdown if system is running).
FindResource - List the code-sources containing the specified resource.
GetResource - Call getResource() or getResources() on a specified loader and report the results.
HttpSessions - View summary of active HttpSessions for deployed applications.
LeakedLoaders - Control detection of class loader leaks and inspect results.
ListQueries - List built-in subclasses of the "oracle.classloader.query.Query" class.
LoadClass - Call loadClass() or Class.forName() using a specified loader and report the results.
LoadedClasses - List the names of all loaded classes (if available).
LoaderTree - List the class loader tree.
Packages - List the package names contained within the specified code-source(s).
SharedLibraries - List shared-libraries and the loaders that have imported them.
SystemProperties - List or set System properties.
ThreadPools - List application server related thread for the current VM.
Threads - List thread info for the current VM.
UnusedCodeSources - List any code-sources from which no classes or resources have been loaded.
Uptime - Report how long the system has been running.
VMStat - List statistic info for the current VM.
Specify the query name for a full description, or use the '-l' option to see ful
l descriptions for all.
Similar Messages
-
Replace commons-logging.jar with another version
Hi all,
I'm using CR4E version 2 Update 4(v. 12.2.205) and I would use instead of
commons-logging.jar (v. 1.1.1) provided, the version used in my application
(v. 1.0.4). Is possible without errors?
I specify that I not use the provided log4j.jar in CR4E v.2.
Thanks a lotThe versions that we provide with our product is the version that we expect to be using when using our product. Any other version may or may not work and there would be no way to fix an issue specific to using a different version than what we provide.
-
Commons-logging jar file useage
How to create a commons-logging.properties file and what are all paramter should me there in the propeties file. Basically i was using log4j.jar for logging the message. Now i want to use the commons-logging.jar for logging messsge. for that i have to create properties files with the specific paramter.
help me....
thanks in advacneHere is home page of commons logging project:
http://jakarta.apache.org/commons/logging/
And short user guide available there:
http://jakarta.apache.org/commons/logging/guide.html -
How to use commons-logging.jar files ?
i want to get the .java files from thisHow to use commons-logging.jar files ?
i want to get the .java files from this1. Go here.
2. Follow links to download source. -
Commons-logging.jar and log4j.jar
Folks:
First of all, what are those commons-xxx.jar, such as commons-beanutil.jar, commons-collections.jar, commons-digester.jar, etc?
What is the difference between commons-loggin.jar ann log4j.jar? I read a post somewhere saying that commons-loggin.jar points to log4j.jar, why?
Could somebody throw some thoughts to enlighten me, please?
Thanks a lot !http://jakarta.apache.org/commons/index.html
-
J2ee.jar causes problems with commons-logging.jar
Hi All -
(JDK 1.5.0_03, commons-logging 1.0.4, latest j2ee.jar, Eclipse 3.1.0 RC3 )
I am developing some components that are to be used within j2ee containers and in standalone mode as well. When I run the software under Tomcat, it works correctly (Tomcat is not using the j2ee.jar that comes with Sun's App server obviously), but when I develop with the j2ee.jar file that comes with Sun's App server, I can't use commons-logging. For example, the code supplied below (a class with only this line in the main method, not using any j2ee features) will fail JUST by having j2ee.jar in my path, but if I take it out of the path, it works fine. I am also on the commons-logging mail list and no one there has been able to solve this issue for me. Again, if I deploy my application to Tomcat, I don't have this problem.
The isolated line that is giving me the issue (and will give the issue even in a non j2ee application that just has this one line) is this:
log= LogFactory.getLog(CommonsLoggingTest.class);
When I run this without j2ee.jar in the path, it works fine. When I run it with j2ee.jar in the path, I get this:
Exception in thread "main" org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at com.redhawk.testing.CommonsLoggingTest.doTest(CommonsLoggingTest.java:27)
at com.redhawk.testing.CommonsLoggingTest.main(CommonsLoggingTest.java:45)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 5 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
... 6 more
Anyone have any ideas? Its really annoying to have to take this jar file out of my path every time I want to run a test. I could just start developing against other implementations of the j2ee classes I need (for example, Tomcat's jar files do not give this error) but for various reasons that is also undesirable.
Thanks!
JasonThis problem does not arise with commons-logging 1.0.3.
Any idea what is different in 1.0.4 that would introduce problems when Sun's j2ee.jar is in the path? -
Taskflow based on human task and commons logging error
Hi,
Is the logging changed after the soa update. When I deploy the humantask taskflow to the soa-infra I got .the following error
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
I had to remove the commons logging library from the project and add this to the orion-application.xmlI don't use log4j , I just created a fusion webapp where I add taskflow based on a human task that's it.
If I remove the commons logging then deployment fails. -
Hi,
My application is using log4j, I get my logger as follows:
private static Logger sLogger = Logger.getLogger(Neolyser.class);My problem is that Im using a library thats using commons logging and writes all its logging onto my logger, which I dont want. I want only to see my log statements, I'm happy enough with exceptions and stack traces from the library. So how can I turn off the commons logging? Or at least get it to write to another logger? Thanks in advance,
SteHi thanks for your reply, Im pretty new to log4j so I dont know how to do that. I configure my looger as follows:
BasicConfigurator.resetConfiguration();
ConsoleAppender lCAppender = new ConsoleAppender(new PatternLayout(lPattern));
lCAppender.setThreshold(Level.toLevel(lLevel));Are there other settings I can use to turn off the library logging? Thanks -
Hi,
When i start WL 9.1 server, i get the following error. My application uses log4j-1.2.8 and commons-logging-1.0.4.jar. I wasnt getting this in WL 8.1.4. is there any in-compatibilities(Looking at the error message, i looks like that).Is there anything that needs to be done for WL 9.1?
<Mar 22, 2006 10:23:30 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[
1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, http.>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default"
is now listening on 10.173.194.102:7001 for protocols iiop, t3, ldap, http.>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000331> <Started W
ebLogic Admin Server "AdminServer" for domain "coretest_oracle" running in Devel
opment Mode>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server st
ate changed to RUNNING>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server st
arted in RUNNING mode>
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lor
g/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryL
og.java:94)
at com.bea.console.preferences.spi.FilePreferencesProvider.<init>(FilePr
eferencesProvider.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.bea.portlet.prefs.spi.ProviderFactory.createInstance(ProviderFact
ory.java:79)
at com.bea.portlet.prefs.spi.ProviderFactory.setDefaultProviderClass(Pro
viderFactory.java:47)
at com.bea.portlet.prefs.spi.IPreferenceStore$Factory.registerDefaultPro
vider(IPreferenceStore.java:128)
at com.bea.netuix.servlets.manager.SingleFileServlet.init(SingleFileServ
let.java:113)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:
94)
at weblogic.servlet.internal.WebAppServletContext$AsyncInitRequest.run(W
ebAppServletContext.java:1641)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkMan
agerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)Hi,
When i start WL 9.1 server, i get the following error. My application uses log4j-1.2.8 and commons-logging-1.0.4.jar. I wasnt getting this in WL 8.1.4. is there any in-compatibilities(Looking at the error message, i looks like that).Is there anything that needs to be done for WL 9.1?
<Mar 22, 2006 10:23:30 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default[
1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, http.>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <Server> <BEA-002613> <Channel "Default"
is now listening on 10.173.194.102:7001 for protocols iiop, t3, ldap, http.>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000331> <Started W
ebLogic Admin Server "AdminServer" for domain "coretest_oracle" running in Devel
opment Mode>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server st
ate changed to RUNNING>
<Mar 22, 2006 10:23:30 AM EST> <Notice> <WebLogicServer> <BEA-000360> <Server st
arted in RUNNING mode>
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lor
g/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryL
og.java:94)
at com.bea.console.preferences.spi.FilePreferencesProvider.<init>(FilePr
eferencesProvider.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.bea.portlet.prefs.spi.ProviderFactory.createInstance(ProviderFact
ory.java:79)
at com.bea.portlet.prefs.spi.ProviderFactory.setDefaultProviderClass(Pro
viderFactory.java:47)
at com.bea.portlet.prefs.spi.IPreferenceStore$Factory.registerDefaultPro
vider(IPreferenceStore.java:128)
at com.bea.netuix.servlets.manager.SingleFileServlet.init(SingleFileServ
let.java:113)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:
94)
at weblogic.servlet.internal.WebAppServletContext$AsyncInitRequest.run(W
ebAppServletContext.java:1641)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkMan
agerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) -
Commons-logging error when starting Flex2 in JRun
Created new JRun Server and deployed Flex2 to this server.
Receiving this error when starting up this server instance.
Starting Macromedia JRun 4.0 (Build 92909), logicerm2 server
07/13 22:23:28 info JRun Naming Service listening on *:2911
07/13 22:23:28 warning No sessionSecret has been specified in
jrun.xml. Installi
ng a self generated sessionSecret.
07/13 22:23:28 info No JDBC data sources have been configured
for this server (s
ee jrun-resources.xml)
07/13 22:23:28 info JRun Web Server listening on *:8102
07/13 22:23:28 info Deploying enterprise application
"default-ear" from: file:/C
:/JRun4/servers/logicerm2/default-ear/
07/13 22:23:28 info Deploying web application "JRun Default
Web Application" fro
m: file:/C:/JRun4/servers/logicerm2/default-ear/
07/13 22:23:29 info Web Services in default-ear#default-war:
07/13 22:23:29 info AdminService
07/13 22:23:29 warning default-war web application has
'reload' as true in jrun-
web.xml. Consider setting it false if the application is
running in production e
nvironment.
07/13 22:23:29 warning default-war web application has
'compile' as true in jrun
-web.xml. Consider setting it false if the application is
running in production
environment.
07/13 22:23:29 user JSPServlet: init
07/13 22:23:29 info Deploying web application "Flex Data
Services" from: file:/C
:/JRun4/servers/logicerm2/flex/
07/13 22:23:29 user JSPServlet: init
07/13 22:23:29 user FlexMxmlServlet: init
07/13 22:23:29 INFO Loading configuration file
C:\JRun4\servers\logicerm2\flex\W
EB-INF\flex\flex-webtier-config.xml
07/13 22:23:30 INFO Loading configuration file
C:\JRun4\servers\logicerm2\flex\W
EB-INF\flex\flex-config.xml
07/13 22:23:30 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler
07/13 22:23:30 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451
07/13 22:23:30 user MessageBrokerServlet: init
07/13 22:23:31 user FlexSwfServlet: init
07/13 22:23:31 user FlexInternalServlet: init
07/13 22:23:31 info Deploying web application "Flex Admin Web
Application" from:
file:/C:/JRun4/servers/logicerm2/flex-admin/
07/13 22:23:31 user JSPServlet: init
07/13 22:23:31 user MessageBrokerServlet: init
07/13 22:23:31 info Deploying web application "Flex Data
Services Samples" from:
file:/C:/JRun4/servers/logicerm2/samples/
07/13 22:23:31 user JSPServlet: init
07/13 22:23:31 user FlexMxmlServlet: init
07/13 22:23:32 INFO Loading configuration file
C:\JRun4\servers\logicerm2\sample
s\WEB-INF\flex\flex-webtier-config.xml
07/13 22:23:32 INFO Loading configuration file
C:\JRun4\servers\logicerm2\sample
s\WEB-INF\flex\flex-config.xml
07/13 22:23:32 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler
07/13 22:23:32 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451
07/13 22:23:32 user MessageBrokerServlet: init
07/13 22:23:32 error Could not pre-load servlet:
MessageBrokerServlet
[1]org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logg
ing.LogConfigurationException:
org.apache.commons.logging.LogConfigurationExcept
ion: Invalid class loader hierarchy. You have more than one
version of 'org.apa
che.commons.logging.Log' visible, which is not allowed.
(Caused by org.apache.co
mmons.logging.LogConfigurationException: Invalid class loader
hierarchy. You ha
ve more than one version of 'org.apache.commons.logging.Log'
visible, which is n
ot allowed.) (Caused by
org.apache.commons.logging.LogConfigurationException: or
g.apache.commons.logging.LogConfigurationException: Invalid
class loader hierarc
hy. You have more than one version of
'org.apache.commons.logging.Log' visible,
which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationExc
eption: Invalid class loader hierarchy. You have more than
one version of 'org.
apache.commons.logging.Log' visible, which is not allowed.))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:209)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at
org.apache.commons.httpclient.params.DefaultHttpParams.<clinit>(Defau
ltHttpParams.java:53)
at
flex.messaging.services.http.HTTPProxyAdapter.<init>(HTTPProxyAdapter
.java:111)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:71
at
flex.messaging.Destination.createAdapter(Destination.java:277)
at
flex.messaging.Destination.initDestination(Destination.java:103)
at
flex.messaging.services.HTTPProxyService.createDestination(HTTPProxyS
ervice.java:78)
at
flex.messaging.services.AbstractService.createDestinations(AbstractSe
rvice.java:82)
at
flex.messaging.config.MessagingConfiguration.createServices(Messaging
Configuration.java:187)
at
flex.messaging.config.MessagingConfiguration.configureBroker(Messagin
gConfiguration.java:84)
at
flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:10
5)
at
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
java:1242)
at
jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
ice.java:789)
at
jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
va:291)
at
jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at
jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
ce.java:242)
at
jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at
jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
ce.java:179)
at
jrun.deployment.DeployerService.run(DeployerService.java:891)
at
jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java
:223)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
ava:426)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by:
org.apache.commons.logging.LogConfigurationException:
org.apache.comm
ons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have
more than one version of 'org.apache.commons.logging.Log'
visible, which is not
allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Inval
id class loader hierarchy. You have more than one version of
'org.apache.common
s.logging.Log' visible, which is not allowed.)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:397)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
... 30 more
Caused by:
org.apache.commons.logging.LogConfigurationException: Invalid class
l
oader hierarchy. You have more than one version of
'org.apache.commons.logging.
Log' visible, which is not allowed.
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:385)
... 31 more
[0]flex.messaging.config.ConfigurationException: Unable to
create service 'flex.
messaging.services.HTTPProxyService' for 'proxy-service' due
to the following er
ror: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.lo
gging.LogConfigurationException: Invalid class loader
hierarchy. You have more
than one version of 'org.apache.commons.logging.Log' visible,
which is not allow
ed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid cla
ss loader hierarchy. You have more than one version of
'org.apache.commons.logg
ing.Log' visible, which is not allowed.) (Caused by
org.apache.commons.logging.L
ogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
Invalid class loader hierarchy. You have more than one
version of 'org.apache.c
ommons.logging.Log' visible, which is not allowed. (Caused by
org.apache.commons
.logging.LogConfigurationException: Invalid class loader
hierarchy. You have mo
re than one version of 'org.apache.commons.logging.Log'
visible, which is not al
lowed.)).
at
flex.messaging.config.MessagingConfiguration.createServices(Messaging
Configuration.java:202)
at
flex.messaging.config.MessagingConfiguration.configureBroker(Messagin
gConfiguration.java:84)
at
flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:10
5)
at
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
java:1242)
at
jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
ice.java:789)
at
jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
va:291)
at
jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at
jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
ce.java:242)
at
jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at
jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
ce.java:179)
at
jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerS07/13 22:23:33 user
FlexSwfServlet: init
ervice.invokeRunnable(SchedulerService.java:223)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
ava:426)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
PLEASE Help!!!
BernieFigured this one out:
Searched thru instance of JRun that flex was installed in and
removed all the additional commons-logging jar files I
found. -
Commons-logging Error when starting JRun with Flex
Created new JRun Server and deployed Flex2 to this server.
Receiving this error when starting up this server instance.
Starting Macromedia JRun 4.0 (Build 92909), logicerm2 server
07/13 22:23:28 info JRun Naming Service listening on *:2911
07/13 22:23:28 warning No sessionSecret has been specified in
jrun.xml. Installi
ng a self generated sessionSecret.
07/13 22:23:28 info No JDBC data sources have been configured
for this server (s
ee jrun-resources.xml)
07/13 22:23:28 info JRun Web Server listening on *:8102
07/13 22:23:28 info Deploying enterprise application
"default-ear" from: file:/C
:/JRun4/servers/logicerm2/default-ear/
07/13 22:23:28 info Deploying web application "JRun Default
Web Application" fro
m: file:/C:/JRun4/servers/logicerm2/default-ear/
07/13 22:23:29 info Web Services in default-ear#default-war:
07/13 22:23:29 info AdminService
07/13 22:23:29 warning default-war web application has
'reload' as true in jrun-
web.xml. Consider setting it false if the application is
running in production e
nvironment.
07/13 22:23:29 warning default-war web application has
'compile' as true in jrun
-web.xml. Consider setting it false if the application is
running in production
environment.
07/13 22:23:29 user JSPServlet: init
07/13 22:23:29 info Deploying web application "Flex Data
Services" from: file:/C
:/JRun4/servers/logicerm2/flex/
07/13 22:23:29 user JSPServlet: init
07/13 22:23:29 user FlexMxmlServlet: init
07/13 22:23:29 INFO Loading configuration file
C:\JRun4\servers\logicerm2\flex\W
EB-INF\flex\flex-webtier-config.xml
07/13 22:23:30 INFO Loading configuration file
C:\JRun4\servers\logicerm2\flex\W
EB-INF\flex\flex-config.xml
07/13 22:23:30 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler
07/13 22:23:30 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451
07/13 22:23:30 user MessageBrokerServlet: init
07/13 22:23:31 user FlexSwfServlet: init
07/13 22:23:31 user FlexInternalServlet: init
07/13 22:23:31 info Deploying web application "Flex Admin Web
Application" from:
file:/C:/JRun4/servers/logicerm2/flex-admin/
07/13 22:23:31 user JSPServlet: init
07/13 22:23:31 user MessageBrokerServlet: init
07/13 22:23:31 info Deploying web application "Flex Data
Services Samples" from:
file:/C:/JRun4/servers/logicerm2/samples/
07/13 22:23:31 user JSPServlet: init
07/13 22:23:31 user FlexMxmlServlet: init
07/13 22:23:32 INFO Loading configuration file
C:\JRun4\servers\logicerm2\sample
s\WEB-INF\flex\flex-webtier-config.xml
07/13 22:23:32 INFO Loading configuration file
C:\JRun4\servers\logicerm2\sample
s\WEB-INF\flex\flex-config.xml
07/13 22:23:32 user FlexMxmlServlet: Starting Adobe Flex Web
Tier Compiler
07/13 22:23:32 user FlexMxmlServlet: Adobe Flex Web Tier
Compiler Build: 143451
07/13 22:23:32 user MessageBrokerServlet: init
07/13 22:23:32 error Could not pre-load servlet:
MessageBrokerServlet
[1]org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logg
ing.LogConfigurationException:
org.apache.commons.logging.LogConfigurationExcept
ion: Invalid class loader hierarchy. You have more than one
version of 'org.apa
che.commons.logging.Log' visible, which is not allowed.
(Caused by org.apache.co
mmons.logging.LogConfigurationException: Invalid class loader
hierarchy. You ha
ve more than one version of 'org.apache.commons.logging.Log'
visible, which is n
ot allowed.) (Caused by
org.apache.commons.logging.LogConfigurationException: or
g.apache.commons.logging.LogConfigurationException: Invalid
class loader hierarc
hy. You have more than one version of
'org.apache.commons.logging.Log' visible,
which is not allowed. (Caused by
org.apache.commons.logging.LogConfigurationExc
eption: Invalid class loader hierarchy. You have more than
one version of 'org.
apache.commons.logging.Log' visible, which is not allowed.))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:209)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at
org.apache.commons.httpclient.params.DefaultHttpParams.<clinit>(Defau
ltHttpParams.java:53)
at
flex.messaging.services.http.HTTPProxyAdapter.<init>(HTTPProxyAdapter
.java:111)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:71
at
flex.messaging.Destination.createAdapter(Destination.java:277)
at
flex.messaging.Destination.initDestination(Destination.java:103)
at
flex.messaging.services.HTTPProxyService.createDestination(HTTPProxyS
ervice.java:78)
at
flex.messaging.services.AbstractService.createDestinations(AbstractSe
rvice.java:82)
at
flex.messaging.config.MessagingConfiguration.createServices(Messaging
Configuration.java:187)
at
flex.messaging.config.MessagingConfiguration.configureBroker(Messagin
gConfiguration.java:84)
at
flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:10
5)
at
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
java:1242)
at
jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
ice.java:789)
at
jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
va:291)
at
jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at
jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
ce.java:242)
at
jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at
jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
ce.java:179)
at
jrun.deployment.DeployerService.run(DeployerService.java:891)
at
jrunx.scheduler.SchedulerService.invokeRunnable(SchedulerService.java
:223)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
ava:426)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by:
org.apache.commons.logging.LogConfigurationException:
org.apache.comm
ons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have
more than one version of 'org.apache.commons.logging.Log'
visible, which is not
allowed. (Caused by
org.apache.commons.logging.LogConfigurationException: Inval
id class loader hierarchy. You have more than one version of
'org.apache.common
s.logging.Log' visible, which is not allowed.)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:397)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
... 30 more
Caused by:
org.apache.commons.logging.LogConfigurationException: Invalid class
l
oader hierarchy. You have more than one version of
'org.apache.commons.logging.
Log' visible, which is not allowed.
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:385)
... 31 more
[0]flex.messaging.config.ConfigurationException: Unable to
create service 'flex.
messaging.services.HTTPProxyService' for 'proxy-service' due
to the following er
ror: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.lo
gging.LogConfigurationException: Invalid class loader
hierarchy. You have more
than one version of 'org.apache.commons.logging.Log' visible,
which is not allow
ed. (Caused by
org.apache.commons.logging.LogConfigurationException: Invalid cla
ss loader hierarchy. You have more than one version of
'org.apache.commons.logg
ing.Log' visible, which is not allowed.) (Caused by
org.apache.commons.logging.L
ogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
Invalid class loader hierarchy. You have more than one
version of 'org.apache.c
ommons.logging.Log' visible, which is not allowed. (Caused by
org.apache.commons
.logging.LogConfigurationException: Invalid class loader
hierarchy. You have mo
re than one version of 'org.apache.commons.logging.Log'
visible, which is not al
lowed.)).
at
flex.messaging.config.MessagingConfiguration.createServices(Messaging
Configuration.java:202)
at
flex.messaging.config.MessagingConfiguration.configureBroker(Messagin
gConfiguration.java:84)
at
flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:10
5)
at
jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.
java:1242)
at
jrun.servlet.WebApplicationService.preloadServlets(WebApplicationServ
ice.java:789)
at
jrun.servlet.WebApplicationService.postStart(WebApplicationService.ja
va:291)
at
jrun.deployment.DeployerService.initModules(DeployerService.java:711)
at
jrun.deployment.DeployerService.createWatchedDeployment(DeployerServi
ce.java:242)
at
jrun.deployment.DeployerService.deploy(DeployerService.java:430)
at
jrun.deployment.DeployerService.checkWatchedDirectories(DeployerServi
ce.java:179)
at
jrun.deployment.DeployerService.run(DeployerService.java:891)
at jrunx.scheduler.SchedulerS07/13 22:23:33 user
FlexSwfServlet: init
ervice.invokeRunnable(SchedulerService.java:223)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.j
ava:426)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
PLEASE Help!!!
BernieThis can happen if you have the default-ear that JRun creates
and you install the /samples files for Flex Data Services installed
together.
The problem is with the commons-logging.jar. If you copy the
commons-logging.properties file from the
samples\WEB-INF\flex\jars\commons-logging.properties directory to
the samples\WEB-INF\classes\commons-logging.properties directory,
it will resolve the problem.
This is listed as Adobe FDS bug: 179227 -
Weblogic admin console fails to start when commons logging is used.
I have an application that requires commons logging.
I followed the instructions as per the documentation and other forum entries such as How to use log4j into weblogic 10.3 to add the commons logging jar from apache and the weblogic jar specified. Plus I set the system property for the LogFactory.
When I start up the application server I see messages as expected from my application. But when I start up the weblogic Admin console I get and exception and the console fails to start. I even tried to put the jars in my applicaiton instead of the domain/lib directory to try to iscolate the issue but still got issues with starting the Console.
Any ideas on why this is occuring?
See the error below:
####<May 19, 2010 4:16:04 PM EDT> <Notice> <Stdout> <TE001XU-CATOR1> <AdminServer> <Check Retention Schedule Setting> <<WLS Kernel>> <> <> <1274300164672> <BEA-000000> <----------------------------------------Retention Init()---------------------------------------->
####<May 19, 2010 4:16:04 PM EDT> <Notice> <Stdout> <TE001XU-CATOR1> <AdminServer> <Check Retention Schedule Setting> <<WLS Kernel>> <> <> <1274300164672> <BEA-000000> <Thu May 20 05:00:00 EDT 2010>
####<May 19, 2010 4:16:06 PM EDT> <Info> <Health> <TE001XU-CATOR1> <AdminServer> <weblogic.GCMonitor> <<anonymous>> <> <> <1274300166060> <BEA-310002> <81% of the total memory in the server is free>
####<May 19, 2010 4:35:03 PM EDT> <Info> <WorkManager> <TE001XU-CATOR1> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274301303146> <BEA-002901> <Creating WorkManager "consoleWorkManager" for module "null" and application "consoleapp">
####<May 19, 2010 4:35:17 PM EDT> <Error> <HTTP> <TE001XU-CATOR1> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274301317582> <BEA-101216> <Servlet: "AppManagerServlet" failed to preload on startup in Web application: "console".
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at weblogic.servlet.AsyncInitServlet.createDelegate(AsyncInitServlet.java:44)
at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:98)
at weblogic.servlet.AsyncInitServlet.init(AsyncInitServlet.java:78)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1915)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1889)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1807)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
at weblogic.application.internal.BackgroundDeploymentService$2.next(BackgroundDeploymentService.java:373)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BackgroundDeploymentService$BackgroundDeployAction.run(BackgroundDeploymentService.java:277)
at weblogic.application.internal.BackgroundDeploymentService$OnDemandBackgroundDeployAction.run(BackgroundDeploymentService.java:336)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused By: org.apache.commons.logging.LogConfigurationException: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: weblogic.logging.commons.LogFactoryImpl cannot be cast to org.apache.commons.logging.LogFactory)
at org.apache.commons.logging.LogFactory$2.run(LogFactory.java:574)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:517)
at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:254)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.<clinit>(MBeanUtilsInitSingleFileServlet.java:23)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at weblogic.servlet.AsyncInitServlet.createDelegate(AsyncInitServlet.java:44)
at weblogic.servlet.AsyncInitServlet.initDelegate(AsyncInitServlet.java:98)
at weblogic.servlet.AsyncInitServlet.init(AsyncInitServlet.java:78)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1915)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1889)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1807)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
at weblogic.application.internal.BackgroundDeploymentService$2.next(BackgroundDeploymentService.java:373)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
at weblogic.application.internal.BackgroundDeploymentService$BackgroundDeployAction.run(BackgroundDeploymentService.java:277)
at weblogic.application.internal.BackgroundDeploymentService$OnDemandBackgroundDeployAction.run(BackgroundDeploymentService.java:336)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)Thank you for replying. Yes that is the first place we looked and tried. Actually to be more specific we followed the instrcutions under: "How to Use the Commons API with WebLogic Logging Services" of the same link.
Are you thinking that maybe we are we missing a step somewhere else within the site?
Not sure if I was clear before but we are using Weblogic 10.3 and also tried up to version 10.3.3. And we get the same results.
We prefer to use the method with commons logging for our application.
One more specific here what we did on our last attempt.
1. added this to the startWeblogic script JAVAOPTIONS -Dorg.apache.commons.logging.LogFactory=weblogic.logging.commons.LogFactoryImpl
2. we put the WebLogic-specific Commons classes, $BEA_HOME/modules/com.bea.core.weblogic.commons.logging_1.3.0.0.jar, together with the commons-logging.jar file in one of the following locations: APP-INF/LIB or WEB-INF/LIB directory or DOMAIN_NAME/LIB directory server CLASSPATH
We are still not able to get the Weblogic admin console to start
Any other ideas?
Edited by: user13094648 on May 21, 2010 10:29 AM
Edited by: user13094648 on May 21, 2010 10:37 AM -
How to use commons.logging in weblogic (8.1)?
Greetings,
I'm trying to use commons.logging framework to manage the logs of my
application. With Weblogic I will use an implementation that works with
weblogic.logging package but with other J2EE products I'll use another
native log implementations or frameworks (for instance, for jboss I will
use log4j).
1) I created a class WeblogicLogger which implements the Log interface::
public final class WeblogicLogger implements Log {
I packaged this class in a jar file with a properties file,
commons-logging.properties, which has the property setting my class
below has the default logger:
org.apache.commons.logging.Log=pt.ptinovacao.weblogic.logging.WeblogicLogger
2) My sample code has the following code:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private static final Log log = LogFactory.getLog(
LogTimeStartHandler.class.getName());
something(){
log.info(this.getClass()+" test log");
3) I added the commons-logging jars and my jar with my custom wrapper
weblogic logger in ${WL_HOME}/common/bin/commEnv.sh:
WEBLOGIC_CLASSPATH=
(...)${CLASSPATHSEP}${WL_HOME}/server/lib/weblogiclogger.jar${CLASSPATHSEP}${WL_HOME}/server/lib/commons-logging-api.jar${CLASSPATHSEP}${WL_HOME}/server/lib/commons-logging.jar
However, my loggings still not appear in my weblogic server. Did I miss
something?
thanks,
Pedro SalazarDid you manage to get this working?
If yes ... what did you do?
I am having the same problem implementing commons-logging with log4j -
Struts, log4j, commons-logging problems in 9.0.4 too??
ok... I have a J2EE project that uses struts, log4j, a couple ejbs. I can successfully deploy and run on JBoss. However, our client insists that we use the 10g App Server, so I tried to deploy on 10g v10.1.2 (after making the appropriate changes to the deployment descriptors); the ear file deployed without problems, but when using the application, I encountered the following error when the app got to part of my code that tries to create a log file using the commons-logging framework:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
I see from these forums that there is a known problem regarding commons-logging and log4j with v10.1.2 (Help: 10g, struts, commons-logging and log4j doesn't work in 10g!? 9i fine! )..... so, I installed v9.0.4 of the 10g AppServer, deployed and ...... drum roll please.... I get the same error.
The commons-logging.jar file IS in the [application dir]/WEB-INF/lib directory so the app should be finding the org.apache.commons.logging.LogFactory class file. And - struts is working based on page navigation prior to hitting the error (which I've heard indicates that the commons-logging.jar library is being invoked at some point).
So... am I missing something? or does v9.0.4 also have the bug (related to classloaders)???
sure hope someone can help....
ScottI don't know why it's not working either, unless it's related to that classloader issue.... I have the following files in my WEB-INF/lib directory:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
log4j-1.2.9.jar
struts.jar
ScottsTester-ejb.jar (my ejb classes)
ScottsTester-web.jar (my struts-related classes)
I'm running into problems when the app tries to create an instance of my ejb (which has as a member variable an org.apache.commons.logging.Log object which is created by the org.apache.commons.logging.LogFactory object - the Oracle App Server is telling me it can't find the LogFactory class despite the fact that the commoons-logging.jar file is in the WEB-INF/lib directory.... and, as other postings have noted, this appears to be a problem with the classloaders. Unfortunately, the workaround suggesting by Qiang causes problems with my ejbs - when I try to get a home object, I encounter a ClassCastException somewhere in the PortableRemoteObject.narrow(o, DbConnectionHome.class); call..... maybe Oracle should stick to databases..... -
EJBC error when using Commons Logging API
All,
I am using weblogic 7.0 and Commons with log4j.When I run the
ejbc I get the following error.
There is no package called Lorg in my classpath.
Any suggestions on why this is happening?
Thanks in Advance,
Chandrav
[java] ERROR: Error from ejbc: Class not found: Lorg/apache/commons/logging/Log;
[java] <Apr 23, 2003 1:59:58 PM PDT> <Warning> <EJB> <010054> <EJB Deploym
ent: ServiceProviderInterfaceEntityBean has a class com.wisor.validator.servicep
rovidermanagement.entitybean.ServiceProviderInterfaceEntityLocal which is in the
classpath. This class should only be located in the ejb-jar file.>
[java] [EJBCompiler] : Recompiling because no previous hashes found
[java]
[java] java.lang.NoClassDefFoundError: Class not found: Lorg/apache/commons
/logging/Log;
[java] at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBCompl
ianceChecker.java:282)
[java] at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymen
tInfo(EJBComplianceChecker.java:227)
[java] at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompile
r.java:923)
[java] at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.j
ava:879)
[java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:23
2)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
96)
[java] at weblogic.ejbc20.runBody(ejbc20.java:459)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java]
[java]
[java] ERROR: ejbc found errors
[java]
BUILD FAILEDmake sure you have defined the commons logging jar as a Class-Path entry in
your ejb jar META-INF\manifest.mf file
\"Chandrasekaran.V" <[email protected]> wrote in message news:<3ea75721$[email protected]>...
All,
I am using weblogic 7.0 and Commons with log4j.When I run the
ejbc I get the following error.
There is no package called Lorg in my classpath.
Any suggestions on why this is happening?
Thanks in Advance,
Chandrav
[java] ERROR: Error from ejbc: Class not found: Lorg/apache/commons/logging/Log;
[java] <Apr 23, 2003 1:59:58 PM PDT> <Warning> <EJB> <010054> <EJB Deploym
ent: ServiceProviderInterfaceEntityBean has a class com.wisor.validator.servicep
rovidermanagement.entitybean.ServiceProviderInterfaceEntityLocal which is in the
classpath. This class should only be located in the ejb-jar file.>
[java] [EJBCompiler] : Recompiling because no previous hashes found
[java]
[java] java.lang.NoClassDefFoundError: Class not found: Lorg/apache/commons
/logging/Log;
[java] at weblogic.ejb20.compliance.EJBComplianceChecker.check(EJBCompl
ianceChecker.java:282)
[java] at weblogic.ejb20.compliance.EJBComplianceChecker.checkDeploymen
tInfo(EJBComplianceChecker.java:227)
[java] at weblogic.ejb20.ejbc.EJBCompiler.complianceCheckJar(EJBCompile
r.java:923)
[java] at weblogic.ejb20.ejbc.EJBCompiler.checkCompliance(EJBCompiler.j
ava:879)
[java] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:23
2)
[java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
96)
[java] at weblogic.ejbc20.runBody(ejbc20.java:459)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:21)
[java]
[java]
[java] ERROR: ejbc found errors
[java]
BUILD FAILED
Maybe you are looking for
-
I need a method to target specific columns in an IP query embedded in a WAD
I have an IP enabled WAD with multiple embedded queries. I need a method to target specific columns of specific queries so as to enable text wrapping. Does anyone have a technique that has worked for them that they can share? Sheldon
-
So i have setup iCal server in an open directory environment. Its running ok, and i can manage and use individual user calendars, but the group calendars are not showing up in iCal on the client machine im using for testing. In this scenario i have a
-
JRE versions - Vista Compatible
I would like to know wich versions of Sun Java 2 Runtime Environment are compatible with Windows Vista. Or at least I have to know if the Sun Java 2 Runtime Environment 1.4.2_06 is compatible with Windows Vista. Thanks all. Bruno Miyabara.
-
How to determine partner according to higer hierarchy node?
Hi Experts: I need to determine a partner in a sales document according to partner in higher (pricing) hierarchy node. I user access sequence wizard and hierarchy was not available as source for determination. I tried sourc CRM_PARTNER_G assigning it
-
Oracle Pre-defined Business Flows for BF.015
Hi All, I am new to ABF 1.4. I need to prepare a BF.015 (the old BP.080). In the guideline for preparing BF.015, the ABF Guide says - "The work product for this task is the Future Process Model. It consists of all the Oracle Business Flows being impl