[EJB 3.0] - EJB3 query language
by thanukshad
is there a specific way to write sql queries in entity beans in ejb spec 3 rather than normal sql query?
i have defined namedquery as follow.
@NamedQueries( {@NamedQuery(name = "Language.findByAgentCode",
query = "SELECT l FROM Language l WHERE l.AgentCode = :agentcode")})
but when deploying following exception is thrown
2007-11-28 10:03:31,237 WARN [org.jboss.system.ServiceController] Problem starting service persistence.units:ear=sdb.ear,jar=sdb3.jar,unitName=Language
javax.persistence.PersistenceException: org.hibernate.HibernateException: Errors in named queries: Language.findByAgentCode
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
pls help me to solve this problem
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108294#4108294
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108294
18 years, 5 months
[JBoss Portal] - JBoss sizing (examples, sites, simple architecture?)
by Jorwo
Hello,
I'm a newbie to JBoss Portal, but not at all to Java.
I'm starting to read all I can about JBoss Portal, but there is some information that I can't seem to find anywhere.
-> What is some typical implementation for an internet site with JBoss Portal? Cache, Hibernate, Clustering, AS? Others? Tomcat is really essential?
-> On an internet site, what should we use as web server? Apache connected to JB Portal? Or Tomcat? Or JBoss Portal in itself is secure enough?
-> Are there any reference docs that explain some of the typical sizing done on sites using JBoss Portal? I need to start worrying about what kind of server (how many, etc) I'm supposed to buy.
Are there any docs somewhere or forum posts, that I can read?
Or maybe your personal experiences are shareable?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108288#4108288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108288
18 years, 5 months
[JBoss Seam] - How to access h:datatable row data during its iteration
by terryb
I want to access row data to do certain computation on some columns as the datatable iterates to populate itself. That computed value then will be displayed in table's footer.
I also want to just access row index to list on the table.
I tried datatable binding to to UIData in the backing bean but I get EntityManager is Null error?
I think I can't use @DataModel for this purpose, since from what I read it works when user selects a row on table manually.
|
| @Name("paymentReconciliation")
| public class PaymentReconciliation extends EntityQuery {
|
| ...
|
| private UIData tableData = null;
|
| public UIData getTableData() {
| getTableData");
| return this.tableData;
| }
|
| public void setTableData(UIData uiData) {
| this.tableData = uiData;
| }
|
| ...
|
| }
|
| XHTML[\b]
|
| ...
| <h:dataTable id="paymentReconciliationList" var="paymentRecon" value="#{paymentReconciliation.resultList}"
| rendered="#{not empty paymentReconciliation.resultList}" border="1" binding="#{paymentReconciliation.tableData}">
|
| ...
|
| Exception
| 11:51:55,077 ERROR [ExceptionFilter] exception root cause
| java.lang.IllegalStateException: entityManager is null
| at org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:31)
| at sun.reflect.GeneratedMethodAccessor542.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:32)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
| at org.jboss.seam.interceptors.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
| at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
| at au.edu.tisc.session.admin.PaymentReconciliation_$$_javassist_97.validate(PaymentReconciliation_$$_javassist_9
| 7.java)
| ...
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108284#4108284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108284
18 years, 5 months