[EJB 3.0] - MS SQL View as Entity?
by mheidt
Hello,
I have a xml-based hibernate library and thought of using it within seam.
But when I want to use EJB3, I assume, that I need an anotation-based description.
But now I have the issue that all MS SQL Views (CREATE VIEW...) aren't found:
Reason: javax.persistence.PersistenceException:
org.hibernate.HibernateException: Missing table: TestView
The same code using an existing TestTable in @Table(name="TestTable") works.
Hence the schema and catalog in the persistence.xml is correct...
The xml-based notation works as well:
<hibernate-mapping>
| <class name="com.dcx.tscm.db.ComponentSets" table="ComponentSets" schema="dbo" catalog="tscm">
Did anybody manage to get a MS SQL View as annotated entity bean?
The ms-sql driver is jtds-1.2.jar
Kind regards,
Markus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090616#4090616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090616
18Â years, 6Â months
[JBoss Seam] - Template and Nested EL Expresssion
by trossmy
I have several managed beans that lookup a list of database records and implement an Interface (SeamAction) with one method public void find() . In order to provide paging for the results I would like to have a template like this:
| <s:link action="#{seamAction.find}" rendered="#{previousExists}"
| value="||" id="firstPage">
| <f:param name="firstResult" value="0" />
| </s:link>
| <s:link action="#{seamAction.find}" rendered="#{previousExists}"
| id="previousPage">
| <h:graphicImage id="previous" alt="previous" url="/images/arr-l.gif">
| </h:graphicImage>
| <f:param name="firstResult" value="#{previousFirstResult}" />
| </s:link>
| <s:link action="#{seamAction.find}" rendered="#{nextExists}"
| id="nextPage">
| <h:graphicImage id="next" alt="next" url="/images/arr-r.gif">
| </h:graphicImage>
| <f:param name="firstResult" value="#{nextFirstResult}" />
| </s:link>
| <s:link action="#{seamAction.find}" rendered="#{nextExists}" value="||"
| id="lastPage">
| <f:param name="firstResult" value="#{lastFirstResult}" />
| </s:link>
|
However if I use the template in a page like this (myAction is an implementation of the SeamAction interface, with
@Name("myAction")
@Scope(ScopeType.CONVERSATION) )
:
| <ui:include src="fragments/tableControl.jspx"rendered="#{resultList.rowCount gt 0}">
| <ui:param name="seamAction" value="#{myAction}" />
| </ui:include>
|
|
the action 'seamAction' is not found.
Somebody knows how to get it running (I'm using seam 1.2.1GA)?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090608#4090608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090608
18Â years, 6Â months
[Persistence, JBoss/CMP, Hibernate, Database] - javax.persistence.PersistenceException: org.hibernate.Hibern
by BGMF
Hi @all!
since I've solved my fist larger problem (even if a small missing thing was causing it) I had encountered a variety of different other Exception - wrong libraries and such stuff.
But know I'm - again - looking very confused on my server logging...
anonymous wrote :
| 3:58:23,406 INFO [SessionFactoryImpl] building session factory
| 13:58:23,890 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 13:58:23,890 ERROR [[TologResponderServlet]] Servlet.service() for servlet TologResponderServlet threw exception
| javax.persistence.PersistenceException: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
| at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
| at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
| at de.zimmermann.diplom.tmservice.util.database.TologTestDatabaseQueryResponder.init_local(TologTestDatabaseQueryResponder.java:612)
| at de.zimmermann.diplom.tmservice.util.TologQueryResponder.init_local(TologQueryResponder.java:56)
| at de.zimmermann.diplom.tmservice.servlet.TologResponderServlet.processRequest(TologResponderServlet.java:69)
| at de.zimmermann.diplom.tmservice.servlet.TologResponderServlet.doGet(TologResponderServlet.java:140)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
| at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:329)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
| ... 27 more
|
Has anyone of you already encountered such a problem and remembers, what you've done to solve it???
Thanks in advance!
BGMF
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090600#4090600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090600
18Â years, 6Â months