serialize 1 « Core « JPA Q&A





1. How to Serialize Hibernate Collections Properly?    stackoverflow.com

I'm trying to serialize objects from a database that have been retrieved with Hibernate, and I'm only interested in the objects' actual data in its entirety (cycles included). Now I've been working ...

2. Issue with serializing Hibernate objects using XStream    stackoverflow.com

I've been facing this issue where, the hibernate objects on serialization produces unexpect xmls containing all the instrumented code from Hibernate. We did some cleaning of the object before serializing the object. But, ...

3. How do I restore a transient field in Hibernate like readResolve() for hibernate serialization?    stackoverflow.com

Is there a way to hook up a callback method to be called when an object is deserialized from Hibernate. Similiar to Java's readResolve() method for Java object serialization? ...

4. Why are life-cycle listeners in Hibernate Serializable?    stackoverflow.com

The Hibernate interfaces that you implement to provide event listeners, for example: org.hibernate.event.PostInsertEventListener; all extend Serializable. However, it doesn't seem to explain anywhere why your listeners need to be serializable. We've been ...

5. What is the best way to serialize an EMF model instance?    stackoverflow.com

I have an Eclipse RCP application with an instance of an EMF model populated in memory. What is the best way to store that model for external systems to access? ...

6. Serialization of Entity classes using Xstream    stackoverflow.com

I'm using Xstream to serialize a EJB entity class to be transferred by a web service, but it also writes the database specific information in this case the following code. Is ...

7. Calling equals on an ArrayList After Serialization    stackoverflow.com

I am hitting a strange problem in relation to equals on an object transported over RMI. This has been wrecking my head for a few days now and I was wondering if ...

8. When and why JPA entities should implement Serializable interface?    stackoverflow.com

The question is in the title. Below I just described some of my thoughts and findings. When I had very simple domain model (3 tables without any relations) all my entities did ...

9. Storing Objects in columns using Hibernate JPA    stackoverflow.com

Is it possible to store something like the following using only one table? Right now, what hibernate will do is create two tables, one for Families and one for people. ...





10. Using serializable in hibernate what underlying database types do i use    stackoverflow.com

I need to use a serializable type in hibernate (to store a Subject (security)) All this works fine. I just need to know what the underlying database types are for the following ...

11. Hibernate proxy serialization and receive on client side    stackoverflow.com

I lack understanding of how does the generated proxy class object (CGLib enhanced POJO) is transferred to the remote client and still retains its ability to generate Lazy Init. Exceptions. Does that ...

12. Do Hibernate table classes need to be Serializable?    stackoverflow.com

I have inherited a Websphere Portal project that uses Hibernate 3.0 to connect to a SQL Server database. There are about 130 Hibernate table classes in this project. They all implement Serializable. ...

13. Data dump of Hibernate-based application    stackoverflow.com

Is there some tool for do dump data to some format. May be XML, JSON, CSV etc for using it in other application(may be with other DB engine)

14. why hibernate forcing serialization in session.get method    stackoverflow.com

I see that hibernate's session.get() and load() methods is accepting only Serializable objects. As per my understanding of hibernate, it will generate an SQL statement and send it to DBMS. It ...

15. Persisting Serializable Objects in Hibernate    stackoverflow.com

I am attempting to persist objects that contain some large Serializable types. I want Hibernate to automatically generate my DDL (using Hibernate annotations). For the most part, this works, but the ...

16. Java swing application save custom file format    stackoverflow.com

i'am writing some swing applications(not rich clients, running standalone) with a lot of domain models. Those are Java Beans, bound to the UI via presentation models. Now i need to save all ...





17. Hibernate and Serializable Entities    stackoverflow.com

Does anyone know if there is a framework out there that is able to strip out Hibernate collections from entity classes to make them serializable? I had a look at BeanLib ...

18. Using JPA and JSON serialization    stackoverflow.com

I would like to have a JPA Entity that has a GSon Object as a field/attribute. For instance:

@Entity
public class MyEntity {

    private JsonObject myObject;

    ...

19. Is Hibernate / JPA taking in consideration the transiant modifier ( not the annotation )    stackoverflow.com

I want to avoid serialisation ( in JMS / AMF ) but still persist the field with JPA/Hibernate. Is the transient modifier my friend ? Are @Transient annotation and the transient modifier ...

20. Hibernate object Serialization    stackoverflow.com

Why a Hibernate persistence object in Java is marked serializable

21. Cannot be cast to java.io.Serializable    stackoverflow.com

I am currently using criteria to retrieve the details of a user, but when trying to query the details object with the right user, I get a ClassCastException. My Criteria Code;

Criteria ...

22. Struts2 + Json Serialization of items    stackoverflow.com

I have the following classes:

public class Student {
    private Long id  ;
    private String firstName;
    private String lastName;
private Set<Enrollment> enroll = ...

23. Why this class should implement java.io.Serializable when I using hibernate?    stackoverflow.com

This exception only happened when Tweet Class was used. I cannot find the reason why I should use Serializable. I did the mapping myself in GeneticMessage.hbm.xml. All the types (long & ...

24. GraniteDS can't convert from actionscript class to java bean...how to solve this?    stackoverflow.com

I have a Entity bean and it's corresponding ActionScript class when i transfer an object of that class i got that error:

13:54:07,750 ERROR [AMFMessageFilter] AMF message error
org.granite.messaging.amf.io.AMF3SerializationException
    at ...

25. add xml serialization annotation to entity classes generated with hibernate    stackoverflow.com

I'm generating JAVA class entities with Hibernate from database, the classes are generated using Netbeans and the class produced are entity classes with hibernate attributes. I want to serialize this objects so ...

26. Struts-json-plugin problem serializing JPA entity    stackoverflow.com

Hallo all. I have a problem with the struts-json-plugin. My action has an association with some JPA entities objects: all of them are initialized in the action but when they are serialized via ...

27. Why does an Entity need to be serializable when using shared primary key in JPA 2/Hibernate?    stackoverflow.com

So I have the following situation:

@Entity
class Image {
  @Id
  @GeneratedValue
  private Long id;

  ....
}

@Entity
class ImageData implements Serializable {
  @Id
  @OneToOne
  private Image image;

  ...

28. Why JPA-2.0 Primary Key Classes have to implement Serializable but my example works without?    stackoverflow.com

In many sources I have read PrimaryKey Classes and even JPA2 entities should be serializable. IN my example (legacy database) there is a relationship between employee and languages: Employee Class:

@Entity
@IdClass(EmpleadoId.class)
@Table(name = "NO_INFGRAEMPL")
public class ...

29. Deserialize object from database (Java/Hibernate)    stackoverflow.com

I have an MS 2000 database that is used by our primary Java application. That application has a class (lets call it 'car') that is serialized and put into the ...

30. how to obtain an unproxied and EAGER fetched object in Hibernate?    stackoverflow.com

I want to load an objet and forget that it comes from hibernate! That's it, I just do something as:

MyClass myObject = MyClassDAO.getUnproxiedObject(objectID);
and than I have a real instance of myObj ...

31. How do I Serialize Object to Database for Hibernate to read in Java    stackoverflow.com

I'm currently writing a tool to plug into an existing enterprise application that uses Hibernate. My tool at install time needs to write some values into the database where one ...

32. When do I have to make entities serializable when using EJB3?    stackoverflow.com

I use all of my entities Serializable. However I think it is okay to use without serializable. But what are the advantages of making an entity Serializable? When do we really ...

33. Hibernate and serialization    stackoverflow.com

In our application we have a dual persistence. First, the entity can be saved online in a MySQL DB (we are using Hibernate), second the entity can be saved locally ...

34. ColdFusion9: Using serializeJson on Hibernate entity encodes numeric properties as strings    stackoverflow.com

I'm writing my first ORM-backed REST api, and having some issues with the JSON serialization. Here's one of my entity definitions:

component persistent="true" extends="Base" {

    property name="id"
   ...

35. Struts2 grid json    stackoverflow.com

How can I exclude Hibernate objects that are listed as FetchType.LAZY? It causes problems because I get a org.hibernate.LazyInitializationException. I understand that it is trying to serialize the object ...

36. Serialize a JAXB object via its ID?    stackoverflow.com

In my data model, I have something to this effect:

@Entity
public class Target {

    @Id 
    @GeneratedValue
    private Long id;

    ...

37. Why does a class implements Serializable interface?    stackoverflow.com

@Entity
public class Husband implements Serializable {

   @Id
   private int id;

   private String name;

   @OneToOne
   private Wife wife;

}

@Entity
public class Wife implements Serializable ...

38. JPA Serialization    stackoverflow.com

I'm working with JPA 2.0-EclipseLink-Hibernate 3 on MySQL 5. My classes structure is like below (I simplified it)

public class Status implements Serialization {
    private String name = null;

 ...

39. Hibernate session.contains( Class clazz, Serializable id )    stackoverflow.com

I want to be able to check whether a session contains an entity of a given class/identifier. I can't see a way to do this at the moment.

  • contains() takes an ...

40. Java, convert(cast) Serializable objects to other objects    stackoverflow.com

I'm using Session.save() method (in Hibernate) to persist my entity objects which returns an object of type java.io.Serializable. The returned value is the generated primary key for the entity. The generated primary key ...

41. Java serialization bug when facing circular dependency with a Set    stackoverflow.com

My project is a java project over EJB3 using Hibernate and Weblogic server. For convenience sake (and as far as I understand, is typical to hibernate), some of the entities contains ...

42. JPA2 One-to-many serialization exception    stackoverflow.com

I have such a problem when migrating from Hibernate to JPA2 in new EJB project. In stateless bean i fetching a parent class instance which name is ProductType with unidirectional One-to-many relationship ...

43. Hibernate and Serializable    stackoverflow.com

I'm a bit confused, I was under the impression that classes will only need to implement serializable, well, if I need to serialize them (as in, hibernate doesn't require classes to ...

44. Hibernate's proxy    stackoverflow.com

I saw some "weird"(as in, "I lack the knowledge to understand") behaviour from hibernate earlier today. Basically, I have a class(lets call it A) with a nullable many-to-one relation to another ...

45. get value from private field having object "Field". JAVA    stackoverflow.com

my problem is that, i want to save class object java.lang.reflect.Field into database using Hibernate. E.g. table:

@Entity
public class Actor implements Serializable {
    @Id
    @GeneratedValue
   ...

46. Hibernate code -- cannot be cast to java.io.Serializable    stackoverflow.com

I have the following Hibernate code that is returning an error. The results of my query cannot be cast to Serializable, according to my error message. Can anyone help ...

47. serialize objects into database using jpa    forums.netbeans.org

Hi all, Does anyone have an idea how I can serialize a whole object into a field in a database row using Java persistence api. Thanks

48. Re: serialize objects into database using jpa    forums.netbeans.org

Declare a binary column in your database table (i.e. bytea in postgresql) in order to map it to a byte[] property in your entity. Then you can store raw data serializing ...

49. Struts2-json-plugin serialization issue with a Hibernate backed JPA entity    struts.1045723.n5.nabble.com

I have a JPA entity, which hibernate is proxying. The following action works as it explicitly states the properties to include, however what I would much rather do is use excludeProperties to remove the problematic property. The problem property when serialized causes a "Positioned Update not supported" exception. The interesting thing is, all the properties on the entity class ...

51. Hibernate serializable to/from XML    coderanch.com

I'm looking for an API for serialize Hibernate Objects to/from XML. I tried HiperJAXB but is a little hard to understand for my. Now Im looking XStream works fine but now I have some doubts about Forgering-keys and CLOB Manage. (How I can do that?) Anyone have some experience with this Api or know another API? thank you Wilberto

52. Hibernate and serialization    coderanch.com

53. Serialize a Persistent Hibernate Object gives lazy initialization errors    coderanch.com

I am trying to serialize (to XML) a Hibernate Persistent Object that I have retrieved in a Hibernate find query. Upon conversion using the JDK XML encoder I get Hibernate lazy intialisation errors. Has anyone seen these before? Any advice would be great. The errors look like so --> com.gs.tbs.ppl.payment.PaymentDetailsImpl.achPaymentMethod - no session or session was closed org.hibernate.LazyInitializationException: failed to lazily ...

54. Annoying Hibernate serialization    coderanch.com

I have a very annoying hibernate serialization problem. On the server side I have servlets and Hibernate to handle the persitence. The hibernate mapping uses annotation and plain POJO objects. LanguageDAO dao = new LanguageDAO(); dao.persist( new Language( "GB" ) ); Many of these POJO objects must be used in my applet as well. It's the exact same functionality in the ...

55. JPA, one to many and serialization    coderanch.com

Hi all, I'm fairly new to JPA and having to work through an issue. I've used Netbeans and JDeveloper both to generate entities from tables. Now, these entities cross language boundaries via serialization methods exposed with Oracle's Coherence - meaning, entities are both serialized to and from C# .NET objects. Due to this serialization, I can't have the backref/many to one ...

56. Serialize objects in Hibernate    coderanch.com

57. why hibernate forcing serialization in session.get method    coderanch.com

I see that hibernate's session.get() and load() methods is accepting only Serializable IDs as argument to get Entities. As per my understanding of hibernate, it will generate an SQL statement and send it to DBMS when it needs to get a row from DB. It will never need to send a java object over network. In that case why hibernate is ...

58. How to serialize Hibernate entity?    forum.hibernate.org

hi, I'm looking for the best way to serialize a Hibernate entity to a string like table1:column1=val1; column2=val2;... table2:column1=val1; column2=val2;... where tableX is the actual DB table name and ColumnX are actual DB column names. So far I'm trying it using ClassMetadata and methods like getProperties(), getPropertyValue(). But I'm not sure if it's the best way and I'm also having problem ...

59. Issue with serializing/deserializing collections    forum.hibernate.org

We have a strange problem we can't seem to understand. We have two entities and the one has a collections of the other. We are trying to make a duplicate of this and want to save that duplicate. However, it seems Hibernate remembers some reference to the old collection and removes all items from the original object upon saving the new ...

60. Session (de-)serialization problem    forum.hibernate.org

I have an exception with a 1-N bidirectional relationship when I serialize, then deserialize the hibernate session (JPA). But first, here are my persistent classes (some info are missing for clarity, but the entities are correct afaik): Code: @Entity public class Parent implements Serializable { private static final long serialVersionUID= @Id private long id; @Column(name="NAME", ...

61. NoClassDefFoundError when Serializing Configuration?    forum.hibernate.org

I've seen other posts on this but without a resolution unless you use addCacheableFile which doesn't load hbm.xml files from jars. When I try to serialize my Configuration object I get a java.lang.NoClassDefFoundError with Exception in thread "main" java.lang.NoClassDefFoundError: org/jaxen/VariableContext at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1382) at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:52) at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:438) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.(ObjectStreamClass.java:413) at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310) at ...

62. Custom Field Serialization w/ JPA?    forum.hibernate.org

I hope this is a fairly straightforward & newbie JPA question... I'm trying to figure out how to map either an array of Objects or a List of Objects to an existing database schema. For simplicity sakes, assuming that my code looks like so: Code: @Entity @Table(name = "USER") private class User { @Id ...

63. "de-initialize" objects before serialization    forum.hibernate.org

Hello, I have a problem with (understanding) serialization of collections. Guess I have loaded a "Customer" object and want each of his opened trouble tickets. No problem. One-to-Many (one customer, many trouble tickets) The mapping is bidirectional. So every Customer has a List, every TroubleTicket has a Customer (lazy) object. I want to only return a List from my method (parameter ...

64. Serialize/Deserialize nested classes via XStream    forum.hibernate.org

I have 3 POJOs: Code: @Configurable @XStreamAlias("Employer") @Entity public class Employer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private Dept dept; ...

65. Usage of stored Serializable -> LazyInitializationException    forum.hibernate.org

org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:132) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:174) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) at package.Data_$$_javassist_2.getValue(Data_$$_javassist_2.java) at package.DataHandlerTest.testGetAtom(DataHandlerTest.java:146) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) ...

66. serialize domain objects to a hashmap    forum.hibernate.org

Given the following object graph, where Author has 1 to many Books... Author { String name Set Books } Book { String title } Is there an out of the box way to serialize this object graph to a HashMap e.g. key is a bean property name and value is the actual value e.g. [name="Joe", book[0].title="book 1", book[1].title="book 2"] Is there ...

67. Serialization exception may be related to hibernate    forum.hibernate.org

Hi, I keep getting the serialization exception and causing the rpc failed. Can someone tell me what's going on? com.google.gwt.user.client.rpc.SerializationException: Type 'com.jobscout.frontpage.client.Category$$EnhancerByCGLIB$$424f9bbb' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = com.jobscout.frontpage.client.Category@9cdbbc I use hibernate to ...

69. Elegant way to serialize Hibernate objects to XML?    forum.hibernate.org

I'm wondering whether any Hibernate users have found (or written) a good framework for serializing Hibernate objects to XML. I'm working on an app that uses XML/XSLT for presentation, and currently, I am writing my own code to iterate through the various Hibernate objects and add elements/attributes to my view XML document. there must be a better way to do this...Anyone ...

70. Serious serialization issue with hibernate    forum.hibernate.org

Winth hibernate 2.0 we started saving some data in the database as a serialized object using Suddenly with release 2.02 we started getting net.sf.hibernate.type.SerializationException: Could not deserialize a serializable property: at net.sf.hibernate.type.SerializableType.fromBytes(SerializableType.java:75) at net.sf.hibernate.type.SerializableType.get(SerializableType.java:35) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:60) at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:51) at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66) at net.sf.hibernate.loader.Loader.hydrate(Loader.java:494) at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:448) at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:417) at net.sf.hibernate.loader.Loader.getRow(Loader.java:356) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:190) at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:661) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:676) at ...

71. update(Object,Serializable)    forum.hibernate.org

The first is updating the instance. All the data including the id (eg not null) is included with the instance. This instance is placed into the session cache. The second updates the data using using the supplied id thus the objects id, if it has one, is not important. If you view the code the first calls the second so the ...

72. Using Castor to serialize Hibernate objects    forum.hibernate.org

I need to marshall/unmarshall my Hibernate objects back and forth to XML. I've experimented with a few tools, and would like to use Castor mostly because of its ease of use. My problem is that I need to get Castor to ignore uninitialized collections. Currently, I get a lazy init exception if I give Castor an object with uninitialized collections. Because ...

73. serializable-type, caching and performance question.    forum.hibernate.org

I've used the serializable-type to get hibernate to store third-party objects I use as delegates in my own objects. The object is accessible as a property in my object. This seemed like the best choice since the alternatives (as far as I know) was: 1. To create a hibernate-mapping of the third party object (of which I know little other than ...

74. how to tell Hibernate when serializable property is dirty?    forum.hibernate.org

I have got an object that is persisted by Hibernate and holds a Serializable property within (a complex structure of fine-grained objects which I don't want to store in separate database tables, anyway it's an 'composition' in UML terms). The problem is that Hibernate does see changes in properties exposed as persistent, but the Serializable thing seems to be non-transparent. In ...

75. Session Serialized problem ?    forum.hibernate.org

It is cause by readResolve() that it cannot reference to the SessionFactory. The SessionFactory can be lookup inside Session Bean and no problem. For my intention, I am not going to reconnect the session in client side, but I want to keep the session-scope cached object and pass back to the server side and reconnect again at later use. The remote ...

76. Problems with Session.get ( Class clazz, Serializable id )    forum.hibernate.org

I want to check how/if the get-method works fine, but unfortunately it doesn't. My test is this. First save an object to the database, and then check if I can retrieve it. If I can, it means the object is in the database, otherwise not. The CommsIn class implements Serializable and is the class used for the test. Here is the ...

77. Problem using serialized/deserialized objects    forum.hibernate.org

Hi, I'm using Hibernate 2.1.1 and HSQL DB. I have 2 objects related one-many relationship. I serialize these objects in a file and after that try to deserialize from that file and save them in DB. I also use my own class generating IDs for that objects. If I use simple object (not related) it works fine, but when I use ...

78. Session is serializable ok but...    forum.hibernate.org

only that some (i insist it's not always the case) web use-cases need more than one jsp to create or modify a graph of objects. If we don't want to lose data because of the loadbalancing, we should commit and disconnect for these cases knowing that for all the other cases threadlocal/servlet filter is used for example. But this approach is ...

79. Persistent object serialization & multi-layered architec    forum.hibernate.org

Hello, My question is where I can find a specification of how exactly object networks are serialized (when sent over RMI). My real problem is that I am planning to use Hibernate in multi-tired architecture: - Presentation (web) - Business (EJB) - Session Facade - ... - Hibernate - Database The question is how and in what form do I transport ...

80. Hibernate, serialization, performance... can anyone explain?    forum.hibernate.org

Newbie Joined: Tue Oct 07, 2003 3:58 pm Posts: 16 Location: Netherlands This is a trace of executing just a simple load() method on an OperatorSession object, which has got three fields of 'serializable' type. To improve performance, serialization was rewritten as custom readObject()/writeObject() methods. What I see here is a little bit embarassing: - OperatorSessionFactory - Loading operator session id='123' ...

82. simple serializable question    forum.hibernate.org

when i want to put a regular seializable object into a hibernate class, and define the mapping as "serializable" for that object, system produces VARBINARY(255) as the type of the DB Table column (HSQLDB). does that mean my serialized object cannot be larger than 255bytes? if yes, how can i make it larger? i do not want to use blobs. Thanks ...

83. How to serialize a file    forum.hibernate.org

if Attachment implements Serializable, in which case the document object can be deserialized as-is if you simply mark it as a hibernate property (no type required) @hibernate.property the other option is to use the hibernate type 'blob'. or, @hibernate.property type="blob" in which case you would have to deal with the associated blob semantics in the code

84. Customisable serialization of lazy proxies.    forum.hibernate.org

Summary: It would be nice if Hibernate supported three options for lazy proxy object serialization: proxy - send the proxy (current behaviour) initialize - initialize the proxy and send the target nullify - uninitialized proxies get sent as null; if the proxy is initialised then the target is sent. Background: I am trying to open up a legacy system to heterogenous ...

85. Serialization problem with BLOB    forum.hibernate.org

Hi, I have BLOB associated with data object and mapping is as follows I get the following exception when i am tryin to read the BLOB in Oracle9i. Could not deserialize a serializable property: : invalid stream header Please let me know the solution. Thanks in advance sanv

86. I cannot get a serialized object from database    forum.hibernate.org

Hello Everyone, I encounter a problem with Hibernate 2.1.2, jdk1.4 and Oracle 9.2.0.1. I have a class containing a mapped collection of objects retrieved using the tag in my hibernate_mapping.xml (here is the code) Code: ...

87. Criterion object should be serializable ?    forum.hibernate.org

Hi, I try to pass a collection of criteria from the "expression" package of hibernate to a Session bean method from a delegate object. I worked fine with JBoss but now I migrated my app to Websphere 5.0 and the server throws me a message indicating the criterion should be serializable. I think the Criterion interface should extend the Serializable interface. ...

88. Circular Refs in Hibernate VOs blowup XML Serialization    forum.hibernate.org

We are using WebLogic WebServices to transfer our Hibernate VOs over the wire for transferring data. Problem is that in any relationship between two objects created with HibernateSynchronizer, there's a circular reference between those objects. WebLogic's XMLEncoder doesn't like this too much complaining about the recursion. I am wondering what I can do in the Hibernate objects to break the reference. ...

89. updating serialized / unserialized object    forum.hibernate.org

The 'problem' is that the SessionImpl uses instance equality to check if the object is already in the session. Since you've serialized/deserialized your objects then you have new instances of them. You are then turning around (using the same Session) and attempting to update the object. It doesn't find it in the session (due to different instances) but it DOES find ...

90. Under what condition to implement Serializable?    forum.hibernate.org

You just have to be a little more verbose! Are you asking when to implement Serializable in you POJOs? In that case the answer is: when you want to use them in some kind of webapp or send them over network. Hibernate per se does not require the POJOs to be Serializable, I think. /C

91. Serializable    forum.hibernate.org

[b]Hibernate version:[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs:[/b] [b]Name and version of the database you are using:[/b] [b]Debug level Hibernate log excerpt:[/b] I used ddl2hbm to convert a table to xml and persistence class. I had a datatype 'long' in my table which has been converted to serializable in my persistence class. ...

92. XML serialization and collections    forum.hibernate.org

I'm working on an application accessible via both the web (Struts), and Soap (Axis). I'm using Castor to marshall/unmarshall my domain objects and I'm noticing that when I change an object and send it back to the server, when I call update(), Hibernate deletes and recreates my many-to-many relationships, even though I haven't changed the contents of the collection. When I ...

93. Serialized collection problems    forum.hibernate.org

Hello, I am using hibernate in a (stateless) webservice scenario with a fat swing client. I have no problem querying for information and present this. But when I change something and saves it by sending the graph back, I get weird SQL updates on my collection tables. Scenario: 1. Query and get full object graph. 2. (DMO->DTO) Convert graph to something ...

94. Criterial Serialization and reconnect issue    forum.hibernate.org

Hibernate version: Hibernate 2.1 and 3.0 alpha I am developing an API and using Hibernate for ORM. I thought the Criteria API weas pretty flexible. I'd like to expose the criteria API to my clients, while doing so, I ran into the serialization issue with Criteria. I have downloaded the source code for Hibernate 3.0 alpha. And tried to make the ...

95. custom type does not implement Serializable    forum.hibernate.org

I've a UserType to handle NULL values for booleans as false. It works fine. Up on start-up Hibernate complains that it doesn't implement the Serializable interface also it does. Any ideas? Ernst Debug level Hibernate log excerpt: Code: ... WARNUNG CustomType : custom type does not implement Serializable: class ch.bedag.gba.cap.server.persistence.hibernate.BooleanPersistentType ... Implementation of the BooleanPersistentType ...

96. Persisting Serializable Object to Oracle DB    forum.hibernate.org

Newbie Joined: Tue Oct 05, 2004 9:21 am Posts: 7 Location: Dublin, Ireland Hibernate version: Hibernate version 2.1 Mapping documents: ...

97. XML Serialization of domain objects    forum.hibernate.org

Hibernate version:2.x Name and version of the database you are using: SQL Server 2000 All, I have been having some problems with XML serialization of domain objects, which we have designed to be persisted using hiberanate to SQL server database. Example domain object: --------------------------- User (attributes) First Name (attributes) Last Name (attributes) LoginName (attributes) Address ---- one to many relation Address ...

98. Serializable configuration for hibernate 2.1    forum.hibernate.org

99. Serialize Criteria object from an RMI client    forum.hibernate.org

How to use Criteria API from RMI client(doesnt know the DB info) and query at RMI server(knows the DB info.) I have RMI application where the client queries the data object using the custom Search Object. I am evaluating the Hibernate for a possible ORM tool. I would like to use the Criteria API that comes with Hibernate. I couldnt use ...

100. hashCode and serializable    forum.hibernate.org

I am having problem working on overriding hashCode() method when if reference other objects to get their properties. Here is the sample: public int hashCode() { int result = HashCodeUtil.SEED; result = HashCodeUtil.hash(result, this.otherOjb1.getName()); result = HashCodeUtil.hash(result, this.otherObj2.getName()); return result; } The problem is that when I use EJB and then it breaks. The exception is a "NullPointerException". It seems to ...