Note that there are some explanatory texts on larger screens.

plurals
  1. PO Can't Serialize Session Beans - Warning thrown
    text
    copied!<p>I'm running an enviroment with JSF + Primefaces + tomcat 6.0.32 in netbeans using EclipseLink (JPA 2.0).</p> <p>My application works fine, but everytime I run it, I get a lot of warnings saying that cannot Serializate my session beans, and shows me blocks like this for every session bean:</p> <pre><code>18-jul-2012 23:05:46 org.apache.catalina.session.StandardSession writeObject ADVERTENCIA: No puedo serializar atributo de sesión facturacionController para sesión 62A53325838E1E7C6EB6607B1E7965E6 java.io.NotSerializableException: org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) ... and so on... </code></pre> <p>The thing is that my session beans already implements Serializable. So what can I do to solve this ? </p> <p>Thanks !</p> <p>---- added info 07/20/2012 ----</p> <p>The only point where I'm making a reference to EntityManager from the session bean is when I create the jpaController in the getter property, like this:</p> <pre><code>private JpaController getJpaController() { if (jpaController == null) { jpaController = new JpaController(Persistence.createEntityManagerFactory("myPersistenceUnit")); } return jpaControllerPedido; } </code></pre> <p>That is because I defined the jpaController constructor like this:</p> <pre><code>public JpaController(EntityManagerFactory emf) { this.emf = emf; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload