[JBoss JIRA] (AS7-6416) console spi BeanFactory processor does not support @Category
by Rob Cernich (JIRA)
Rob Cernich created AS7-6416:
--------------------------------
Summary: console spi BeanFactory processor does not support @Category
Key: AS7-6416
URL: https://issues.jboss.org/browse/AS7-6416
Project: Application Server 7
Issue Type: Bug
Components: Console
Reporter: Rob Cernich
Assignee: Heiko Braun
The BeanFactory processor in the console SPI generates a composite BeanFactory by extending component bean factory types. However, GWT does not process @Category annotations on parent interfaces, so any category classes defined on a component bean factor are not defined on the composite.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (JGRP-1548) UNICAST2: send STABLE message after 'last received' message
by Gray Watson (JIRA)
[ https://issues.jboss.org/browse/JGRP-1548?page=com.atlassian.jira.plugin.... ]
Gray Watson commented on JGRP-1548:
-----------------------------------
Maybe we should not bundle OOB messages or something? Or maybe a flag could be set on a message that disables bundling for it?
> UNICAST2: send STABLE message after 'last received' message
> -----------------------------------------------------------
>
> Key: JGRP-1548
> URL: https://issues.jboss.org/browse/JGRP-1548
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.3
>
>
> Contrary to UNICAST, which acks every message, UNICAST2 never acks messages, but only asks the sender to retransmit a message when a gap has been detected.
> However, the drawback of this (negative ack) mechanism is the so called last-message-dropped problem: when A sends messages [1..5] to B, but 5 is dropped by the transport, as A doesn't retransmit messages until it gets a retransmission request from B, B only gets messages [1..4].
> B will *not* ask A to retransmit message 5, as B doesn't know A *sent* message 5 in the first place.
> If A doesn't send message 6 for B to detect 5 is missing and asking A for retransmission, B won't get that message.
> The way this is currently handled is with stable messages. A STABLE message is sent from B to A every stable_interval ms or whenever M bytes from A have been received. In the worst case, B will have to wait stable_interval ms until it finally receives message 5 from A.
> SOLUTION:
> In addition to time and size based STABLE messages, we could send a STABLE message whenever the batch of messages removed from the receive window has completed and the receive window is empty.
> This would send a STABLE message immediately when a single message has been received (and no other messages from A are in the receive window), but it would send another STABLE message only when all (e.g.) 200 messages from A have been processed and the receive window is empty.
> With this new mechanism, we could even remove the time-based STABLE messages !
> Example:
> - At time T0, messages M1 and M2 are received. A STABLE message for M2 is sent.
> - At T+500 (ms), messages M3-M100 are received. A STABLE message for M100 is sent
> - At T+1500, M101 is received. A STABLE message for M101 is sent.
> - At T+2000, M102 is received. A STABLE message for M102 is sent.
> - At T+2010, M103-M500 are received. A STABLE message for M500 is sent
> (Note that the example above didn't take size-based STABLE messages into account)
> This is similar to the ACK based scheme in UNICAST where we only send an ack for the last message in a batch (or for a single message if not batch has been received).
> This new mechanism needs to be configurable: if enabled, the time-based STABLE mechanism would be disabled.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (JGRP-1573) Non-atomic retrieval of seqnos causes IllegalArgumentException
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1573?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1573:
---------------------------
Fix Version/s: 3.2.7
3.3
> Non-atomic retrieval of seqnos causes IllegalArgumentException
> --------------------------------------------------------------
>
> Key: JGRP-1573
> URL: https://issues.jboss.org/browse/JGRP-1573
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.2.6
> Reporter: Radim Vansa
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.2.7, 3.3
>
>
> In {{UNICAST2.handleDataReceived}} the hr and hd arguments are read non-atomically (out of lock) and neither are {{volatile}}, therefore, the order of reading the values may be interchanged (even if the values were updated in the correct order, reading delivered prior to received does not help currently). This may lead to later {{IllegalArgumentException}}.
> This could be fixed by either requesting the seqnos synchronously or in a loop until hd <= hr holds (and set them to be volatile).
> {code}
> 04:39:37,939 ERROR [org.jgroups.protocols.TCP] (OOB-32,null) failed handling incoming message: java.lang.IllegalArgumentException: low (16456815) needs to be <= high (16456814)
> at org.jgroups.protocols.UNICAST2$Unicast2Header.createStableHeader(UNICAST2.java:1037) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.UNICAST2.sendStableMessage(UNICAST2.java:611) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:754) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:420) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:606) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.FD.up(FD.java:253) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.MPING.up(MPING.java:179) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2642) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.TP.passMessageUp(TP.java:1289) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1852) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1825) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_33]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_33]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (JGRP-1573) Non-atomic retrieval of seqnos causes IllegalArgumentException
by Radim Vansa (JIRA)
Radim Vansa created JGRP-1573:
---------------------------------
Summary: Non-atomic retrieval of seqnos causes IllegalArgumentException
Key: JGRP-1573
URL: https://issues.jboss.org/browse/JGRP-1573
Project: JGroups
Issue Type: Bug
Affects Versions: 3.2.6
Reporter: Radim Vansa
Assignee: Bela Ban
Priority: Minor
In {{UNICAST2.handleDataReceived}} the hr and hd arguments are read non-atomically (out of lock) and neither are {{volatile}}, therefore, the order of reading the values may be interchanged (even if the values were updated in the correct order, reading delivered prior to received does not help currently). This may lead to later {{IllegalArgumentException}}.
This could be fixed by either requesting the seqnos synchronously or in a loop until hd <= hr holds (and set them to be volatile).
{code}
04:39:37,939 ERROR [org.jgroups.protocols.TCP] (OOB-32,null) failed handling incoming message: java.lang.IllegalArgumentException: low (16456815) needs to be <= high (16456814)
at org.jgroups.protocols.UNICAST2$Unicast2Header.createStableHeader(UNICAST2.java:1037) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.UNICAST2.sendStableMessage(UNICAST2.java:611) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:754) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:420) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:606) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.FD.up(FD.java:253) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.MPING.up(MPING.java:179) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.TP$ProtocolAdapter.up(TP.java:2642) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.TP.passMessageUp(TP.java:1289) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1852) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1825) [jgroups-3.2.6.Final-redhat-1.jar:3.2.6.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_33]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_33]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (JBAS-9528) I am trying to implement hellow world bean example in EJB 3.0 on Jboss and getting following error while running the client .
by Sambprasad Kuvalekar (JIRA)
[ https://issues.jboss.org/browse/JBAS-9528?page=com.atlassian.jira.plugin.... ]
Sambprasad Kuvalekar updated JBAS-9528:
---------------------------------------
Description:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.test.business.HelloBusiness
at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveProxyClass(ObjectInputStreamWithClassLoader.java:253)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
... 12 more
Exception in thread "main" java.lang.NullPointerException
at com.ejb3.client.HelloClient.main(HelloClient.java:25)
Here is my client class.
package com.ejb3.client;
import java.util.Properties;
import com.ejb3.client.ClientUtiliy;
import javax.naming.*;
import javax.annotation.Resource;
public class HelloClient {
@Resource
//private static SessionContext sctx;
public static void main (String[]args )throws Exception
{
Properties properties = new Properties();
// Context ctx = new InitialContext(properties);
Context ctx = ClientUtiliy.getInitialContext();
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
//System.out.println("bean is saying "+helloBus.sayHello());
HelloBusiness bean = doLookup();
System.out.println(bean.sayHello()); // 4. Call business logic
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("custom/remote/HelloBusiness");
//helloBus.sayHello();
}
private static HelloBusiness doLookup() {
Context context = null;
HelloBusiness bean = null;
try {
// 1. Obtaining Context
context = ClientUtiliy.getInitialContext();
// java.lang.Object ejbHome = context.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
// 2. Generate JNDI Lookup name
// String lookupName = getLookupName();
// 3. Lookup and cast
bean = (HelloBusiness) context.lookup("HelloBusiness");
// bean = (HelloBusiness) javax.rmi.PortableRemoteObject.narrow(ejbHome, HelloBusiness.class);
} catch (NamingException e) {
e.printStackTrace();
}
return bean;
}
Have used @RemoteBinding annotation in the bean with the jndiBinding="HelloBusiness'
> I am trying to implement hellow world bean example in EJB 3.0 on Jboss and getting following error while running the client .
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-9528
> URL: https://issues.jboss.org/browse/JBAS-9528
> Project: Application Server 3 4 5 and 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: AppClient
> Environment: JBOSS 5.1.GA, EJB 3.X , JAVA 1.5
> Reporter: Sambprasad Kuvalekar
>
> javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
> at com.ejb3.client.HelloClient.main(HelloClient.java:24)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> at $Proxy0.createProxyBusiness(Unknown Source)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
> ... 5 more
> Caused by: java.lang.ClassNotFoundException: com.test.business.HelloBusiness
> at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
> at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:242)
> at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveProxyClass(ObjectInputStreamWithClassLoader.java:253)
> at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
> at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
> at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
> at org.jboss.remoting.Client.invoke(Client.java:1724)
> at org.jboss.remoting.Client.invoke(Client.java:629)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
> at $Proxy0.createProxyBusiness(Unknown Source)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
> at com.ejb3.client.HelloClient.main(HelloClient.java:24)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
> ... 12 more
> Exception in thread "main" java.lang.NullPointerException
> at com.ejb3.client.HelloClient.main(HelloClient.java:25)
> Here is my client class.
> package com.ejb3.client;
> import java.util.Properties;
> import com.ejb3.client.ClientUtiliy;
> import javax.naming.*;
> import javax.annotation.Resource;
> public class HelloClient {
> @Resource
> //private static SessionContext sctx;
>
> public static void main (String[]args )throws Exception
> {
> Properties properties = new Properties();
>
>
> // Context ctx = new InitialContext(properties);
> Context ctx = ClientUtiliy.getInitialContext();
> // HelloBusiness helloBus = (HelloBusiness)ctx.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
> //System.out.println("bean is saying "+helloBus.sayHello());
> HelloBusiness bean = doLookup();
> System.out.println(bean.sayHello()); // 4. Call business logic
> // HelloBusiness helloBus = (HelloBusiness)ctx.lookup("custom/remote/HelloBusiness");
> //helloBus.sayHello();
> }
>
> private static HelloBusiness doLookup() {
> Context context = null;
> HelloBusiness bean = null;
> try {
> // 1. Obtaining Context
> context = ClientUtiliy.getInitialContext();
> // java.lang.Object ejbHome = context.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
> // 2. Generate JNDI Lookup name
> // String lookupName = getLookupName();
> // 3. Lookup and cast
> bean = (HelloBusiness) context.lookup("HelloBusiness");
> // bean = (HelloBusiness) javax.rmi.PortableRemoteObject.narrow(ejbHome, HelloBusiness.class);
> } catch (NamingException e) {
> e.printStackTrace();
> }
> return bean;
> }
>
> Have used @RemoteBinding annotation in the bean with the jndiBinding="HelloBusiness'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (JBAS-9528) I am trying to implement hellow world bean example in EJB 3.0 on Jboss and getting following error while running the client .
by Sambprasad Kuvalekar (JIRA)
[ https://issues.jboss.org/browse/JBAS-9528?page=com.atlassian.jira.plugin.... ]
Sambprasad Kuvalekar updated JBAS-9528:
---------------------------------------
Description:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.test.business.HelloBusiness
at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveProxyClass(ObjectInputStreamWithClassLoader.java:253)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
... 12 more
Exception in thread "main" java.lang.NullPointerException
at com.ejb3.client.HelloClient.main(HelloClient.java:25)
Here is my client class.
package com.ejb3.client;
import java.util.Properties;
import com.ejb3.client.ClientUtiliy;
import javax.naming.*;
import javax.annotation.Resource;
public class HelloClient {
@Resource
//private static SessionContext sctx;
public static void main (String[]args )throws Exception
{
Properties properties = new Properties();
// Context ctx = new InitialContext(properties);
Context ctx = ClientUtiliy.getInitialContext();
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
//System.out.println("bean is saying "+helloBus.sayHello());
HelloBusiness bean = doLookup();
System.out.println(bean.sayHello()); // 4. Call business logic
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("custom/remote/HelloBusiness");
//helloBus.sayHello();
}
private static HelloBusiness doLookup() {
Context context = null;
HelloBusiness bean = null;
try {
// 1. Obtaining Context
context = ClientUtiliy.getInitialContext();
// java.lang.Object ejbHome = context.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
// 2. Generate JNDI Lookup name
// String lookupName = getLookupName();
// 3. Lookup and cast
bean = (HelloBusiness) context.lookup("HelloBusiness");
// bean = (HelloBusiness) javax.rmi.PortableRemoteObject.narrow(ejbHome, HelloBusiness.class);
} catch (NamingException e) {
e.printStackTrace();
}
return bean;
}
Have used @RemoteBinding annotation in the bean with the jndiBinding="HelloBusiness'
was:
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.test.business.HelloBusiness
at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveProxyClass(ObjectInputStreamWithClassLoader.java:253)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy0.createProxyBusiness(Unknown Source)
at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
at com.ejb3.client.HelloClient.main(HelloClient.java:24)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
... 12 more
Exception in thread "main" java.lang.NullPointerException
at com.ejb3.client.HelloClient.main(HelloClient.java:25)
Here is my client class.
package com.ejb3.client;
import java.util.Properties;
import com.ejb3.client.ClientUtiliy;
import javax.naming.*;
import javax.annotation.Resource;
public class HelloClient {
@Resource
//private static SessionContext sctx;
public static void main (String[]args )throws Exception
{
Properties properties = new Properties();
// Context ctx = new InitialContext(properties);
Context ctx = ClientUtiliy.getInitialContext();
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
//System.out.println("bean is saying "+helloBus.sayHello());
HelloBusiness bean = doLookup();
System.out.println(bean.sayHello()); // 4. Call business logic
// HelloBusiness helloBus = (HelloBusiness)ctx.lookup("custom/remote/HelloBusiness");
//helloBus.sayHello();
}
private static HelloBusiness doLookup() {
Context context = null;
HelloBusiness bean = null;
try {
// 1. Obtaining Context
context = ClientUtiliy.getInitialContext();
// java.lang.Object ejbHome = context.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
// 2. Generate JNDI Lookup name
// String lookupName = getLookupName();
// 3. Lookup and cast
bean = (HelloBusiness) context.lookup("HelloBusiness");
// bean = (HelloBusiness) javax.rmi.PortableRemoteObject.narrow(ejbHome, HelloBusiness.class);
} catch (NamingException e) {
e.printStackTrace();
}
return bean;
}
Have used @RemoteBinding annotation in the bean with the jndiBinding="HelloBusiness'
> I am trying to implement hellow world bean example in EJB 3.0 on Jboss and getting following error while running the client .
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-9528
> URL: https://issues.jboss.org/browse/JBAS-9528
> Project: Application Server 3 4 5 and 6
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: AppClient
> Environment: JBOSS 5.1.GA, EJB 3.X , JAVA 1.5
> Reporter: Sambprasad Kuvalekar
>
> javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
> at com.ejb3.client.HelloClient.main(HelloClient.java:24)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> at $Proxy0.createProxyBusiness(Unknown Source)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
> ... 5 more
> Caused by: java.lang.ClassNotFoundException: com.test.business.HelloBusiness
> at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
> at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:242)
> at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveProxyClass(ObjectInputStreamWithClassLoader.java:253)
> at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1756)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1910)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1834)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
> at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
> at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
> at org.jboss.remoting.Client.invoke(Client.java:1724)
> at org.jboss.remoting.Client.invoke(Client.java:629)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
> at $Proxy0.createProxyBusiness(Unknown Source)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)
> at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
> at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
> at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at com.ejb3.client.HelloClient.doLookup(HelloClient.java:40)
> at com.ejb3.client.HelloClient.main(HelloClient.java:24)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
> ... 12 more
> Exception in thread "main" java.lang.NullPointerException
> at com.ejb3.client.HelloClient.main(HelloClient.java:25)
> Here is my client class.
> package com.ejb3.client;
> import java.util.Properties;
> import com.ejb3.client.ClientUtiliy;
> import javax.naming.*;
> import javax.annotation.Resource;
> public class HelloClient {
> @Resource
> //private static SessionContext sctx;
>
> public static void main (String[]args )throws Exception
> {
> Properties properties = new Properties();
>
>
> // Context ctx = new InitialContext(properties);
> Context ctx = ClientUtiliy.getInitialContext();
> // HelloBusiness helloBus = (HelloBusiness)ctx.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
> //System.out.println("bean is saying "+helloBus.sayHello());
> HelloBusiness bean = doLookup();
> System.out.println(bean.sayHello()); // 4. Call business logic
> // HelloBusiness helloBus = (HelloBusiness)ctx.lookup("custom/remote/HelloBusiness");
> //helloBus.sayHello();
> }
>
> private static HelloBusiness doLookup() {
> Context context = null;
> HelloBusiness bean = null;
> try {
> // 1. Obtaining Context
> context = ClientUtiliy.getInitialContext();
> // java.lang.Object ejbHome = context.lookup("HellowWorldEJBEAR/HellowWorldBean/remote");
> // 2. Generate JNDI Lookup name
> // String lookupName = getLookupName();
> // 3. Lookup and cast
> bean = (HelloBusiness) context.lookup("HelloBusiness");
> // bean = (HelloBusiness) javax.rmi.PortableRemoteObject.narrow(ejbHome, HelloBusiness.class);
> } catch (NamingException e) {
> e.printStackTrace();
> }
> return bean;
> }
>
> Have used @RemoteBinding annotation in the bean with the jndiBinding="HelloBusiness'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (AS7-1628) Custom JSF deployment does not work altogether with CDI
by Stan Silvert (JIRA)
[ https://issues.jboss.org/browse/AS7-1628?page=com.atlassian.jira.plugin.s... ]
Stan Silvert commented on AS7-1628:
-----------------------------------
See this comment for workaround https://community.jboss.org/wiki/DesignOfAS7Multi-JSFFeature#comment-11484
> Custom JSF deployment does not work altogether with CDI
> -------------------------------------------------------
>
> Key: AS7-1628
> URL: https://issues.jboss.org/browse/AS7-1628
> Project: Application Server 7
> Issue Type: Bug
> Components: JSF
> Reporter: George Gastaldi
> Assignee: Stuart Douglas
> Labels: jsf
> Fix For: Open To Community
>
>
> When using another JSF impl (with flag org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL set to true) and a beans.xml is on WEB-INF, the following error occurs:
> {code:java}
> 12:33:07,066 INFO [org.jboss.modules] JBoss Modules version 1.0.1.GA
> 12:33:07,341 INFO [org.jboss.msc] JBoss MSC version 1.0.0.GA
> 12:33:07,394 INFO [org.jboss.as] JBoss AS 7.0.1.Final "Zap" starting
> 12:33:08,212 WARN [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.
> 12:33:08,220 INFO [org.jboss.as] creating http management service using network interface (management) port (9990)
> 12:33:08,267 WARN [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.
> 12:33:08,276 INFO [org.jboss.as.logging] Removing bootstrap log handlers
> 12:33:08,293 INFO [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)
> 12:33:08,306 INFO [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.
> 12:33:08,418 INFO [org.jboss.as.naming] (Controller Boot Thread) Activating Naming Subsystem
> 12:33:08,426 INFO [org.jboss.as.naming] (MSC service thread 1-5) Starting Naming Service
> 12:33:08,429 INFO [org.jboss.as.osgi] (Controller Boot Thread) Activating OSGi Subsystem
> 12:33:08,449 INFO [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem
> 12:33:08,453 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.2.0.Beta2
> 12:33:08,469 INFO [org.xnio] (MSC service thread 1-4) XNIO Version 3.0.0.Beta3
> 12:33:08,482 INFO [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.0.0.Beta3
> 12:33:08,724 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/powerlogic/jcompany55/java/bin/../jre/bin/server;D:/powerlogic/jcompany55/java/bin/../jre/bin;D:/powerlogic/jcompany55/java/bin/../jre/lib/amd64;D:\powerlogic\jcompany55\java\bin;c:\Program Files\Microsoft IntelliType Pro\;D:\jdk6\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\maven\bin;C:\Program Files (x86)\apache-ant-1.8.2\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\Git\bin;D:\powerlogic\jcompany55\eclipse;
> 12:33:08,731 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
> 12:33:08,753 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-7) Starting remote JMX connector
> 12:33:08,757 INFO [org.jboss.as.remoting] (MSC service thread 1-5) Listening on /127.0.0.1:9999
> 12:33:08,803 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-8) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
> 12:33:09,018 INFO [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)
> 12:33:09,088 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) Bound data source [java:jboss/datasources/ExampleDS]
> 12:33:09,394 INFO [org.jboss.as.deployment] (MSC service thread 1-1) Started FileSystemDeploymentService for directory D:\jboss-as-web-7.0.1.Final\standalone\deployments
> 12:33:09,402 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found exemplo.war in deployment directory. To trigger deployment create a file called exemplo.war.dodeploy
> 12:33:09,403 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found hellomyfaces.war in deployment directory. To trigger deployment create a file called hellomyfaces.war.dodeploy
> 12:33:09,427 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap" started in 2588ms - Started 93 of 148 services (55 services are passive or on-demand)
> 12:33:09,444 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "hellomyfaces.war"
> 12:33:10,229 INFO [org.jboss.as.jpa] (MSC service thread 1-8) added javax.persistence.api dependency to hellomyfaces.war
> 12:33:10,274 INFO [org.jboss.weld] (MSC service thread 1-5) Processing CDI deployment: hellomyfaces.war
> 12:33:10,628 INFO [org.jboss.weld] (MSC service thread 1-1) Starting Services for CDI deployment: hellomyfaces.war
> 12:33:10,652 INFO [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.2 (Final)
> 12:33:10,679 INFO [org.jboss.weld] (MSC service thread 1-4) Starting weld service
> 12:33:11,055 INFO [org.apache.myfaces.ee6.MyFacesContainerInitializer] (MSC service thread 1-6) Added FacesServlet with mappings=[/faces/*, *.jsf, *.faces]
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
> 12:33:11,096 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true
> 12:33:11,097 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value auto
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.VALIDATE_XML' found, using default value false
> 12:33:11,098 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value true
> 12:33:11,099 INFO [org.apache.myfaces.shared_impl.config.MyfacesConfig] (MSC service thread 1-6) Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.
> 12:33:11,122 INFO [org.apache.myfaces.config.DefaultFacesConfigurationProvider] (MSC service thread 1-6) Reading standard config META-INF/standard-faces-config.xml
> 12:33:11,425 AVISO [org.apache.myfaces.config.annotation.DefaultAnnotationProvider] (MSC service thread 1-6) AnnotationConfigurator does not found classes for annotations in /WEB-INF/classes/org/jboss/test/jsf/hellomyfaces/ . This could happen because maven jetty plugin is used (goal jetty:run). Try configure org.apache.myfaces.annotation.SCAN_PACKAGES init parameter or use jetty:run-exploded instead.
> 12:33:11,681 INFO [org.apache.myfaces.config.DefaultFacesConfigurationProvider] (MSC service thread 1-6) Reading config : jar:file:D:%5Cjboss-as-web-7.0.1.Final%5Cmodules%5Corg%5Cjboss%5Cas%5Cweld%5Cmain%5Cjboss-as-weld-7.0.1.Final.jar!/META-INF/faces-config.xml
> 12:33:11,714 GRAVE [org.apache.myfaces.webapp.AbstractFacesInitializer] (MSC service thread 1-6) An error occured while initializing MyFaces: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory: java.lang.IllegalArgumentException: Class org.jboss.as.weld.webtier.jsf.WeldApplicationFactory is no javax.faces.application.ApplicationFactory
> at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:311) [myfaces-api-2.1.1.jar:]
> at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:277) [myfaces-api-2.1.1.jar:]
> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:200) [myfaces-api-2.1.1.jar:]
> at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:489) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:401) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:309) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:125) [myfaces-impl-2.1.1.jar:]
> at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111) [myfaces-impl-2.1.1.jar:]
> at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
> at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
> at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
> at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
> 12:33:11,725 INFO [org.jboss.web] (MSC service thread 1-6) registering web context: /hellomyfaces
> 12:33:11,770 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "hellomyfaces.war"
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months