473,804 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Odette-j Error

6 New Member
When i connect to the server i get a BufferOverflowE xception,
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: acceptConnectio n()


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.Buffer OverflowExcepti on

at java.nio.Direct ByteBuffer.put( DirectByteBuffe r.jav a:279)

at org.fossilec.od ettej.service.S treamTransmissi onSer vice.receiveStr eamTransmission Buffer(StreamTr ansmi ssionService.ja va:87)

at org.fossilec.od ettej.service.S treamTransmissi onSer vice.receive(St reamTransmissio nService.java:6 4)

at org.fossilec.od ettej.AbstractS tate.receive(Ab strac tState.java:85)

at org.fossilec.od ettej.ListenerS tate.negotiateS tartS ession(Listener State.java:548)

at org.fossilec.od ettej.ListenerS tate.startSessi on(Li stenerState.jav a:114)

at org.fossilec.od ettej.Session.a cceptConnection (Sess ion.java:266)

at examples.odette j.OdetteServer. startSession(Od etteS erver.java:140)

at examples.odette j.OdetteServer. handleConnectio ns(Od etteServer.java :114)

at examples.odette j.OdetteServer. run(OdetteServe r.jav a:54)

at javaapplication 1.Main.<init>(M ain.java:27)

at javaapplication 1.Main.main(Mai n.java:37)

java.lang.Illeg alStateExceptio n: Not in Idle state

at org.fossilec.od ettej.Session.N otInIdleStateEr ror(S ession.java:310 )

at org.fossilec.od ettej.Session.a cceptConnection (Sess ion.java:272)

at examples.odette j.OdetteServer$ 2.run(OdetteSer ver.j ava:164)

at java.lang.Threa d.run(Thread.ja va:595)



Regards,
Louis.
Feb 19 '08 #1
0 1295

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

Similar topics

62
11429
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
2516
by: louis08 | last post by:
When i call: OdetteFTPEntity oftp = session.acceptConnection(transport); I recive a java.nio.BufferOverflowException
0
9712
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10341
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7634
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5530
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.