This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1" Watch "Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1" New topic
Author

Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1

Karl Koster
Greenhorn

Joined: Oct 24, 2009
Posts: 1
I am having fits trying to get a table with an xml typed column in PostgreSQL to update. The Entity is coded as follows:


All of the queries used to select from the relevant table work without a problem. However, when I go to insert/update an entity I get a message stating that the a string (what is coming from the entity) cannot be cast to xml (what is expected on the database. I know this is an issue with the underlying JPA implementation (whatever version of Hibernate is in JBoss 5.1 in this case). However, I am looking for a way, preferably at the JPA declaration level, to convince mapping to cast to the xml type (all that is needed is a CAST(string as xml). I just can't seem to find the magic incantation that does this.

Any constructive help would be appreciated.

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Karl,
Welcome to JavaRanch!

We have a forum just for ORM and JPA. I'll move this for you. The software helpfully links the original to the moved copy.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping to an xml typed column (PostgreSQL) on an EJB3 entity in JBoss 5.1
 
Similar Threads
Stored Procedures + Hibernate + Xml mapping
Trying to figure out how to use MySQL and generated @Id
Error when deploying an EAR on JBoss 5.1.0
jsf navigation and database connection
ava.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to