Page 1 of 1

SupportLogger ClassCastException while deploying admin WLS

Posted: Sun Sep 14, 2014 11:45 pm
by RajuNene
Hi,

I am new to BroadleafCommerce and to the Java EE world. I wanted to deploy site and admin applications on weblogic application server. I have no issues with the site, site is up and running on the weblogic instance. When I am trying to deploy admin.war on the same weblogic instance I am getting the following error,

looks like there is an explicit cast statement in getLogger() method of SupportLogManager class, Please help me out in resolving this.

Thanks in Advance!
Raj


<User defined listener org.broadleafcommerce.common.web.extensibility.MergeContextLoaderListener fai
led: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blConfiguration' defined in resource loaded from byte array: Instan
tiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.broadleafcommerce.common
.config.RuntimeEnvironmentPropertiesConfigurer]: Constructor threw exception; nested exception is java.lang.ClassCastException: org.broadleafcommerce.common.logging.SupportLogger cannot be cast to org.broadleafcommerce.common.logging.SupportLogger.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blConfiguration' defined in resource loaded from byte array: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class org.broadleafcommerce.common.conf
ig.RuntimeEnvironmentPropertiesConfigurer]: Constructor threw exception; nested exception is java.lang.ClassCastException: org.broadleafcommerce.common.logging.SupportLogger cannot be cast to org.broadleafcommerce.common.logging.SupportLogger
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.broadleafcommerce.common.config.RuntimeEnvironmentPropert
iesConfigurer]: Constructor threw exception; nested exception is java.lang.ClassCastException: org.broadleafcommerce.common.logging.SupportLogger cannot be cast
to org.broadleafcommerce.common.logging.SupportLogger
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException: org.broadleafcommerce.common.logging.SupportLogger cannot be cast to org.broadleafcommerce.common.logging.SupportLogger

at org.broadleafcommerce.common.logging.SupportLogManager.getLogger(SupportLogManager.java:44)
at org.broadleafcommerce.common.logging.SupportLogManager.getLogger(SupportLogManager.java:60)
at org.broadleafcommerce.common.config.RuntimeEnvironmentPropertiesConfigurer.<init>(RuntimeEnvironmentPropertiesConfigurer.java:83)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Truncated. see log file for complete stacktrace

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Mon Sep 15, 2014 9:14 am
by phillipuniverse
Can you open an issue for this at https://github.com/BroadleafCommerce/Br ... rce/issues? Specifically reference that this is a problem in WebLogic.

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Mon Sep 15, 2014 7:41 pm
by RajuNene
Hi Phillip,

As suggested I have raised an issue in Github and the issue number is #1123,
Just curious, If there is an issue with weblogic, then site shouldn't be working right.but site application is working fine.
any thoughts?

Thanks,
Raj

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Tue Sep 16, 2014 11:14 am
by phillipuniverse
I don't have any ideas at the moment, that's a pretty weird issue. Especially because it says that the cast is to the exact same class

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Tue Sep 16, 2014 12:31 pm
by prabhat.kataria
Raju, can you confirm if you can successfully run site and admin separately? I faced similar kind of problem which i mentioned at viewtopic.php?f=15&t=3178&p=8091&hilit=No+bean+named+%27%24%7Bsolr.source%7D%27+is+defined#p8091. Only diffrences are my problem is related to tomcat and I get following exception in my case.
NoSuchBeanDefinitionException: No bean named '${solr.source}' is defined


P.S: I am on BLC 3.1.5-GA

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Tue Sep 16, 2014 9:11 pm
by RajuNene

Hi Prabath,

I did not tried to run site and admin independently, because site should be up and running before we start admin application as per Getting Started doc. I have only one instance of weblogic 12c, on this I am able to deploy and run the site without any issues. when I am trying to deploy admin on the same instance this issue occurs.

I am actaully on BLC 3.0.8-GA.

Appreciate help in this regard.

Thanks,
Raj

Re: SupportLogger ClassCastException while deploying admin WLS

Posted: Wed Sep 17, 2014 11:34 am
by prabhat.kataria
Yes getting started doc says to start site before admin so as to populate all data correctly. But you can take database backup or change hibernate property to create database only once and then you can try running admin alone.

Do let me know if you are able to run admin.