Issue Details (XML | Word | Printable)

Key: SFOS-1138
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Steve Loughran
Reporter: Steve Loughran
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
SmartFrog

Provide a better error message when a remote process isnt the right type

Created: 10/Mar/09 01:28 PM (GMT)   Updated: 10/Mar/09 01:53 PM (GMT)
Component/s: .sfCore
Affects Version/s: 3.17.010
Fix Version/s: 3.17.010

Time Tracking:
Not Specified

Compatibility: backwards compatible


 Description  « Hide
big stack trace but not any useful cues when (somehow) a newly started process doesn't come up remotely

SmartFrogDeploymentException: 'action' component. java.lang.ClassCastException: org.smartfrog.services.assertions.TestCompoundImpl, cause: java.lang.ClassCastException: org.smartfrog.services.assertions.TestCompoundImpl
at org.smartfrog.sfcore.common.SmartFrogDeploymentException.forward(SmartFrogDeploymentException.java:187)
at org.smartfrog.sfcore.processcompound.PrimHostDeployerImpl.deploy(PrimHostDeployerImpl.java:128)
at org.smartfrog.sfcore.prim.PrimDeployerImpl.deploy(PrimDeployerImpl.java:246)
at org.smartfrog.sfcore.deployer.SFDeployer.deploy(SFDeployer.java:94)
at org.smartfrog.sfcore.compound.CompoundImpl.sfDeployComponentDescription(CompoundImpl.java:159)
at org.smartfrog.services.assertions.TestCompoundImpl.sfStart(TestCompoundImpl.java:229)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.smartfrog.services.assertions.TestCompoundImpl_Stub.sfStart(Unknown Source)
at org.smartfrog.services.assertions.events.TestEventSink.invokeStart(TestEventSink.java:355)
at org.smartfrog.services.assertions.events.TestEventSink.startApplication(TestEventSink.java:378)
at org.smartfrog.services.assertions.events.TestEventSink.runTestsToCompletion(TestEventSink.java:433)
at org.smartfrog.test.DeployingTestBase.runTestDeployment(DeployingTestBase.java:259)
at org.smartfrog.test.DeployingTestBase.completeTestDeployment(DeployingTestBase.java:302)
at org.smartfrog.test.DeployingTestBase.runTestsToCompletion(DeployingTestBase.java:338)
at org.smartfrog.test.DeployingTestBase.expectSuccessfulTestRunOrSkip(DeployingTestBase.java:439)
at org.smartfrog.services.hadoop.test.system.local.cluster.SecurityExitBlockingTest.testSecurityForked(SecurityExitBlockingTest.java:40)
Caused by: java.lang.ClassCastException: org.smartfrog.services.assertions.TestCompoundImpl
at org.smartfrog.sfcore.processcompound.ProcessCompoundImpl.sfResolveProcess(ProcessCompoundImpl.java:944)
at org.smartfrog.sfcore.processcompound.PrimProcessDeployerImpl.getProcessCompound(PrimProcessDeployerImpl.java:72)
at org.smartfrog.sfcore.processcompound.PrimHostDeployerImpl.deploy(PrimHostDeployerImpl.java:126)
at org.smartfrog.sfcore.prim.PrimDeployerImpl.deploy(PrimDeployerImpl.java:246)
at org.smartfrog.sfcore.deployer.SFDeployer.deploy(SFDeployer.java:94)
at org.smartfrog.sfcore.compound.CompoundImpl.sfDeployComponentDescription(CompoundImpl.java:159)
at org.smartfrog.services.assertions.TestCompoundImpl.sfStart(TestCompoundImpl.java:229)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Steve Loughran added a comment - 10/Mar/09 01:53 PM (GMT)
We now throw an SF Resolution exception including the name, the reference, the desired and actual class types.

The java code is a bit convoluted; it would be much cleaner if we had a a specific SmartFrogResolveToWrongClass exception that could be used to distinguish the situation where a reference resolves but to the wrong type.