473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Odette-j Error

When i connect to the server i get a BufferOverflowException,
HELP!!!!

This is where the error is thrown.
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.       final Transport transport = new TCPTransport(client);
  4.  
  5.  
  6.  
  7.       final Session session = Session.getInstance(new Properties(), TransferMode.BOTH);
  8.  
  9.  
  10.  
  11.       final StringBuffer userBoxId = new StringBuffer();
  12.  
  13.  
  14.  
  15.       session.setReceivingSupport(new ListeningSupport("C:/oftp/"));
  16.  
  17.  
  18.  
  19.       session.acceptConnection(transport);
  20.  
  21.       /*Error happens here at next line*/
  22.  
  23.       OdetteFTPEntity oftp = session.acceptConnection(transport);
  24.  

this is the function that is called: acceptConnection()


Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.       public OdetteFTPEntity acceptConnection(Transport transport)
  4.                            throws OdetteFTPException {
  5.  
  6.  
  7.                     /* incoming network connection */ 
  8.  
  9.                     if ((state == null) || (state instanceof IdleState)) {
  10.  
  11.  
  12.  
  13.                         boolean stb = PreferencesUtil.getBoolean(properties, "odette.stb");
  14.  
  15.                         int sdeb = PreferencesUtil.getInt(properties, "odette.buffer-size");
  16.  
  17.                         service = Service.getInstance(transport, sdeb, stb);
  18.                           setProperty("odette.called-address", transport.getLocalAddress());
  19.  
  20.                         setProperty("odette.calling-address",transport.getRemoteAddress());
  21.  
  22.  
  23.  
  24.                        /* start session phase */
  25.  
  26.                           changeState(ListenerState.class);
  27.  
  28.                           /*Error happens here at next line*/
  29.  
  30.                           state.startSession();
  31.  
  32.  
  33.  
  34.                       } else {
  35.  
  36.  
  37.  
  38.                         NotInIdleStateError();
  39.  
  40.                     }
  41.  
  42.                     return state;
  43.  
  44.                 }
  45.  

I traced it into this interface called OdetteFTPEntity

Expand|Select|Wrap|Line Numbers
  1.  
  2.       public interface OdetteFTPEntity {
  3.  
  4.           public Session getContext();
  5.  
  6.       /*Error happens here in startSession Function*/
  7.  
  8.           public void startSession() throws OdetteFTPException;
  9.  
  10.           public void startFile(VirtualFile file, String destination,
  11.                  String originator, String userData, String reserved)
  12.  
  13.                   throws OdetteFTPException;
  14.  
  15.           public void dataRegime() throws OdetteFTPException;
  16.  
  17.           public void closeFile(int recordCount, long unitCount)
  18.  
  19.                   throws OdetteFTPException;
  20.  
  21.           public void changeDirection() throws OdetteFTPException;
  22.  
  23.           public void endToEndResponse(String datasetName, Date fileDateTime,
  24.  
  25.                   String destination, String originator, String userData,
  26.  
  27.                   String reserved) throws OdetteFTPException; 
  28.  
  29.           public void release() throws OdetteFTPException;
  30.  
  31.  
  32.           public void abort(EndSessionReason error) throws OdetteFTPException;
  33.  
  34.  
  35.           public boolean isConnected() throws OdetteFTPException;
  36.  
  37.  
  38.  
  39.       }
  40.  
  41.  
This is the error stack trace



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.
Feb 19 '08 #1
0 1277

Sign in to post your reply or Sign up for a free account.

Similar topics

62
by: Ecohouse | last post by:
I was just wondering if there was any way to use a toolbar in Outlook 2002 in Access 2002? I want to create a custom toolbar in Access similar to the Calendar toolbar in Outlook. Any ideas?
7
by: louis08 | last post by:
When i call: OdetteFTPEntity oftp = session.acceptConnection(transport); I recive a java.nio.BufferOverflowException
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.