Author Topic: Error Performing RequestRegister  (Read 4402 times)

Offline fabio.meschini

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Error Performing RequestRegister
« on: August 01, 2014, 01:14:27 PM »
hi all,
i'm working with the java sdk platform and i'm developing some code for using the genesys chat api.
Now i've an error when i try to perform the RequestRegister ([url][/http://www.genesyslab.info/repository/PSDK/8.0-Java_API_Reference/com/genesyslab/platform/webmedia/protocol/basicchat/requests/RequestRegister.html]).
My code is a simple test method:
private void register() throws Exception{
int referenceID = new Random().nextInt();
logger.info("Action RegisterClient [Place {}] [ReferenceID {}]",place,referenceID);
/*'RequestRegister' ('0')
message attributes:
UserNickname [str] = "arianna"
UserType [str]  = AGENT
PersonId [str]  = "Ari"
TimeZoneOffset [int] = 120
ReferenceId [int] = 1*/

RequestRegister requestRegister = RequestRegister.create();
requestRegister.setUserNickname("arianna");
requestRegister.setPersonId("Ari");
requestRegister.setUserType(UserType.Agent);
requestRegister.setTimeZoneOffset(120);
requestRegister.setReferenceId(referenceID);

sendInteractionRequest(requestRegister, new CompletionHandler<Message, Object>() {
@Override
public void failed(Throwable exc, Object attachment) {
logger.info("REQUEST REGISTER OPERATION FAILED");
logger.error("Request ERROR : ",exc);
logger.error("Attachments : "+attachment.toString());
}
@Override
public void completed(Message result, Object attachment) {
logger.info("REQUEST REGISTER OPERATION PERFORMED SUCCESSFULLY");
registered=true;
}
});
}


In detail the platform exception returns this message:

PlatformException: Common transport supports int attribute id only. id = userId


I'm analyzing this issue, but i can't solve it.
i'm working with chatserver 8.1.000.26, interactionserver 8.1.200.27 and my sdk version is 8.1.2.

Can anybody help me?
Thank you in advance.

Fabio

------

the stacktrace is the following:


15:51:12.136 [New I/O  worker #2] DEBUG c.g.p.c.c.i.n.NettyConnectionImpl - Connection is established
15:51:12.136 [New I/O  worker #2] DEBUG c.g.p.c.c.impl.AbstractConnection - ConnState transition. 'Opening' -> 'Opened' for 'tcp://192.168.115.40:5010[Opened]/1
15:51:12.136 [main] DEBUG c.g.p.commons.protocol.DuplexChannel - Channel is opened 'InteractionConnection - tcp://192.168.115.40:5010
15:51:12.136 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Starting registration...
15:51:12.136 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Requesting with RequestRegisterClient
15:51:12.137 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Message got new reference: 1
15:51:12.137 [main] DEBUG c.g.p.commons.protocol.DuplexChannel - Sending message to 'OpenMedia.InteractionServer@InteractionConnection - tcp://192.168.115.40:5010' message: 'RequestRegisterClient' (100) attributes:
attr_client_name [str] = "client"
attr_client_type [int] = 1 [Proxy]
attr_ref_id [int] = 1
15:51:12.137 [main] DEBUG PSDK.DATA - Sending message to OpenMedia.InteractionServer/InteractionConnection - tcp://192.168.115.40:5010 message: 'RequestRegisterClient' (100) attributes:
attr_client_name [str] = "client"
attr_client_type [int] = 1 [Proxy]
attr_ref_id [int] = 1
15:51:12.137 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Waiting for response. Correlator Entry for request RequestRegisterClient/100, ref=1
15:51:12.227 [New I/O  worker #2] DEBUG c.g.p.c.p.r.ProtocolMessagePackagerImpl - New message #125
15:51:12.228 [New I/O  worker #2] DEBUG c.g.p.commons.protocol.DuplexChannel - Handling message: 'EventAck' (125) attributes:
attr_extension [bstr] = KVList:
'ApplicationName' [str] = "Genesys Interaction Server"
'ServerVersion' [str] = "8.1.200.27"
'ServerVersionFamily' [int] = 8
'ServerVersionMajor' [int] = 1
'ServerVersionMinor' [int] = 2
'ServerVersionBuild' [int] = 27
attr_prxy_client_id [int] = 1601
attr_ref_id [int] = 1
15:51:12.228 [New I/O  worker #2] DEBUG PSDK.DATA - Handling message: 'EventAck' (125) attributes:
attr_extension [bstr] = KVList:
'ApplicationName' [str] = "Genesys Interaction Server"
'ServerVersion' [str] = "8.1.200.27"
'ServerVersionFamily' [int] = 8
'ServerVersionMajor' [int] = 1
'ServerVersionMinor' [int] = 2
'ServerVersionBuild' [int] = 27
attr_prxy_client_id [int] = 1601
attr_ref_id [int] = 1
15:51:12.228 [New I/O  worker #2] DEBUG c.g.p.commons.protocol.DuplexChannel - Complete message handling: 125
15:51:12.228 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Got response, id: 125
15:51:12.228 [main] DEBUG c.g.p.o.p.InteractionServerProtocol - Channel com.genesyslab.platform.openmedia.protocol.InteractionServerProtocol@36afae4a@{InteractionConnection - tcp://192.168.115.40:5010} is registered, proxy id = 1.601
15:51:12.228 [main] DEBUG c.g.p.c.protocol.AbstractChannel - Channel state transition: Opening->Opened
15:51:12.228 [main] DEBUG c.g.p.c.protocol.AbstractChannel - Firing 'onChannelOpened'
15:51:12.229 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Finalizing registration...
15:51:12.229 [main] INFO  c.accenture.webmedia.TestInviteChat - Protocol InteractionServerProtocol has been opened. PROTOCOLID [1934601674] CHANNELID [1934601674] [host : InteractionConnection] [port : 192.168.115.40] [WarmStandby 5010]
15:51:12.229 [com.genesyslab.PCT.invoker.default] DEBUG c.g.p.c.protocol.ListenerHelper - Notifying 1 listener(s)
15:51:12.229 [main] INFO  c.accenture.webmedia.TestInviteChat - ---->  [RequestRegister] Sending RequestAsynch Towards Interaction Server



['RequestRegister' (0) attributes:
UserId [str] = "1"
UserNickname [str] = "arianna"]
15:51:12.230 [com.genesyslab.PCT.invoker.default] DEBUG c.g.p.c.protocol.ListenerHelper - 1 listener(s) understood the event right
15:51:12.230 [main] DEBUG c.g.p.commons.protocol.ClientChannel - Message got new reference: 2
15:51:12.234 [main] DEBUG c.g.p.c.timer.impl.SchedulerImpl - Scheduling delayed action: TimeoutAction(RequestRegister/0,ref=2); delay:30000
15:51:12.236 [main] DEBUG c.g.p.commons.protocol.DuplexChannel - Sending message to 'OpenMedia.InteractionServer@InteractionConnection - tcp://192.168.115.40:5010' message: 'RequestRegister' (0) attributes:
UserId [str] = "1"
UserNickname [str] = "arianna"
ReferenceId [int] = 2
15:51:12.236 [main] DEBUG PSDK.DATA - Sending message to OpenMedia.InteractionServer/InteractionConnection - tcp://192.168.115.40:5010 message: 'RequestRegister' (0) attributes:
UserId [str] = "1"
UserNickname [str] = "arianna"
ReferenceId [int] = 2
15:51:12.245 [main] WARN  c.g.p.c.p.r.ProtocolMessagePackagerImpl - Problems sending message
com.genesyslab.platform.commons.PlatformException: Common transport supports int attribute id only. id = userId
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.asIntId(CommonMessageTransportImpl.java:149) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.packString(CommonMessageTransportImpl.java:57) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.onAttribute(CommonMessageTransportImpl.java:50) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportAttribute(ProtocolMessagePackagerImpl.java:133) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportFlatAttributes(ProtocolMessagePackagerImpl.java:118) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportData(ProtocolMessagePackagerImpl.java:104) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.sendMessage(ProtocolMessagePackagerImpl.java:78) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.DuplexChannel.doSend(DuplexChannel.java:578) [protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.doBeginRequest(ClientChannel.java:306) [protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.requestAsync(ClientChannel.java:195) [protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.requestAsync(ClientChannel.java:168) [protocol.jar:8.1.200.30]
at com.accenture.webmedia.TestInviteChat.sendInteractionRequest(TestInviteChat.java:171) [bin/:na]
at com.accenture.webmedia.TestInviteChat.register(TestInviteChat.java:285) [bin/:na]
at com.accenture.webmedia.TestInviteChat.test1Login(TestInviteChat.java:399) [bin/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [junit.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [junit.jar:na]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) [junit.jar:na]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [junit.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [junit.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [junit.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [junit.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [junit.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [junit.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [junit.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [junit.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [junit.jar:na]
at org.junit.runners.Suite.runChild(Suite.java:128) [junit.jar:na]
at org.junit.runners.Suite.runChild(Suite.java:24) [junit.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [junit.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [junit.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [junit.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [junit.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [junit.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [junit.jar:na]
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]
15:51:12.246 [main] ERROR c.accenture.webmedia.TestInviteChat - Error submitting async Request Connect
com.genesyslab.platform.commons.protocol.ProtocolException: Exception sending message
at com.genesyslab.platform.commons.protocol.DuplexChannel.doSend(DuplexChannel.java:580) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.doBeginRequest(ClientChannel.java:306) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.requestAsync(ClientChannel.java:195) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.ClientChannel.requestAsync(ClientChannel.java:168) ~[protocol.jar:8.1.200.30]
at com.accenture.webmedia.TestInviteChat.sendInteractionRequest(TestInviteChat.java:171) [bin/:na]
at com.accenture.webmedia.TestInviteChat.register(TestInviteChat.java:285) [bin/:na]
at com.accenture.webmedia.TestInviteChat.test1Login(TestInviteChat.java:399) [bin/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_29]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_29]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_29]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_29]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [junit.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [junit.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [junit.jar:na]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) [junit.jar:na]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [junit.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [junit.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [junit.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [junit.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [junit.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [junit.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [junit.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [junit.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [junit.jar:na]
at org.junit.runners.Suite.runChild(Suite.java:128) [junit.jar:na]
at org.junit.runners.Suite.runChild(Suite.java:24) [junit.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [junit.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [junit.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [junit.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [junit.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [junit.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [junit.jar:na]
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) [.cp/:na]
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) [.cp/:na]
Caused by: com.genesyslab.platform.commons.PlatformException: Common transport supports int attribute id only. id = userId
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.asIntId(CommonMessageTransportImpl.java:149) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.packString(CommonMessageTransportImpl.java:57) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.connection.impl.CommonMessageTransportImpl.onAttribute(CommonMessageTransportImpl.java:50) ~[connection.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportAttribute(ProtocolMessagePackagerImpl.java:133) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportFlatAttributes(ProtocolMessagePackagerImpl.java:118) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.transportData(ProtocolMessagePackagerImpl.java:104) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform.commons.protocol.runtime.ProtocolMessagePackagerImpl.sendMessage(ProtocolMessagePackagerImpl.java:78) ~[protocol.jar:8.1.200.30]
at com.genesyslab.platform. .protocol.DuplexChannel.doSend(DuplexChannel.java:578) ~[protocol.jar:8.1.200.30]
... 37 common frames omitted
15:51:12.259 [main] INFO  c.accenture.webmedia.TestInviteChat - REQUEST REGISTER OPERATION FAILED
« Last Edit: August 01, 2014, 01:35:22 PM by fabio.meschini »