Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Malformed \uxxxx encoding  error !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Malformed \uxxxx encoding  error !!" Watch "Malformed \uxxxx encoding  error !!" New topic
Author

Malformed \uxxxx encoding error !!

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
Hi
I was using Ant first time when I got this error.
Actually I was deplying Edroman's samples on weblogic7. FYI ejb, Weblogic and Ant all are new for me.
So I copied one example of weblogic and making changes to run Edroman example.
When I run Ant, I got this error
"Malformed \uxxxx encoding "
I serached Google .. but could not found any reason for it. It was the same script which was running previously.
When I debug I found that this line was giving error
<property file="./examples.properties"/>
I think "." as current directory is not taken by Ant.
Then I used another property
<property name="source" value="."/>
and rewrite
<property file="${source}/examples.properties"/>
Now it works properly.
No queries ... just wanted to share this new experence.


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2854
    
  11

Well, first of all, there's no need for the "." because ant will resolve the path relative to whatever you defined for basedir in the project. That said, I tried out the syntax you used, and didn't get any errors. The message "Malformed \uxxxx encoding" seems to refer to a bad Unicode character somewhere, but I don't know where that could be.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
But from my build.xml I changed that line only and after that I did not get error.
I am using Ant provided by weblogic 7.0 and my build file is like the build files used by weblogic examples.
Niels Peter
Greenhorn

Joined: Jul 06, 2003
Posts: 1
All,
I had the same problem and figured out it was because I used '\' when defining my directory struture and I had a 'usr' directpry aka '\usr\<blah>' which the XML parser likely thought was a unicode escape sequence..
Solution: Make usre you use '/' in all directory vars
 
jQuery in Action, 2nd edition
 
subject: Malformed \uxxxx encoding error !!