Page 1 of 1

Entity Configuration

Posted: Mon Aug 06, 2012 8:36 am
by Valdus
Simply put, I followed the tutorial on the website in order to implement a custom implementation of customer and I am getting this error.


[ERROR] 09:19:28 ContextLoader - Context initialization failed
[artifact:mvn] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Cannot resolve reference to bean 'blPersistenceUnitManager' while setting bean property 'persistenceUnitManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blPersistenceUnitManager' defined in resource loaded from byte array: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: com.crown.profile.core.domain.CrownCustomerImpl
[artifact:mvn] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
[artifact:mvn] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[artifact:mvn] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[artifact:mvn] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
[artifact:mvn] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
[artifact:mvn] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
[artifact:mvn] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
[artifact:mvn] at org.broadleafcommerce.common.web.extensibility.MergeContextLoaderListener.contextInitialized(MergeContextLoaderListener.java:42)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:766)
[artifact:mvn] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:406)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:758)
[artifact:mvn] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:242)
[artifact:mvn] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1233)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:701)
[artifact:mvn] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:475)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
[artifact:mvn] at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
[artifact:mvn] at org.eclipse.jetty.server.Server.doStart(Server.java:272)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
[artifact:mvn] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
[artifact:mvn] at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511)
[artifact:mvn] at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364)
[artifact:mvn] at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516)
[artifact:mvn] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[artifact:mvn] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
[artifact:mvn] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
[artifact:mvn] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
[artifact:mvn] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
[artifact:mvn] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
[artifact:mvn] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
[artifact:mvn] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
[artifact:mvn] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[artifact:mvn] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[artifact:mvn] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[artifact:mvn] at java.lang.reflect.Method.invoke(Method.java:597)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
[artifact:mvn] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[artifact:mvn] at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


Any help would be appreciated.

Re: Entity Configuration

Posted: Mon Aug 06, 2012 9:11 am
by phillipuniverse
Might be that you didn't do a maven re-install of core? Might be why the class isn't getting picked up.

Re: Entity Configuration

Posted: Mon Aug 06, 2012 9:28 am
by Valdus
I tried that, and it actually still failed is it possible that it is because I'm using a sql server as opposed to the standard database that comes with the demo?

Re: Entity Configuration

Posted: Mon Aug 06, 2012 9:48 am
by Valdus
Update on the question, do I need to include the updated package in the pom file for the maven installer to even see it?

Re: Entity Configuration

Posted: Mon Aug 06, 2012 10:12 am
by Valdus
Got it working had to create a different entity configuration file. Once I did that and added it to the build pathing it worked just fine.

Re: Entity Configuration

Posted: Mon Aug 06, 2012 2:42 pm
by phillipuniverse
Cool, thanks for reporting back.

Re: Entity Configuration

Posted: Tue Aug 07, 2012 7:58 am
by Valdus
No problem, its better that people know a solution rather than getting stuck in the same scenario I was in.

Re: Entity Configuration

Posted: Mon Oct 29, 2012 3:19 pm
by chico1198@yahoo.com
I am having the exact same problem. Could you elaborate on "Got it working had to create a different entity configuration file. Once I did that and added it to the build pathing it worked just fine." If possible, I would like to get my instance working as well.

For me, this seems to be related to trying to reconfigure my application to work with Tomcat rather than Jetty.

Thanks,

Chris

Re: Entity Configuration

Posted: Mon Oct 29, 2012 6:55 pm
by chico1198@yahoo.com
I figured out the problem - I was attempting to run a "production" scenario. The "production" value I passed to the JVM seems to cause this issue. When I removed the line (thus running 'devlopment'), I was able to start Tomcat just fine.

Re: Entity Configuration

Posted: Mon Nov 05, 2012 1:28 pm
by chico1198@yahoo.com
As it turns out, the answer was even simpler than expected. In my Ant script I had mistakenly typed "tomcat7:run" instead of "tomcat7:run-war" after compiling and packaging my .war file. As an old boss would say, "skinwear error". ;)