I am working on a J2ME application.  

I am using Nokia 6131 NFC phone. I am using NetBeans IDE.  

I have 4 forms and I am playing some notification sounds for the user while filling the form.

The problem is sound goes off suddenly after 3 to 4 min and the only solution is to exit the application and again open it.

My Code

```
public void playSoundOK()
{
        try
        {
            InputStream is = getClass().getResourceAsStream("/OK.wav");
            Player player = Manager.createPlayer(is,"audio/X-wav");

            player.realize();
            player.prefetch();
            player.start();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

```

Exception

```
at com.nokia.mid.impl.isa.mmedia.audio.AudioOutImpl.openSession(AudioOutImpl.java:206)
at com.nokia.mid.impl.isa.mmedia.MediaOut.openDataSession(MediaOut.java:282)
at com.nokia.mid.impl.isa.mmedia.MediaPlayer.doPrefetch(MediaPlayer.java:155)
at com.nokia.mid.impl.isa.amms.audio.AdvancedSampledPlayer.doPrefetch(+4)
at com.nokia.mid.impl.isa.mmedia.BasicPlayer.prefetch(BasicPlayer.java:409)
at org.ird.epi.ui.UtilityClass.playSoundOK(UtilityClass.java:139)
at org.ird.epi.ui.EnrollmentForm.targetDetected(+695)
at javax.microedition.contactless.DiscoveryManager.notifyTargetListeners(DiscoveryManager.java : 700)
at javax.microedition.contactless.DiscoveryManager.access$1200(DiscoveryManager.java:103)
at javax.microedition.contactless.DiscoveryManager$Discoverer.notifyIndication(DiscoveryManager.java:882)
at com.nokia.mid.impl.isa.io.protocol.external.nfc.isi.NFCConnectionHandler$IndicationNotifier.run(+67) javax.microedition.media.MediaException: AUD

```