akibsayyed / jain-slee

Automatically exported from code.google.com/p/jain-slee
0 stars 0 forks source link

Diameter CCA RA: IO Exception when set RequestedAction in Credit-Control-Answer #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by yudhihutama, Nov 1, 2012 
(http://code.google.com/p/mobicents/issues/detail?id=3260)

What steps will reproduce the problem?
1.Create AVP 

CreditControlClientSession session = ccaProvider.createClientSession();
CreditControlAVPFactory avpFactory = session.getCCAAvpFactory(); 
ActivityContextInterface localACI = 
ccaACIF.getActivityContextInterface(session);
localACI.attach(this.getSbbContext().getSbbLocalObject());
CreditControlRequest request = session.createCreditControlRequest();
List<DiameterAvp> avps = new ArrayList<DiameterAvp>();

avps.add(avpFactory.getBaseFactory().createAvp(Avp.CC_REQUEST_TYPE, 4));
avps.add(avpFactory.getBaseFactory().createAvp(Avp.CC_REQUEST_NUMBER, 0l));
avps.add(avpFactory.getBaseFactory().createAvp(Avp.REQUESTED_ACTION,0));

2. Put AVPList in Request
request.setExtensionAvps(avps.toArray(new DiameterAvp[avps.size()]));

3. Send CCR Request
session.sendCreditControlRequest(request);

What is the expected output? What do you see instead?
20:51:38,958 INFO  [DiameterCCAResourceAdaptor] (pool-29-thread-1) Activity 
started [Diameter Session ID[127.0.0.1;314;3156828783]]
20:51:39,005 INFO  [CreditControlSessionFactory] (pool-29-thread-1) Diameter 
CCA SessionFactory :: stateChanged :: 
source[org.jdiameter.client.impl.app.cca.ClientCCASessionImpl@22e89a5a] :: 
oldState[IDLE], newState[PENDING_EVENT]
20:51:39,005 ERROR [STDERR] (pool-29-thread-1) java.io.IOException: Failed to 
send message, due to: org.jdiameter.api.InternalException: 
java.lang.ClassCastException: org.jdiameter.client.impl.parser.MessageImpl 
cannot be cast to org.jdiameter.common.impl.app.AppEventImpl
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
org.mobicents.slee.resource.diameter.cca.CreditControlClientSessionImpl.sendCred
itControlRequest(CreditControlClientSessionImpl.java:130)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
com.xl.DiameterSbb.doSendEventCCR(DiameterSbb.java:146)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
com.xl.DiameterSbb.onServiceStartedEvent(DiameterSbb.java:215)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
java.lang.reflect.Method.invoke(Method.java:597)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
org.mobicents.slee.runtime.sbbentity.SbbEntityImpl.invokeEventHandler(SbbEntityI
mpl.java:481)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.routeQue
uedEvent(EventRoutingTaskImpl.java:379)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
org.mobicents.slee.runtime.eventrouter.routingtask.EventRoutingTaskImpl.run(Even
tRoutingTaskImpl.java:126)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
org.mobicents.slee.runtime.eventrouter.EventRouterExecutorImpl$EventRoutingTaskS
tatsCollector.run(EventRouterExecutorImpl.java:73)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
85)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
20:51:39,005 ERROR [STDERR] (pool-29-thread-1)  at 
java.lang.Thread.run(Thread.java:619)

What version of the product are you using? On what operating system?
Diameter-base-2.7 Final
Diameter-CCA-2.7 Final
JANSLEE 2.7 Final
DiameterMux 1.4 Final

Original issue reported on code.google.com by brainslog on 22 Jan 2013 at 3:11

GoogleCodeExporter commented 9 years ago
Thanks for reporting this issue. I have just been able to replicate it. Will 
fix it.

Original comment by brainslog on 22 Jan 2013 at 3:12

GoogleCodeExporter commented 9 years ago
This issue has been fixed in the Diameter stack.

See Issue #35 (http://code.google.com/p/jdiameter/issues/detail?id=35) for more 
details.

As a side note, this only happens due to a problem with the CCR, which in this 
case is the Destination-Realm AVP missing. You should see the error message in 
DEBUG logs. 

Original comment by brainslog on 22 Jan 2013 at 4:20

GoogleCodeExporter commented 9 years ago

Original comment by EMMart...@gmail.com on 11 Apr 2013 at 11:41

GoogleCodeExporter commented 9 years ago

Original comment by EMMart...@gmail.com on 11 Apr 2013 at 12:07

GoogleCodeExporter commented 9 years ago

Original comment by EMMart...@gmail.com on 11 Apr 2013 at 12:07

GoogleCodeExporter commented 9 years ago

Original comment by EMMart...@gmail.com on 11 Apr 2013 at 12:57