I've been working on implementing the ServletWrappingController method and I'm having a few issues. Here's my config...
<!-- Setup Spring ServletWrappers -->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/spellchecker/google-spellchecker.do">tinyMCESpellCheckerWrappingController</prop>
</props>
</property>
</bean>
<bean id="tinyMCESpellCheckerWrappingController" class="org.springframework.web.servlet.mvc.ServletWrappingController">
<property name="servletClass">
<value>org.tinymce.spellchecker.TinyMCESpellCheckerServlet</value>
</property>
<property name="servletName">
<value>doPost</value>
</property>
</bean>
I'm getting a few exceptions...
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tinyMCESpellCheckerWrappingController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Invocation of init method failed; nested exception is java.lang.InstantiationException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tinyMCESpellCheckerWrappingController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Invocation of init method failed; nested exception is java.lang.InstantiationException
I don't see an error message here so I'm unsure where to begin debugging to determine the cause...
I just checked your other post and it seems the class TinyMCESpellCheckerServlet is an abstract class which caused this issue on trying instantiating this class.
Related
In my project, I have configured spring beans as follows. (To get the DataSource via JNDI). And the below configurations worked fine when I used spring 3.2.5 along with hibernate 4.
<bean id="dataSource" class="org.springframework.remoting.rmi.JndiRmiProxyFactoryBean">
<property name="jndiName" value="java:/jdbc/mydb"/>
<property name="serviceInterface" value="javax.sql.DataSource"/>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean" scope="singleton">
<property name="dataSource" ref="dataSource"/>
<property name="packagesToScan" value="com.abc.core.system_configuration.implGeneral.bean.*"/>
<property name="configLocations" value="implGeneral/sysConfigHibernate.cfg.xml"/>
</bean>
However, now when I try to update Spring to 5.1.8 and Hibernate 5, I get the below error.
Initialization of bean failed;
nested exception is org.springframework.beans.ConversionNotSupportedException:
Failed to convert property value of type 'org.springframework.remoting.rmi.JndiRmiProxyFactoryBean' to required type 'javax.sql.DataSource' for property 'dataSource';
nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.remoting.rmi.JndiRmiProxyFactoryBean' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found.
why org.springframework.remoting.rmi.JndiRmiProxyFactoryBean cant be casted to javax.sql.DataSource . Does anyone have an idea on this?
UPDATED:
complete error log is as follows
13:59:30,939 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleCacheControler' defined in class path resource [implGeneral/spring-config-systemconfig.xml]: Cannot resolve reference to bean 'ruleHibernatePersister' while setting constructor argument;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleHibernatePersister' defined in class path resource [implGeneral/spring-config-systemconfig.xml]: Cannot resolve reference to bean 'sessionFactory' while setting constructor argument;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [implGeneral/spring-config-systemconfig.xml]: Initialization of bean failed;
nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.remoting.rmi.JndiRmiProxyFactoryBean' to required type 'javax.sql.DataSource' for property 'dataSource';
nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.remoting.rmi.JndiRmiProxyFactoryBean' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found
while integrating Spring Security SAML Extension with sso getting No bean named 'parserPool' is defined spring security error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'metadata' defined in ServletContext resource [/WEB-INF/spring-config/spring-security.xml]: Cannot create inner bean 'org.opensaml.saml2.metadata.provider.HTTPMetadataProvider#5b357e7c' of type [org.opensaml.saml2.metadata.provider.HTTPMetadataProvider] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.opensaml.saml2.metadata.provider.HTTPMetadataProvider#5b357e7c' defined in ServletContext resource [/WEB-INF/spring-config/spring-security.xml]: Cannot resolve reference to bean 'parserPool' while setting bean property 'parserPool'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'parserPool' is defined
add
#Bean(initMethod = "initialize")
public StaticBasicParserPool parserPool() {
return new StaticBasicParserPool();
}
I don't do xml configuration but I guess you can easily translate this bean declaration.
In xml just add the bean
<!-- XML parser pool needed for OpenSAML parsing -->
<bean id="parserPool"
class="org.opensaml.xml.parse.StaticBasicParserPool"
init-method="initialize">
<property name="builderFeatures">
<map>
<entry
key="http://apache.org/xml/features/dom/defer-node-expansion"
value="false" />
</map>
</property>
I'm having issue while upgrading JAVA8 from Java6 and Tomcat7.0 to Tomcat8.0. Before I'm having Spring source suite tool development tool. hibernate3 jar file is used I'm having below issue.
Please let me know which hibernate jar files it will support and other jar files?
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'desecn' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'itracProps' while setting bean property 'icProps';
nested exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'itracProps' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed;
nested exception is java.lang.NullPointerException.
WEB-INF/Application-context.xml file:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans
PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- COMMON CLASS -->
<bean id="desecn" class="com.appfoundation.itrac3.misc.DesEncrypter">
<property name="icProps" ref="icProps" />
</bean>
<bean id="utility" class="com.appfoundation.itrac3.misc.Utility">
<property name="icProps" ref="icProps"/>
<property name="desecn" ref="desecn"/>
</bean>
<!-- Precept Migration - init method is placed to get Servlet Context from Spring Web Application Context -->
<bean id="icProps" class="com.appfoundation.itrac3.misc.ItProperties" init-method="loadProperties"/>
Error:
org.springframework.web.servlet.FrameworkServlet initServletBean
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'messageSource' defined in ServletContext
resource [/WEB-INF/searchcenterTLSencha-servlet.xml]: Initialization
of bean failed; nested exception is java.lang.NullPointerException
XXXX-servlet.xml: (part of it)
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basenames">
<list>
<value>resources/messages</value>
<value>resources/application</value>
</list>
</property>
</bean>
Please someone assist me here, its been 2 days I spent time on this, still not able to figure out.
Appreciate your help..
I am trying to setup a spring project with neo4j. However, when I run the application it does not start up and give the following exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'videoRepository': Cannot resolve reference to bean 'neo4jTemplate' while setting bean property 'neo4jTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Cannot resolve reference to bean 'graphDatabaseService' while setting bean property 'graphDatabaseService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'graphDatabaseService' defined in class path resource [spring/neo4j.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.neo4j.kernel.EmbeddedGraphDatabase]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#147e32a' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnableToUpgradeException: Not all store files match the version required for successful upgrade
Here is my neo4j.xml
<neo4j:repositories base-package="neo4j.repository"/>
<neo4j:config graphDatabaseService="graphDatabaseService"/>
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase" destroy-method="shutdown">
<constructor-arg value="C:/Users/mario/Documents/Neo4j/default.graphdb"/>
<constructor-arg>
<map>
<entry key="allow_store_upgrade" value="true"/>
</map>
</constructor-arg>
</bean>
I am assuming that this problem is caused by allow_store_upgrade. If I remove or set this property to false a exception is thrown suggesting to me to set it to true. What is really causing this problem and how can I fix it?