XML 1 « Development « JPA Q&A





1. Importing and normalising XML with Hibernate    stackoverflow.com

When importing xml to a DB with Hibernate, is there a way to resolve an attribute consisting of comma-separated values to populate related table(s)? In this (somewhat obfuscated) example I have an ...

2. Can hibernate call return a XML data?    stackoverflow.com

I would like to know if we call a Java class annotated with hibernate classes. Can we get the data from the table in a XML format? browser give data for id ...

3. is opening and closing of factory contolled by web.xml?    stackoverflow.com

This post is related to post InvalidStateException while trying to enter data into DB. Do i need to put some entries in web.xml?Does web.xml control opening and closing of factory?I ...

4. HOw to give path of hibernate xml file in web-inf folder    stackoverflow.com

I am using eclispe in my java class i need to give the path of hibernate cfg.xml like

.configure("WEB-INF/hibernate.cfg.xml")
but this is not working but it works if i copy file to some packagae ...

5. Programmatic hibernate configuration after xml configuration    stackoverflow.com

I am trying to insert a record using hibernate. It works fine when database usernanme and password are in the hibernate config file along with all other properties. But when I remove ...

6. Is there a JPA provider which stores in XML format and not for a RDBMS?    stackoverflow.com

DataNucleues for example does it but I don't like the preprocessing (their JPA implementation is based on JDO). Are there other alternatives? The format of the XML-file doesn't really matter. We use ...

8. Hibernate JPA ORM.XML...how does it work    bytes.com

Hi, I've been working on a project that generates from a given XML file representing a database java classes and orm.xml and Jsfs. Now am supposed to use hibernate with all ...

9. Using Hibernate to Read XML    coderanch.com

Hi all, I am intending to read an XML in the following format: .... .... .... .... Now i want to read this XML pewr record and create a JAVA object and persist that object in DB.(Using SAX for parsing) The problem i am facing is if there are any null values in ...





10. Hibernate xml file    coderanch.com

11. XML to Hibernate objects    coderanch.com

Originally posted by thomas silver: Hello, I have xml document coming in as webservice request with data to populate Hibernate objects. Is there a good strategy to do this other than manually mapping data (via DOM/SAX) from xml tree to Hibernate objects? Thanks. [ September 29, 2006: Message edited by: thomas silver ]

12. hibernate.reveng.xml    coderanch.com

13. hibernate reveng.xml customizing...    coderanch.com

I'm not sure how you might do this in reveng.xml but you can easily do this with a "custom reveng strategy". If you're using Eclipse for the IDE with the hibernate plug-in go the the "run as..." dialog and under reveng.strateg enter something like com.mycom.util.MyRevEngStrategy. As you might guess from the naming convention, this will be a java class. This will ...

14. Hibernate with xml files    coderanch.com

hello, Thank you for responding. The idea was that for the moment(a prototype) the data we work with is stored in xml files, but later on the data will be stored in database. And I thought that it would be easier just to change the hibernate configuration file to change it form xml files to database mapping. but if I have ...

15. Hibernate XML    coderanch.com

Hi guys, just wondering if someone could point me in the right direction in regards to an error I can't get my head around with my Hibernate confirguration... We have an initial cfg.xml which is throwingf the below error, I have tried looking at resolving it but can't get my head around what the issue is. The part of the XML ...

16. XML import syntax    forum.hibernate.org





17. [help] How to set hibernate naming strategy in config xml?    forum.hibernate.org

Please help: I am having troubles to set Hibernate naming strategy in its configuration xml file. What I did was 1. First created a new class public class TestNamingStrategy extends DefaultNamingStrategy { 2. Now if I try to set the naming strategy through code like below, everything works fine and my own naming strategy got applied: org.hibernate.cfg.Configuration cfg = new org.hibernate.cfg.Configuration(); ...

18. Use Hibernate for XML marshalling or something else?    forum.hibernate.org

Use Hibernate for XML marshalling or something else like Castor? I have simple producer/consumer programs using JMS and sending POJOs. It was prototype. It is doing a simple XML marshalling and then posting JMS TextMessage to JMS topic for communication between producer/consumer. Objects are small like worst case 2-3kb and transfer rate will be about 7-10msg/sec. Now I have to do ...

19. reveng.xml - how to change set to lazy="false"    forum.hibernate.org

20. Need XML elements marshalling / unmarshalling example code..    forum.hibernate.org

Using Spring 3.x, Hibernate 3.x and MySQL, I need to create an XML formatted response to send from Server to Client and be able to decode an XML formatted request coming in to the Server from the client. I want to use POJO mapping, @XmlRootElement, @XMLElement, JAXB marshalling and unmarshalling to do this. Can someone point me to some sample code ...

21. Populate MultiSelect Dojo box onLoad from XML data file    forum.hibernate.org

Hi, I created a dijit.form.multiselect control and populated it with hardcoded data in the create.jspx - for testing. That works fine. Now, I need to populate it with external XML data at onload time. How do I do that? Most materials I read on this subject either uses a json data file or an URI as data source. Furthermore, is there ...

22. Tip: Build an orm.xml    forum.hibernate.org

I was having issues with Hibernate, specifically the meta model stuff. That's because my persistent classes were scattered across 3 packages: support: base classes everything inherits from gen: generated source code my modeling tool spits out. main: my customized code. So every entity was in 3 packages: support: mappedsuperclass gen: mappedsuperclass extends support main: entity extends gen The problem I was ...

23. Context.xml is not parseable n valid?    forum.hibernate.org

Hi All, Please help me by giving me the solution of this error: [Fatal Error] :4:2: The markup in the document following the root element must be well-formed. C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\nbproject\build-impl.xml:584: Deployment error: Tomcat configuration file C:\Documents and Settings\Neetu.Khanna\My Documents\NetBeansProjects\HibernateExp\web\META-INF\context.xml seems to be broken. Please make sure it is parseable and valid. See the server log for details. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:205) ...

24. Duplicate XML entry for hello.Message    forum.hibernate.org

I want to use orm.xml along with persistence.xml but it is not working and throwing me the exception as ' Duplicate XML entry for hello.Message' , Message is my annotated class. my persistence.xml is as described below - new doc    forum.hibernate.org

44. Can I get xml result using hibernate ?    forum.hibernate.org

45. Hibernate to XML    forum.hibernate.org

We use JAXB to marshal the object tree. Of course, this requires you to define an XSD for your objects. For us it works well, because we pass XML files both ways. The only caveat with doing it both ways is that you have to remember to "break" the child-knows-about-parent link before marshalling. -G

46. Hibernate, Documentum and XML    forum.hibernate.org

Hello all, I have a question about hibernate integration with a tool like Documentum. I want to know if someone here have a feedback or knoledges about this case. I want to know if it's easy to use it or integrate with a business model. I have no more technical informations about my project at this time. But if someone already ...

47. XML Marshalling/Unmarshalling Sets    forum.hibernate.org

Hello all, My application needs some flatfile-intermediate storage of data. So I thought of Marshalling my data in an XML-format, using XMLEncoder. This worked well. I wrote my own persistenceDelegate for the Enummerations and then this works: Code: RSA rsa = rsaDao.load(rsaId); container.add(rsa) xmlStream.writeObject(container); this delivers something like: Code: ...

48. XML parser    forum.hibernate.org

49. NoClassDefFoundError: javax.xml.transform.Source    forum.hibernate.org

50. Hibernate - XML    forum.hibernate.org

51. Error parsing XML    forum.hibernate.org

Newbie Joined: Sun Sep 12, 2004 10:37 pm Posts: 1 Hello people... The following error is showing. Anybody can help-me please? 23:24:26,482 ERROR XMLHelper:61 - Error parsing XML: XML InputStream(3) White spaces are required between publicId and systemId. 23:24:26,492 ERROR Configuration:380 - Could not configure datastore from inputstream org.dom4j.DocumentException: Error on line 3 of document : White spaces are required between ...

52. treecache.xml    forum.hibernate.org

I am using JBoss 3.2.6 and Hibernate 2.1. I am deploying hibernate using an MBean and have the following attributes specified in jboss-service.xml. The jboss-service.xml is packaged in a SAR file, which is then deployed through an EAR file. net.sf.hibernate.cache.TreeCacheProvider false Where do I place the treecache.xml file that came along with Hibernate? - Bala

53. DOCTYPE SYSTEM in xml files of hibernate    forum.hibernate.org

54. Error parsint XML    forum.hibernate.org

Newbie Joined: Thu Dec 23, 2004 7:03 am Posts: 5 Location: Brasov, Romania Hibernate version: 2.1.7c Mapping documents: Field.hbm.xml Code: ...

55. Proxies and XML marshalling    forum.hibernate.org

Is there an API call that will return an instance of an entity class given an initialized proxy? Preferably one that will be efficient for a collection of proxies? The problem I'm trying to solve is that I need to do XML marshalling of entity objects, and I need to have control over how much of the graph appears in the ...

56. Hibernate against Filesystem/XML-Files    forum.hibernate.org

57. XML import/export    forum.hibernate.org

Hi, I am currently testing Hibernate for a new application where importing and exporting Objects between two different datastores is a mandatory feature. It has been decided that an XML file will be used to exchange those objects. I successfuly exported a simple object from its persistant state to an XML file using Hibernate v3. My question is now how do ...

58. treecache.xml file location?    forum.hibernate.org

Hi, I am trying to use JBoss Cache in Hibernate 2. While trying to run I get a FileNotFoundException for "treecache.xml" file. On checking the code, I realised hibernate2.jar contains a class TreeCache. This has a configure() method which has a hard-coded "treecache.xml" name but this xml does NOT exist in hibernate2.jar. Where do I get this file from? Am I ...

59. Purpose of Treecache.xml?    forum.hibernate.org

Hi, I've searched the forum, documentation, and In Action book for the definitions of the properties listed in the treecache.xml, but I can't find any. Basically, I am not sure what properties are set or need to be set by the user in this xml file. All I did was copy the treecache.xml sample file provided in the "etc" directory of ...

60. status of XML data export/import    forum.hibernate.org

61. a problem about exporting and importing data with xml    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: hibernate 3.0.4 Mapping documents:

62. Can you specify *.xml files in your own location?    forum.hibernate.org

Hi guys, I am new to Hibernate and have done a search on this but have found loads of other (useful) tips and advice but not for what I need. Basically I was wondering if it's possible to specify another location for the hibernate.cfg.xml file rather than the main class path of the project. The reason is, when I compile up ...

63. Hibernate3 and XML    forum.hibernate.org

64. xml export    forum.hibernate.org

65. Recommended change to hibernate build.xml    forum.hibernate.org

66. XML export Fails for simply many to many example    forum.hibernate.org

Newbie Joined: Thu Sep 01, 2005 10:08 am Posts: 1 java.lang.ClassCastException: org.dom4j.tree.DefaultElement is thrown when converting a list to XML using the following simple code: Code:

67. Using XML Databinder and ReverseXML    forum.hibernate.org

Hello, we are using hibernate XML Databinder and ReverseXML to sync up data from different mysql servers. The problem is whenever an xml generated by XML Databinder is read by ReverseXML to load in the database, the error below occurs org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. looking at the xml, I dont seem to find ...

68. XML Node info from Metadata?    forum.hibernate.org

Is there any way to retrieve the node name from the mappings of an entity and/or a property if using XML data binding in Hibernate 3? I've got a need to do some specialized XML processing not handled by the standard Hibernte XML binding code, so I need to know what the XML node name is from the mapping file. I ...

69. Need help implementing a data-based XML import    forum.hibernate.org

Newbie Joined: Mon Oct 24, 2005 9:16 am Posts: 7 I'm new to hibernate and I'm working on a project where I have to create a new database as well, so I'm using a forward engineering approach from classes to tables. To create and load the database with test data at the same time, I created a class with a recursive ...

70. XML Problem on Migrating to 3    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.5 Full stack trace of any exception that occurs: INFO: Mapping class: co.com.unionsoluciones.sofia.cartera.model.bo.AmortizacionCredito -> amortizacioncredito_amc 03-Nov-2005 10:11:37 org.hibernate.util.XMLHelper$ErrorLogger error SEVERE: Error parsing XML: XML InputStream(57) Element type "property" must be followed by either attribute specifications, ">" or "/>". 03-Nov-2005 10:11:37 org.hibernate.cfg.Configuration addInputStream SEVERE: Could not configure datastore from input ...

71. MappingException - xml not found    forum.hibernate.org

Hey, I'm very new to Hibernate, just finished installing HibernateTools for Eclipse and I have a problem which seems to be very basic ;) I followed the FLASH presentation of how to configure the Tools, I've created a new Configuration/Console Configuration and generated the XMLs/Classes of an existing DB, My directory structure is: dev-proj/test/hibernate/src - hibernate.hbm.xml dev-proj/test/hibernate/src/org/revenge - all generated POJO ...

72. hbnfiles.xml = no such file or directory    forum.hibernate.org

73. Problem in importing objects from XML    forum.hibernate.org

Im using hibernate 3.0.5. I have used dom4j to export the objects into an xml. Then, I use the session.replicate() to import the data. All these work without any problem as far as the data that exported are still in the database. When I import, it goes and overwites the objects from xml to the database. However, the problem occurs when ...

74. Hibernate Programatic and XML Configuration Error    forum.hibernate.org

Hibernate version: 3.0 hi i am trying to use both hibernate configuration xml for mappins and common properties and programtic to past database connection property, this is the code: cfg variable is a serialized object that contain the configuration properties Code: configuration = new Configuration(); Properties properties = new Properties(); properties.put("connection.driver_class",cfg.getDbDriver()); properties.put("connection.url",cfg.getDatabaseURL()); properties.put("connection.username",cfg.getDbUser()); properties.put("connection.password",cfg.getDbPassword()); properties.put("hibernate.dialect","org.hibernate.dialect.MySQLDialect"); configuration.setProperties(properties); ...

75. Convert Big XML -> Java Object -> Data Base    forum.hibernate.org

open file() List books; Book book; int counter = 0; int maxCounter = 0; // Maximum Bath size while(there are book nodes pending for unmarshal) { book = unmarshal(); books.add(book); counter++; if (counter == maxCounter) { save (books) counter = 0; ...

76. XML Import with Hibernate    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1 Mapping documents: sq_track

77. Xml data    forum.hibernate.org

78. error on org/xml/sax/ErrorHandler    forum.hibernate.org

79. error on org/xml/sax/ErrorHandler    forum.hibernate.org

80. XML metadata files processing    forum.hibernate.org

81. Is there any way to use hibernate against an xml data store?    forum.hibernate.org

Hi - I was wondering if there was anyway to get hibernate to operate against data stored in xml files (at least in a limited way). (I realize hibernate is an oRm tool, where the 'r' is relational, but...) Why would I want to do this? 1) leverage hibernate mappings to define and xml mapping 2) treat my data access abstraction ...

83. Peristing XML    forum.hibernate.org

I am experimenting with persisting XML using the Dom4j capability. I have table where all columns are string values. When I call saveOrUpdate, I get a class cast exception. The exception occurs when calling: class org.hibernate.type.StringType{ ... public String toString(Object value) { return (String) value; } ... Value is a DefaultDocument. I can understand why the would cause a CCE, what ...

84. Import and Export from XML    forum.hibernate.org

I would like to be able to import and export my Hibernate databases to and from XML files or some other format like a zip file. The files would include the schema as well as the data. It would be useful to backup and restore from one database to another. I thought XMLDatabinder and ReverseXMLDatabinder might be able to help me ...

85. Error parsing XML: XML InputStream. Can someone help    forum.hibernate.org

here is my mapping file generated by Sychronizer: false false false I am using Hibernate 3.1.3, here is the error I got when I tried to run: Sep 13, ...

86. Importing xml data    forum.hibernate.org

Author Message ndefeijter Post subject: Importing xml data Posted: Tue Nov 07, 2006 10:35 am Newbie Joined: Tue Nov 07, 2006 9:58 am Posts: 1 Hi all, I have some questions and a problem regarding to importing XML data into a relational database using hibernate. First things first, the questions. [*] Is there any documentation/tutorials available regarding this subject? ...

87. Use Hibernate with XML DBs?    forum.hibernate.org

88. XML Marshalling question--hibernate 3.0    forum.hibernate.org

I have some complex objects where some attributes are persisted and defined in a hibernate mapping file, while others are not persisted and are derived via getter methods. I'd like to use Hibernate 3.0's XML marshalling feature, but this has the obvious problem that I don't have a way to specify a node value for the derived attribute. Anyone have any ...

89. manipulating xml files    forum.hibernate.org

hi all, i have a team.hbm.xml file which contains the mappings for my database table. right now this file contains 3 properties as per my table. but now my requirement is that when a player logs in, he can access these three properties but when my manager logs in, he has an access to additional columns of the same table. is ...

90. extracting data in XML format    forum.hibernate.org

Newbie Joined: Mon Feb 12, 2007 1:01 pm Posts: 2 Hello: I am trying to extract data from my database in XML format. If I specify a very simple query like "from OrderTab" I get the expected XML. With the data from the child tables embedded. Very nice. If I enter the following query " select ot.orderKey, ot.customerName from OrderTab" , ...

91. Hibernate 3.2.2 build.xml depends on clover    forum.hibernate.org

Newbie Joined: Sun Feb 18, 2007 2:54 pm Posts: 6 Hibernate version: 3.2.1, 3.2.2 Mapping documents: N/A (trying to build examples) I get the following when trying to build examples using 'ant eg' -- HSQLDB has been copied to lib, but the failure occurs earlier than that. I tried commenting out the clover parts of build.xml but, not being that familiar ...

92. Error Parsing XML    forum.hibernate.org

93. XML Encoding of hibernate objects.    forum.hibernate.org

Hi everyone, I am having trouble with XML encoding of a java application which uses hibernate. I get a null pointer on every serialisation attempt of my hibernate objects, and everytime a "EnhancerByCGLIB" is in the stacktrace. I tried disabling cglib and using Hibernate.initialize(status); without success. My mapping files were generated by MyEclipse - Hibernate Tools, should I modify them to ...

94. Programmatic Configuration mixed with xml. Possible?    forum.hibernate.org

Hi I am using Hibernate in a Eclipse RCP application where driver, dialect, subprotocol are set using an extension point and the Ip, Databasename, User and Password are set using the application preferences. Due to that I set the Configuration programmatically. All works fine except that my mapping files are not added to the configuration yet. I assumed that the xml ...

95. Object to XML    forum.hibernate.org

Thank you for your answer. Yes I know xstreams or e.g. Castor / Jaxb etc. But because I'm already using Hibernate for the OR-mapping and DB-Data-to-XML mapping, I would not prefer to use another lib for the Object-to-XML mapping. There are situations where my application needs to send an object (serialized as XML-document) over network, without storing it to DB first. ...

96. Export To Xml, How does Hibernate name elements    forum.hibernate.org

I'd like to export objects to xml with a Hibernate-dom4j-session. Here is my problem: There are objects that contain collections, that can contain other objects of any type, e.g. a 'Folder' contains objects, that can be of type 'Folder' or 'File'. When exporting a folder with a folder and a file in its objects-collection I would get xml like this: Code: ...

97. java.lang.LinkageError: Class org/xml/sax/Parser violates    forum.hibernate.org

I am using Spring 2.0 with Hibernate 3.0/JPA and getting following error when tomcat starts up and tries to load spring file: Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/amazon/otb/dao/hibernate/applicationContext-hibernate.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: Class org/xml/sax/Parser violates loader constraints Caused by: java.lang.LinkageError: Class org/xml/sax/Parser violates loader constraints at ...

98. From HibernateMapping.xml to java    forum.hibernate.org

99. Problem with auto discovery of orm.xml file    forum.hibernate.org

Hi, I have a problem with the auto discovery of the orm.xml file. I'm running Glassfish v2 in a Windows environment. When I deploy my application as an exploded EAR, the org.hibernate.ejb.EJB3Configuration class cannot find the orm.xml in the META-INF directory of my EJB module. Looking at the code in EJB3Configuration, we can find the following: Code: private void scanForXmlFiles(URL jar, ...

100. How to confire EhCahe.xml    forum.hibernate.org

Hi All, I am using Spring 2.0 and hibernate 3.1 in our project. In my project home page occupying the 6Mb size in 3 select queries. So I want place that 6Mb in cache with that i can reduce the database hits. I knew that hibernate provides secondary level cache by using ehCache.xml. I did the following: 1. Placed ehcache.xml in ...