[JBoss jBPM] - JSP compile issue inside a jstl loop
by zlegein
I am seeing a ton of these in our logs, does any one know what this is? This file does compile but it fails sometimes? I am not sure what exactly this error message is trying to tell me.
The section of code that it is complaining about is a jstl loop in a jsp that has two dynamic columns in a table.
Here is that section of code.
<c:forEach items="${programCategoryGroups}" var="programCategoryGroup" varStatus="loop">
<c:choose>
<c:when test="${loop.index % 2 == 0}">
<c:choose>
<c:when test="${lmbwebfn:contains(inquiry.programCategoryGroups, programCategoryGroup)}">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
<spring:message code="${programCategoryGroup.resource.key}"/>
<c:if test="${(loop.index + 1) == fn:length(programCategoryGroups)}">
<c:out value="" escapeXml="false"/>
</c:if>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${lmbwebfn:contains(inquiry.programCategoryGroups, programCategoryGroup)}">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
<spring:message code="${programCategoryGroup.resource.key}"/>
<c:out value="" escapeXml="false"/>
</c:otherwise>
</c:choose>
</c:forEach>
2007-12-06 06:55:52,877 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/].[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: ServletException in '/WEB-INF/presentations/7014/jsp/form1.jsp': Unable to compile class for JSP
Generated servlet error:
Duplicate field form1_jsp._jspx_fnmap_0
Generated servlet error:
Duplicate field form1_jsp._jspx_fnmap_0
Generated servlet error:
_jspx_fnmap_0 cannot be resolved
Generated servlet error:
_jspx_fnmap_0 cannot be resolved
An error occurred at line: 43 in the jsp file: /WEB-INF/presentations/7014/jsp/form1.jsp
Generated servlet error:
_jspx_fnmap_0 cannot be resolved
An error occurred at line: 46 in the jsp file: /WEB-INF/presentations/7014/jsp/form1.jsp
Generated servlet error:
_jspx_fnmap_0 cannot be resolved
An error occurred at line: 52 in the jsp file: /WEB-INF/presentations/7014/jsp/form1.jsp
Generated servlet error:
_jspx_fnmap_0 cannot be resolved
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
at org.apache.jsp.WEB_002dINF.presentations._7014.jsp.layout_jsp._jspx_meth_tiles_insert_4(layout_jsp.java:1221)
at org.apache.jsp.WEB_002dINF.presentations._7014.jsp.layout_jsp._jspService(layout_jsp.java:548)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:243)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1141)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:878)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:430)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at net.lmb.web.filter.UserProfileFilter.doFilter(UserProfileFilter.java:51)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.AbFilter.doFilter(AbFilter.java:154)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.TrafficFilter.doFilter(TrafficFilter.java:77)
at net.lmb.web.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:40)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.VisitorFilter.doFilter(VisitorFilter.java:89)
at net.lmb.web.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:40)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.ClientInfoFilter.doFilter(ClientInfoFilter.java:47)
at net.lmb.web.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:40)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.LocaleFilter.doFilter(LocaleFilter.java:69)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.SessionFilter.doFilter(SessionFilter.java:54)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.PageCacheFilter.doFilter(PageCacheFilter.java:29)
at net.lmb.web.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:40)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at net.lmb.web.filter.SecureRequestFilter.doFilter(SecureRequestFilter.java:46)
at net.lmb.web.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:40)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118876#4118876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118876
18 years, 3 months
[JBossCache] - Hibernate and OptimisticTreeCache
by youngm
I've had a JBossCache+hibernate question over on the hibernate forums for a while with no responses. I was wondering if someone here might be able to help me out?
The question is:
Looking at the code in Hibernate OptimisticTreeCache it appears that Hibernate tells JBossCache to use an entity's version column for the cache's optimistic check when writing to the cache.
If the entity doesn't have a version column it appears hibernate tells JBossCache not to do a version check of any kind when updating the cache using a dummy DataVersion implementation. (Last update wins I presume?)
So, theoretically if I am using OptimisticeTreeCache with a Hibernate entity that don't contain a version column will my cache and DB remain synchronized? Is there any possible concurrent modification scenario where the 2 could become out of sync? For this particular Entity I don't care if concurrent changes step on each other as long as the cache and the db don't get out of sync when all is said and done. Does anyone on this forum have any insight for me?
Thanks,
Mike
http://forum.hibernate.org/viewtopic.php?t=981936&highlight=
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118864#4118864
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118864
18 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - Trivial Hibernate example with EJB3 and Hibernate, but trans
by smithmb
Hello folks,
I'm trying to create a trivial example of a transaction working correctly with MySQ L5.0.x and local-tx-datasource and Connector/J 3.x. I'm using Hibernate and EJB3, and JBoss 4.0.x. I cannot get transactions to rollback w/ SessionContext.setRollbackOnly() OR by throwing an uncaught EJB/Runtime exception.
Rolling back via the mysql command line client works great, and the tables in question are InnoDB.
Here is my documentation of the problem -- I'd love it if anyone can tell me anything that looks weird. Please help -- this is so trivial it SHOULD work!
mysql-ds.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>MySqlDS</jndi-name>
| <connection-url>jdbc:mysql://127.0.0.1:3306/scheduler_db</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>censored</user-name>
| <password>censored</password>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
persistence.xml:
| <persistence>
| <persistence-unit name="persistence-unit">
| <jta-data-source>java:/MySqlDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="hibernate.connection.release_mode" value="auto"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| </properties>
| </persistence-unit>
| </persistence>
|
My EJB3 session bean:
| @Stateless
| public class TestBean implements TestBeanLocal, TestBeanRemote
| {
|
| @PersistenceContext(name = "persistence-unit")
| EntityManager em;
|
| @Resource
| SessionContext ctx;
|
| public static final String RemoteJNDIName = "example/" + TestBean.class.getSimpleName() + "/remote";
| public static final String LocalJNDIName = "example/" + TestBean.class.getSimpleName() + "/local";
|
| @TransactionAttribute(TransactionAttributeType.REQUIRED)
| public void test()
| {
| Book book = new Book(null, "My first book", "Person 1");
| em.persist(book);
|
| Book book2 = new Book(null, "My second book", "Person 2");
| em.persist(book2);
|
| System.out.println("CURRENT TRANSACTION STATUS 1: " + (ctx.getRollbackOnly() ? "ROLLBACK" : "NOT ROLLBACK"));
| ctx.setRollbackOnly();
| System.out.println("CURRENT TRANSACTION STATUS 2: " + (ctx.getRollbackOnly() ? "ROLLBACK" : "NOT ROLLBACK"));
|
| Book book3 = new Book(null, "My third book", "Person 3");
| em.persist(book3);
|
| List someBooks = em.createQuery("from Book").getResultList();
|
| for (Iterator iter = someBooks.iterator(); iter.hasNext();)
| {
| Book element = (Book) iter.next();
| em.remove(element);
| }
| }
|
My test client:
| public static void main(String[] args) throws Exception
| {
| Properties properties = new Properties();
| properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.factory.url.pkgs", "=org.jboss.naming:org.jnp.interfaces");
| properties.put("java.naming.provider.url", "localhost:1099");
| Context context = new InitialContext(properties);
|
| TestBeanRemote beanRemote = (TestBeanRemote) context.lookup(TestBean.RemoteJNDIName);
| beanRemote.test();
| }
|
Output log from JBoss:
| 2008-01-10 17:15:40,755 DEBUG [org.jboss.remoting.transport.socket.ServerThread] WAKEUP in SERVER THREAD
| 2008-01-10 17:15:40,991 DEBUG [org.jboss.remoting.transport.socket.ServerThread] beginning dorun
| 2008-01-10 17:15:41,211 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4915213685571584
| 2008-01-10 17:15:41,211 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
| 2008-01-10 17:15:41,211 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
| 2008-01-10 17:15:41,211 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
| 2008-01-10 17:15:41,211 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
| 2008-01-10 17:15:41,220 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] executing identity-insert immediately
| 2008-01-10 17:15:41,224 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
| 2008-01-10 17:15:41,224 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2008-01-10 17:15:41,352 DEBUG [org.hibernate.SQL] insert into book (title, author) values (?, ?)
| 2008-01-10 17:15:41,420 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 1
| 2008-01-10 17:15:41,420 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2008-01-10 17:15:41,420 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2008-01-10 17:15:41,420 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2008-01-10 17:15:41,420 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] executing identity-insert immediately
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.SQL] insert into book (title, author) values (?, ?)
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 2
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2008-01-10 17:15:41,421 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2008-01-10 17:15:41,421 INFO [STDOUT] CURRENT TRANSACTION STATUS 1: NOT ROLLBACK
| 2008-01-10 17:15:41,422 INFO [STDOUT] CURRENT TRANSACTION STATUS 2: ROLLBACK
| 2008-01-10 17:15:41,422 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
| 2008-01-10 17:15:41,447 DEBUG [org.jboss.remoting.transport.socket.ServerThread] begin thread wait
|
Book.java (the hibernate entity):
| @Entity
| @Table(name = "book")
| @SequenceGenerator(name = "book_sequence", sequenceName = "book_id_seq")
| public class Book implements Serializable
| {
| /**
| *
| */
| private static final long serialVersionUID = -9108127436362270765L;
| private Integer id;
| private String title;
| private String author;
|
| public Book()
| {
| super();
| }
|
| public Book(Integer id, String title, String author)
| {
| super();
| this.id = id;
| this.title = title;
| this.author = author;
| }
|
| @Override
| public String toString()
| {
|
| return "Book: " + getId() + " Title " + getTitle() + " Author " + getAuthor();
| }
|
| /**
| * @return the author
| */
| public String getAuthor()
| {
| return author;
| }
|
| /**
| * @param author the author to set
| */
| public void setAuthor(String author)
| {
| this.author = author;
| }
|
| /**
| * @return the id
| */
| @Id
| @GeneratedValue(strategy = GenerationType.AUTO, generator = "book_sequence")
| public Integer getId()
| {
| return id;
| }
|
| /**
| * @param id the id to set
| */
| public void setId(Integer id)
| {
| this.id = id;
| }
|
| /**
| * @return the title
| */
| public String getTitle()
| {
| return title;
| }
|
| /**
| * @param title the title to set
| */
| public void setTitle(String title)
| {
| this.title = title;
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118862#4118862
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118862
18 years, 3 months