Tag Archives: JavaWeb

Error creating bean with name ‘datasource’ defined in class path resource

Use idea to create a new spring boot project, do nothing, create a new controller, and then start to report an error

Exception encountered during context initialization – cancelling refresh attempt: org.springframework.beans . factory.BeanCreationException : Error creating bean with name ‘dataSource’ defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$ Hikari.class ]: Bean instantiation via factory method failed; nested exception is org.springframework.beans .BeanInstantiationException: Failed to instantiate [ com.zaxxer.hikari .HikariDataSource]: Factory method ‘dataSource’ threw exception; nested exception is org.springframework.boot . autoconfigure.jdbc.DataSourceProperties $DataSourceBeanCreationException: Failed to determine a suitable driver class

 

Reason: spring boot will load by default org.springframework.boot . autoconfigure.jdbc.DataSourceAutoConfiguration class

Because there is no configuration information related to datasource in the new spring boot project, an error is reported as soon as it is started

Add the following to the application class:

@EnableAutoConfiguration(exclude={DataSou rceAutoConfiguration.class })

 

Or configure the datasource information and complete the configuration file

Servlet error: no interface expected here

No interface expected here error was encountered when implementing the code. Idea was not compiled. No interface expected here means there is no interface.

resolvent

After a look around, we found that servlet is an interface, not a class. Httpservlet is an abstract class, so when we change it to servlet, we need to change extensions to implements.

Change extend to implements

 

 

 

Illegalargumentexception error when adding cookie to response

Many people often make this mistake when learning cookies. Someone asked me this question today, so I will share with you the solution to this problem (there is no specific solution on the Internet).
error code:

Cookie cookie=new Cookie("name","value value2");
response.addCookie(cookie);

Error
Java. Lang. IllegalArgumentException: An invalid character [32] was present in the Cookie value
Error code:

Cookie c=new Cookie("name","value,value2");
response.addCookie(c);

Error:
Java. Lang. IllegalArgumentException: An invalid character [44] was present in the Cookie value

the exception can be seen that this problem belongs to the invalid parameters, looking at the back of the prompt content
the An invalid character [44] was present in the Cookie value
cookies are invalid characters in character [44], so we query ASCII code is 44 said
“, “said 32 Spaces so we only need to replace the value of the corresponding characters, or coding

Solution of project error reporting in eclipse

I. The project has a Red Cross:

Target runtime MyEclipse Tomcat V7.0 Unknown Faceted Project Problem
br> Target runtime MyEclipse Tomcat V7.0 Unknown Faceted Project Problem

2. To find the project directory. Mon. Under the Settings of org.eclipse.wst.com project. Facet. XML core.

3. Will & lt; The runtime name = “MyEclipse Tomcat v7.0″/& gt; Delete, and then right-click the project and refresh.

Second, the projects have a red exclamation point
right click – buildPath – see each TAB to see if there is failure jars or path error
Three, didn’t find the sessionFactory project appear this error:
the solution: (need SRC and res) in both directory to compile project right – buildPath – source – addFolder – check the res and SRC – ok

Right-click on the project –buildPath–Libraries– select JRE System Library–Edit– select Workspace Default JRE


Five, the project after import the captcha code error:
import com. Sun.. Image codec. Jpeg. JPEGCodec; .
import com. Sun. Image codec. Jpeg. JPEGImageEncoder;
Access: The type JPEGCodec is not accessible due to restriction on required library D:\eclipse\JDK7x64\jre\lib\rt.jar
br bb0 Access: restriction: The type JPEGCodec is not accessible due to restriction on required library D:\eclipse\JDK7x64\jre\lib\rt.jar Warning: Forbidden References (Access Rules) from the Deprecated and Restricted API in Windows-Preferences-Java-Complicer-Errors/Warnings.
2, [Project] ->; Properties -> Java Build Path -> Libraries -> Delete JRE System Library
and Add: Add Library ->; JRE System Library -> Click OK
3, [Project] -> Properties -> Java Build Path -> Libraries -> Double-click the JRE System Library and change it to “Workspace Default JRE”

Six, because of the relationship between work, Eclipse development of Java projects to copy, sometimes report a very strange error. Java Compiler Level does not match the version of the installed Java project facet “Java Compiler Level does not match the version of the installed Java project facet” when the source code is identical.
it is very easy to solve, actually under the resource manager, find the project directory, in. Settings subdirectories inside, use a text editor open org.eclipse.wst.com mon. Project. Facet. Core. The XML configuration file
content is as follows:
& lt; ?The XML version = “1.0” encoding = “utf-8”?>
& lt; faceted-project>
& lt; runtime name=”com.genuitec.runtime.generic.jee70″/>
& lt; fixed facet=”jst.web”/>
& lt; fixed facet=”wst.jsdt.web”/>
& lt; fixed facet=”java”/>
& lt; Installed facet = “Java” version = “1.7”/& gt;
& lt; Installed facet = “JST. Web” version = “3.1”/& gt;
& lt; Installed facet = “JST. Web. JSTL” version = “1.2.2”/& gt;
& lt; Installed facet = “WST. JSDT. Web” version = “1.0”/& gt;
& lt; /faceted-project>

& lt; Installed facet = “Java” version = “1.7”/& gt;
:
:
:
:
the right mouse button to select the project, click Properties, select the Java Compiler, you can see on the right side window to the Compiler version
check the Enable project specific Settings
check Use default the compliance Settings
the selection of the corresponding version into in accordance with the version = “1.7”

Relative path and absolute path${ pageContext.request.contextPath }

Exe
relative path: the path from the current path, if the current path is C:\ Windows
to describe the path, just type
system32\ CMD. Exe
in fact, the strict relative path should be
.\system32\ CMD. Exe
, where. Represents the current path, which can be omitted in channel cases, but not in special cases.
if the current path is c:\program files
to invoke the above command, you need to type
.. \ Windows \system32\cmd.exe
where.. Is the parent directory.
if the current path is c:\program files\common files
then you need to enter
… .\windows\system32\cmd.exe
Hold on, this should make a lot more sense than it does in the program.
The ${pageContext. Request. ContextPath} is equivalent to the & lt; %=request.getContextPath()%> or you could say < %=request.getContextPath()%> EL version of
means to remove the deployment of the application name, or the current project name
such as my project name for SpringMVC in the browser input for http://localhost:8080/SpringMVC/login.jsp
The ${pageContext. Request. ContextPath} or & lt; %=request.getContextPath()%> is to take out/for SpringMVC, and "/" represents the meaning of is http://localhost:8080
so we project should write ${pageContext. Request. ContextPath}/login JSP
Just give me some examples. I'm going to start with the relative path, and in a lot of cases I'm going to get it right.

You see the delete, I also use the relative path, why it won't go wrong for me, because the request path only one layer, there is no placeholder, when converting HiddenHttpMethodFilter delete request will remove a layer, so will not go wrong, the request path into http://localhost:8080/emp/1001

but this edit is not so optimistic.

There is a placeholder in the path, so the conversion will not be complete.

This is the kind of farce that occurs when multiple layers of requests have no path for a Handler to process in the first place.
So use relative paths as often as possible.

exception is java.lang.LinkageError: loader constraint violation: loader

Service startup reported this error:

Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mobile.jstx.auditBudgetDAO' defined in class path resource [mobile-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'dao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'dao': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'dao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'dao': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'dao': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more
Exception in thread "ProductApplicationContextLoadThread-Thread" Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'signDaoImpl' defined in class path resource [resource/spring/server-core-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDao': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDao': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDao': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more
Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mobile.reportLoginDao' defined in class path resource [gdsg_login-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mobile.reportMobileDao' defined in class path resource [gdsg-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more
Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mobile.fapDao' defined in class path resource [fap-mobile.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more
Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plan.planRightELECache' defined in class path resource [plan-comcontext.xml]: Cannot create inner bean 'gov.gfmis.pay.plan.bs.PlanRightELECache#17138f4' of type [gov.gfmis.pay.plan.bs.PlanRightELECache] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanRightELECache#17138f4' defined in class path resource [plan-comcontext.xml]: Cannot resolve reference to bean 'plan.planNormalBusiness' while setting bean property 'planNormalBusiness'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plan.planNormalBusiness' defined in class path resource [plan-context.xml]: Cannot create inner bean 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' of type [gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' defined in class path resource [plan-context.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "gov/gfmis/fap/rule/FVoucherDTO"
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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:423)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanRightELECache#17138f4' defined in class path resource [plan-comcontext.xml]: Cannot resolve reference to bean 'plan.planNormalBusiness' while setting bean property 'planNormalBusiness'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plan.planNormalBusiness' defined in class path resource [plan-context.xml]: Cannot create inner bean 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' of type [gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' defined in class path resource [plan-context.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "gov/gfmis/fap/rule/FVoucherDTO"
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
	... 17 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'plan.planNormalBusiness' defined in class path resource [plan-context.xml]: Cannot create inner bean 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' of type [gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' defined in class path resource [plan-context.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "gov/gfmis/fap/rule/FVoucherDTO"
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
	... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gov.gfmis.pay.plan.bs.PlanNormalBusinessImpl#8ae431' defined in class path resource [plan-context.xml]: Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "gov/gfmis/fap/rule/FVoucherDTO"
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
	... 38 more
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "gov/gfmis/fap/rule/FVoucherDTO"
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
	at java.lang.Class.getDeclaredMethods(Unknown Source)
	at java.beans.Introspector$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
	at java.beans.Introspector.getTargetMethodInfo(Unknown Source)
	at java.beans.Introspector.getBeanInfo(Unknown Source)
	at java.beans.Introspector.getBeanInfo(Unknown Source)
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:220)
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282)
	at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 42 more
Exception in thread "ProductApplicationContextLoadThread-Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'report.serverReportCommonLogic' defined in class path resource [fap_report-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	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 gov.gfmis.fap.context.DefaultBundleApplicationContext.refresh(Unknown Source)
	at gov.gfmis.osgi.internal.ProductAppCtxLoadThread.run(Unknown Source)
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:391)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1250)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
	... 13 more
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] to required type [gov.gfmis.fap.util.dao.springdao.GeneralDAO] for property 'generalDAO': no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:138)
	at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:386)
	... 17 more

key line error:
Exception is Java.lang.LinkageError: Loader constraint cheesecake factory: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name “gov/gfmis/fap/rule/FVoucherDTO”
So osgi loads a different FVoucherDTO which means that both bundles have this class: FVoucherDTO bundle conflicts.

Solve the problem that the delete request is not available under SpringBoot. There was an unexpected error (type=Method Not Allowed, status=405).


1. Whitelabel Error Page Error occurs when the Page submits the DELETE request

<button th:attr="del_uri=@{/emp/}+${emp.id}" class="btn btn-sm btn-danger deleteBtn">Del</button>

<form id="deleteEmpForm"  method="post">
	<input type="hidden" name="_method" value="delete"/>
</form>

<script>
	$(".deleteBtn").click(function(){
			   $("#deleteEmpForm").attr("action",$(this).attr("del_uri")).submit();
				return false;
			});
</script>


solution
You only need to configure [Application.Properties] in the SpringBoot configuration:

spring.mvc.hiddenmethod.filter.enabled=true