Page 1 of 2
Merge Issues
Posted: Thu Sep 13, 2012 1:51 pm
by Valdus
My override of the CustomerImpl class is being overwritten by the merge process and I am not exactly sure why this is, I followed the tutorial exactly from you guys and it still throws a 500 error on tomcat not being able to cast.
Re: Merge Issues
Posted: Thu Sep 13, 2012 2:36 pm
by Valdus
One update to this, through my tomcat logs I have found the the profile entity manager is being loaded after my applicationcontext-entity.xml file from core. I have no idea how or why that is happening, but I know it should not.
Re: Merge Issues
Posted: Thu Sep 13, 2012 3:29 pm
by phillipuniverse
Can you post your patchConfigLocations that you have configured in web.xml? Any of your own application contexts should be loaded after any BLC ones.
Re: Merge Issues
Posted: Thu Sep 13, 2012 3:33 pm
by Valdus
Here is my patch configuration it is exactly as i received when i downloaded. Also included is the debug error from tomcat
Code: Select all
<context-param>
<param-name>patchConfigLocation</param-name>
<param-value>
classpath:/bl-open-admin-contentClient-applicationContext.xml
classpath:/bl-cms-contentClient-applicationContext.xml
classpath:/applicationContext.xml
/WEB-INF/applicationContext-datasource.xml
/WEB-INF/applicationContext-email.xml
/WEB-INF/applicationContext-security.xml
/WEB-INF/applicationContext.xml
</param-value>
</context-param>
Code: Select all
[ INFO] 15:25:37 XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [bl-profile-applicationContext-entity.xml]
[DEBUG] 15:25:37 DefaultDocumentLoader - Using JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]
[DEBUG] 15:25:37 PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.1.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.1.xsd
[DEBUG] 15:25:37 DefaultBeanDefinitionDocumentReader - Loading bean definitions
[DEBUG] 15:25:37 BeanDefinitionParserDelegate - Neither XML 'id' nor 'name' specified - using generated bean name [org.broadleafcommerce.profile.core.domain.CountryImpl#19032362]
[ INFO] 15:25:37 DefaultListableBeanFactory - Overriding bean definition for bean 'org.broadleafcommerce.profile.core.domain.Customer': replacing [Generic bean: class [com.crown.profile.core.domain.CrownCustomerImpl]; scope=prototype; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [applicationContext-entity.xml]] with [Generic bean: class [org.broadleafcommerce.profile.core.domain.CustomerImpl]; scope=prototype; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [bl-profile-applicationContext-entity.xml]]
[ INFO] 15:25:37 XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [bl-cms-applicationContext-entity.xml]
Re: Merge Issues
Posted: Thu Sep 13, 2012 3:47 pm
by phillipuniverse
I assume that this is what you have in applicationContext-entity.xml in core?
Code: Select all
<bean id="org.broadleafcommerce.profile.core.domain.Customer" class="com.crown.profile.core.domain.CrownCustomerImpl" scope="prototype" />
You might also turn on INFO logging on org.broadleafcommerce for log4j.xml. On startup you can then see the final merged applicationcontext that Broadleaf will present to Spring. From that, you can check the blMergedEntityContexts. I'm curious if the bl-profile-applicationContext-entity.xml is actually appearing after your custom applicationContext-entity or if maybe something else is going on.
Re: Merge Issues
Posted: Thu Sep 13, 2012 3:51 pm
by Valdus
I'm doing that right now, I'll get that up and report back to you. If you want I can attach the log file for everything as an attachment.
Re: Merge Issues
Posted: Thu Sep 13, 2012 4:04 pm
by Valdus
The application is somehow loading the bl-profile-applicationcontext-entity.xml after mine. So I guess the real question is how do I fix that.
Re: Merge Issues
Posted: Fri Sep 14, 2012 8:56 am
by Valdus
I have spent the morning and definitely confirmed that the profile application context is loading after application context from core. I guess my issue is that I cannot figure out where the merge order has been specified for the files from the broadleaf framework.
Re: Merge Issues
Posted: Fri Sep 14, 2012 9:48 am
by aazzolini
We are using an incorrect data structure to store the files to merge.
We will be converting these to LinkedHashSet for the next release.
Re: Merge Issues
Posted: Fri Sep 14, 2012 9:51 am
by Valdus
Do you have a work around I can use till this release, because I can't actually continue my development until this issue is resolved. And if not how long until the next release with this fix. Thanks for answering the questions I have btw you guys are a great help.