Appfuse Tutorial troubles - BeanCreationException - appfuse

I'm working through the Appfuse tutorial for version 3.5 (as previously advised by Matt Raible in response to another question).
I'm on this step: http://appfuse.org/display/APF/Using+Spring+MVC#UsingSpringMVC-listview
But when I build (mvn package).. I get the following error:
Running gov.nysed.archives.Nimbus.dao.PersonDaoTest
Running gov.nysed.archives.Nimbus.webapp.controller.UpdatePasswordControllerTest
WARN [main] GenericApplicationContext.refresh(487) | Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean wit h name 'userManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void gov.nysed.archives.Nimbus.service.impl.UserManagerImpl.set
MailMessage(org.springframework.mail.SimpleMailMessage); nested exception is java.lang.NoClassDefFoundError: [Lorg/hibernate/engine/FilterDefinition;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.1.3.RELEASE.jar:4.1.3.RELEASE] ...
Could my adding the "persons" section (Entity and controller etc) cause this problem? It passed the tests prior to adding the new entity... so of course, yes... but how?

Related

Graphdb Startup failure after computer reboot

I had to shutdown graphdb due to a reboot but now after starting up again I get a long list of errors...
Error message here as it is too long for stackoverflow
I am now running the storage tool to export the few dozen graphs I have in there but is there a way to restore and startup graphdb again? It is version 8.0.2 and I am planning to upgrade it soon...
All GraphDB errors with messages like the one below indicate that the Workbench failed to deserialize the internal database containing information about the currently active location, users, permissions, saved SPARQL queries, application states like diagrams, etc.
[ERROR] 2017-06-23 07:51:55,256 [localhost-startStop-1 | o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener|
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'fileTasksExecutor': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryActionClassHierarchyListener' defined in URL [jar:file:/ssd/graphdb-free-8.0.2/lib/workbench/WEB-INF/lib/graphdb-framework-graph-explore-8.0.2.jar!/com/ontotext/forest/graphexplore/listener/RepositoryActionClassHierarchyListener.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.ontotext.forest.graphexplore.service.ClassHierachyStorageService]: : Error creating bean with name 'classHierachyStorageService': Invocation of init method failed; nested exception is java.lang.NullPointerException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'classHierachyStorageService': Invocation of init method failed; nested exception i|
s java.lang.NullPointerException
To reinitialize the Workbench's meta-data rename or delete the directory {$gdb.home.work}. This operation will remove all Workbench specific configurations only and keep all your repository data!

Simple Camel run goal with blueprint gives exception

I have a simple maven project created based on camel blueprint archetype.
When I do "mvn camel:run" I see this error
Caused by: java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:295)
at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:256)
at org.apache.camel.test.blueprint.Main.doStart(Main.java:110)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.main.MainSupport.run(MainSupport.java:138)
at org.apache.camel.main.MainSupport.run(MainSupport.java:390)
at org.apache.camel.test.blueprint.Main.main(Main.java:79)
Why is a test package being used ? I don't have anything in test scope or test classes. What is the sequence of the OsgiService creation and which class is supposed to create it ?
The issue was CamelContext was not getting created. The problem went away when I removed the reference to an unknown class.
I move to karaf

How to solve BeanCreationException ploblem while upgrading grails version from 2.4.5 to 2.5.0?

I'm upgrading grails version to 2.5.0 from 2.4.5. The problem that occurred while running my project is -
Error initializing the application: Error creating bean with name 'com.athena.mis.application.model.ListSupplierActionServiceModelValidator': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.codehaus.groovy.grails.orm.hibernate.validation.HibernateDomainClassValidator.setProxyHandler(org.codehaus.groovy.grails.support.proxy.ProxyHandler); nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.athena.mis.application.model.ListSupplierActionServiceModelValidator': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.codehaus.groovy.grails.orm.hibernate.validation.HibernateDomainClassValidator.setProxyHandler(org.codehaus.groovy.grails.support.proxy.ProxyHandler); nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.access$100(Lorg/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor;)Lorg/springframework/beans/factory/config/ConfigurableListableBeanFactory;
ListSupplierActionServiceModel is a groovy class in my project and it's cache usage is read-only.
I had quite a hard time fixing this one...
Simply remove the .slcache directory in your grails project root folder and you're done !
Differently from what Ludovic reported, I actually found that I had to delete the .slcache directory from $HOME/.grails/

When deploy a webapp to WebLogic12c encounters a JAXBException

I try to deploy a application on WebLogic 12c(version:12.1.2.0.0), when staring up it encounters an Exception as blow:
Failed to create the JAXB binder; nested exception is javax.xml.bind.JAXBException: provider org.eclipse.persistence.jaxb.JAXBContextFactory could not be instantiated: javax.xml.bind.JAXBException:
Exception Description: The java interface org.apache.camel.Endpoing can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
- with linked exception:
[Exception [EclipseLink-50089] (Eclipse Persistence Service - 2.4.2.v2013-0514-5956486): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The java interface org.apache.camel.Endpoing can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
But it doesn't happen when deploy to WebLogic11g(version:10.3.3.0).
Is this caused by a jar conflict?
I found a solution at the following threads:
http://camel.465427.n5.nabble.com/Spring-Camel-Context-initialization-error-in-weblogic-12c-td5733202.html
http://camel.465427.n5.nabble.com/Help-on-deploying-Camel-on-Weblogic-12c-Name-Collision-td5720837.html
After putting the jaxb.properties in my camel-spring-x.x.x.jar and redeploy, the problem has gone.

Error creating bean with name 'worklight-direct'

I am using the MobileFirst Platform on Liberty profile and DB2 for database.
I deployed the new project war file on the Mobile First Platform. after the deployment I restart the server when I try to access the Mobile First Platform console I am getting the below error.
but the project schema, Mobile First Platform schema and report schema are there and currently there has not been any change on DB2 side.
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'worklight-direct' defined in URL
[wsjar:file:/appl/was1/IBM/WebSphere/Liberty/usr/shared/resources/hamfactoryapps/lib/worklight-jee-library.jar!/conf/spring-server-core.xml]:
Invocation of init method failed; nested exception is
java.lang.RuntimeException: FWLSE0206E: The project /hamfactoryapps failed
to initialize, because the project database schema for data source
jdbc:db2://xxxxxx:51000/WRKLGHT is from version N/A,
which is not supported by the server from version 6.3.0.00.20141127-1357.
Use the MobileFirst ant tasks to upgrade the project database schema.
[project hamfactoryapps]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean
(AbstractAutowireCapableBeanFactory.java:473)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
$1.run(AbstractAutowireCapableBeanFactory.java:409)
I delete the old schema and I create the new one, after I'm getting the below error.
[ERROR ] CWNEN0030E: The #Resource factory encountered a problem getting the object instance jdbc/WorklightAdminDS binding object. The exception message was: failed to resolve jdbc/WorklightAdminDS to javax.sql.DataSource
[WARNING ] Expected an object of type DataSource, but found: null
[ERROR ] Context initialization failed
Error creating bean with name 'registrationServiceFactory' defined in ServletContext resource [/WEB-INF/spring-management-service.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to open data base. DataStoreFactory returned null for unknown reason.
[ERROR ] SRVE0283E: Exception caught while initializing context: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registrationServiceFactory' defined in ServletContext resource [/WEB-INF/spring-management-service.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to open data base. DataStoreFactory returned null for unknown reason.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:300)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
This error would happen if you are trying to access the wrong schema than the one you have intended to use. Double-check this.
Also make sure that you have used the correct create-worklight-db2.sql. See the documentation here: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.installconfig.doc/devref/t_ant_tasks_configure_dbs_wlconsole.html
purge the database and re-create it based on the above.