NetBeans MobilityPack 5 BUG?? how can I send a byte array?

I�ve created a WebApp and a Simple servlet with one public method.
public byte[] getStr(byte[] b) {       
String s = "A string";
return s.getBytes();
Then I've used "Mobile To Web App" wizard to generate stubs to that getStr method. And when I�ve tried to call that getStr method:
byte[] aByte = "st".getBytes();
byte[] b = client.getStr(aByte);
I've got an error at Server in Utility.java in generated ReadArray method.
* Reads an array from the given data source and returns it.
*@param source The source from which the data is extracted.
*@return The array from the data source
*@exception IOException If an error occured while reading the data.
public static Object readArray(DataInput in) throws IOException {
short type = in.readShort();
int length = in.readInt();
if (length == -1) {
return null;
} else {
switch (type) {
case BYTE_TYPE: {
byte[] data = new byte[length];
in.readFully(data);
return data;
default: {
throw new IllegalArgumentException("Unsupported return type (" + type + ")");
At this line "in.readFully(data);" I�ve got an EOFException.
The the aByte = "st".getBytes(); was 2bytes long and at the server "int length = in.readInt();" it was 363273. Why?
All code was generated by NetBeans Mobility pack 5 it's not mine so its a bug?
How can I fix this?

I found that bug. I've described it here
http://www.netbeans.org/issues/show_bug.cgi?id=74109
There's a solution how to fix the generated code.

Similar Messages

  • How can I send pictures not embedded, but as an attachment? THX

    How can I send pictures not embedded, but as an attachment? THX

    I had the same problem. I closed  the message, tried again selecting the correct imessage contact number and it worked.
    I'm guessing I first selected a non-imessage phone number and it got stuck in a gray/can't send mode (bug).

  • How can I send email using two different email address that both link back to my one exchange account on my Ipad mini

    How can I send email using two different email address that both link back to my one exchange account on my Ipad mini? 
    On my PC I simply have a master return email address and use a POP for the secondary address.  Both are through the one exchange account without a problem.  I need to be able to do the same on my Ipad.

    Ah, I should have made that clear.  My domain didn't come from google.  It was purchased at and is hosted at dreamhost, but I haven't used their email servers in years - I just route everything through gmail.  I actually have a bunch of domains (with websites).
    Gmail has an option that lets someone with custom domains send (and receive) email through gmail using the custom domain once Google confirms proper ownership of the domain (to prevent spammers and such).  Gmail has a setting for "send email as" which allows gmail to be sent using a custom domain as the sender.  I'm pretty sure Apple's old mobileme had this feature too, but I didn't use it.

  • How can I send stuff from one iPhone to another via Bluetooth?

    How can I send stuff from one iPhone to another via Bluetooth?

    There are some apps that will let you send photos from one iOS device to another over BT.

  • How can I send email from my yahoo alias account in iPhone5 mail?

    How can I send email from my yahoo alias account in iPhone5 mail?
    I have 2 email accounts: [email protected] is an alias of [email protected]
    In my old iPhone3 I had these accounts set up so that I could send and receive email from both accounts. I did this using the following settings:
    ‘Other’ POP account info:
    Name: xyz
    Address: [email protected]
    Description: alias
    Incoming mail server:
    Host name: pop.mail.yahoo.com
    User name: [email protected]
    Password: password for yahoo account
    Server port: 995
    Outgoing mail server:
    SMTP: smtp.o2.co.uk (o2 is the name of my phone network)
    Server port: 25
    ‘Yahoo!’ account info:
    Name: xyz
    Address: [email protected]
    Password: password for yahoo account
    Description: Yahoo!
    Outgoing mail server:
    Primary server: Yahoo! SMTP server
    Server port: 465
    I’ve tried using the same settings in my new iPhone5, but it doesn’t work. I can receive mail to both accounts, and can send from the Yahoo account, but I cannot send mail from the alias account. When I try, it displays the message: “Cannot send mail. A copy has been placed in your Outbox. The recipient ‘[email protected]’ was rejected by the server”.
    I’ve tried to configure the POP alias account using combinations of ‘pop.mail.yahoo.com’, ‘pop.mail.yahoo.co.uk’, ‘apple.pop.mail.yahoo.co.uk’ and ‘apple.pop.mail.yahoo.com’, for the incoming host, and ‘smtp.o2.co.uk’, ‘smtp.mail.yahoo.com’, ‘smtp.mail.yahoo.co.uk’, ‘apple.smtp.mail.yahoo.com’ and ‘apple.smtp.mail.yahoo.co.uk’ for the outgoing mail server. None of these have worked.
    I’ve also tried setting it up using IMAP instead of POP without success. I tried configuring it using combinations of ‘imap.mail.yahoo.com’, ‘apple.imap.mail.yahoo.com’, ‘imap.mail.yahoo.co.uk’ and ‘apple.imap.mail.yahoo.co.uk’ for the incoming mail server and ‘smtp.o2.co.uk’, ‘smtp.mail.yahoo.com’, ‘smtp.mail.yahoo.co.uk’, ‘apple.smtp.mail.yahoo.com’ and ‘apple.smtp.mail.yahoo.co.uk’ for the outgoing mail server.
    Yahoo say that if I can't send Yahoo! Mail from my mail program, I may be accessing the Internet through an ISP that is blocking the SMTP port, and that if this is the case, I should try setting the SMTP port number to 587 when sending email via Yahoo!'s SMTP server. I don't think that this is the problem, but I tried it just to make sure - without success.
    I’ve also heard that the problem might have something to do with the SPF settings of my alias domain provider. I’m not too sure exactly what SPF settings are, or how to change them, but from what I can gather it seems unlikely that this is the problem given that I was able to send mail from my alias account on my old iPhone3.
    Any help much appreciated: how can I get my alias account to send emails in iPhone5 mail?
    Many thanks,
    Patrick

    A new development: I've tried sending emails from the alias several times over the past 24 hours, but in general I've deleted them if they haven't sent within about half an hour.
    However, one of the messages I left sitting in the outbox did send successfully in the end, but this took about an hour.
    So: perhaps my problem is not in fact that I am completely unable to send mail from my alias, but that I can only do so intermittently and extremely slowly, and by ignoring the "cannot send" message.
    Any help appreciated.

  • How can we send Error Idocs via mail

    Hi,
    I have read read through forums and  understood that it can be achieved either through workflow or through report using table edidd & edids.
    If workflow option is used , does the mail trigger for every error idoc ? How can we send daily error report to user say by EOD containing all error idocs using all possible options.
    Regards,
    Rachel

    Rachel,
    I dont think so any direct Report will be available just to get Error IDOCs details. Although you can create a simple report to read the tables. An example is in below link.
    http://wiki.scn.sap.com/wiki/display/Snippets/Custom+report+for+IDOC+Monitoring
    Also, you can create a Query of EDIDC and EDIDS tables to obatin relevant information.
    Thanks,
    Ravi

  • How can I send more than one document on an email

    how can I send more than one document on one email

    Thank you but I understand that form of attaching a document. However when I select a document then click 'Share' I have the option of sending the document by email as a word or pages document or pdf, what I want to know is can I use this procedure to send more than one document per email and if I can how?

  • How can I send more than one foto in a email

    How can I send more than one foto in a email?

    Or, to send up to 5 photos in one email, open the Photos app, go to the Album containing the photos, tap Select, tap up to 5 photos (a blue tick will appear on them), then tap the Share icon (square with arrow pointing up) and choose Mail.
    If you choose more than 5 photos this way, you won't get the Mail option.

  • How can I send multiple photos in an email?

    How can I send multiple photos in an email?

    In Photos, when looking at your pictures, click the Action arrow first (upper right), before selecting any pictures.  Then you can tap select the pictures you want to send then click "Share" in the upper left.  From there you can Email.
    If you click and open one picture first, the Action button will only allow you to share that one picture.
    (Yeah, took me a while to figure this out. )
    ivan

  • How can I send out a voice memo by iphone 6 plus?

    How can I send out a voice memo to my friend? the voice memo last around 1.5 hours.  I tried to sent by email but not success.
    Pls. help.

    It is not Family Sharing - it is Continuity. Go to Settings>FaceTime>Cellular Calls, turn them off.
    Cheers,
    GB

  • How can I send a podcast video via email?

    Hello techies,
    How can I send a National Geographic podcast via email to a friend?
    I've tried importing and exporting without much success.

    Hello Chris Miller,
    Of course I did. I certainly would not have suggested doing something I haven't tried to do myself. Would You? I wouldn't unless we are experimenting with something, but this is not the case here.
    I also mentioned to lexlizandtay to watch the filesize.
    Many ISP's have a 10 MB limit on sending or receiving emails.
    I also said in my above post "Works for Me"......
    I have a 3.8 MB Podcast that was downloaded straight from Apple. I can send this without any problems the way I mentioned above.
    I also have other podcasts that I made myself using GarageBand or Quicktime that work just fine.
    Give it a try.

  • How can i send photos to my friends Macbook using my Macbook iMessage App

    How can i send photos to my friend who is chatting with me on iMessage ?
    My friend had uploaded his photo in his iMessenger app but i am able to see his profile photo on my iMessage app ?
    As i am a beginner in using Macbook and i was using Windows 8.1 pro ,so thats why i am facing some issues.
    Please Help me.
    Thanking You

    Hi ..
    You can use iTunes to transfer photos to your iPhone >  iOS: How to transfer or sync content to your computer

  • How can i send my in-app purchases to apple?

    I cant copy and paste it! So how do i save it and send it to apple??? I need to get that refund thing becasue my kids bought A LOT of in-app purchases. I tried saving it as a pdf but it saved as blank white pages. I cant print it either? How can i send them to apple. My last resort is having to write them in by hand. Is there anything eaiser? I need this by tomorrow because thats the last day to send it.

    Unless you have the emailed receipts for the purchases (you should be able to do copy-and-paste from them) then I think that you will need to type them in - I don't think that you can do copy-and-paste from the purchase history on iTunes (it doesn't work on mine).

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • I uploaded a video from itunes to my iphone how can i send it to my friend?

    I uploaded a video from itunes to my iphone how can i send it to my friend

    You can't. The techical term for that is "stealing".

Maybe you are looking for