I tried to broadcast an object using object serialization and UDP connection. I am using netbeans IDE and i use a Java Desktop Application for both sending and receivinends.Object is broadcasted when a button is clicked. And i get the following exception...
Oct 29, 2011 1:50:04 PM receive1.Receive1View jButton1ActionPerformed
SEVERE: null
java.lang.ClassNotFoundException: send.objecttransmit
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at receive1.Receive1View.jButton1ActionPerformed(Receive1View.java:245)
at receive1.Receive1View.access$800(Receive1View.java:29)
at receive1.Receive1View$4.actionPerformed(Receive1View.java:133)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
The code works well when i try to broadcast from class using java class library of netbeans IDE.
please help.
How are you handling lost packets? UDP is a lossy protocol and if a packet is lost you could get a corrupt "stream" if you just combine the packets you do get.
The problem is that the application that is attempting to deserialize the object does not have the class send.objecttransmit on its classpath when you run it standalone.
The code works well when i try to broadcast from class using java class library of netbeans IDE.
I'm not sure I understand what you are saying, but if your application is working in NetBeans, then that must be because the class is on the classpath when you run it that way.
Related
I am trying to read a .docx file into a JTextPane, but its giving some exception. I am using POI library. What should I do? Help me out, please. Here is my code:
file = new File(
"C:\\Users\\Siddique Ansari\\Documents\\CV Parser\\Siddique_Resume.docx");
FileInputStream fis=new FileInputStream(file.getAbsolutePath());
XWPFDocument document=new XWPFDocument(fis);// line no 549
extractor = new XWPFWordExtractor(document);
String fileData = extractor.getText();
Document doc = jTextPane1.getDocument();
System.out.println(fileData);
doc.insertString(doc.getLength(), fileData, null);
And this is the Exception:
Exception in thread "AWT-EventQueue-0"
java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException
at cvparser.ExcelSheet.jButton3ActionPerformed(ExcelSheet.java:549)
at cvparser.ExcelSheet.access$400(ExcelSheet.java:39)
at cvparser.ExcelSheet$5.actionPerformed(ExcelSheet.java:219)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.apache.xmlbeans.XmlException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 28 more
In addition to the apache-poi JAR files, for example,
1869113 11-26-12 17:22 poi-3.9/poi-3.9-20121203.jar
936648 11-26-12 17:22 poi-3.9/poi-ooxml-3.9-20121203.jar
4802621 11-26-12 17:22 poi-3.9/poi-ooxml-schemas-3.9-20121203.jar
You'll also need the JAR files from ooxml-lib in your classpath:
313898 04-05-09 14:28 poi-3.9/ooxml-lib/dom4j-1.6.1.jar
26514 02-23-11 12:31 poi-3.9/ooxml-lib/stax-api-1.0.1.jar
2666695 04-05-09 14:29 poi-3.9/ooxml-lib/xmlbeans-2.3.0.jar
thank you for reading this.
i m using freetts to make my program speak some text...
While inside the IDE, when i run all the programs, they work fine.(mine and all freetts example programs).
Also the runnable programs (jar) that come with the bin download of freetts, run on terminal fine.... Freetts --> http://sourceforge.net/projects/freetts/files/
Well the exact same programs doesn't work when i export them from the IDE. Tried both netbeans and eclipse to export the programs but i m getting errors.
i m suspecting it has to do with the jar files i include in the projects (jsapi.jar, freetts.jar,freetts-jsapi10.jar). i mean that somehow it may be forbidden to use them this way but maybe i m talking nonsense.
Anyone know what's happening?
i m posting 3 different errors i m getting on terminal from 3 programs distributions that work fine on IDEs... sorry for the long post
1.
java -jar JSAPIClock.jar
checkPoint1
java.lang.NullPointerException
at jsapiclock.JSAPIClock.createSynthesizer(JSAPIClock.java:49)
at jsapiclock.JSAPIClock.main(JSAPIClock.java:86)
checkPoint2
checkPoint3
checkPoint4
The time is now, almost half past six, in the evening.
Exception in thread "Thread-1" java.lang.NullPointerException
at jsapiclock.JSAPIClock.speak(JSAPIClock.java:74)
at jsapiclock.Clock.speakTime(Clock.java:233)
at jsapiclock.Clock.access$000(Clock.java:41)
at jsapiclock.Clock$ClockThread.run(Clock.java:269)
2.notice that Speech.properties file is included in both directories below
java -jar HelloWorld.jar
All general Mode JSAPI Synthesizers and Voices:
Using voice: kevin16
No synthesizer created. This may be the result of any
number of problems. It's typically due to a missing
"speech.properties" file that should be at either of
these locations:
user.home : /home/yiannis
java.home/lib: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib
Another cause of this problem might be corrupt or missing
voice jar files in the freetts lib directory. This problem
also sometimes arises when the freetts.jar file is corrupt
or missing. Sorry about that. Please check for these
various conditions and then try again.
3.This is weird actually
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:55)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at java.net.JarURLConnection.getManifest(JarURLConnection.java:217)
at java.net.JarURLConnection.getMainAttributes(JarURLConnection.java:269)
at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:251)
at com.sun.speech.freetts.VoiceManager.getDependencyURLs(VoiceManager.java:283)
at com.sun.speech.freetts.VoiceManager.getVoiceDirectories(VoiceManager.java:173)
at com.sun.speech.freetts.VoiceManager.getVoices(VoiceManager.java:110)
at com.sun.speech.freetts.jsapi.FreeTTSEngineCentral.createEngineList(FreeTTSEngineCentral.java:85)
at blah2.CustomSpeaker.createSynthesizer(CustomSpeaker.java:34)
at blah2.FullScreenBox.<init>(FullScreenBox.java:49)
at blah2.Blah2View.actionPerformed(Blah2View.java:323)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
System property "mbrola.base" is undefined. Will not use MBROLA voices.
java.lang.NullPointerException
at blah2.CustomSpeaker.createSynthesizer(CustomSpeaker.java:36)
at blah2.FullScreenBox.<init>(FullScreenBox.java:49)
at blah2.Blah2View.actionPerformed(Blah2View.java:323)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Thread-1" java.lang.NullPointerException
at blah2.CustomSpeaker.speak(CustomSpeaker.java:61)
at blah2.Speaker$SpeakerThread.run(Speaker.java:42)
l've written a dll on VS2010 and I will call it from JAVA by the help of JNA.But it doesn't run if VS 2010 doesn't exist on computer.It gives errors
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
Unable to load library 'C:\Users\hasan\Desktop\cv-2dll.dll': The
specified module could not be found. at
com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at
com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at
com.sun.jna.Library$Handler.(Library.java:140) at
com.sun.jna.Native.loadLibrary(Native.java:393) at
com.sun.jna.Native.loadLibrary(Native.java:378) at
hsv.HSVHistogram.main(HSVHistogram.java:24) at
hsv.HSVView.jButton1ActionPerformed(HSVView.java:231) at
hsv.HSVView.access$900(HSVView.java:25) at
hsv.HSVView$5.actionPerformed(HSVView.java:134) at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288) at
javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at
java.awt.Component.processEvent(Component.java:6053) at
java.awt.Container.processEvent(Container.java:2041) at
java.awt.Component.dispatchEventImpl(Component.java:4651) at
java.awt.Container.dispatchEventImpl(Container.java:2099) at
java.awt.Component.dispatchEvent(Component.java:4481) at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085) at
java.awt.Window.dispatchEventImpl(Window.java:2478) at
java.awt.Component.dispatchEvent(Component.java:4481) at
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643) at
java.awt.EventQueue.access$000(EventQueue.java:84) at
java.awt.EventQueue$1.run(EventQueue.java:602) at
java.awt.EventQueue$1.run(EventQueue.java:600) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616) at
java.awt.EventQueue$2.run(EventQueue.java:614) at
java.security.AccessController.doPrivileged(Native Method) at
java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613) at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Your DLL probably needs the C/C++ runtime DLLs. The computer without Visual Studio 2010 installed probably doesn't have them.
Try compiling your DLL so that the C/C++ Runtime Library is statically linked into the DLL. Open the properties page for your DLL project in VS 2010, then select the Configuration Properties->C/C++->Code Generation subdialog and select Multi-threaded (/MT) or Multi-threaded Debug (/MTd). Once you recompile & relink the DLL it should run on systems without the VS 2010 runtime DLLs.
I am trying to make an Java application, which needs a connection with a MySQL database to read data.
I've read several tutorials and examples, tried almost everything but I just can't get any access to the database.
At the moment I am using this to connect to the db:
try{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://myhost/test","databaseUser", "password");
}
catch (Exception e){
System.out.println(e);
}
Stacktrace:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.io.EOFException
MESSAGE: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
STACKTRACE:
java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:573)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1044)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2775)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at facturatiesysteem.SysteemView.zoekKlant(SysteemView.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
** END NESTED EXCEPTION **
Last packet sent to the server was 16 ms ago.
And a lot more...
but I just can't get access to it.
What can I do here?
phpmyadmin is a front-end to a database, a web application. It's not a database. You can't access the database in Java through phpmyadmin. You need a direct access to the database itself (which is called MySQL, BTW). Not sure if your hosting provider allows it.
I created this program server and client to send sms via bluetooth and i got stuck with this problem my client works perfectly and this one to but when I'm running this file and press the but I get null point exception. I will appreciate your help.
LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC);
Error message
java.lang.NullPointerException
at SMS_SERVER.jButton2ActionPerformed(SMS_SERVER.java:267)
at SMS_SERVER.access$000(SMS_SERVER.java:27)
at SMS_SERVER$1.actionPerformed(SMS_SERVER.java:101)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Follow Anothem's suggestion. If you're using jsr82, that's only the API. It is expected that developers do their own implementations.
Alternatively, you could download the Bluecove implementation binaries.
If the line above is the one you encounter the exception on, check if LocalDevice.getLocalDevice() actually returns what you expect. If it doesn't, that's your problem.
Try to put a new instance in your call of
public void actionPerformed(java.awt.event.ActionEvent evt) {
-> public void actionPerformed(new java.awt.event.ActionEvent evt) {
let me know
Bye