You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by lili_ili <sv...@gmail.com> on 2012/01/05 17:06:07 UTC

"object is not assignable" in OSGI environment

Hi

I am developing in OSGI Glassfish 3.1 environment. log4j.jar is loaded as
OSGI bundle  (wrapped as com.springsource.org.apache.log4j bundle), and
log4j.jar also exists in the domain lib.

I have osgi utils.jar bundle that imports log4j.jar bundle and invokes
PropertyConfigurator.configureAndWatch(filePath).

Sometimes I get the following error from configureAndWatch (the fuller log
is attached  http://old.nabble.com/file/p33087002/error.log error.log  )

log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not
assignable to a "org.apache.log4j.Appender" variable.|#]

When I run in log4j bundle, I do not expect to load classes from domain lib.
Is there a way to solve this issue?


thank you
-- 
View this message in context: http://old.nabble.com/%22object-is-not-assignable%22-in-OSGI-environment-tp33087002p33087002.html
Sent from the Log4j - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: "object is not assignable" in OSGI environment

Posted by lili_ili <sv...@gmail.com>.
I saw that one of the ways to solve it is by adding a system property
"log4j.ignoreTCL" = true. Is it a good  solution? Or it may have side
effects in OSGI environment?


lili_ili wrote:
> 
> I am developing in OSGI Glassfish 3.1 environment. log4j.jar is loaded as
> OSGI bundle  (wrapped as com.springsource.org.apache.log4j bundle), and
> log4j.jar also exists in the domain lib. 
> 
> log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not
> assignable to a "org.apache.log4j.Appender" variable.|#]
> 
> 

-- 
View this message in context: http://old.nabble.com/%22object-is-not-assignable%22-in-OSGI-environment-tp33087002p33102830.html
Sent from the Log4j - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org