seam « Seam « JPA Q&A





1. TransactionRequiredException on OptimisticLockException    stackoverflow.com

I have the following class that generates sequencial Card Numbers. I'm trying to recover from OptimisticLockException, by calling recursively the same method. however, i'm getting TransactionRequiredException. Dows anyone knows how to recover ...

2. Seam 2.x and Hibernate 3.5?    stackoverflow.com

Does anyone know if Hibernate 3.5 is supported under Seam 2.x (specifically 2.2.x)? I'm very interested in some of the JPA 2 features, particularly query building, but work within the ...

3. Seam / Hibernate - getting ORA message text    stackoverflow.com

    try {
        if (schId != null) {
            log.info(">>> save");
 ...

4. Multi-Tenant Seam + JPA Application    stackoverflow.com

I work on an existing Seam 2.2.0 + JPA (Hibernate 3.3.1) application that needs to be converted to a 'single database per client' environment where each database schema is the same. ...

5. Seam/Hibernate/JPA -- Duplicate primary key exception?    stackoverflow.com

I've got an object model that is persisted using Seam and JPA (Hibernate). It looks something like this:

@Entity(name = "MyObject")
public class MyObject {

...

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_myobj")
@SequenceGenerator(name = "seq_myobj", ...

6. coding in JPA    seamframework.org

Hi, I'm trying to deploy the jpa sample project from jboss-seam-2.0.2.CR1 on my ibm websphere 6.1. After successfull build and installation (I followed the steps from getting started) I got following problem: instead of text I got those chars while running http://localhost:9080/jboss-seam-jpa/index.html in both: firefox and ie. I would be greatful for any help.

7. Curios hibernate behavior    seamframework.org

The Query from hibernate is correct (And would return the right dates) but it seams that hibernate takes a cached date for creating a new object! If I make a Limit on the query (e.g. Limit 2) the date comes correct! Any suggestions for me? Should I better post this problem in a hibernate forum or is my question stupid? Thank ...

8. Custom Homw with JPA    seamframework.org

Hi,For one of my screens, I have written a custom Home (which extends PersistenceController - have to overload the getPersistenceConextName)I get the EntityManager by calling super.getPersistenceContext().Now, when I try to persist() an entity, it doesn't save the record - there are no errors (even with @Transactional). When I try to include a call to flush() after persist(), it says 'no transaction ...





10. dependency on hibernate in 1.1.3.Final    seamframework.org

Hi, I just tried the new Weld 1.1.3.Final release and noticed several ClassNotFoundExceptions on container startup. Weld complains about missing drools and hibernate classes. I don't use database persistence nor transactions, so I don't have hibernate in my classpath (my app is running on Tomcat 6). I'm not sure if this a Seam Faces or Weld issue. I didn't change the ...

11. difference between hibernate and jpa    seamframework.org

12. Fixed Hibernate for Seam 2.1.2.CR    seamframework.org

13. Flex+Seam+Hibernate    seamframework.org

I am using Flex as my Frontend and Java as the MiddleTier and also Hibernate to interact with the databaseMoreover the framework is SeamI wrote the services-config.xml for destination java classes which are actually entities refering to Database tablesIn flex I provided the destination as my Java class which actually referring to my database table ...

14. Help: Hibernate-Seam persists instantly    seamframework.org

Thank you for the quick answer. But I already had found the answer. I guess it was my mistake to let Seam manage the transaction. Now I have changed the flush mode to MANUAL in my component and its working correctly. But just for the understanding: when Seam manages the transaction, when does seam flush/persist the changes (if flush settings are ...

15. Help needed with JPA please...    seamframework.org

Hi,I have written a test that writes a record to the database twice. Everything is the same except for one element of the entity ID which I have defined as; @TableGenerator(name="CDR_GEN") @GeneratedValue(strategy=GenerationType.TABLE, generator="CDR_GEN") @Column(name="id", nullable=false) @NotNull public long getId() { ...

16. Help Setting Hibernate NamingStrategy    seamframework.org

I need help setting hibernate.ejb.naming_strategy to DefaultComponentSafeNamingStrategy.From what I've read, this goes in META-INF/persistance.xml, but I don't have one. I am using a Seam managed hibernate session.I tried putting the following in my hibernate.cfg.xml but it didn't seem to make a difference.org.hibernate.cfg.DefaultComponentSafeNamingStrategyI'm running tomcat 5.5/6, Seam 2.2.0 GA, and Hibernate 3.3.2 GA.My goal is to be able to use multiple ...





17. Help with Hibernate on Seam    seamframework.org

18. Hibernate 3.5.0    seamframework.org

19. Hibernate Configuration    seamframework.org

20. Hibernate IllegalStateException    seamframework.org

I tried catching the exception as follows User user =(User) entityManager.createNamedQuery("User.findById").setParameter("id",loggedUser.getId()).getSingleResult(); user.setEmail(email); try { entityManager.merge(user); } catch (InvalidStateException e) { e.printStackTrace(); }catch(Exception ex){ System.out.println("Exception thrown"); } facesMessages.add("Email address changed"); The problem is that the exception is thrown AFTER this method call, not during it. Here is the stack trace. And sorry, the exception is InvalidStateException not IllegalStateException. SEVERE: uncaught exception java.lang.IllegalStateException: ...

21. Hibernate in SEAM(CRUD)    seamframework.org

22. hibernate.jdbc.wrap_result_sets causes failure    seamframework.org

Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73) at com.pegas.morani.action.reservation.ReservationEngine.getHotelAdapterClasses(ReservationEngine.java:113) at com.pegas.morani.action.reservation.ReservationEngine.getHotelDescriptionURL(ReservationEngine.java:585) at com.pegas.morani.action.reservation.nh.ReservationNHPage.getHotelURL(ReservationNHPage.java:138) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274) at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) at org.jboss.el.parser.AstValue.getValue(AstValue.java:67) at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174) at com.sun.facelets.el.ELText$ELTextComposite.toString(ELText.java:115) at com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:49) ... 78 more Caused by: org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at ...

23. Hibernate JPA never finds my ehcache2.xml    seamframework.org

I have been struggling with something simple - having our Seam app (Hibernate/JPA/EJB) find our custom ehcache2.xml file. I have made sure that the config file is everywhere it could possibly be - in the EAR's lib, in the JAR, in the WAR/WEB-INF/ - in probably eight different places in order to make sure it can be picked up. To no ...

24. hibernate listener    seamframework.org

25. Hibernate - ORA-00907: missing right parenthesis    seamframework.org

I've got the same problem. I've got no control over the Oracle database, I just need to show the data in those tables. I get this error and I thin this code is generated behind the scenes by Seam. How is it possible to correct this behaviour without touching the table structure ?

26. hibernate or jpa and seam    seamframework.org

I really need to call a stored procedure that updates an entry in the database. Is this possible using hibernate/jpa. And if so, could someone please provide some sample code and any links to documentation that explains this further. I also need to call one query that returns a result set depending upon parameters passed into it. Any help would be ...

27. hibernate savepoint    seamframework.org

28. Hibernate statistics and JPA    seamframework.org

I modded the booking example and got the following results: 0:01,205 INFO [StatisticsImpl] Logging statistics.... 0:01,206 INFO [StatisticsImpl] start time: 1240643960318 0:01,207 INFO [StatisticsImpl] sessions opened: 5 0:01,207 INFO [StatisticsImpl] sessions closed: 3 0:01,208 INFO [StatisticsImpl] transactions: 3 0:01,209 INFO [StatisticsImpl] successful transactions: 3 0:01,210 INFO [StatisticsImpl] optimistic lock failures: 0 0:01,211 INFO [StatisticsImpl] flushes: 2 0:01,213 INFO [StatisticsImpl] connections obtained: ...

30. Hibernate table join issue    seamframework.org

31. Hibernate ValidationException Handling    seamframework.org

32. how can i build a correct weld+seam3+hibernate3+jpa develop...    seamframework.org

Forum: Seam 3 Users Forum ListTopic List how can i build a correct weld+seam3+hibernate3+jpa development enviroment? 21. Dec 2011, 00:23 America/New_York | Link mi haisheng i want to build a development enviroment in eclipse-indigo,include weld,seam3,hibernate3,jpa. the configuration is below: 1.pom.xml:-------------------------------- 4.0.0 mydept testprog ...

33. How to Call Stored Procedure in JPA    seamframework.org

35. How to create table in Seam with Hibernate    seamframework.org

36. How to: selectOneMenu and hibernate    seamframework.org

Hi!I (hope) use hibernate to populate a h:selectOneMenu.Hibernate (used from jbosstool) automatically create me:GroupE: Entity with id, description and other things named grupEGroupEList: EntityQuery making the select over the table named grpEListGroupEHome: EntityHomeThis selectOneMenu is populated during login in authenticator:@Out GroupEList grpEList;...grpEList= new GroupEList();String query = "select ...

37. Is Hibernate a joke as JPA provider?    seamframework.org

As a developer you should be most aware that when coding complex pieces of software it is generally accepted that there are bugs. You may have found one. Hibernate is a very decent JPA provider that is used by LARGE corporations and systems. Trying to infer that it is a joke because it currently doesn't support a very seldom used mapping ...

38. Is possible use seam without JPA?    seamframework.org

39. jBPM3, Seam 2.2 and Hibernate    seamframework.org

false java:/PostgresqlDS org.hibernate.transaction.JTATransactionFactory org.hibernate.transaction.JBossTransactionManagerLookup org.hibernate.cache.HashtableCacheProvider update

49. Seam 2.2.1 and Hibernate 3.6    seamframework.org

50. Seam 2.2 with AS 5.1 and hibernate not working    seamframework.org

I have a new project that used to work in seam 2.1 deployed as a WAR. I used seam-gen from 2.2 to generate a new project. I copied my code to newly generated project and updated the schema declaration in xml files to 2.2. I have changed components.xml and persistance.xml to match Seam 2.2 examples (JPA one). I'm getting below error ...

51. Seam 2 + JPA 2    seamframework.org

I would like to make use of some new features from JPA 2 within my seam (2.2.1.CR1) application. I gather that to do this I will need to use JBoss AS 6. I have downloaded JBoss 6.0.0M3 and updated the hibernate jars to 3.5.2Final by removing the ones in common/lib and replacing. I still have my application set out as an ...

52. Seam and Hibernate    seamframework.org

53. Seam and JPA    seamframework.org

54. Seam deployment with Hibernate    seamframework.org

14:17:20,651 INFO [TableMetadata] indexes: [pk_pil_samlink] 14:17:21,483 INFO [TableMetadata] table found: EPT.PIL_REMA 14:17:21,483 INFO [TableMetadata] columns: [knro, attemptid, valuutta, mtapa, versio, status, summa, viite, merchantid, tryid, orderid, effortid, tarkiste] 14:17:21,483 INFO [TableMetadata] foreign keys: [fk_pso_pil] 14:17:21,483 INFO [TableMetadata] indexes: [pk_pil_sampo] 14:17:22,614 INFO [TableMetadata] foreign keys: [fk_psv_pil] 14:17:22,614 INFO [TableMetadata] indexes: [pk_pil_securevault] 14:17:24,066 INFO [TableMetadata] table found: EPT.PIL_PROMO 14:17:24,066 INFO [TableMetadata] columns: [returnstamp, ...

55. Seam Hibernate WAS6.1    seamframework.org

[29.10.09 14:59:01:468 CET] 0000003a SystemOut O 14:59:01,468 INFO [ServletContextListener] Welcome to Seam 2.1.2 [29.10.09 14:59:01:468 CET] 0000003a SystemOut O 14:59:01,468 DEBUG [ServletLifecycle] Cached the context classloader in servletContext as 'seam.context.classLoader' [29.10.09 14:59:01:781 CET] 0000003a SystemOut O 14:59:01,781 DEBUG [ClassDescriptor] could not load class (annotation missing dependency): org.jboss.seam.async.TimerServiceDispatcher java.lang.TypeNotPresentException: Type javax.ejb.Stateless not present at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38) at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50) at java.lang.Class.getDeclaredAnnotations(Class.java:1648) at java.lang.Class.getAnnotations(Class.java:1609) at ...

56. Seam, JMS (ActiveMQ) & Hibernate    seamframework.org

On a remote machine, a JMS Object message is produced, containing a specific Hibernate DAO, and is posted onto a queue in ActiveMQ. Then, on the web side, i.e. Seam, I have a Session scoped Seam component which is also a javax.jms.MessageListener, and this then updates some local values when a new message is received. This all works fine, but then ...

57. Seam JPA Classes Behavior    seamframework.org

58. Seam Paradox: For full zero turn around avoid JPA?    seamframework.org

A co-worker at my new job was inquiring about how the incremental hot deployment works when the user is in the middle of execution of a wizard (LRC) use case. Say you're on page 1, hot deploy a JavaBean change for page 2 that eliminates an instance variable, for example. Then proceed to page 2 after the hot incremental deployment of ...

59. Seams without JPA.    seamframework.org

60. seam without hibernate is impossible?    seamframework.org

Here is the problem I am trying to solve...We have an api that serves to flash right now. We want to reuse the same api and put seam on top of it(and perhaps later expose the api for an SOA-like B2B use). But once I finally got all the jars up to date without the huge jboss embeddable, I started getting ...

61. SEAM without jpa and hibernate    seamframework.org

I am a newbie to SEAM. Is this possible, not to say this is how I plan to use seam, but is this possible? Suppose I have an ActionBean with an action that saves user information and also returns a list of users to populate a datatable. Lets also say I dont want to use the EntityManager but I want to ...

62. s:entityConverter NullPointerException with Hibernate    seamframework.org

Exception java.lang.NullPointerException at org.jboss.seam.ui.converter.entityConverter.EntityLoader.getPersistenceContext(EntityLoader.java:30) at org.jboss.seam.ui.converter.entityConverter.EntityLoader.getPersistenceContext(EntityLoader.java:24) at org.jboss.seam.ui.converter.entityConverter.AbstractEntityLoader.put(AbstractEntityLoader.java:46) 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:585) at org.jboss.seam.util.Reflections.invoke(Reflections.java:21) at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38) at org.jboss.seam.util.Work.workInTransaction(Work.java:41) at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42) at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166) at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102) at org.jboss.seam.ui.converter.entityConverter.EntityLoader_$$_javassist_3.put(EntityLoader_$$_javassist_3.java) at org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:77) at org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67) at org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:123) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getFormattedValue(HtmlBasicRenderer.java:469) at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:502) at com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:757) at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:811) ...

63. To JPA or To Hibernate?    seamframework.org

Hi. I'm trying to create a Seam application (JavaBeans and Hibernate), I use Seam's hibernate2 sample application as my guide. I decided to go with annotations this time and give hbm files a vacation ,so I annotated my domain objects with the usual annotations (@Entity, @OneToMany, @NotNull .....) I also use @NamedQueries annotations and inject Hibernate Session into my JavaBeans. But ...

65. Upgrade SEAM to hibernate 3.3.x    seamframework.org

I've tried to follow this approach in the past and I've found the following problem: on JBoss 4.2.3 I was leaving the default libs in /server/config/lib and bundle the new hibernate version in ear lib/. My persistence unit was in an ejb.jar. I was using a scoped class loader in the ear. What happened was that the ejb3 deployer that was ...

66. Use Hibernate in Seam - HowTo?    seamframework.org

67. User and Role Permissions with JPA    seamframework.org

68. Using Criteria API with Seam app (JPA 1.0)    seamframework.org

Is the Java code written to treat/convert the results into entities (i.e. the typical case)? If so, yes. Hibenrate will be aware it loaded those entities with their PKs and will cache them in the PC. If the code is not written to treat the results as entities, but as an object array (such as the case when there is a ...

69. Websphere Hibernate problems    seamframework.org

Or if you can look at WAS start scripts, check out all entries for ws.ext.dirs I think you have to remove the EJB3 persistence jar from your classpath - but my guess is that won't be easy - most likely Websphere might be using it for the admin console or other example apps.

70. Why doesn't rich:tabPanel always cause Hibernate to get all...    seamframework.org

I have a tab panel that displays a master object on the first tab, and then each of the lists the master contains on the other tabs. Each tab allows the editing of a list of objects. The table containing the list has a link that allows you to go to the detail page to edit that row. The first I ...

73. Caveatemptor GenericEJB3DAO / Seam doubt    forum.hibernate.org

... // If this DAO is wired in as a Seam component, Seam injects the right persistence context // if a method on this DAO is called. If the caller is a conversational stateful component, // the persistence context will be scoped to the conversation, not to the method call. // You can call this method and set the EntityManager manually, ...

74. Seam 1.1 goes GA    forum.hibernate.org

As many of you know, I stopped doing development work on Hibernate some months ago in order to concentrate on Seam: http://jboss.com/products/seam Seam was born out of our frustration with the limitations of todays stateless application architectures (stateless session facade, Spring, RoR, etc), which do not include constructs for modeling optimistic transactions, and therefore cause all kinds of problems for Hibernate ...

75. Problems in creating a configuration for JPA in Seam    forum.hibernate.org

Newbie Joined: Thu Sep 17, 2009 7:25 am Posts: 1 D:\Mahesh\Seam-gen>seam generate SEAM_HOME: D:\Mahesh\Seam-gen Using seam-gen sources from: D:\Mahesh\Seam-gen\seam-gen Buildfile: D:\Mahesh\Seam-gen\seam-gen\build.xml init: init-properties: [echo] d:/Mahesh/JBoss validate-workspace: validate-project: init-generate: generate-model: [echo] Reverse engineering database using JDBC driver d:\Mahesh\mysql\mysql -connector-java-5.0.8-bin.jar [echo] project=c:/GTT/DemoTest [echo] model=com.mbt.beans [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engi neering) [hibernate] 1. task: hbm2java (Generates a set ...