HELP!!!!
This is where the error is thrown.
Expand|Select|Wrap|Line Numbers
- final Transport transport = new TCPTransport(client);
- final Session session = Session.getInstance(new Properties(), TransferMode.BOTH);
- final StringBuffer userBoxId = new StringBuffer();
- session.setReceivingSupport(new ListeningSupport("C:/oftp/"));
- session.acceptConnection(transport);
- /*Error happens here at next line*/
- OdetteFTPEntity oftp = session.acceptConnection(transport);
this is the function that is called: acceptConnection()
Expand|Select|Wrap|Line Numbers
- public OdetteFTPEntity acceptConnection(Transport transport)
- throws OdetteFTPException {
- /* incoming network connection */
- if ((state == null) || (state instanceof IdleState)) {
- boolean stb = PreferencesUtil.getBoolean(properties, "odette.stb");
- int sdeb = PreferencesUtil.getInt(properties, "odette.buffer-size");
- service = Service.getInstance(transport, sdeb, stb);
- setProperty("odette.called-address", transport.getLocalAddress());
- setProperty("odette.calling-address",transport.getRemoteAddress());
- /* start session phase */
- changeState(ListenerState.class);
- /*Error happens here at next line*/
- state.startSession();
- } else {
- NotInIdleStateError();
- }
- return state;
- }
I traced it into this interface called OdetteFTPEntity
Expand|Select|Wrap|Line Numbers
- public interface OdetteFTPEntity {
- public Session getContext();
- /*Error happens here in startSession Function*/
- public void startSession() throws OdetteFTPException;
- public void startFile(VirtualFile file, String destination,
- String originator, String userData, String reserved)
- throws OdetteFTPException;
- public void dataRegime() throws OdetteFTPException;
- public void closeFile(int recordCount, long unitCount)
- throws OdetteFTPException;
- public void changeDirection() throws OdetteFTPException;
- public void endToEndResponse(String datasetName, Date fileDateTime,
- String destination, String originator, String userData,
- String reserved) throws OdetteFTPException;
- public void release() throws OdetteFTPException;
- public void abort(EndSessionReason error) throws OdetteFTPException;
- public boolean isConnected() throws OdetteFTPException;
- }
java.nio.BufferOverflowException
at java.nio.DirectByteBuffer.put(DirectByteBuffer.jav a:279)
at org.fossilec.odettej.service.StreamTransmissionSer vice.receiveStreamTransmissionBuffer(StreamTransmi ssionService.java:87)
at org.fossilec.odettej.service.StreamTransmissionSer vice.receive(StreamTransmissionService.java:64)
at org.fossilec.odettej.AbstractState.receive(Abstrac tState.java:85)
at org.fossilec.odettej.ListenerState.negotiateStartS ession(ListenerState.java:548)
at org.fossilec.odettej.ListenerState.startSession(Li stenerState.java:114)
at org.fossilec.odettej.Session.acceptConnection(Sess ion.java:266)
at examples.odettej.OdetteServer.startSession(OdetteS erver.java:140)
at examples.odettej.OdetteServer.handleConnections(Od etteServer.java:114)
at examples.odettej.OdetteServer.run(OdetteServer.jav a:54)
at javaapplication1.Main.<init>(Main.java:27)
at javaapplication1.Main.main(Main.java:37)
java.lang.IllegalStateException: Not in Idle state
at org.fossilec.odettej.Session.NotInIdleStateError(S ession.java:310)
at org.fossilec.odettej.Session.acceptConnection(Sess ion.java:272)
at examples.odettej.OdetteServer$2.run(OdetteServer.j ava:164)
at java.lang.Thread.run(Thread.java:595)
Regards,
Louis.