[JBoss Web Services] - Bizarre Serialization Problem
by spyhunter99
spyhunter99 [https://community.jboss.org/people/spyhunter99] created the discussion
"Bizarre Serialization Problem"
To view the discussion, visit: https://community.jboss.org/message/728819#728819
--------------------------------------------------------------
I'm looking at WS-Discovery, which is a UDP SOAP over multicast based protocol that is similar to UDDI, except way similier and it's adhoc. In the Java world, there's only one implementation that I've found which is here http://code.google.com/p/java-ws-discovery/ http://code.google.com/p/java-ws-discovery/.
I can get the samples to run correctly in outside of the Jboss world and it works as advertised. Basically, there is a service that listens for "Probe" messages on UDP and replies to the requestor based on the search criteria. Cool.
The problem I ran into boils down to a serialization issue. Escentially, when I run outside of Jboss, it's using the standard default JDK soap libraries, aka Sun's JAXB serializers, message factories and marshallers. In Jboss, it's actually creating JbossWS classes which fill these roles. For everything I've done up until now, this have been just fine with this arrangement. Enter WS-Discovery (at least this guys implementation).
First, some implementation details that are worth mentioning and are important to understanding the problem. It's not SOAP over HTTP, it's over UDP which means this guys library serializes the message, then writes it to transport. In order to facilitate this, the author created a custom class which has functions such as getSOAPmessage and getSOAPbody etc with a toString function that serializes the message. The problem is related to how the message is structured and as you can imagine, using the JDK's classes it correctly serializes but with the JbossWS classes it does not. Specifically, the part with the search results is null under JbossWS.
It appears that the actually loading of the JAXB specific stuff happens with this line, which unfortunately doesn't leave me with any flexiblity as far as forcing it to the JDK's vs JbossWS.
MessageFactory factory = MessageFactory.newInstance(soapProtocol);
At the point of serialization, the SOAP message itself is
com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl
org.jboss.ws.core.soap.SOAPMessageImpl
Long story short, there is a way to force the class loading from a specific instance to use Sun's JDK? Or perhaps would it be better if I found either an alternative implementation or write my own.
Esscentially what I would like to do is to write a JAX-WS handler which does a web service callout using WS-Discovery to find the correct url, thus eliminating the need for configuration files. It obviously would need to work in a variety of soap stacks, more than just JbossWS and Sun's default implementation.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/728819#728819]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
Re: [jboss-user] [JBoss Tools] - m2e(clipse)-wtp 0.15.0 : New and Noteworthy
by lostiniceland
lostiniceland [https://community.jboss.org/people/lostiniceland] commented on
"m2e(clipse)-wtp 0.15.0 : New and Noteworthy"
To view all comments on this blog post, visit: https://community.jboss.org/community/tools/blog/2012/02/03/m2eclipse-wtp...
--------------------------------------------------
Thanks for the work on this highly-anticipated-plugin.
I do have a little problem though. I used version 0.14 with an JBoss example on my laptop and there everythin works fine, so I introduced the plugin to my project and I installed 0.15. We are (unfortunately) stuck at JEE 5 and when I import the Maven project, m2e-wtp generates another project which has the name of my <webmodule>EAR. This seems to be a virtual component and I am getting error when trying to look at the Deployment Assemblies in the projects properties
The only difference is the plugin version and the JEE5 < - > JEE6 difference. Both projects have a ear-module but on JEE5 with version 15 I get this additional project instead that the ear-module is configured.
Can someone explain why this might happen?
--------------------------------------------------
12 years, 8 months
[jBPM] - JBPM Console Server (5.2)/Hibernate/JBoss AS 7.1.1 Error
by Timothy Charman
Timothy Charman [https://community.jboss.org/people/tcharman] created the discussion
"JBPM Console Server (5.2)/Hibernate/JBoss AS 7.1.1 Error"
To view the discussion, visit: https://community.jboss.org/message/728888#728888
--------------------------------------------------------------
Hi
I get this when trying to click on a process in the JBPM console. It is obviously trying to connect to the console server database for the first time, and failing. It has retrieved the process from Guvnor successfully (apparently). Anyone have any ideas? It looks like it might have found Hibernate 4 but is coded against Hibernate 3?
Thanks
Tim
URL: ' http://xxx.xxx.xxx.xxx:8080/gwt-console-server/rs/process/definition/timi... http://xxx.xxx.xxx.xxx:8080/gwt-console-server/rs/process/definition/timi...'
Action: 'org.jboss.bpm.console.client.process.UpdateInstancesAction'
Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/classic/Session;
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
root cause
java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/classic/Session;
org.jbpm.process.audit.ProcessInstanceDbLog.findActiveProcessInstances(ProcessInstanceDbLog.java:46)
org.jbpm.integration.console.CommandDelegate.getActiveProcessInstanceLogsByProcessId(CommandDelegate.java:300)
org.jbpm.integration.console.ProcessManagement.getProcessInstances(ProcessManagement.java:66)
org.jboss.bpm.console.server.ProcessMgmtFacade.getInstancesJSON(ProcessMgmtFacade.java:189)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/728888#728888]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[jBPM] - Guvnor logging like crazy
by Timothy Charman
Timothy Charman [https://community.jboss.org/people/tcharman] created the discussion
"Guvnor logging like crazy"
To view the discussion, visit: https://community.jboss.org/message/728887#728887
--------------------------------------------------------------
Hi
I get this in the JBoss log every few seconds. Looks like Guvnor is trying to close a JCR connection that is already closed. Repeatedly. Does anyone else see this?
Thanks
Tim
15:09:35,005 INFO [org.apache.jackrabbit.core.TransientRepository] (http--0.0.0.0-8080-5) Session opened
15:09:35,006 INFO [org.apache.jackrabbit.core.TransientRepository] (http--0.0.0.0-8080-5) Session closed
15:09:24,989 WARN [org.apache.jackrabbit.core.session.SessionState] (http--0.0.0.0-8080-1) session-guest-13305 has already been closed. See the attached exception for
a trace of where this session was closed.: java.lang.Exception: Stack trace of where session-guest-13305 was originally closed
at org.apache.jackrabbit.core.session.SessionState.close(SessionState.java:245) [jackrabbit-core-2.2.8.jar:2.2.8]
at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:888) [jackrabbit-core-2.2.8.jar:2.2.8]
at org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:389) [jackrabbit-core-2.2.8.jar:2.2.8]
at org.drools.repository.RulesRepository.logout(RulesRepository.java:198) [guvnor-repository-5.3.1.Final.jar:5.3.1.Final]
at org.drools.guvnor.server.repository.RulesRepositoryManager.close(RulesRepositoryManager.java:67) [classes:]
at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_22]
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.drools.guvnor.server.repository.RulesRepositoryManager_$$_javassist_seam_5.close(RulesRepositoryManager_$$_javassist_seam_5.java) [classes:]
at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source) [:1.6.0_22]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_22]
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.Component.callComponentMethod(Component.java:2275) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.Component.callDestroyMethod(Component.java:2206) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.Component.destroy(Component.java:1472) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:394) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.contexts.ServletLifecycle.endRequest(ServletLifecycle.java:86) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:74) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/728887#728887]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months