[Clustering/JBoss] - Re: NotSerializableException in JBossCache with Log4J Level
by realstaple
Any further word on this?
I created a listener that implements both HttpSessionAttributeListener and ServletContextAttributeListener (code below). It exposed a few other classes we were putting into the session.
However, I continue to get the log4j NonSerializable exceptions without any indication from the listener that something has been added that contains org.apache.log4j.Level.
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.ServletContextAttributeEvent;
import java.io.ObjectOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class FindNonSerializableSessionAttributesListener implements HttpSessionAttributeListener, ServletContextAttributeListener {
private static final Log logger = LogFactory.getLog(FindNonSerializableSessionAttributesListener.class);
public void attributeAdded(HttpSessionBindingEvent httpSessionBindingEvent) {
checkSerailizable(httpSessionBindingEvent.getName(), httpSessionBindingEvent.getValue());
}
public void attributeRemoved(HttpSessionBindingEvent httpSessionBindingEvent) {}
public void attributeReplaced(HttpSessionBindingEvent httpSessionBindingEvent) {
checkSerailizable(httpSessionBindingEvent.getName(), httpSessionBindingEvent.getValue());
}
private void checkSerailizable(String name, Object value) {
if (logger.isDebugEnabled()) {
try {
ObjectOutputStream out = new ObjectOutputStream(new ByteArrayOutputStream());
out.writeObject(value);
out.close();
out.flush();
} catch (IOException e) {
logger.info("Error serialiazing when setting session attribute " + name + "::" + value, e);
}
}
}
public void attributeAdded(ServletContextAttributeEvent servletContextAttributeEvent) {
checkSerailizable(servletContextAttributeEvent.getName(), servletContextAttributeEvent.getValue());
}
public void attributeRemoved(ServletContextAttributeEvent servletContextAttributeEvent) {
//To change body of implemented methods use File | Settings | File Templates.
}
public void attributeReplaced(ServletContextAttributeEvent servletContextAttributeEvent) {
checkSerailizable(servletContextAttributeEvent.getName(), servletContextAttributeEvent.getValue());
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027961#4027961
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027961
19Â years, 1Â month
[JBoss Messaging] - XARecovery: setting the provider name
by mskonda
In the earlier versions of JBM, I used to provide the providerName using the format shown below
| <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryMessaging" value="org.jboss.jms.recovery.JMSProviderXAResourceRecovery;ProviderName=DefaultJMSProvider"/>
|
(Ofcourse the class is now changed to MessagingXAResourceRecovery)
Looks like, the value tag wouldn't accept the ProviderName=* anymore.
If I leave without any value, it would pick up DefaultJMSProvider as the ProvidreName:.
| <property name="com.arjuna.ats.jta.recovery.XAResourceRecoveryMessaging" value="org.jboss.jms.recovery.MessagingXAResourceRecovery"/>
|
However, what if I don't have the same name (DefaultJMSProvider) as my provider' name?
I'm sure there must be way, only I didn't find it.
thanks
Madhu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027960#4027960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027960
19Â years, 1Â month
[JBossWS] - Re: How can I do mutual SSL when using JBoss as Web service
by zhijun
I have tried everything I can think of.
- Added the -Djavax.net.ssl.keystore=.... properties in my command to start the JBoss JVM.
- Added the following in my web.xml file
anonymous wrote : <service-ref>
| <service-ref-name>RemoteWebService</service-ref-name>
| <service-interface>javax.xml.rpc.Service</service-interface>
| <wsdl-file>RemoteWebService.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <port-component-ref>
| <service-endpoint-interface>
| com.zzz.MyWebService
| </service-endpoint-interface>
| <call-property>
| <prop-name>javax.net.ssl.keyStore</prop-name>
| <prop-value>my.keystore</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.keyStorePassword</prop-name>
| <prop-value>password</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.trustStore</prop-name>
| <prop-value>keystore.trust</prop-value>
| </call-property>
| <call-property>
| <prop-name>javax.net.ssl.trustStorePassword</prop-name>
| <prop-value>password</prop-value>
| </call-property>
| </port-component-ref>
| </service-ref>
- I added the following lines in my Web service client that will run in JBoss
System.setProperty("javax.net.ssl.keyStore", "/opt/jboss/jas405/server/myserver/conf/my.keystore");
| System.setProperty("javax.net.ssl.keyStorePassword", "password");
| System.setProperty("javax.net.ssl.trustStore", "/opt/jboss/jas405/server/myserver/conf/trust.keystore");
| System.setProperty("javax.net.ssl.trustStorePassword", "password");
Now when I ran my Web service client in JBoss and when I tried to call the web service, I continued to get the following error in server log:
2007-03-14 10:37:31,054 DEBUG [org.jboss.remoting.Client] invoke called, but our invoker is disconnected, discarding and fetching another fresh invoker for: InvokerLocator [https://....:1443/.../services/MyWebService]
| 2007-03-14 10:37:31,054 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] connect called for: org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker@154fc43
| 2007-03-14 10:37:31,063 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Setting request header with SOAPAction : ""
| 2007-03-14 10:37:31,063 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Setting request header with Content-Type : text/xml; charset=UTF-8
| 2007-03-14 10:37:31,098 DEBUG [org.jboss.ws.soap.SOAPContentElement] Transitioning to dom-valid state, MTOM disabled
| 2007-03-14 10:37:31,132 DEBUG [org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker] Error invoking http client invoker.
| org.jboss.ws.WSException: Invalid HTTP server response [403] - Forbidden
| at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.apache.jsp.TestWS1_jsp._jspService(TestWS1_jsp.java:86)
| 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.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.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 2007-03-14 10:37:31,133 ERROR [org.jboss.ws.jaxrpc.CallImpl] Call invocation failed with unkown Exception
| javax.xml.soap.SOAPException: Could not transmit message
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:204)
| at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:687)
| at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404)
| at org.apache.jsp.TestWS1_jsp._jspService(TestWS1_jsp.java:86)
| 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.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.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:201)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:81)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:189)
| ... 28 more
| Caused by: org.jboss.ws.WSException: Invalid HTTP server response [403] - Forbidden
| at org.jboss.ws.binding.soap.SOAPMessageUnMarshaller.read(SOAPMessageUnMarshaller.java:73)
| at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:175)
| ... 33 more
| 2007-03-14 10:37:31,135 DEBUG [org.jboss.ws.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.soap.SOAPMessageContextImpl@e782a8
| 2007-03-14 10:37:31,135 INFO [STDOUT] Call invocation failed: Could not transmit message; nested exception is:
| javax.xml.soap.SOAPException: Could not transmit message
I would highly appreciate it if anyone can provide any clue as to what I'm missing or what might be the problem.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027959#4027959
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027959
19Â years, 1Â month