[JBoss JIRA] (DROOLS-22) Drools index files are getting created out of control and consume all of the hard drive space
by Jyothi Alapati (JIRA)
Jyothi Alapati created DROOLS-22:
------------------------------------
Summary: Drools index files are getting created out of control and consume all of the hard drive space
Key: DROOLS-22
URL: https://issues.jboss.org/browse/DROOLS-22
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Jyothi Alapati
Assignee: Mark Proctor
Drools index files are getting created out of control and consume all of the hard drive space. It used to consume 20MB for index files, but in this case, it consumed 5GB of hard disk space and stopped working.
Note: Deleting the old index files except the latest solved this problem, but we want to this to be prevented, instead of deleting the index files manually.
--
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
11 years, 11 months
[JBoss JIRA] (AS7-6415) Access Log directory - XML Parse issue
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/AS7-6415?page=com.atlassian.jira.plugin.s... ]
Brian Stansberry updated AS7-6415:
----------------------------------
Component/s: Web
> Access Log directory - XML Parse issue
> --------------------------------------
>
> Key: AS7-6415
> URL: https://issues.jboss.org/browse/AS7-6415
> Project: Application Server 7
> Issue Type: Bug
> Components: Web
> Environment: Jboss 7.1.1 win xp 32 bit
> Reporter: narayana b
>
> step1)
> <!-- -->
> <paths>
> <path path="E:/jboss/jboss-as-7.1.1.Final/standalone" name="access-log-dir" />
> </paths>
> step2) created a "access-log" dir under E:/jboss/jboss-as-7.1.1.Final/standalone
> <virtual-server name="default-host" enable-welcome-root="true">
> <alias name="localhost"/>
> <alias name="example.com"/>
> <acesss-log pattern="Time Taken: %T %h %l %u %t %r %s %b" resolve-hosts="false" extended="false" prefix="access_log." rotate="true">
> <directory path ="access-log" relative-to="access-log-dir" />
> </acesss-log>
> </virtual-server>
> Parse Error
> -----------
> at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1
> at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_17]
> Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[351,5]
> Message: JBAS014789: Unexpected element '{urn:jboss:domain:web:1.1}acesss-log' encountered
> at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:85) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.WebSubsystemParser.parseHost(WebSubsystemParser.java:582)
> at org.jboss.as.web.WebSubsystemParser.readElement(WebSubsystemParser.java:329)
> at org.jboss.as.web.WebSubsystemParser.readElement(WebSubsystemParser.java:65)
> at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
> at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Fi.........
> Please let me know is this fixed? ready to release??
--
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
11 years, 11 months
[JBoss JIRA] (AS7-6408) Can't configure JGroups subsystem with CLI script in 7.2.0.Alpha1-SNAPSHOT
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/AS7-6408?page=com.atlassian.jira.plugin.s... ]
Tomaz Cerar commented on AS7-6408:
----------------------------------
I have found the issue and resolved it.
However this approach of sending protocol list as part of add operation on stack is deprecated and only works because validation of operations is disabled in CLI. (check jboss-cli.xml)
new approach is to call :add-protocol(type=<type>, socket-binding=<optional socket-binding>) operation for each protocol you are adding.
problem with old way is that you can only list protocols but you cannot define to witch socket-binding they relate...
old way will still work but if possible try to migrate your scripts to new model.
> Can't configure JGroups subsystem with CLI script in 7.2.0.Alpha1-SNAPSHOT
> ---------------------------------------------------------------------------
>
> Key: AS7-6408
> URL: https://issues.jboss.org/browse/AS7-6408
> Project: Application Server 7
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 7.2.0.Alpha1
> Environment: Git checkout of JBossAS 7.2.0.ALPHA1 from today (28/Jan/2013)
> Reporter: Bernd Koecke
> Assignee: Tomaz Cerar
> Attachments: standalone-ha-jgroups.cli, standalone-jgroups-fragment.xml
>
>
> When I try to configure extension and subsystem JGroups with a CLI script, the attribute "protocols" of the stack=tcp- or stack=udp-node contains the list of configured protocols twice. The result is that the list of protocols is doubled in the standalone.xml. But having a protocol twice in one stack results in an error at next server startup. I will attach the CLI script and the resulting XML fragment.
> When I shutdown the server, remove the doubled second part of each protocol list, the server comes up and all is working fine. But I can't configure it only with a CLI script.
--
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
11 years, 11 months
[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
11 years, 11 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
11 years, 11 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
11 years, 11 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
11 years, 11 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
11 years, 11 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
11 years, 11 months