Alfred’s Computing Weblog

Alfred Java-cored Computing Weblog

The prefix “tx” for element “tx:advice” is not bound

with one comment

The prefix “tx” for element “tx:advice” is not bound

I was updating my code, to add in DB data insertion into 1 of my action class.
hit the above error “The prefix “tx” for element “tx:advice” is not bound”
From the error message, i think its complaining the missing of to define the schema location.
So, I add the schema location, and restart the tomcat…. eh, same error again?!
OK, i did a google and found out that, I not only missed to define the schema location;
I also forget to defind the “tx” header. (something like “tablib” in jsp).
So, I add in the following line “xmlns:xsi=”” and test again.
Wow, its working now!

Lessons Learned:
The root cause of this error is missing the “xmlns:tx” being defined in applicationContext.xml

Final applicationContext.xml header:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""


Written by Alfred

October 17, 2008 at 17:58

Posted in Java, Spring

Tagged with , ,

One Response

Subscribe to comments with RSS.

  1. Realy appreciate your effort anf way of putting the solution here 🙂


    November 20, 2008 at 17:44

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: