Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "beans" is not bound

Tags:

java

spring

xml

xsd

Why am I having this error

[Fatal Error]: The prefix "xsi" for attribute "xsi:schemaLocation" associated with an element type "beans" is not bound.

at the header of my XML file:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans      
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx.xsd">

The error is at the last line of my XML declaration. Please what can I do to remove this error?

like image 940
Blaze Avatar asked Feb 06 '23 19:02

Blaze


1 Answers

Simply add

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

to your bean element to eliminate that error.

like image 126
kjhughes Avatar answered Feb 10 '23 08:02

kjhughes