[JBossWS] - Re: JBOSS-WS Client not sending COOKIE after 2 calls
by lowecg2004
Hello,
I'm using 2.0.0 web services in a similar way to the author but I'm getting some slightly different problems with sessions.
I call a web service method that creates a HttpSession and saves some state to that session using httpSession.setAttribute("userId", userId). At the client, I get JSESSIONID back from a HTTP cookie which I pass on to a subsequent call to a servlet that is part of the same JEE context. In the servlet I verify that httpSession.getId() matches the session ID created in the web service, however a call to httpSession.getAttribute("userId") is null.
Could this be part of the same problem? The web service is declared under Seam 2.0.0b1, so is it possible that this could also be part of the problem?
To try and see if I could work around the issue, I thought I would experiment and create a jsession in a separate servlet call and then make the web service call participate in the existing session (rather than rely on the web service creating the session). Now I cannot even get a cookie (or any other HTTP header value for that matter) to pass to the server.
After reading the following:
https://jax-ws.dev.java.net/guide/HTTP_compression.html
I thought that this code would work:
final DevelopmentService_Service service = new DevelopmentService_Service();
| final DevelopmentService proxy = service.getDevelopmentServicePort();
| ((BindingProvider)proxy).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
|
| final HttpCookie jSessionId = getJSessionId();
| ((BindingProvider)proxy).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS,
| Collections.singletonMap("Cookie",Collections.singletonList(jSessionId.toString())));
But no joy. Incidentally, the HTTP compression example given at the URL above doesn't work either.
Should I be able to pass HTTP parameters from the client to the server in this way?
Cheers,
Chris.
Clients were generated using wsconsume
JBossWS 2.0.0.GA
JBossAS 4.2.0.GA
JBoss Seam 2.0.0.b1
Java 1.6.0_02 client and server
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068575#4068575
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068575
18Â years, 8Â months
[JBoss Seam] - Re: SeamTest breaks on drools 4.0
by stu2
"ellenzhao" wrote : There are two solutions:
|
| 1.delete the Janino compiler in Seam lib and use Eclipse compiler. You can get the Eclipse compiler after downloading the Drools 4.0 binary. In the drools/lib, you see a core-xxxx.jar. That is Eclipse compiler. Drop it into your Seam lib folder, edit your build.xml, edit your application.xml.
|
| Regards,
| Ellen
Thanks Ellen. I tried the first option, grabbing the Drools 4.0 distribution. I copied the lib over, and added
<module>
| <java>core-3.2.3.v_686_R32x.jar</java>
| </module>
to application.xml, and removed the janino.jar. After a clean build and making sure the jars were in test-build, I still get the same exception though.
For the Seam guys, is this something new seam-gen users are expected to setup? Or has seam-gen not yet been updated since the drools update?
Any suggestions are appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068571#4068571
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068571
18Â years, 8Â months
[JBoss Seam] - Startup exception: Ajax4jsfFilter
by amayen
Hi!
I have a problem since migrating to SEAM 2.0.
When I start up my Webapp i get the following error.
00:27:12,890 INFO [Contexts] starting up: org.jboss.seam.web.ajax4jsfFilter
| 00:27:12,921 ERROR [[/xxxxx]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
| java.lang.RuntimeException: exception invoking: create
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:134)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2067)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1990)
| at org.jboss.seam.Component.newInstance(Component.java:1961)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
| at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
| at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
| at org.jboss.seam.init.Initialization.init(Initialization.java:533)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy46.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| 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(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
| ... 98 more
| Caused by: java.lang.IllegalAccessError: tried to access field org.jboss.seam.web.Ajax4jsfFilter.delegate from class org.jboss.seam.ui.filter.Ajax4jsfFilter
| at org.jboss.seam.ui.filter.Ajax4jsfFilter.create(Ajax4jsfFilter.java:78)
| ... 104 more
I used the ajax4jsf-1.1.1 JAR and build the jboss-seam.jar from sources which i downloaded 2 hours ago (about 22:00 ).
It seems that there exists an incompatibility between the seam code and the ajax4jsf code but i'm not sure.
Maybe someone can confirm this.
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4068569#4068569
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4068569
18Â years, 8Â months