• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java to Java Byteorder Problem  RSS feed

 
Frank Meier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

im having a strange byteorder problem during the communication via sockets on the SAP WebAS. Im using a servlet that is deployed as a .par and a .ear archive that runs on the WebAS. The servlet opens a socket to the application running directly on the WebAS.

When those communicate via standard java sockets and DataOutputStreams sometimes the servlet begins to send little endian byteorder instead of big endian. It starts in the middle of the code and i have currently no idea how i could fix this. It isnt only one value thats not being send correctly, it just switches and sends everything after it in little endian. It also happens very randomly, sometimes it happens everytime then doesnt happen the next 50 or 100 communications tries.

Did anyone else encounter this problem and could give me some tips how to fix it.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried your code in a standalone Java program?

This doesn't sound like a servlet specific problem.
 
Frank Meier
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes already tried it standalone and didnt have this effect, the problem is i can not be sure because the error doesnt happen very often . Iam using the standard readint and writeint methods, and sometimes i get the number 16777216 instead of 1, which is the 1 in little endian format.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!