Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7580779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:00:07+00:00 2026-05-30T18:00:07+00:00

I am performing a Maven build on my client’s Java codebase, and one of

  • 0

I am performing a Maven build on my client’s Java codebase, and one of the test suites is failing. The error reported in the logs is the same as what I find when I step through the code with the NetBeans debugger.

The native function java.net.PlainDatagramSocketImpl.send() is throwing a BindException – “Cannot assign requested address”. I cannot step deeper into the code than this, since it is a native function.

At a higher level, the code is performing a basic test of the network.

DatagramSocket ds = new DatagramSocket(service.getNetworkConfiguration().getBindSocketAddress().getPort() + 100);
InetSocketAddress bindSocketAddress = service.getNetworkConfiguration().getBindSocketAddress();
ds.send(new DatagramPacket(message, message.length, bindSocketAddress.getAddress(), bindSocketAddress.getPort()));

The IP address returned by service, and therefore contained in bindSocketAddress is, as noted, 0.0.0.0 – I have tried different ports (32168, 22332, 1234), all with the same error.

The + 100 that appears in the definition of the DatagramSocket port is apparently intentional, and this test suite has been succeeding for a long time for others, with that in place.

I am running on Windows 7, 64-bit.

I have disabled the firewall and antivirus on the local machine, and I have run netstat -a and I do not see any of the ports I’ve used in the list of bound ports.

Is this likely to be an issue with my Windows configuration or even my router? Perhaps my Java configuration in some way? Any suggestions would be highly appreciated.

Follow up: I receive the IDENTICAL error when running on a CentOS 5.5 virtual machine. It still may be a Windows 7 configuration issue, though, since the VM guest is running on the Windows 7 host – sharing its internet connection. (bridged)

Follow up #2 (see 4th comment): It seems invalid to have the RECIPIENT be 0.0.0.0; in fact, a comment in the JDK (InetAddress.java) says: The unspecified address (also called anylocal or wildcard address) must not be used as the destination address of an IP packet where the wildcard address is 0.0.0.0. I changed the code to use “localhost” (see 4th comment) and it solves the problem. However, the above code might be valid for a reason I don’t understand; when I clarify with the developers of the code, I will post a follow-up or an answer.

UPDATE (Mar 1, 2012): It turns out (in retrospect) that in fact, the code in question was simply a bug on the previous programmers’ parts. My true misunderstanding was entirely unrelated to the topic of the question.

The explanation is: every time I built the Java code, I ran the associated unit tests that were built into the system. I did not, at that time, realize that it was possible to build the source code, yet bypass the unit tests. It turns out that another programmer on the team had built the code (successfully), but skipped the unit tests (and failed to notice this error); then committed the code to source control, believing that it was correct. Other programmers were also in the habit of building the code while skipping the unit tests. Therefore, the bug was not caught for a few weeks. However, I did perform the unit tests, and received this supposedly working code from source control while it still contained the bug. I did not ask others on the team about the bug because at that time, I believed it was my responsibility to understand Java sufficiently without taking the time of other programmers on the team, and I assumed it was my misunderstanding because I assumed that others were not receiving the error in the unit tests.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:00:10+00:00Added an answer on May 30, 2026 at 6:00 pm

    Please see my “Update” – this question is moot.

    Look at my long comment for a fuller explanation.

    I am leaving the question here in case the “Update” at the end of the question, which is unrelated to the topic of the question itself, is discovered by someone for whom it proves useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While performing a conditional DELETE operation in one of my InnoDB tables, which apparently
I am performing two validations on the client side on the samve event. I
I'm performing a query that is looking for values in one table that are
After performing a Menubar> Project> Clean... I get the following error in the errorlog:
When performing I/O operations in Java, is it generally more efficient (in terms of
I need to simulate JMS behavior while performing automated tests via maven/hudson. I was
When performing a delete of a one-many relationship without exposing the foreign key, EF
I was performing one of these saturday morning tasks, trying to understand why searching
I am performing some test on sql server and I want to get the
Performing user authentication in Java EE / JSF using j_security_check I tried this solution.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.