[EJB/JBoss] - Re: Socket Timeout with EJB2 on JBoss v4.0.5GA?
by cdsanchez
Hello klester,
I am newbie at jboss forums and am trying to use your guide to configure the timeout in my Jboss server.
I've modified jboss-service.xml including the Mbeans UnifiedInvoker and Connector; I've applied changes too in the standardjboss.xml adding the invoker-proxy-binding and replacing in the container "Standard Stateless SessionBean" to use the new proxy invoker.
I've coded a sample HelloWorld Stateless Bean; when I try to deploy the service, Jboss shows me the error:
18:25:02,406 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=HelloWorldTest,service=EJB
java.lang.RuntimeException: invoker is null: jboss:service=invoker,type=unified
at org.jboss.proxy.ejb.ProxyFactory.setupInvokers(ProxyFactory.java:244)
at org.jboss.proxy.ejb.ProxyFactory.start(ProxyFactory.java:228)
at org.jboss.ejb.SessionContainer.startInvokers(SessionContainer.java:421)
at org.jboss.ejb.SessionContainer.startService(SessionContainer.java:383)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy49.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:395)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy23.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:627)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy24.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:534)
18:25:03,171 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jndiName=HelloWorldTest,service=EJB
State: FAILED
Reason: java.lang.RuntimeException: invoker is null: jboss:service=invoker,type=unified
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:jndiName=HelloWorldTest,service=EJB
State: FAILED
Reason: java.lang.RuntimeException: invoker is null: jboss:service=invoker,type=unified
I am using Jboss 4.0.3Sp1 and Jdk 1.4
I've tried with Jboss 4.0.5GA too and got same error.
It could be a EJB conf problem?
Thank you very much in advance.
Regards
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250806#4250806
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250806
16 years, 8 months
[EJB 3.0] - Re: SLSBs and pooling
by jaikiran
As Peter mentioned, there have been deployment performance issues in AS-5. However, if you are using JBoss AS 5.1.0.GA then there have been many improvements. But the deployment timings don't yet match with the 4.x series of the AS.
See this thread for details about EJB3 deployment performance http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231116
As mentioned in that thread :
"jaikiran" wrote :
| Feel free to report any improvement or if the timing remains the same. While reporting, please provide details about your application including :
|
| 1) Number of EJB3 beans
| 2) Approximate number of methods in each bean
| 3) Time it takes to deploy this single application (its recommended that you let the server start cleanly and once its started drop your application in the deploy folder so that you get an accurate timing for the deployment). If available, the time this application used to take without this new version of EJB3.
| 4) Any other information which you might feel is useful.
| 5) Operating system and machine configurations
While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250802#4250802
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250802
16 years, 8 months
[JBoss Cache: Core Edition] - Re: How to desing cache in Client/Server mode?
by steeven
manik, thanks very much. Inval-async mode worked now.
I think it is not possible to make only one server response read request, right? if one server failed to response, the other server could response at once. but at most case, both the server loader will response read request.
another question, how to make the server readonly? the server will accept changes from client side. it is dangerous for my case.
===================================
client:
<?xml version="1.0" encoding="UTF-8"?>
| <jbosscache xmlns="urn:jboss:jbosscache-core:config:3.0">
|
| <eviction wakeUpInterval="5000">
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
| eventQueueSize="200000">
| <property name="maxNodes" value="5000" />
| <property name="timeToLive" value="1000000" />
| </default>
| </eviction>
|
| <clustering mode="i" clusterName="EmsGlobalCluster">
| <async />
| <jgroupsConfig configFile="udp.xml" />
| </clustering>
|
| <loaders passivation="false" shared="false">
| <loader class="org.jboss.cache.loader.ClusteredCacheLoader">
| <properties>
| timeout = 3000
| </properties>
| </loader>
| </loaders>
|
| </jbosscache>
server:
<?xml version="1.0" encoding="UTF-8"?>
| <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="urn:jboss:jbosscache-core:config:3.1">
|
| <transaction
| transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
|
| <eviction wakeUpInterval="5000">
| <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
| eventQueueSize="200000">
| <property name="maxNodes" value="5000" />
| <property name="timeToLive" value="1000000" />
| </default>
| </eviction>
|
| <clustering mode="i" clusterName="EmsGlobalCluster">
| <async />
| <jgroupsConfig configFile="udp.xml" />
| </clustering>
|
| <loaders passivation="false" shared="true">
| <loader class="org.steeven.MyCacheLoader"
| async="false" fetchPersistentState="false" ignoreModifications="true"
| purgeOnStartup="false">
| <properties />
| </loader>
| </loaders>
| </jbosscache>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250794#4250794
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250794
16 years, 8 months
[Javassist user questions] - Pop from empty stack after MethodCall.replace
by dschulten
Hi,
I need to replace the following call in legacy bytecode:
dataInputStream.read(buf, 0, len);
by
dataInputStream.readFully(buf, 0, len);
The original read() has the obvious flaw that it does not check for the return value of dataInputStream.read, which leads to problems if the implementation chooses to fill the buffer only partially. I want to solve this bug using Javassist.
I do the following:
ExprEditor exprEditor = new ExprEditor() {
@Override
public void edit(MethodCall methodCall)
throws CannotCompileException {
String methodName = methodCall.getMethodName();
if (methodName.equals("read")) {
methodCall.replace("$_ = $0.readFully($$);");
didChangesToClassfile = true;
}
}
};
But the created class is broken, it is rejected by the classloader and jode says "Pop from empty stack".
Obviously I want to replace a method call with a return value which is being ignored by a void method call. I guess this is what causes the problem, but maybe I am wrong.
The offending bytecode is below, look around readFully in line 114:
public void (String arg1)
Code(max_stack = 4, max_locals = 9, code_length = 139)
0: aload_0
1: invokespecial java.lang.Object. ()V (23)
4: new <java.io.DataInputStream> (2)
7: dup
8: aload_0
9: invokevirtual java.lang.Object.getClass ()Ljava/lang/Class; (24)
12: aload_1
13: invokevirtual java.lang.Class.getResourceAsStream (Ljava/lang/String;)Ljava/io/InputStream; (22)
16: invokespecial java.io.DataInputStream. (Ljava/io/InputStream;)V (16)
19: dup
20: astore_1
21: invokevirtual java.io.DataInputStream.readUnsignedByte ()I (21)
24: i2c
25: bipush 70
27: if_icmpeq #31
30: return
31: aload_1
32: invokevirtual java.io.DataInputStream.readUnsignedByte ()I (21)
35: i2c
36: bipush 49
38: if_icmpeq #42
41: return
42: aload_0
43: aload_1
44: invokevirtual java.io.DataInputStream.readByte ()B (19)
47: putfield ak.h I (15)
50: aload_0
51: aload_1
52: invokevirtual java.io.DataInputStream.readByte ()B (19)
55: putfield ak.d I (11)
58: aload_0
59: aload_1
60: invokevirtual java.io.DataInputStream.readByte ()B (19)
63: putfield ak.e I (12)
66: aload_0
67: aload_1
68: invokevirtual java.io.DataInputStream.readByte ()B (19)
71: putfield ak.f I (13)
74: aload_0
75: aload_1
76: invokevirtual java.io.DataInputStream.readByte ()B (19)
79: putfield ak.g I (14)
82: aload_1
83: invokevirtual java.io.DataInputStream.readShort ()S (20)
86: dup
87: istore_2
88: newarray
90: astore_3
91: aload_1
92: aload_3
93: iconst_0
94: iload_2
95: istore %7
97: istore %6
99: astore %5
101: astore %4
103: iconst_0
104: istore %8
106: aload %4
108: aload %5
110: iload %6
112: iload %7
114: invokevirtual java.io.DataInputStream.readFully ([BII)V (116)
117: istore %8
119: iload %8
121: pop
122: aload_0
123: aload_3
124: iconst_0
125: iload_2
126: invokestatic javax.microedition.lcdui.Image.createImage ([BII)Ljavax/microedition/lcdui/Image; (34)
129: putfield ak.G Ljavax/microedition/lcdui/Image; (10)
132: aload_1
133: invokevirtual java.io.DataInputStream.close ()V (17)
136: return
137: pop
138: return
The original bytecode looks like this:
public void (String arg1)
Code(max_stack = 4, max_locals = 4, code_length = 116)
0: aload_0
1: invokespecial java.lang.Object. ()V (23)
4: new <java.io.DataInputStream> (2)
7: dup
8: aload_0
9: invokevirtual java.lang.Object.getClass ()Ljava/lang/Class; (24)
12: aload_1
13: invokevirtual java.lang.Class.getResourceAsStream (Ljava/lang/String;)Ljava/io/InputStream; (22)
16: invokespecial java.io.DataInputStream. (Ljava/io/InputStream;)V (16)
19: dup
20: astore_1
21: invokevirtual java.io.DataInputStream.readUnsignedByte ()I (21)
24: i2c
25: bipush 70
27: if_icmpeq #31
30: return
31: aload_1
32: invokevirtual java.io.DataInputStream.readUnsignedByte ()I (21)
35: i2c
36: bipush 49
38: if_icmpeq #42
41: return
42: aload_0
43: aload_1
44: invokevirtual java.io.DataInputStream.readByte ()B (19)
47: putfield ak.h I (15)
50: aload_0
51: aload_1
52: invokevirtual java.io.DataInputStream.readByte ()B (19)
55: putfield ak.d I (11)
58: aload_0
59: aload_1
60: invokevirtual java.io.DataInputStream.readByte ()B (19)
63: putfield ak.e I (12)
66: aload_0
67: aload_1
68: invokevirtual java.io.DataInputStream.readByte ()B (19)
71: putfield ak.f I (13)
74: aload_0
75: aload_1
76: invokevirtual java.io.DataInputStream.readByte ()B (19)
79: putfield ak.g I (14)
82: aload_1
83: invokevirtual java.io.DataInputStream.readShort ()S (20)
86: dup
87: istore_2
88: newarray
90: astore_3
91: aload_1
92: aload_3
93: iconst_0
94: iload_2
95: invokevirtual java.io.DataInputStream.read ([BII)I (18)
98: pop
99: aload_0
100: aload_3
101: iconst_0
102: iload_2
103: invokestatic javax.microedition.lcdui.Image.createImage ([BII)Ljavax/microedition/lcdui/Image; (34)
106: putfield ak.G Ljavax/microedition/lcdui/Image; (10)
109: aload_1
110: invokevirtual java.io.DataInputStream.close ()V (17)
113: return
114: pop
115: return
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250792#4250792
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250792
16 years, 8 months