Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
IllegalStateException: Metadata is read-only
Luis Oliveira
Greenhorn
Posts: 6
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi all.
I'm getting an exception on this instruction:
meta.mergeTree("javax_imageio_1.0", nodes);
The exception is as follow:
IllegalStateException: Metadata is read-only.
This exception start to show after a migration from
Jboss
4 to jboss 7 and a change in JDK from 1.5 to 1.7.
Is this exception familiar to anyone?
Thanks
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Luis.
You're not giving us much to work with. We don't even know the type of meta. Please take a look here:
HowToAskQuestionsOnJavaRanch
.
Luis Oliveira
Greenhorn
Posts: 6
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ok ok, sorry, I will try to give a little more info.
I'm trying to change a bmp image. Like I said before, this was working code, until I migrate it to a new server.
The error happens on this function:
private IIOMetadata setDpi(IIOMetadata meta, int dpi) throws IOException { IIOMetadataNode nodes = (IIOMetadataNode) meta.getAsTree("javax_imageio_1.0"); NodeList nl; IIOMetadataNode dim; nl = nodes.getElementsByTagName("Dimension"); if ((nl != null) && (nl.getLength() > 0)) dim = (IIOMetadataNode) nl.item(0); else { dim = new IIOMetadataNode("Dimension"); nodes.appendChild(dim); } meta.mergeTree("javax_imageio_1.0", nodes); //ERROR HAPPENS HERE return meta; }
The metadata comes from the image which I'm trying to change:
IIOMetadata metadata = imageWriter.getDefaultImageMetadata(spec, paramBMP); metadata = setDpi(metadata, dpi);
Really thanks
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Exception Can't find a persistence unit named 'null'
Configuring SQL Server 2008 to JBOSS
EJB 3 Stateful BMT SessionBean Open Transaction not behaving properly : JBoss 6 : EJB 3
IllegalStateException related
EJB 3 Stateful BMT SessionBean Open Transaction not behaving properly
More...