{"id":5689,"date":"2014-04-05T05:31:47","date_gmt":"2014-04-05T05:31:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/javaserialcommrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-05T05:31:47","modified_gmt":"2014-04-05T05:31:47","slug":"javaserialcommrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/05\/javaserialcommrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"java,serial,commRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/aca1b89e4c213b48e563ae0731e97134?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAbhilash<br \/>\njava spring email javamail<br \/>\nI am trying to send email through my outlook.com account (mapped to a specific domain, my email id would be like emailId@mydomain.comI am getting the following exception.2014-03-14 00:27:55,314 [pool-1-thread-1] ERRORorg.springframework.scheduling.support.MethodInvokingRunnable -Invocation of method &#8216;sendMail&#8217; on target class [classcom.sixthsense.lws.scheduler.TestMailSenderJob] failedorg.springframework.mail.MailSendException: Failed messages:com.sun.mail.smtp.SMTPSendFailedException: 501 5.5.4<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d99a9857128bba62d21ca699df490894?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFrank<br \/>\njava spring<br \/>\nI have the following Spring code, taken from a textbook, that&#8217;s returning a NotWritablePropertyException. I&#8217;m told I need setters for my Song class, which I thought I&#8217;d just done, but it&#8217;s apparently not working. I&#8217;ve edited my code below. Can anybody help? Here is the code.package com.springinaction.springidol;public class Singer implements Performer {private String name = &#8220;Someone&#8221;;private Song song;public Singer() {}public Singer(String song) {this.song.setTitle(song);}public Singer(Strin<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/213c10c8495b7f85c8747bd767d150b9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMj1992<br \/>\njava android<br \/>\n1.I was trying to pass an array of string from 1 activity to another but the application is giving &#8220;Application Stopped Unexpectedly&#8221;.I am new to android and I don&#8217;t know how to do it.2.Can you please tell me how to tackle these runtime errors and how to use logcat I&#8217;ve noidea?Code Activity A:private OnClickListener mylistener=new OnClickListener() {@Overridepublic void onClick(View arg0) {intent=new Intent(MsgSmsActivity.this,MsgSmsActivity2.class);MsgSmsActivity.this.startActivity(intent);inte<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/72499b1b7bba74a357718ec259d2709e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSethiel<br \/>\njava hadoop hcatalog<br \/>\nMy test code:public static void main(String [] args) throws HCatException {String metastoreUrl = &#8220;thrift:\/\/&lt;censored&gt;:9083&#8221;;String databaseName = &#8220;default&#8221;;String tableName = &#8220;test&#8221;;WriteEntity.Builder builder = new WriteEntity.Builder();WriteEntity entity = builder.withDatabase(databaseName).withTable(tableName).build();HCatWriter writer = DataTransferFactory.getHCatWriter(entity, HCatalogUtils.createConfigurationMap(metastoreUrl));HCatRecord record1 = new DefaultHCatRecord(2);record1.set<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/clobU.jpg?s=32&amp;g=1\" \/><br \/>\nMihir<br \/>\njava image image-processing java-2d<br \/>\ni have a tiff file 18000 * 18000 in Dimension and 1.20 GB in size. the tiff has 72 DPI.I want to convert this TIFF to PNG\/JPEG using 400 DPI.I am using following code to do it public static void ConvertTiffToJpg(String str_TiffUrl,String str_JpgFileDestinationUrl) throws Exception {try {FileSeekableStream obj_FileSeekableStream = new FileSeekableStream(new File(str_TiffUrl));ImageDecoder obj_ImageDecoder = ImageCodec.createImageDecoder(&#8220;tiff&#8221;, obj_FileSeekableStream, null);RenderedImage obj_Ren<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0a47da997987f8d66a76e971bb182d31?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nHD84335<br \/>\njava web-services jax-ws glassfish-3 myeclipse<br \/>\nI have a problem running JAX_WS Webservices with Glassfish application server. Previously, i used to use Apache tomcat which works fine with it. But now, having Glassfish, this problem is preventing the application from being deployed&#8230; please check it below:2013-04-04T13:09:23.028+0300 com.sun.xml.ws.wspolicy.com.sun.xml.ws.api.policy.ModelTranslator SEVERE: [failed to localize] WSP_0071_ERROR_MULTIPLE_ASSERTION_CREATORS_FOR_NAMESPACE(http:\/\/schemas.xmlsoap.org\/ws\/2004\/08\/addressing, com.sun.x<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0e0ac290b833189cfaab8b5b060db879?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJav_Rock<br \/>\njava android opencv computer-vision background-subtraction<br \/>\nI am working on a robotics project using an Android phone as the main processor and the camera to detect movement. I got the Android binary package from OpenCV and got it correctly installed. I can capture images using the OpenCV native camera and display them to the screen. I&#8217;m having problems using the background subtraction class, though. I can make a new BackgroundSubtractorMOG object in the constructor, but when I attempt to run the code below, it force quits I get the error &#8220;Only 1- and 3-<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/in8l6.jpg?s=32&amp;g=1\" \/><br \/>\njjmartinez<br \/>\njava rest tomcat tomcat7 resteasy<br \/>\nI&#8217;m developing a Rest service with RestEasy. I need to deploy in Tomcat. And I think that I have problems in my web.xmlThis is my web.xml:&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;&lt;web-app xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221; xmlns=&#8221;http:\/\/java.sun.com\/xml\/ns\/javaee&#8221; xsi:schemaLocation=&#8221;http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-app_3_0.xsd&#8221; id=&#8221;WebApp_ID&#8221; version=&#8221;3.0&#8243;&gt;&lt;display-name&gt;MyServices&lt;\/display-name&gt; &lt;!&#8211; Auto scan RE<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5cb8fc0060a265a101e2363ded5ce963?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nCoolBeans<br \/>\njava hibernate spring junit<br \/>\nThe error message is:- Error creating bean with name &#8216;agencyDetailsInterfaceService&#8217; defined in class path resource .Stack Trace below:org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#8216;agencyDetailsInterfaceService&#8217; defined in class path resource [spring\/aas-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type &#8216;$Proxy51 implementing com.qbe.us.aas.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3af621f0eab202760b3c690bb9efb36c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ntheZenPebble<br \/>\njava hibernate junit h2<br \/>\nI have almost identical code in the setUp() method of three tests. When run individually, the tests all work, but when I run them as part of the complete set of tests, the last one fails.The &#8220;offending&#8221; code is:@Before public void setUp() throws Exception {AnnotationConfiguration configuration = new AnnotationConfiguration();configuration.addAnnotatedClass(User.class);configuration.setProperty(&#8220;hibernate.dialect&#8221;, &#8220;org.hibernate.dialect.H2Dialect&#8221;);configuration.setProperty(&#8220;hibernate.connection<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a0ffc2a4f1c1e499e1a3ca24e4c1166a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMikeyB<br \/>\nwindows-server serial<br \/>\nHow do I enable a serial console on Windows (2008 and\/or 2012) such that I can log into it like the Good Old Days of Real Servers and issue provisioning commands, ideally via PowerShell?$ cu -l \/dev\/ttyS0 Connected.Welcome to ad1.adlab.brazzers.comMicrosoft Windows [Version 6.1.7601] Copyright (C) 2009 Microsoft Corporation. All rights reserved.Login: Administrator Password: PS C:\\Users\\Administrator&gt; New-NetIPAddress -InterfaceAlias eth0 -IPv4Address 192.168.101.11 -PrefixLength 24 -DefaultG<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/vg3Si.png?s=32&amp;g=1\" \/><br \/>\nHennes<br \/>\nbios windows-server-2003 serial cmd.exe<br \/>\nI am trying to find the serial number of a windows server 2003 R2.I used a lot of tools but i couldn&#8217;t find the serial number.Note that i want the serial number and not the product key.I also used the following command on cmd:wmic bios get serialnumberbut the result is serial number and then empty lines, which is unexpected from my experience. How can i find the serial number? What is wrong?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e092c11abc762569e43e3f98d1cb2107?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkfuglsang<br \/>\narduino serial rf<br \/>\nI have a very simple setup with an Arduino Uno R3 connected to my Windows 7 x64 with Arduino 1.0.1.I have a RF receiver connected to the Arduino on the DI10 port using the SoftwareSerial library. I am using a AM-RRQ3-433 module. See rfsolutions.co.uk\/acatalog\/AM_Super-heterodyne_Receiver.htmlWhen I receive a byte from the RF receiver, I am simply writing it to the Serial (so that I can see it on my PC in the serial monitor). Doing so seems to conflict between SoftwareSerial and Serial, since the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/29b0a81131a712b13b4681ec7274ca8f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMarve<br \/>\npostgresql primary-key serial<br \/>\nI run a small site and use PostgreSQL 8.2.17 (only version available at my host) to store data. In the last few months there were 3 crashes of the database system on my server and every time it happened 31 ID&#8217;s from a serial field (primary key) in one of the tables were missing. There are now 93 ID&#8217;s missing.Table:CREATE TABLE &#8220;REGISTRY&#8221; (&#8220;ID&#8221; serial NOT NULL,&#8221;strUID&#8221; character varying(11),&#8221;strXml&#8221; text,&#8221;intStatus&#8221; integer,&#8221;strUIDOrg&#8221; character varying(11), )It is very important for me that all<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/25b02331ea03bb3408ed04bfa4a885af?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTim<br \/>\nlinux serial asterisk<br \/>\nI&#8217;m working on a patch for chan_dongle for Huawei e177 modems which has one way audio problem.For debugging purpose I decided to write an external test case to read and write audio from and to the modem but I was unable the receive the audio stream in any of the serial files after the modem was mounted. I use minicom to issue the commands, I pick up an incoming call using the relevant AT command but no bytes stream arrives to any file. The only output I receive is from the AT command in \/dev\/tty<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e6e71330f0a50d37ad936ff09b80623e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nVlad Lazarenko<br \/>\nc++ sql postgresql key serial<br \/>\nWhat is the correct syntax to create a integer primary key auto incremental field in postgresql using C++?I started with db-&gt;ExecuteSQL(&#8220;CREATE TABLE mytable (\\&#8221;mytableid\\&#8221; INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,this compiles but the process crashes and no field is created.db-&gt;ExecuteSQL(&#8220;CREATE TABLE mytable (\\&#8221;mytableid\\&#8221; serial PRIMARY KEY NOT NULL,This works and does create the field correctly.Do I need the NOT NULL or is this not necessary with serial? Is this the best syntax and<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/672f146dca4d06407ad3fb7fea6c1241?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\naliz<br \/>\nlinux terminal screen serial embedded<br \/>\nI have built a custom embedded system using debian 6.0.using \/etc\/inittab i have made several (8) processes running on different \/dev\/ttyX terminals, which i can switch between using Alt+FX key combination. the thing is using this setup i need to attach a keyboard\/monitor to device and reboot it, to be able to operate on it, which is so undesirable. i know linux supports terminals through serial port and i have a couple of them on the device, but i need to have all these processes output in a si<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/2d02132b9f29fef6ba8116f898386587?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTiago Queiroz<br \/>\narduino serial<br \/>\nI have a PanStamp (arduino compatible) and everything was working fine until I change the amount of data I&#8217;m sending through serial.send_altitude is called every second using timer interruption (TimerOne library).This is the original function that sends data (and does not hang):void send_altitude() { cli();float_byte altitude; byte buffer[6];\/\/ Do one trash read to avoid fluctuations analogRead(ALT_SENSOR); delay(5); altitude.asFloat = getAltitude(ALT_SENSOR);buffer[0] = 0x05; \/* Size *\/ buffer[<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1d23ac8bea21ef15ac1ec943bc06289f?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMarcel<br \/>\narduino serial linux monitor eclipse<br \/>\nI like to program my Arduino using Eclipse. However, I still need the Arduino IDE to use the Serial port monitor.This is very inconvenient and breaks my work flowI tried to use RXTX but this would cause Eclipse to crash. I also tried to use a workaround using a SSH-Server but I didn&#8217;t succeed.Has anyone managed to monitor an Arduinos output from within Eclipse on a Linux x64 machine (I use Debian Testing), who could give some detailed instructions?Thank you in advance!!!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/22c2a81ffc7aeed2599f9aaa8d95a69d?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTyilo<br \/>\narduino serial<br \/>\nWhen executing the following code on my Arduino Micro, only the first line is printed:void crash(void) {abort(); }void setup(void) {Serial.begin(9600);while(!Serial.available()) {Serial.println(&#8220;Please input something to begin&#8221;);delay(500);}Serial.println(&#8220;First&#8221;); \/\/ Gets printeddelay(500); \/\/ Make sure Arduino is done writing to the serial connectionSerial.println(&#8220;Second&#8221;); \/\/ Doesn&#8217;t get printedcrash(); \/\/ Makes the Arduino device crash }void loop(void) {}I would like to something like this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fb867640ddc6aee363d96530573845b0?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nstefan<br \/>\nbash find cluster comm<br \/>\nI have a script that&#8217;s supposed to get the list of files of two directories, get differences and execute some code for certain files.These are the commands to get the file lists:list_in=$(find input\/ -maxdepth 1 &#8211; type f | sed &#8216;s\/input\\\/\/\/&#8217; | sort -u); list_out=$(find output\/ -maxdepth 1 &#8211; type f | sed &#8216;s\/output\\\/\/\/&#8217; | sort -u);I execute the script in the correct directory, so this shouldn&#8217;t fail. The unprocessed files are determined bylist_todo=$(comm -23 &lt;(echo &#8220;$list_in&#8221;) &lt;(echo &#8220;$list_<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a35d74f4e5c15cd50cb45d3e517e4ca?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKevin<br \/>\njava serial comm<br \/>\nI have a problem with comm ports in JAVA. I&#8217;m using Java version, 1.5 because that version still have access to windows COMM ports (serials).The problem is that the command throws the exception:javax.comm.PortInUseException: Port currently owned by Unknown Windows ApplicationThe thing is that the application opens the comm port for the first time, then I close the comm when the user exits some window. But the user may return to that window, and therefore I try to open again the same port:I close<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Abhilash java spring email javamail I am trying to send email through my outlook.com account (mapped to a specific domain, my email id would be like emailId@mydomain.comI am getting the following exception.2014-03-14 00:27:55,314 [pool-1-thread-1] ERRORorg.springframework.scheduling.support.MethodInvokingRunnable -Invocation of method &#8216;sendMail&#8217; on target class [classcom.sixthsense.lws.scheduler.TestMailSenderJob] failedorg.springframework.mail.MailSendException: Failed messages:com.sun.mail.smtp.SMTPSendFailedException: 501 5.5.4 Frank java spring I have the following [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5689","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5689"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5689\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}