[JBoss/Spring Integration] - Jboss and terracotta deployment problem.
by jpori
I have been trying to put our AS and app under TC for a while, but I'm constantly getting this error(No bean class specified on bean definition) when jboss is put to connection with terracotta.
Our spring module is following
app.ear
- a_persistence.spring
In jboss-spring we have:
| <description>BeanFactory=(a_persistence)</description>
| <import resource="classpath:spring/component1-spring.xml" />
| <import resource="classpath:spring/component2-spring.xml" />
- a_service.spring
In jboss-spring we have:
| <description>
| BeanFactory=(b_service)
| ParentBeanFactory=(a_persistence)
| </description>
| <import resource="classpath:spring/service1-spring.xml" />
| <import resource="classpath:spring/service2-spring.xml" />
|
Libraries:
component1.jar
component2.jar
service1.jar
service2.jar
The a_persistence.spring deploys ok, but when deploying a_service.spring and from the service1-spring.xml the first bean throws exception:
Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition; - nested throwable:
| (org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BEANNAME' defined in class path resource [spring/service2-spring.xml]: Instantiation of bean failed; nested exception is java.lang.IllegalStateException: No bean class specified on bean definition)
This happens only if the bean is defined in the xml, this works ok if the bean is annotated. Meaning that I use component-scan in the file.
Bean definition:
<bean id="UserService" class="com.company.usermgr.UserServiceImpl"/>
Also this error happens when there is NO hierachy between spring content(no ParentBeanFactory).
I would like to keep the component design, but I have no idea what is causing this. I have checked all the jar and libraries, tested with different versions and so on.
Also noticed that if I use bean factory from the deployer, it deploys, but autowires will not work(beans are nulls).
But if I get the TC config out from the jboss, everything work like a dream.
Not sure if this is the correct forum, but I will try my luck...
Environment is
Jboss 4.2.3
Spring 2.5.4 - 2.5.6SEC
jdk 1.6
Terracotta 3.0.0
Deployer 2.1 for spring 2.5
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229404#4229404
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229404
17 years, 1 month
[Beginners Corner] - Problem with socket connection to an EJB
by Andrechan
I'm using Jboss v4.2
I have an application that generates threads who do a remote call to a session bean in a method like this
public void doWork()
| {
|
| Properties p = new Properties( );
| p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| p.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
| p.put(Context.PROVIDER_URL,"jnp://"+ip+":1099");
|
| Context context;
| try{
| context = new InitialContext(p);
| NavSenderRemote beanRemote = (NavSenderRemote) context.lookup("WSGeoEAR/NavSenderBean/remote");
|
| Random r = new Random();
| int lat=r.nextInt(100);
| int lon= r.nextInt(100);
|
| beanRemote.setPosition(idUtente, lat, lon);
|
| }catch (NamingException e){
| e.printStackTrace();
| }
This application works if I run it on the same computer but if I run it on another computer it gives this exception on the client side:
Exception in thread "Thread-0" org.jboss.remoting.CannotConnectException: Can no
| t get connection to server. Problem establishing socket connection for InvokerLo
| cator [socket://172.19.1.22:3873/]
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor
| t(MicroSocketClientInvoker.java:532)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI
| nvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
| eInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPr
| opagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
| lientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.
| java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteP
| roxy.java:107)
| at $Proxy0.setPosition(Unknown Source)
| at threads.ClientRMIThread.doWork(ClientRMIThread.java:91)
| at threads.ClientRMIThread.run(ClientRMIThread.java:59)
| at java.lang.Thread.run(Unknown Source)
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
|
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
|
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
| rce)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientS
| ocket(SocketClientInvoker.java:152)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConne
| ction(MicroSocketClientInvoker.java:856)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor
| t(MicroSocketClientInvoker.java:525)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI
| nvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
| eInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPr
| opagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityC
| lientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.
| java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteP
| roxy.java:107)
| at $Proxy0.setPosition(Unknown Source)
| at threads.ClientRMIThread.doWork(ClientRMIThread.java:91)
| at threads.ClientRMIThread.run(ClientRMIThread.java:59)
| at java.lang.Thread.run(Unknown Source)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
| eInterceptor.java:74)
| ... 12 more
| Caused by: java.net.SocketException: Connection reset
| at java.net.SocketInputStream.read(Unknown Source)
| at java.io.BufferedInputStream.fill(Unknown Source)
| at java.io.BufferedInputStream.read1(Unknown Source)
| at java.io.BufferedInputStream.read(Unknown Source)
| at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
| at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
| at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Sour
| ce)
| at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
| at java.io.ObjectInputStream.<init>(Unknown Source)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(Ob
| jectInputStreamWithClassLoader.java:95)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.c
| reateInput(JavaSerializationManager.java:54)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getM
| arshallingStream(SerializableUnMarshaller.java:72)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getM
| arshallingStream(SerializableUnMarshaller.java:55)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputSt
| ream(ClientSocketWrapper.java:185)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams
| (ClientSocketWrapper.java:164)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(Client
| SocketWrapper.java:66)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
|
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
|
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
| rce)
| at java.lang.reflect.Constructor.newInstance(Unknown Source)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientS
| ocket(SocketClientInvoker.java:152)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConne
| ction(MicroSocketClientInvoker.java:856)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transpor
| t(MicroSocketClientInvoker.java:525)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientI
| nvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemot
| eInterceptor.java:62)
| ... 12 more
|
I have already checked that
-Jboss runs with -b 0.0.0.0
-the firewalls are deactivated
-the ip is correct
any ideas?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229391#4229391
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229391
17 years, 1 month
[Clustering/JBoss] - Re: JBoss Cluster using Gossip Router
by amardeep21
Thanks for the explanation really appreciate that.
Now, I understand your point its using port 5446 because i am using ports-01 which is then using the sample-bindings and XSL transform to rewrite the ports.
But, if use normal default ports config which i tried as well it gives same result.
network: Connecting socket://vpnip:1099 with proxy=DIRECT
network: Connecting socket://vpnip:1098 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://vpnip:1099 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://staticip:4446 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://staticip:4446 with proxy=DIRECT
network: Connecting socket://staticip:1099 with proxy=DIRECT
network: Connecting socket://staticip:4446 with proxy=DIRECT
network: Connecting socket://staticip:4446 with proxy=DIRECT
So, is it a problem with sample-bindings?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4229386#4229386
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4229386
17 years, 1 month