[JBoss jBPM] - Filter error after setting character encoding in LogFilter.j
by frank101
I was trying to set the request character encoding to utf-8, but got an error after the change. The change was in doFilter() in LogFilter.java. Here is the code that does that:
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) servletRequest;
// ADDED THESE 2 LINES
request.setCharacterEncoding("UTF-8");
filterChain.doFilter(servletRequest, servletResponse);
log.debug("request "+request.getRequestURL());
Enumeration enumeration = request.getParameterNames();
while (enumeration.hasMoreElements()) {
String paramName = (String) enumeration.nextElement();
log.debug("request parameter ["+paramName+"]="+request.getParameter(paramName));
}
HttpSession session = request.getSession();
enumeration = session.getAttributeNames();
while (enumeration.hasMoreElements()) {
String attributeName = (String) enumeration.nextElement();
log.debug("session parameter ["+attributeName+"]="+session.getAttribute(attributeName));
}
filterChain.doFilter(servletRequest, servletResponse);
}
Here is the error trace:
21:12:34,980 DEBUG [LogFilter] request parameter [login:username]=cookie monster
21:12:34,980 DEBUG [LogFilter] request parameter [login_SUBMIT]=1
21:12:34,980 DEBUG [LogFilter] request parameter [login:_link_hidden_]=
21:12:34,980 DEBUG [LogFilter] request parameter [login:_id2]=Log In
21:12:34,990 DEBUG [LogFilter] session parameter [org.apache.myfaces.application
.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/login.jsp]=[Ljava.lang.Object;@132cb29
21:12:34,990 DEBUG [LogFilter] session parameter [javax.faces.request.charset]=I
SO-8859-1
21:12:34,990 DEBUG [LogFilter] session parameter [userBean]=org.jbpm.webapp.bean
.UserBean@12f2b32
21:12:35,000 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet t
hrew exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{userBean.
userSelectItems}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
:399)
at javax.faces.component.UISelectItems.getValue(UISelectItems.java:55)
at javax.faces.component._SelectItemsIterator.hasNext(_SelectItemsIterat
or.java:92)
at javax.faces.component._SelectItemsUtil.matchValue(_SelectItemsUtil.ja
va:46)
at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:52)
at javax.faces.component.UIInput.validate(UIInput.java:269)
at javax.faces.component.UIInput.processValidators(UIInput.java:144)
at javax.faces.component.UIForm.processValidators(UIForm.java:68)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBa
se.java:417)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:14
2)
at org.apache.myfaces.lifecycle.LifecycleImpl.processValidations(Lifecyc
leImpl.java:208)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
ipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: org.jbpm.webapp.bean.UserBean
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverI
mpl.java:78)
at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELPars
erHelper.java:532)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
:380)
... 34 more
Caused by: javax.faces.el.EvaluationException: Bean: org.jbpm.webapp.bean.UserBe
an, property: userSelectItems
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolv
erImpl.java:404)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverI
mpl.java:71)
... 37 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolv
erImpl.java:400)
... 38 more
Caused by: java.lang.NullPointerException
at org.jbpm.webapp.bean.UserBean.getUsers(UserBean.java:53)
at org.jbpm.webapp.bean.UserBean.getUserSelectItems(UserBean.java:61)
... 43 more
21:12:36,873 DEBUG [JbpmContextInfo] creating jbpm context with service factorie
s '[message, scheduler, logging, persistence, authentication]'
21:12:36,873 DEBUG [JbpmContext] creating JbpmContext
21:12:36,873 DEBUG [DbPersistenceServiceFactory] creating persistence service
21:12:36,873 DEBUG [DbPersistenceService] creating hibernate session
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961752#3961752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961752
17 years, 11 months
[JBoss Messaging] - Re: Removing a MessageListener doesn't remove its associated
by davidrh
I've tried upgrading to CR3 (both the server and the client JAR), and now under load we get the following exception on the client (it happens anywhere from 20 seconds to a couple of minutes after processing starts):
| 2006-07-31 11:05:10,829 ERROR org.jboss.jms.client.container.ExceptionInterceptor - Caught Exception:
| org.jboss.aop.NotFoundInDispatcherException: Object with oid: -2147483420 was not found in the Dispatcher
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:842)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:691)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:443)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:530)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:253)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:610)
| at org.jboss.remoting.Client.invoke(Client.java:602)
| at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:112)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
| at org.jboss.jms.client.container.TransactionAspect.handleSend(TransactionAspect.java:170)
| at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect10.invoke(TransactionAspect10.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:134)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
| at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
| at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
| at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:237)
| at sun.reflect.GeneratedMethodAccessor504.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:134)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
| at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
| at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:208)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
| at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
| at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:671)
| at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:653)
| at org.springframework.jms.core.JmsTemplate$3.doInJms(JmsTemplate.java:638)
| at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:585)
| at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:635)
| at com.platefood.pfp.integration.messaging.JmsTemplateMessageDispatcher.dispatchAsynchronous(JmsTemplateMessageDispatcher.java:67)
| at com.platefood.pfp.core.integration.publishing.MulePublisherInvoker.invokeAsynchronous(MulePublisherInvoker.java:116)
| at com.platefood.pfp.core.integration.publishing.PublisherIntegrationServiceImpl.send(PublisherIntegrationServiceImpl.java:985)
| at com.platefood.pfp.core.integration.publishing.PublisherIntegrationServiceImpl.validateAndSend(PublisherIntegrationServiceImpl.java:1686)
| at com.platefood.pfp.core.integration.publishing.PublisherIntegrationServiceImpl.updateListingKeyword(PublisherIntegrationServiceImpl.java:1595)
| at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:292)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
| at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
| at com.platefood.pfp.core.business.common.dao.OptimisticLockInterceptor.invoke(OptimisticLockInterceptor.java:46)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
| at com.platefood.pfp.core.business.aop.PerformanceLoggerInterceptor.invoke(PerformanceLoggerInterceptor.java:377)
| at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
| at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
| at $Proxy146.updateListingKeyword(Unknown Source)
| at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:324)
| at com.platefood.pfp.core.integration.publishing.PublisherIntegrationReceiver.onMessage(PublisherIntegrationReceiver.java:190)
| at com.platefood.pfp.integration.spring.jms.JMSReceiverManager$2.onMessage(JMSReceiverManager.java:226)
| at org.jboss.jms.client.remoting.MessageCallbackHandler.callOnMessage(MessageCallbackHandler.java:82)
| at org.jboss.jms.client.remoting.MessageCallbackHandler$ClientDeliveryRunnable.run(MessageCallbackHandler.java:751)
| at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(Unknown Source)
| at java.lang.Thread.run(Thread.java:534)
|
The log is then filled with this exception, and no messages are processed anymore. I still have the code in there to close and re-open the session every sixty seconds but that doesn't fix the problem.
This didn't happen with CR2 and I haven't changed our application apart from the jboss-messaging-client.jar. There are only two warnings in the JBoss server.log:
| 2006-07-31 11:03:57,257 WARN [org.jboss.jms.server.endpoint.DeliveryRunnable] Failed to deliver the message to the client.
| 2006-07-31 11:03:57,267 WARN [org.jboss.jms.server.connectionmanager.SimpleConnectionManager] A problem has been detected with the connection to remote client 5c4o25-8eg1pp-eqa511ib-1-eqa51w8f-h It is possible the client has exited without closing its connection(s) or there is a network problem. All connection resources corresponding to that client process will now be removed.
|
I will try to update my test harness class above to include some load and see if I can re-produce the problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961751#3961751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961751
17 years, 11 months
[JBossWS] - Using entities with collections?
by sbalmos
Hi all,
In 1.0.2, the WSDL generator now ignores datatypes that are collections. This was easy enough to fix with my wrapper SOAP interface. However, the complex datatypes that I return from my functions are entity beans, which themselves have member collections. I cannot replace these collections with arrays, since the EJB3 Persistence system needs collections to determine relationship mappings. And I can't create overridden getter methods in the entities that return arrays.
So, what am I supposed to do? On one hand, I must use collections in the entities for the persistence framework. Yet on the other hand, I can't for the SOAP framework. Am I supposed to create new wrapper entity datatypes for SOAP, which only use arrays? What about Map-type collections, where a flat array wouldn't really work?
Ideas are appreciated.
--Scott
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961750#3961750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961750
17 years, 11 months