0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExceptionの原因と解決

Last updated at Posted at 2019-03-08

問題

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException

原因

Xmlファイルに日本語入力のスペースが入っている

例文

7行目の『value』の前の赤い点線が日本語入力のスペースが入っていることを示している。
このスペースがエラーの原因。

filename.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans.xsd">

	<bean id="bean1"  class="com.tuyano.libro.SampleBean">
	<property name="message"  value="Hello this is Bean Sample!" />
	</bean>
</beans>

解決

日本語スペースを見つけ出し取り除いてやる。

方法

xmlファイルを開いてひたすら日本語スペースを探す、見つける、スペース削除。完了。
(アナログ感は否めない。。)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?