-
1. Re: Problems with crud application generated using Seamgen
chrismalan Dec 22, 2008 5:12 AM (in response to chrismalan)A quick update: before going to work I quickly deployed the app to JBoss-4.2.2.GA. No problems now. Everything works as it should.
The same Seam-2.1.0, the same code generated by Seam. The finger points to JBoss-5.0.0. What worked once does not work anymore. If it ain't broken, forget about not fixing it, break it? BTW, 4.2.2 starts 30 seconds faster than 5.0.0 on my system - Gentoo Linux, Sun JDK 1.6, 2MB Ram.
-
2. Re: Problems with crud application generated using Seamgen
hapacur Mar 18, 2009 2:49 PM (in response to chrismalan)Any updates on that subject? Is there a fix for JBoss AS 5.0.0 ?
-
3. Re: Problems with crud application generated using Seamgen
oguzyalcin.oguzhanyalcin.gazi.edu.tr Mar 18, 2009 3:53 PM (in response to chrismalan)Hi, In another topic someone mentioned same error. I2ve faced with this error on jboss as 5.0. I think the problem is with the jndi and persistencecontext. You can jump over this exception by simply adding your entities into the persistence.xml file like
<class>your.package.entiy.entityname</class>
Persitence.xml is under your src/main/META-INF folder. -
4. Re: Problems with crud application generated using Seamgen
chrismalan Mar 29, 2009 12:08 PM (in response to chrismalan)Hi Oguzhan,
Thanks. This worked perfectly.
Chris Malan
-
5. Re: Problems with crud application generated using Seamgen
worldofnic Jul 3, 2009 2:12 PM (in response to chrismalan)On JBossAS 5.1.0.GA with Seam 2.1.2, this fix doesn't work. :-(
(I'm using Sun Java 1.6.0_12 on 32-bit Vista).
Anyone any idea?
<persistence-unit name="cron" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/cronDatasource</jta-data-source> <class>org.domain.cron.entity.Dbcron</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/> <property name="hibernate.hbm2ddl.auto" value="create"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.default_schema" value="nems"/> <!-- Only relevant if Seam is loading the persistence unit (Java SE bootstrap) --> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/> </properties> </persistence-unit>
Yet I still get:
Caused by: org.hibernate.hql.ast.QuerySyntaxException: Dbcron is not mapped [select dbcron from Dbcron dbcron]This is making a mockery of getting seam up and running quickly :-(
nic
-
6. Re: Problems with crud application generated using Seamgen
chrismalan Jul 5, 2009 9:25 AM (in response to chrismalan)Hi Nic,
Try removing the transaction-type="JTA"> See if that makes any difference. Your last property seems to indicate the hibernate transaction manager. I don't have that line
(<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>), either.Chris
-
7. Re: Problems with crud application generated using Seamgen
vrxyz Feb 6, 2010 8:34 AM (in response to chrismalan)Hi,
I tried adding this <class>org.domain.oneseamproj.entity.Orgperson</class> into the persistence.xml but I still get the error:
Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Orgperson is not mapped [select orgperson from Orgperson orgperson]
I tried the one suggested by Chris, removing the <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/> from the file. But still, I get that error.
I'm using BossAS 5.1.0.GA with Seam 2.2.0.GA.
Please help me solve this. Thanks in advance! :) -
8. Re: Problems with crud application generated using Seamgen
shavo26 Apr 15, 2010 7:42 AM (in response to chrismalan)I found this problem too on jboss 5.1.0.GA and using seam 2.2 when deploying dan allens seam in action example.
He explains the problem here:
JBossASIssueSo in web.xml i added element persistence-unit-ref:
<persistence-unit-ref> <persistence-unit-ref-name>open18/emf</persistence-unit-ref-name> <persistence-unit-name>open18</persistence-unit-name> </persistence-unit-ref>
and in components.xml
<persistence:managed-persistence-context name="entityManager" persistence-unit-jndi-name="java:comp/env/open18/emf" auto-create="true"/>
removing attribute entity-manager-factory.
Deployed again and this exception did not occur.