• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Error when using CDATA in orm.xml

 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone!

I am using TopLink Essentials implementation of JPA. I created a small client application running with JSE 1.5.15.

I declared the following named query in my orm.xml file:



I tested this and it worked like a charm.

Then, I decided that, in order to avoid the use of XML entities, I could place the query in a CDATA section. Somehwhat like this:



Then I got an error when I try to run the program. The persistence context does not even gets created. It fails when I try to crete the EntityManagerFactory.

This is really weird:




Any idea about what is going on here?

Thanks in advance,
Edwin Dalorzo
[ October 13, 2008: Message edited by: Edwin Dalorzo ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the exactly same problem. The orm.xml file works just fine with OpenJPA but TopLink is unable to handle it. Is there a way to fix this? I don't want to use XML entities in the queries.
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So far I solved the problem using EclipseLink instead of TopLink Essentials. That's all I could recommend to be done by now.
 
reply
    Bookmark Topic Watch Topic
  • New Topic