[JCA/JBoss] - JCA Problem: java.lang.IllegalStateException: Trying to retu
by groovie
Dear Sirs,
i am developping my very first outbound connector and have
still a litte problem on closing my connection handle.
Aquireing and use of connection from a pool does work
without any problem. Closing the connection from a
session acutally cause a problem.
I guess i have overseen something.
The runtime environment:
Operating-System: Fedora-11 Linux
JAVA: Java version: 1.6.0_0,Sun Microsystems Inc.
Java VM: OpenJDK Server VM 14.0-b15,Sun Microsystems Inc.
(shipped with this Linux-OS)
Jboss: 4.2.3.GA
Here is the stack-trace from the closing-thread:
------------------------------------------------
06:59:17,744 INFO [NoTxConnectionManager] Throwable from unregisterConnection
java.lang.IllegalStateException: Trying to return an unknown connection2! null
at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:342)
at org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener.connectionClosed(NoTxConnectionManager.java:88)
at de.dialog_leben.bfs.risikopruefung.connector.normrisk.resource.ManagedNrConnection.closeHandle(ManagedNrConnection.java:280)
at de.dialog_leben.bfs.risikopruefung.connector.normrisk.resource.NormRiskConnectionImpl.close(NormRiskConnectionImpl.java:30)
at de.dialog_leben.bfs.risikopruefung.business.test.normrisk.NRConnectorTest.testSimpleAccess(NRConnectorTest.java:89)
at de.dialog_leben.bfs.risikopruefung.ejb.NormRiskTestAccessServiceBean.testSimpleAccess(NormRiskTestAccessServiceBean.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
(....)
Here is the stack-trace from the registering-thread:
----------------------------------------------------
07:08:14,445 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: de.dialog_leben.bfs.risikopruefung.connector.normrisk.resource.NormRiskConnectionImpl@dce075
java.lang.Throwable: STACKTRACE
at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:423)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
at de.dialog_leben.bfs.risikopruefung.connector.normrisk.driver.NormRiskConnectionFactoryImpl.getConnection(NormRiskConnectionFactoryImpl.java:87)
at de.dialog_leben.bfs.risikopruefung.connector.normrisk.driver.NormRiskConnectionFactoryImpl.getConnection(NormRiskConnectionFactoryImpl.java:76)
at de.dialog_leben.bfs.risikopruefung.business.test.normrisk.NRConnectorTest.testSimpleAccess(NRConnectorTest.java:82)
at de.dialog_leben.bfs.risikopruefung.ejb.NormRiskTestAccessServiceBean.testSimpleAccess(NormRiskTestAccessServiceBean.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
In order to understand what's going wrong i downloaded JBoss-sourcecode
and followed the debugger. I located the problem in the nested class/method:
org.jboss.resource.connectionmanager.NoTxConnectionManager.NoTxConnectionManager/connectionClosed
ce.getConnectionHandle());
}
The ce.getConnectionHandle() expression returns null, that seems to cause the problem.
Therefore i think that i forgot to assign a connectionHandle in my ManagedConnection, cause
ce referes to
ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED) ;
where this referes to my managed connection and ce Event was created in the
managedConnection method closeHandle.
Thank you for your help,
Groovy
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248110#4248110
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248110
16 years, 8 months
[JBossWS] - wsconsume and implementing interface top-down
by delicjapatrycja
Hi
(It's my first post, I was trying to find something about my problem but I couldn't )
I have some problem with deploy my Jax WS Web service.
I'm trying to do this using top-down method - wsconsume. When I generate java classes from WSDL which I have written before, I get one which is the interface.
How should I implement it ?
How should I write the web.xml ? which class name should I write inside <servlet-class> </servlet-class> tags ?
If i write the generated class name, how jax-ws knows where (in which java class) is implementing class ?
If I write the class name inside, which impelements generated interface, I can't deploy the web service. (maybe I do something wrong?)
part of Service class generated by Jax-WS:
| // [...]
| @WebService(name = "XXXService", targetNamespace = "http://xxx.com/XXX/ws")
| public interface XXXService {
|
|
| /**
| *
| * @param in
| * @return
| * returns int
| * @throws Method1FaultMsg
| */
| @WebMethod
| @WebResult(name = "out", targetNamespace = "")
| @RequestWrapper(localName = "method1", targetNamespace = "http://xxx.com/XXX/ws", className = "com.xxx.xxx.ws.Method1")
| @ResponseWrapper(localName = "method1Response", targetNamespace = "http://xxx.com/xxx/ws", className = "com.xxx.xxx.ws.Method1Response")
| public int method1(
| @WebParam(name = "in", targetNamespace = "")
| int in)
| throws Method1FaultMsg
| ;
| // [...]
|
|
My implementation class:
|
| public class XXXServiceImpl implements com.xxx.xxx.ws.XXXService {
|
|
| @WebMethod
| @WebResult(name = "out", targetNamespace = "")
| @RequestWrapper(localName = "method1", targetNamespace = "http://xxx.com/xxx/ws", className = "com.xxx.xxx.ws.Method1")
| @ResponseWrapper(localName = "method1Response", targetNamespace = "http://xxx.com/xxx/ws", className = "com.xxx.xxx.ws.Method1Response")
| public int method1(int in) throws Method1FaultMsg
| {
| try
| {
| return in*2;
| }
| catch(Exception e)
| {
| new Method1FaultMsg("Server Exception", new ServerException(), e);
| }
| return in;
| }
|
|
Any tips?
Anyway, sorry for my English :/
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248099#4248099
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248099
16 years, 8 months
[Remoting] - [Solved] Re: Problem running with Maven
by eric.rotick
First thing is that jmx is not as independent as the remoting guide would have you believe and the jboss-jmx jar is certainly needed. There is already a JIRA to this effect at https://jira.jboss.org/jira/browse/JBREM-808.
Now that jboss-jmx is required, dom4j is also required according to the remoting guide. However, the real killer was that jboss-serialization is needed although I am not using jboss serialization. Add that dependency and everything works.
In conclusion, it seems to me that the maven support for jboss, at least the remoting project, is broken. Many of the poms have no dependencies so it looks like the jars have simply been 'installed' in the repository. There are several version of standard packages in the jboss repositories, e.g. dom4j and concurrent which have jboss versions but no way to know if they should be used. The repositories seem inconsistent, some have the remoting jar but not the subsets etc.
I've read, although I cannot currently find, that with remoting 3 there will be a move to maven builds which, hopefully, will sort this out.
Shame really as remoting seems very good.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248096#4248096
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248096
16 years, 8 months