[JBoss-user] [EJB/JBoss] - 4.0.3rc1: Exception in Timer trying to passivate StatefulBe
I am running 4.0.3rc1 using ejb3 and am seeing the exception below. I saw some post about pasivating an InitialContext in 4.0.3rc1 but Im not sure this is the same. Didnt see any bugs in jira but I cant imagine I am the only person seeing this. I only have one stateful bean with type=PersistenceContextType.EXTENDED. 09:11:20,359 INFO [STDOUT] Exception in thread Timer-5 09:11:20,359 INFO [STDOUT] javax.ejb.EJBException: Could not passivate; failed to save state; CausedByException is: org.hibernate.ejb.TransactionImpl 09:11:20,359 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:335) 09:11:20,359 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143) 09:11:20,359 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92) 09:11:20,375 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512) 09:11:20,375 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462) 09:11:20,375 INFO [STDOUT] java.io.NotSerializableException: org.hibernate.ejb.TransactionImpl 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291) 09:11:20,375 INFO [STDOUT] at org.jboss.ejb3.entity.ExtendedPersistenceContext.writeExternal(ExtendedPersistenceContext.java:54) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291) 09:11:20,375 INFO [STDOUT] at java.rmi.MarshalledObject.(MarshalledObject.java:92) 09:11:20,375 INFO [STDOUT] at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:120) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073) 09:11:20,375 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291) 09:11:20,375 INFO [STDOUT] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:326) 09:11:20,375 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:143) 09:11:20,375 INFO [STDOUT] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:92) 09:11:20,375 INFO [STDOUT] at java.util.TimerThread.mainLoop(Timer.java:512) 09:11:20,375 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3894033#3894033 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3894033 --- SF.Net email is Sponsored by the Better Software Conference EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile Plan-Driven Development * Managing Projects Teams * Testing QA Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: 4.0.3rc1: Exception in Timer trying to passivate Statef
See http://www.jboss.com/index.html?module=bbop=viewtopicp=3894087#3894087 In summary, it appears that flushing the EntityManager solves the problem but I wasnt sure if the container should be able to passivate an unflushed PersistenceContextType.EXTENDED EntiryManager View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3894088#3894088 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3894088 --- SF.Net email is Sponsored by the Better Software Conference EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile Plan-Driven Development * Managing Projects Teams * Testing QA Security * Process Improvement Measurement * http://www.sqe.com/bsce5sf ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - jndi problem with 4.0.3rc1 and EJB3
I have been playing around with EJB on 4.0.1SP1 and just moved to 4.0.3rc1. I added the persistance.xml in place of the hibernate.properties. I have a very simple test with one Entity and one stateless Session. Everything is running in a single VM. No changes to default configuration were made to the server=all. The server starts up fine, creates or updates the db table behind the Entity. JNDI works to the exent I can do this: InitialContext ctx = new InitialContext(); Object o = ctx.lookup(java:/testDS); System.out.print(o); However, if I do this: PersonSessionLocal dao = (PersonSessionLocal) ctx.lookup(PersonSessionLocal.class.getName()); I get this: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1115) org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1223) I have tried running the app outside eclipse(doesnt help), trying a fresh install of jboss (using the installer). Does anyone have any ideas? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887736#3887736 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887736 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: jndi problem with 4.0.3rc1 and EJB3
OK, Im an idiot. I had some jars in my classpath that were contaminating classpath (older jta stuff). However, I am stull getting errors. I can now do a lookup and get a $Proxy object that appears (looking at the debugger) to proxy the PersonSession class but I get a classCastException when casting it. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887752#3887752 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887752 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Proxy error
I am seeing a similar problem. If you get an answer, please let me know at [EMAIL PROTECTED] If I find out, Ill post the answer here. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887753#3887753 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887753 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: jndi problem with 4.0.3rc1 and EJB3
This ClassCastException problem was expained in http://www.jboss.com/index.html?module=bbop=viewtopict=66651 You cannot have the interface classes in the webapp classpath. However, I am trying to run the whole thing in one VM under eclipse so I had to play around with separate trees for the ejb code to keep it out of the web-inf tree. It all seems to work now. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887757#3887757 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887757 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: Proxy error
See http://www.jboss.com/index.html?module=bbop=viewtopict=67287 for my solution. Instead of packaging an EAR, I got it all running out of eclipse using 2 source (and build) paths. This keeps the interfaces out of the web-inf/classes path. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887758#3887758 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887758 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JCA/JBoss] - Re: DS
I am seeing the same problem with win2k, jboss-4.03rc1 with a very simple jndi lookup from within a client in the same vm as the server. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3887619#3887619 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3887619 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - using EJB3 EntityManager outside a session bean
All the examples I have seen using the EntityManager @Inject it in a session bean to do the transaction. Is there anyway to inject and use it from within a simple servlet or POJO. I like the idea of wrapping my access in a simple DAO-like pattern View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3883881#3883881 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883881 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - newbie having problems with ejb3 EntityManager
I am running jboss-4.0.1sp1 with the ejb3 preview under 1.5.0_02. I have a simple webapp running and am trying to use the EJB3 CMP from within a DAO pattern. Everything is running in the same vm and Im using the built in hypersonic db. Once I startup jboss, my EJB deploys ok (at least, there are no exceptions thrown and nothing logged at the INFO level to indicate a problem). Have also deployed the Entity tutorial and from ANT, can make it run so I think the running jboss is configured correctly. Here is the code I have problems with: | import javax.ejb.Inject; | import javax.persistence.EntityManager; | import com.dmd.ratecalc.LoanCalculation; | | public class LoanCalculatorDao { | @Inject | private EntityManager manager; | | public void store(LoanCalculation lc) throws Exception { | manager.persist(lc); | } | } | Stepping through the store(..) method, the manager field is null (I am running under eclipse but I have tried to run outside eclipse and get the same null prt exception). Any ideas? Below is some of the console output: 15:21:48,821 INFO [Ejb3Module] found EJB3 Entity bean: com.dmd.ratecalc.LoanCalculation 15:21:49,571 INFO [Ejb3Module] EJB3 deployment time took: 1578 15:21:49,603 INFO [Ejb3Module] EJB3 jar using default hibernate.properties: {hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.hbm2ddl.auto=create-drop, hibernate.connection.datasource=java:/DefaultDS, hibernate.query.factory_class=org.hibernate.hql.ast.ASTQueryTranslatorFactory} 15:21:52,134 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.1sp1/server/all/deploy/dmd.ejb3 View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3883416#3883416 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883416 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Beginners Corner] - Re: newbie having problems with ejb3 EntityManager
I could make it work by creating a stateless session bean like the tutorial does like: | InitialContext ctx = new InitialContext(); | LoanCalculatorDaoLocal c = (LoanCalculatorDaoLocal) ctx.lookup(LoanCalculatorDaoLocal.class.getName()); | c.store(lc); | However, I would like to make it work with a simpler DAO pattern where the DAO calls manager.persist(..). That is what I cannot get to work. It is not clear to me if the session bean pattern is needed to use the entity bean and if so, why it needs to be that way. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3883419#3883419 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883419 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user