Page 1 of 1

Updating BLC from 2.0.1 to 2.2.0 version

Posted: Tue Mar 05, 2013 9:41 am
by staleks
Hi,

I've just tried to update my project, based on BLC 2.0.1-GA framework, to latest 2.2.0-GA but when applicationContexts starts to load, I'm getting following exception:

Code: Select all

Caused by: org.hibernate.HibernateException: Missing table: BLC_ADMIN_SEC_PERM_XREF
   at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1340)
   at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:378)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
   ... 33 more


Does anyone else has the same problem?

Re: Updating BLC from 2.0.1 to 2.2.0 version

Posted: Thu Mar 07, 2013 12:15 pm
by staleks
Ok, I've figured it out that I need to execute "Database Change" that is already described.


Now I am facing some other issue:

Code: Select all

[2013-03-07 17:56:45] JRebel-Spring: Monitoring Spring bean definitions in '/home/aleksandar/git/WebApp/core/target/classes/applicationContext-entity.xml'.
[ WARN] 17:56:48 PassthroughEncryptionModule org.broadleafcommerce.common.encryption.PassthroughEncryptionModule - This passthrough encryption module provides NO ENCRYPTION and should NOT be used in production.
[ WARN] 17:56:49 CoreContainer org.apache.solr.core.CoreContainer - Log watching is not yet implemented for log4j
[ WARN] 17:56:50 SolrCore org.apache.solr.core.SolrCore - New index directory detected: old=null new=api-solr/core0dir/data/index/
[ WARN] 17:56:50 SolrCore org.apache.solr.core.SolrCore - New index directory detected: old=null new=api-solr/core1dir/data/index/
[ WARN] 17:56:56 ContentNegotiatingViewResolver org.springframework.web.servlet.view.ContentNegotiatingViewResolver - Did not find any ViewResolvers to delegate to; please configure them using the 'viewResolvers' property on the ContentNegotiatingViewResolver
[ERROR] 17:56:56 ContextLoader org.springframework.web.context.ContextLoader - Context initialization failed
java.lang.NoClassDefFoundError: org/springframework/beans/factory/annotation/BeanFactoryAnnotationUtils
   at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:245)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:100)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at sun.proxy.$Proxy89.onApplicationEvent(Unknown Source)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:475)
   at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
   at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
   ... 22 more


I've
    - updated solrconfig.xml to LUCENE_40, as suggested.
    - Removed that "/update/javabin",
    - add <uniqueKey>id</uniqueKey> in schema.xml just below <fields></fields> element

but when I start site, I am getting above error.


Can someone get me some idea where I am wrong?

I am 100% sure that spring-beans-3.1.3 is available in classpath :)

Re: Updating BLC from 2.0.1 to 2.2.0 version

Posted: Fri Mar 08, 2013 4:46 am
by staleks
I've found what have been troubling me.

we've extended project with another module, and while applicationContext.xml was loading, it loads beans from new-module through <context:component-scan>.
And in that new module, some of team members, in pom.xml accedently was used spring-beans-3.1.1.RELEASE strictly stated as <dependency>

classLoader as part of ContextLoader was using that spring-beans-3.1.1.RELEASE instead of 3.1.3 which BLC framework uses.


Therefore I was getting NoClassDefException.

Consider this closed.