[jira] Created: (DAEMON-122) Procrun prevents proper JVM shutdown
Procrun prevents proper JVM shutdown Key: DAEMON-122 URL: https://issues.apache.org/jira/browse/DAEMON-122 Project: Commons Daemon Issue Type: Bug Affects Versions: 1.0.1 Environment: JRE 1.6.0_11, MS Windows XP Reporter: Trev When my program is stopped by procrun, its log files (created by java.util.logging.FileHandler) are never properly closed. I tried using Runtime.addShutdownHook, but the hook never had a chance to run. It's as if procrun were using Runtime.halt, rather than System.exit, to terminate the JVM. I could invoke System.exit myself, to do a proper shutdown, but... then I would run into [DAEMON-103|http://issues.apache.org/jira/browse/DAEMON-103]. I'm using Procrun version 2.0.4.0 (which is included as tomcat6.exe, in tomcat 6.0.18) with StartMode and StopMode both set to jvm. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (VFS-236) SmbFileObject throws NPE when used without authentication
SmbFileObject throws NPE when used without authentication - Key: VFS-236 URL: https://issues.apache.org/jira/browse/VFS-236 Project: Commons VFS Issue Type: Bug Affects Versions: Nightly Builds Reporter: Matt Casters Fix For: 2.0 If you have a shared folder without authentication, SmbFileObject throws an NPE in method createSmbFile(). Here is what I changed to get it to run: private SmbFile createSmbFile(FileName fileName) throws MalformedURLException, SmbException, FileSystemException { SmbFileName smbFileName = (SmbFileName) fileName; String path = smbFileName.getUriWithoutAuth(); UserAuthenticationData authData = null; SmbFile file; NtlmPasswordAuthentication auth; try { authData = UserAuthenticatorUtils.authenticate(getFileSystem().getFileSystemOptions(), SmbFileProvider.AUTHENTICATOR_TYPES); if (authData!=null) { auth = new NtlmPasswordAuthentication( UserAuthenticatorUtils.toString( UserAuthenticatorUtils.getData( authData, UserAuthenticationData.DOMAIN, UserAuthenticatorUtils.toChar(smbFileName.getDomain(, UserAuthenticatorUtils.toString( UserAuthenticatorUtils.getData( authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(smbFileName.getUserName(, UserAuthenticatorUtils.toString( UserAuthenticatorUtils.getData( authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(smbFileName.getPassword(); file = new SmbFile(path, auth); } else { auth=null; file = new SmbFile(path); } } finally { UserAuthenticatorUtils.cleanup(authData); } if (file.isDirectory() && !file.toString().endsWith("/")) { if (auth!=null) { file = new SmbFile(path + "/", auth); } else { file = new SmbFile(path + "/"); } } return file; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-253) How to get time values (hour, min, sec) using FileFTP.getTimestamp() method
[ https://issues.apache.org/jira/browse/NET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670921#action_12670921 ] Sebb commented on NET-253: -- Unix systems often use two different date formats, one with just the date (including the year) and the other with the time. For files that are more than a year old - as is the case in your example - no times are displayed. Try doing a "dir" of a more recent file and see what that gives. Unless the FTP server returns the infomation, there's nothing that NET can do. > How to get time values (hour, min, sec) using FileFTP.getTimestamp() method > --- > > Key: NET-253 > URL: https://issues.apache.org/jira/browse/NET-253 > Project: Commons Net > Issue Type: Task >Affects Versions: 2.0 > Environment: Windows Vista Business, java version "1.6.0_11" >Reporter: Jignesh Patel > > Hello, > I am using commons-net-2.0 in my application to access FTP server. > My aim is to get value of "last modified date/time" value for any file > present on FTP Server. > The FTP Server resides at different location and I don't have direct access > to it. > Beloew are some lines I can see when I connect to FTP Server using ftp client > software. > 220 X2 WS_FTP Server 5.0.4 (2790816660) > USER > 331 Password required > PASS ** > 230 user logged in > SYST > 215 UNIX > Though it was listed "UNIX", I confirmed with my team that actual operating > system on FTP Server is Windows 2000. > To achieve my aim, I used getTimestamp() method of FileFTP class. > I have used default settings. Even I have not configured FTP server using > FTPClientConfig. > The problem is - the Calendar object returned by invoking getTimestamp() > method only contains correct date (day, month & year) value. It does not > contain time parts (hour, min, sec, etc.). When I tried to print date in > -MM-dd HH:mm:ss format, it printed zeros for HH, mm & ss parts (e.g. > 2007-03-26 00:00:00). Any idea on how to get date value value along with time > parts? Am I missing some other configurations? > Note: If above option fails, I may plan to use getModificationTime() method > of FTPClient class. > Thank you, > Jignesh -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-253) How to get time values (hour, min, sec) using FileFTP.getTimestamp() method
[ https://issues.apache.org/jira/browse/NET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670870#action_12670870 ] Jignesh Patel commented on NET-253: --- Well Sebb, below is output of different commands (ls, ls -l, dir) I have used: ftp> ls 200 command successful 150 Opening ASCII data connection for directory listing 267819657.end 267819657.zip 267819718.end 267819718.zip 331519726.end 331519726.zip 226 transfer complete ftp: 90 bytes received in 0.00Seconds 22.50Kbytes/sec. ftp> ftp> ls -l 200 command successful 150 Opening ASCII data connection for directory listing 267819657.end 267819657.zip 267819718.end 267819718.zip 331519726.end 331519726.zip 226 transfer complete ftp: 90 bytes received in 0.00Seconds 45.00Kbytes/sec. ftp> ftp> dir 200 command successful 150 Opening ASCII data connection for directory listing drwxr-xrwx 2 system System0 Dec 24 2007 . drwxr-xrwx 2 system System0 Dec 24 2007 .. -rwxr-xrwx 1 system System0 Mar 26 2007 267819657.end -rwxr-xrwx 1 system System86900 Mar 26 2007 267819657.zip -rwxr-xrwx 1 system System0 Mar 26 2007 267819718.end -rwxr-xrwx 1 system System69415 Mar 26 2007 267819718.zip -rwxr-xrwx 1 system System0 Mar 26 2007 331519726.end -rwxr-xrwx 1 system System 103561 Mar 26 2007 331519726.zip 226 transfer complete ftp: 545 bytes received in 0.00Seconds 136.25Kbytes/sec. ftp> -- If there is no way to get time details using getTimestamp() method, I will try to use getModificationTime() method of FTPClient class. Thanks anyways. Regards, Jignesh > How to get time values (hour, min, sec) using FileFTP.getTimestamp() method > --- > > Key: NET-253 > URL: https://issues.apache.org/jira/browse/NET-253 > Project: Commons Net > Issue Type: Task >Affects Versions: 2.0 > Environment: Windows Vista Business, java version "1.6.0_11" >Reporter: Jignesh Patel > > Hello, > I am using commons-net-2.0 in my application to access FTP server. > My aim is to get value of "last modified date/time" value for any file > present on FTP Server. > The FTP Server resides at different location and I don't have direct access > to it. > Beloew are some lines I can see when I connect to FTP Server using ftp client > software. > 220 X2 WS_FTP Server 5.0.4 (2790816660) > USER > 331 Password required > PASS ** > 230 user logged in > SYST > 215 UNIX > Though it was listed "UNIX", I confirmed with my team that actual operating > system on FTP Server is Windows 2000. > To achieve my aim, I used getTimestamp() method of FileFTP class. > I have used default settings. Even I have not configured FTP server using > FTPClientConfig. > The problem is - the Calendar object returned by invoking getTimestamp() > method only contains correct date (day, month & year) value. It does not > contain time parts (hour, min, sec, etc.). When I tried to print date in > -MM-dd HH:mm:ss format, it printed zeros for HH, mm & ss parts (e.g. > 2007-03-26 00:00:00). Any idea on how to get date value value along with time > parts? Am I missing some other configurations? > Note: If above option fails, I may plan to use getModificationTime() method > of FTPClient class. > Thank you, > Jignesh -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (NET-173) Duplicate IAC when sending a IAC using TelnetClient.getOutputStream()
[ https://issues.apache.org/jira/browse/NET-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston closed NET-173. Resolution: Fixed > Duplicate IAC when sending a IAC using TelnetClient.getOutputStream() > - > > Key: NET-173 > URL: https://issues.apache.org/jira/browse/NET-173 > Project: Commons Net > Issue Type: Bug >Affects Versions: 1.4 > Environment: Linux >Reporter: Scott Burch >Priority: Blocker > > TelnetOutputStream.java appears to have a bug that if we send a IAC to the > stream returned by TelnetClient.getOutputStream() we get duplicate IAC > commands to the telnet server. > I looked through the code and I think I have found the reason. > Line 82-85 appears to just send two IAC commands. > 82 case TelnetCommand.IAC: > 83 __client._sendByte(TelnetCommand.IAC); > 84 __client._sendByte(TelnetCommand.IAC); > 85 break; > Line 91-95 appears to send the original character (which is a IAC) and a IAC > thus producing two IACs in the stream. > 91 else if (ch == TelnetCommand.IAC) > 92 { > 93 __client._sendByte(ch); > 94 __client._sendByte(TelnetCommand.IAC); > 95 } > 50 public void write(int ch) throws IOException > 51 { > 52 > 53 synchronized (__client) > 54 { > 55 ch &= 0xff; > 56 > 57 if (__client._requestedWont(TelnetOption.BINARY)) > 58 { > 59 if (__lastWasCR) > 60 { > 61 if (__convertCRtoCRLF)this > 62 { > 63 __client._sendByte('\n'); > 64 if (ch == '\n') > 65 { > 66 __lastWasCR = false; > 67 return ; > 68 } > 69 } > 70 else if (ch != '\n') > 71 __client._sendByte('\0'); > 72 } > 73 > 74 __lastWasCR = false; > 75 > 76 switch (ch) > 77 { > 78 case '\r': > 79 __client._sendByte('\r'); > 80 __lastWasCR = true; > 81 break; > 82 case TelnetCommand.IAC: > 83 __client._sendByte(TelnetCommand.IAC); > 84 __client._sendByte(TelnetCommand.IAC); > 85 break; > 86 default: > 87 __client._sendByte(ch); > 88 break; > 89 } > 90 } > 91 else if (ch == TelnetCommand.IAC) > 92 { > 93 __client._sendByte(ch); > 94 __client._sendByte(TelnetCommand.IAC); > 95 } > 96 else > 97 __client._sendByte(ch); > 98 } > 99 } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (NET-232) calling Telnet.disconnect without calling Telnet.connect make use of null pointer
[ https://issues.apache.org/jira/browse/NET-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston closed NET-232. Resolution: Fixed Fix Version/s: 1.5 > calling Telnet.disconnect without calling Telnet.connect make use of null > pointer > -- > > Key: NET-232 > URL: https://issues.apache.org/jira/browse/NET-232 > Project: Commons Net > Issue Type: Bug >Affects Versions: 1.4 >Reporter: Frederic Heem > Fix For: 1.5 > > Attachments: common-net-checkfornull-20080901.patch > > > Calling Telnet.disconnect without calling Telnet.connect make use of null > pointer. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (NET-237) add streaming methods (corresponding to array methods) to NNTPClient
[ https://issues.apache.org/jira/browse/NET-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston updated NET-237: - Priority: Minor (was: Major) > add streaming methods (corresponding to array methods) to NNTPClient > > > Key: NET-237 > URL: https://issues.apache.org/jira/browse/NET-237 > Project: Commons Net > Issue Type: New Feature >Affects Versions: 1.0, 1.1, 1.1.1, 1.2, 1.2.1, 1.2.2, 1.3, 1.4, 2.0 >Reporter: Ken Geis >Priority: Minor > > NNTPClient.listNewNews(..) can use a lot of memory for large groups. I > recommend adding streaming version of the same. > Iterator iterateNewNews(NewGroupsOrNewsQuery query); > One could also add streaming versions of the *Newsgroups methods, but these > are expected to have smaller results than some large newsgroups. > Iterator iterateNewNewsgroups(NewGroupsOrNewsQuery query); > Iterator iterateNewsgroups(); > Iterator iterateNewsgroups(String wildmat); > I'll work on iterateNewNews(..) and submit a patch if it's good. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (NET-241) FTPClient Can't be configured with SYST_NT
[ https://issues.apache.org/jira/browse/NET-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rory Winston closed NET-241. Resolution: Incomplete > FTPClient Can't be configured with SYST_NT > -- > > Key: NET-241 > URL: https://issues.apache.org/jira/browse/NET-241 > Project: Commons Net > Issue Type: Bug >Affects Versions: 2.0 > Environment: Windows, jdk 1.5 or jdk1.6 >Reporter: Eisen Wang > > while coding as below: > FTPClient ftp = new FTPClient(); > int reply; > ftp.connect("10.110.13.18",2001); > ftp.login("user","password"); > // ... // transfer files > ftp.type(FTPClient.ASCII_FILE_TYPE); > FTPFile[] temp = ftp.listFiles(); > System.out.println(temp.length); > for (int i = 0; i < temp.length; i++) > { > System.out.println(temp[i].getName()); > }; //filtered all the files > it would report there's 3 files on the ftp server and there name,But if > coding as below: > FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_NT); > FTPClient ftp = new FTPClient(); > int reply; > ftp.configure(conf); > ftp.connect("10.110.13.18",2001); > ftp.login("user","password"); > // ... // transfer files > ftp.type(FTPClient.ASCII_FILE_TYPE); > FTPFile[] temp = ftp.listFiles(); > System.out.println(temp.length); > for (int i = 0; i < temp.length; i++) > { > System.out.println(temp[i].getName()); > }; //filtered all the files > it would report there's 0 file on the ftp server and raise no error. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-253) How to get time values (hour, min, sec) using FileFTP.getTimestamp() method
[ https://issues.apache.org/jira/browse/NET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670841#action_12670841 ] Sebb commented on NET-253: -- Try "ls -l" and see what you get. > How to get time values (hour, min, sec) using FileFTP.getTimestamp() method > --- > > Key: NET-253 > URL: https://issues.apache.org/jira/browse/NET-253 > Project: Commons Net > Issue Type: Task >Affects Versions: 2.0 > Environment: Windows Vista Business, java version "1.6.0_11" >Reporter: Jignesh Patel > > Hello, > I am using commons-net-2.0 in my application to access FTP server. > My aim is to get value of "last modified date/time" value for any file > present on FTP Server. > The FTP Server resides at different location and I don't have direct access > to it. > Beloew are some lines I can see when I connect to FTP Server using ftp client > software. > 220 X2 WS_FTP Server 5.0.4 (2790816660) > USER > 331 Password required > PASS ** > 230 user logged in > SYST > 215 UNIX > Though it was listed "UNIX", I confirmed with my team that actual operating > system on FTP Server is Windows 2000. > To achieve my aim, I used getTimestamp() method of FileFTP class. > I have used default settings. Even I have not configured FTP server using > FTPClientConfig. > The problem is - the Calendar object returned by invoking getTimestamp() > method only contains correct date (day, month & year) value. It does not > contain time parts (hour, min, sec, etc.). When I tried to print date in > -MM-dd HH:mm:ss format, it printed zeros for HH, mm & ss parts (e.g. > 2007-03-26 00:00:00). Any idea on how to get date value value along with time > parts? Am I missing some other configurations? > Note: If above option fails, I may plan to use getModificationTime() method > of FTPClient class. > Thank you, > Jignesh -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (EMAIL-81) Add getTo and getReplyTo to Email class
[ https://issues.apache.org/jira/browse/EMAIL-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl updated EMAIL-81: --- Affects Version/s: (was: 1.2) 1.1 Fix Version/s: (was: 1.1) 1.2 > Add getTo and getReplyTo to Email class > --- > > Key: EMAIL-81 > URL: https://issues.apache.org/jira/browse/EMAIL-81 > Project: Commons Email > Issue Type: Improvement >Affects Versions: 1.1 >Reporter: Travis Reeder >Assignee: Siegfried Goeschl > Fix For: 1.2 > > Attachments: EMAIL-81-patch-v2.txt, EMAIL-81-patch.txt > > > There is no way to get the "to" collection or the "reply-to" collection that > is set via setTo() and setReplyTo(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (EMAIL-81) Add getTo and getReplyTo to Email class
[ https://issues.apache.org/jira/browse/EMAIL-81?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl updated EMAIL-81: --- Affects Version/s: (was: 1.1) 1.2 > Add getTo and getReplyTo to Email class > --- > > Key: EMAIL-81 > URL: https://issues.apache.org/jira/browse/EMAIL-81 > Project: Commons Email > Issue Type: Improvement >Affects Versions: 1.1 >Reporter: Travis Reeder > Fix For: 1.2 > > Attachments: EMAIL-81-patch-v2.txt, EMAIL-81-patch.txt > > > There is no way to get the "to" collection or the "reply-to" collection that > is set via setTo() and setReplyTo(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (EMAIL-69) HtmlEmail generated email don't display in Macos X Mail.app
[ https://issues.apache.org/jira/browse/EMAIL-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl resolved EMAIL-69. Resolution: Fixed With the help of the commons community we did some field testing to verify that the HTMLEmail is properly created and displayed Got positive feedback for +) Apple Mail 2.1.3 on Mac OS X 10.4 +) Thunderbird 2.0.0.19 on Mac OS X 10.5 +) Thunderbird 2.0.0.19 on Ubuntu 8.10 +) Outlook 2007 on Win XP Pro 64 bit +) Evolution 2.24.2 on Ubuntu 8.10 +) OWA (full on IE 7, cut-down on Firefox) +) GMail +) Yahoo! Mail We have problems with 1.9.9 (KDE 3.5.9) but this could be a general issue with KMail > HtmlEmail generated email don't display in Macos X Mail.app > --- > > Key: EMAIL-69 > URL: https://issues.apache.org/jira/browse/EMAIL-69 > Project: Commons Email > Issue Type: Bug >Affects Versions: 1.1 > Environment: Macos X 10.4 with Mail.app >Reporter: Numa Schmeder >Assignee: Siegfried Goeschl > Fix For: 1.2 > > Attachments: EMAIL-69-fix.patch, EMAIL-69-test.patch, mail.app.patch > > > Hi, > The mail generated by HtmlEmail seems boggus in its mime layout. Mail.app > doesn't recognize and display the html part when you send a mail with a Html > and Text part as alternative. > For example this email will only display the text part and not the html part > on Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > htmlEmail.setTextMsg(textMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > > But this email will disply correctly the html in Mail.app: > HtmlEmail htmlEmail = new HtmlEmail(); > htmlEmail.setHtmlMsg(htmlMessage); > email.setFrom(from,fromName); > email.addTo(to, toName); > email.setSubject(subject); > email.send(); > The bug might be I think in the mime layout, I looked at the raw email > source and the mime layout is as follow: > MIME-Version: 1.0 > Content-Type: multipart/related; > boundary="=_Part_0_11727281.1194085710604" > --=_Part_0_11727281.1194085710604 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Ch=C3=A8re Mme Dupont ,=20 > Text Blah blah > --=_Part_0_11727281.1194085710604 > Content-Type: text/html; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > http://www.= > w3.org/TR/html4/loose.dtd"> > > > > = > =20 > =09 My Email > > > > Ch=C3=A8re Mme Dupont ,=20 > > Blah Blah html content > > > --=_Part_0_11727281.1194085710604-- > This is wrong, I am not an expert but shouldn't it be multipart/alternative ? > In all other html email I have checked the mime layout uses > multipart/alternative. > I hop there is a quick fix for this. > Thank you for your help. > Numa -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (EMAIL-80) Message incorrectly displayed on outlook and Outlook Web access
[ https://issues.apache.org/jira/browse/EMAIL-80?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl resolved EMAIL-80. Resolution: Fixed With the help of the commons community we did some field testing to verify that the HTMLEmail is properly created and displayed Got positive feedback for +) Apple Mail 2.1.3 on Mac OS X 10.4 +) Thunderbird 2.0.0.19 on Mac OS X 10.5 +) Thunderbird 2.0.0.19 on Ubuntu 8.10 +) Outlook 2007 on Win XP Pro 64 bit +) Evolution 2.24.2 on Ubuntu 8.10 +) OWA (full on IE 7, cut-down on Firefox) +) GMail +) Yahoo! Mail We have problems with 1.9.9 (KDE 3.5.9) but this could be a general issue with KMail > Message incorrectly displayed on outlook and Outlook Web access > --- > > Key: EMAIL-80 > URL: https://issues.apache.org/jira/browse/EMAIL-80 > Project: Commons Email > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Etienne Jouvin >Assignee: Siegfried Goeschl >Priority: Minor > Fix For: 1.2 > > > Hello. > I try to write HTML Email with version 1.1 and 1.0. > With version 1.1, I found that the email was not correctly display when there > is no image embed into the mail content. Outlook web access only display the > text message and the HTML content is attached as an attachment. > But, when there is at least one image, the message is corerctly displayed. > This does not happends with version 1.0. > Here is the source code used: > HtmlEmail email = new HtmlEmail(); > email.setHostName("192.32.16.76"); > email.setFrom("u...@domain.com"); > email.addTo("us...@domain.com"); > String s_RessourceName = "support.gif"; > URL url = TestLoader.class.getResource(s_RessourceName); > StringBuffer sb_MsgContent = new StringBuffer(); > sb_MsgContent.append("mon message pour voir ma classe > sans image"); > sb_MsgContent.append(""); > email.setHtmlMsg(sb_MsgContent.toString()); > email.setTextMsg("Your email client does not support HTML messages"); > email.send(); > And with image > HtmlEmail email = new HtmlEmail(); > email.setHostName("192.32.16.76"); > email.setFrom("u...@domain.com"); > email.addTo("us...@domain.com"); > String s_RessourceName = "support.gif"; > URL url = TestLoader.class.getResource(s_RessourceName); > String s_RessourceId = email.embed(url, "Support logo"); > StringBuffer sb_MsgContent = new StringBuffer(); > sb_MsgContent.append("mon message pour voir ma classe > sans image"); > sb_MsgContent.append(" src=\"cid:").append(s_RessourceId).append("\">"); > sb_MsgContent.append(""); > email.setHtmlMsg(sb_MsgContent.toString()); > email.setTextMsg("Your email client does not support HTML messages"); > email.send(); > Regards > Etienne Jouvin -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (EMAIL-77) HTML Email with attachment is broken on some mail clients (Thunderbird)
[ https://issues.apache.org/jira/browse/EMAIL-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siegfried Goeschl resolved EMAIL-77. Resolution: Fixed With the help of the commons community we did some field testing to verify that the HTMLEmail is properly created and displayed Got positive feedback for +) Apple Mail 2.1.3 on Mac OS X 10.4 +) Thunderbird 2.0.0.19 on Mac OS X 10.5 +) Thunderbird 2.0.0.19 on Ubuntu 8.10 +) Outlook 2007 on Win XP Pro 64 bit +) Evolution 2.24.2 on Ubuntu 8.10 +) OWA (full on IE 7, cut-down on Firefox) +) GMail +) Yahoo! Mail We have problems with 1.9.9 (KDE 3.5.9) but this could be a general issue with KMail > HTML Email with attachment is broken on some mail clients (Thunderbird) > --- > > Key: EMAIL-77 > URL: https://issues.apache.org/jira/browse/EMAIL-77 > Project: Commons Email > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Siegfried Goeschl >Assignee: Siegfried Goeschl > Fix For: 1.2 > > Attachments: broken.eml, broken.png, good.eml > > > An HTML email created with attachments is not properly displayed on > Thunderbird 2.0.0.12 but works with Outlook -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (DBUTILS-48) Maintaining a parallel Java 1.5 version of DButils
[ https://issues.apache.org/jira/browse/DBUTILS-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670809#action_12670809 ] dfabulich edited comment on DBUTILS-48 at 2/5/09 8:30 AM: - Here's a patch to update DbUtils for 1.5. It's backwards-compatible with the old API; in fact, most of my changes are type-erased at compile time. The biggest change was to change the order of the QueryRunner.query method signatures (var-args have to go at the end). The old functions are left in, but deprecated. I also added a helper static method ResultSetIterator.iterable, which returns an Iterable, for use in for-each loops. You'd use it like this: {code} for (Object[] row : ResultSetIterator.iterable(resultSet)) { // do stuff } {code} was (Author: dfabulich): Here's a patch to update DbUtils for 1.5. It's backwards-compatible with the old API; in fact, most of my changes are type-erased at compile time. The biggest change was to change the order of the QueryRunner.query method signatures (var-args have to go at the end). The old functions are left in, but deprecated. I also added a helper static method ResultSetIterator.iterable, which returns an Iterable, for use in for-each loops. You'd use it like this: for (Object[] row : ResultSetIterator.iterable(resultSet) { // do stuff } > Maintaining a parallel Java 1.5 version of DButils > -- > > Key: DBUTILS-48 > URL: https://issues.apache.org/jira/browse/DBUTILS-48 > Project: Commons DbUtils > Issue Type: New Feature >Reporter: Olivier Grégoire >Priority: Minor > Fix For: 1.2 > > Attachments: generics.patch > > > Well, DButils was a great step forward when managing a database. But Java 5 > came and added a lot of new features to the language, including generics, > which I think is easy to put in place. > The base change of all this is changing the signature of ResultSetHandler: > public interface ResultSetHandler { > public T handle(ResultSet rs) throws SQLException; > } > With this code, we can easily provide directly from the QueryRunner a > specific object without having to cast it. > Furthermore, we can also make the queries much more efficient, and declare > only 2 method instead of three as it is currently the case: > public T query(String sql, ResultSetHandler handler, Object... > params) throws SQLException { > Connection connection = this.prepareConnection(); > try { > return this.query(connection, sql, handler, params); > } finally { > close(connection); > } > } > public T query(Connection connection, String sql, > ResultSetHandler handler, Object... params) throws SQLException { > PreparedStatement statement = null; > ResultSet resultSet = null; > try { > statement = this.prepareStatement(connection, sql); > this.fillStatement(statement, params); > resultSet = this.wrap(statement.executeQuery()); > return handler.handle(resultSet); > } catch (SQLException e) { > throw this.nestException(e, sql, params); // > nestException creates an exception to be thrown here, instead of rethrow(e, > sql, params); > } finally { > try { > close(resultSet); > } finally { > close(statement); > } > } > } > I don't know for you, but I find that code much more readable and > maintainable. In fact, I already did this implementation and use it in prod > without any issue, since it is only basic language adaptation. > And using it is also very easy: > Book book = queryRunner.query("SELECT * FROM book WHERE title = ? AND author > = ?", new BeanHandler(Book.class), title, author); > instead of > Book book = (Book)queryRunner.query("SELECT * FROM book WHERE title = ? AND > author = ?", new BeanHandler(Book.class), new Object[]{title, author}); > However, I wrote an original time estimation of 1 day, because all classes > have to be adapted, especially those included in > org.apache.common.dbutils.handlers. > As I estimate, it is minor, it is just a request in order to have more > beautiful code, for a downside of providing a Java 1.5 compatible version of > DBUtils. Maintaining this should be very rough as well, since DBUtils is not > really big (but it's amazing how so little code can provide so much code > improvements!) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-193) Broken input and output streams
[ https://issues.apache.org/jira/browse/IO-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated IO-193: - Attachment: IO-193.patch Proposed patch. > Broken input and output streams > --- > > Key: IO-193 > URL: https://issues.apache.org/jira/browse/IO-193 > Project: Commons IO > Issue Type: New Feature > Components: Streams/Writers >Reporter: Jukka Zitting >Priority: Minor > Fix For: 1.5 > > Attachments: IO-193.patch > > > When testing error handling in code that uses streams one needs a way to > simulate an IOException being thrown by a stream. Typically this means using > a custom stream class that throws the desired exception. To avoid having to > implement such custom classes over and over again for multiple projects, I'd > like to introduce such classes in Commons IO. > The proposed BrokenInputStream and BrokenOutputStream always throw a given > IOException from all InputStream and OutputStream methods that declare such > exceptions. > For example, the following fictional test code: > {code} > Result result = processStream(new InputStream() { > public int read() throws IOException { > throw new IOException("test"); > } > }); > assertEquals(PROCESSING_FAILED, result); > {code} > could be replaced with: > {code} > Result result = processStream(new BrokenInputStream()); > assertEquals(PROCESSING_FAILED, result); > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (IO-193) Broken input and output streams
Broken input and output streams --- Key: IO-193 URL: https://issues.apache.org/jira/browse/IO-193 Project: Commons IO Issue Type: New Feature Components: Streams/Writers Reporter: Jukka Zitting Priority: Minor Fix For: 1.5 When testing error handling in code that uses streams one needs a way to simulate an IOException being thrown by a stream. Typically this means using a custom stream class that throws the desired exception. To avoid having to implement such custom classes over and over again for multiple projects, I'd like to introduce such classes in Commons IO. The proposed BrokenInputStream and BrokenOutputStream always throw a given IOException from all InputStream and OutputStream methods that declare such exceptions. For example, the following fictional test code: {code} Result result = processStream(new InputStream() { public int read() throws IOException { throw new IOException("test"); } }); assertEquals(PROCESSING_FAILED, result); {code} could be replaced with: {code} Result result = processStream(new BrokenInputStream()); assertEquals(PROCESSING_FAILED, result); {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (DBUTILS-29) [dbutils] Support bean property to SQL IN parameter mapping
[ https://issues.apache.org/jira/browse/DBUTILS-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670814#action_12670814 ] Dan Fabulich commented on DBUTILS-29: - DBUTILS-47 suggests a nice implementation for this using a StatementFiller interface. > [dbutils] Support bean property to SQL IN parameter mapping > --- > > Key: DBUTILS-29 > URL: https://issues.apache.org/jira/browse/DBUTILS-29 > Project: Commons DbUtils > Issue Type: Improvement >Affects Versions: 1.0 > Environment: Operating System: other > Platform: Other >Reporter: David Graham >Priority: Minor > Fix For: 1.2 > > > This commons-dev message brings up interesting points: > http://www.mail-archive.com/commons-...@jakarta.apache.org/msg36011.html > Providing a way to map bean properties to SQL IN parameters would round out > the > bean functionality. We already have ResultSet columns being transferred to > bean > properties; why not transfer the other way as well? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (DBUTILS-48) Maintaining a parallel Java 1.5 version of DButils
[ https://issues.apache.org/jira/browse/DBUTILS-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dan Fabulich updated DBUTILS-48: Attachment: generics.patch Here's a patch to update DbUtils for 1.5. It's backwards-compatible with the old API; in fact, most of my changes are type-erased at compile time. The biggest change was to change the order of the QueryRunner.query method signatures (var-args have to go at the end). The old functions are left in, but deprecated. I also added a helper static method ResultSetIterator.iterable, which returns an Iterable, for use in for-each loops. You'd use it like this: for (Object[] row : ResultSetIterator.iterable(resultSet) { // do stuff } > Maintaining a parallel Java 1.5 version of DButils > -- > > Key: DBUTILS-48 > URL: https://issues.apache.org/jira/browse/DBUTILS-48 > Project: Commons DbUtils > Issue Type: New Feature >Reporter: Olivier Grégoire >Priority: Minor > Fix For: 1.2 > > Attachments: generics.patch > > > Well, DButils was a great step forward when managing a database. But Java 5 > came and added a lot of new features to the language, including generics, > which I think is easy to put in place. > The base change of all this is changing the signature of ResultSetHandler: > public interface ResultSetHandler { > public T handle(ResultSet rs) throws SQLException; > } > With this code, we can easily provide directly from the QueryRunner a > specific object without having to cast it. > Furthermore, we can also make the queries much more efficient, and declare > only 2 method instead of three as it is currently the case: > public T query(String sql, ResultSetHandler handler, Object... > params) throws SQLException { > Connection connection = this.prepareConnection(); > try { > return this.query(connection, sql, handler, params); > } finally { > close(connection); > } > } > public T query(Connection connection, String sql, > ResultSetHandler handler, Object... params) throws SQLException { > PreparedStatement statement = null; > ResultSet resultSet = null; > try { > statement = this.prepareStatement(connection, sql); > this.fillStatement(statement, params); > resultSet = this.wrap(statement.executeQuery()); > return handler.handle(resultSet); > } catch (SQLException e) { > throw this.nestException(e, sql, params); // > nestException creates an exception to be thrown here, instead of rethrow(e, > sql, params); > } finally { > try { > close(resultSet); > } finally { > close(statement); > } > } > } > I don't know for you, but I find that code much more readable and > maintainable. In fact, I already did this implementation and use it in prod > without any issue, since it is only basic language adaptation. > And using it is also very easy: > Book book = queryRunner.query("SELECT * FROM book WHERE title = ? AND author > = ?", new BeanHandler(Book.class), title, author); > instead of > Book book = (Book)queryRunner.query("SELECT * FROM book WHERE title = ? AND > author = ?", new BeanHandler(Book.class), new Object[]{title, author}); > However, I wrote an original time estimation of 1 day, because all classes > have to be adapted, especially those included in > org.apache.common.dbutils.handlers. > As I estimate, it is minor, it is just a request in order to have more > beautiful code, for a downside of providing a Java 1.5 compatible version of > DBUtils. Maintaining this should be very rough as well, since DBUtils is not > really big (but it's amazing how so little code can provide so much code > improvements!) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SANDBOX-246) Findbugs reports
[ https://issues.apache.org/jira/browse/SANDBOX-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670744#action_12670744 ] Stefan Bodewig commented on SANDBOX-246: re-ran findbugs since some of the issues have been outdated. In addition: ZipArchiveEntry clone may return null (this class doesn't exist in Ant) TarInputStream and two methods in ZipFile ignore the result of InputStream.skip() ArchiveStreamFactory createArchiveInputStream ignores result of InputStream read (not in Ant) CpioArchiveEntry.setMode "forgets" to throw IllegalArgumentException (not in Ant) redudant null check in CpioArchiveOutputStream.closeEntry (not in Ant) JarArchiveEntry certificates and manifestattributes are never assigned to (not in Ant) silly selfassignment of numToWrite in TarOutputStream write JarArchivEntry returns pointer to private array (not in Ant) as does UnrecognizedExtraField some static byte[] in ZipOutputStream could be abused by subclasses, not fixed in Ant because of backwards compatibility issues. Not sure whether it should be fixed in compress, will discuss on list. CpioArchiveOutputStream synchronization of crc is inconsistent (not in Ant) dead store to c in BZip2CompressorOutputStream med3 oddness-check in BZip2CompressorOutputStream sendMTFValues may fail for negative numbers The problems that have also been in Ant's codebase have been fixed there in svn revision 741089 and merged over to compress in svn revision 741092. the additional problems in cpio, JarArchive and ArchiveStreamFactory have been addressed in svn revision 741095. will close this, once we know what to do with the remaining issues. > Findbugs reports > > > Key: SANDBOX-246 > URL: https://issues.apache.org/jira/browse/SANDBOX-246 > Project: Commons Sandbox > Issue Type: Bug > Components: Compress >Reporter: Sebb >Assignee: Stefan Bodewig > > TarEntry defines equals(TarEntry) method which does not override > Object.equals() - is this intended? > If so, maybe the method should be called something different such as isSame() > to avoid confusion. > BZip2Compressor and ZipArchive return a pointer to a private byte array, thus > allowing external code to modfy the contents of the final array. > They should return a copy. > BZip2OutputStream line 1302: m_block[ m_zptr[ ( lo + hi ) >> 1 ] + d + 1 ] > ); > Findbugs says: > {quote} > The code computes the average of two integers using either division or signed > right shift, and then uses the result as the index of an array. If the values > being averaged are very large, this can overflow (resulting in the > computation of a negative average). Assuming that the result is intended to > be nonnegative, you can use an unsigned right shift instead. In other words, > rather that using (low+high)/2, use (low+high) >>> 1 > {quote} > TarArchive line 74 may fail to close zInputStream > The classes ZipShort, ZipLong and AsiExtraField implement Cloneable but do > not define or use the clone method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SANDBOX-277) [javaflow] Uninitialized local variable related bug
[ https://issues.apache.org/jira/browse/SANDBOX-277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670731#action_12670731 ] Fernando Petrola commented on SANDBOX-277: -- Debugging ContinuationMethodAdapter class I've seen that there are many lines like this: mv.visitTypeInsn(CHECKCAST, value.getType().getInternalName()); Those lines are trying to cast the value popped from stack to the internal value name, but in case of null values there is no type at least extracted from value.getType(). Is there a way to know the type of certain local variable at that point? > [javaflow] Uninitialized local variable related bug > --- > > Key: SANDBOX-277 > URL: https://issues.apache.org/jira/browse/SANDBOX-277 > Project: Commons Sandbox > Issue Type: Bug > Components: Javaflow >Reporter: Fernando Petrola >Assignee: Torsten Curdt >Priority: Critical > > Executing this test class: > > package test; > import java.net.URL; > import org.apache.commons.javaflow.Continuation; > import org.apache.commons.javaflow.ContinuationClassLoader; > public class TestNullBug > { > public static class Test implements Runnable > { > public class NullLocalVariable > { > public void method1() > { > Integer result= null; > if (result != 0) > result= 1; > } > } > public void run() > { > NullLocalVariable bug1= new NullLocalVariable(); > } > } > public static void main(String[] args) throws Exception > { > ContinuationClassLoader classLoader= new ContinuationClassLoader(new > URL[] {}, TestNullBug.Test.class.getClassLoader()); > > classLoader.addLoaderPackageRoot(TestNullBug.Test.class.getPackage().getName()); > Runnable test= (Runnable) > classLoader.loadClass(TestNullBug.Test.class.getName()).newInstance(); > Continuation.startWith(test); > } > } > > I get the following stacktrace: > Exception in thread "main" java.lang.NoClassDefFoundError: null > at test.TestNullBug$Test.run(TestNullBug.java:23) > at > org.apache.commons.javaflow.bytecode.StackRecorder.execute(StackRecorder.java:104) > at > org.apache.commons.javaflow.Continuation.continueWith(Continuation.java:182) > at > org.apache.commons.javaflow.Continuation.startWith(Continuation.java:136) > at > org.apache.commons.javaflow.Continuation.startWith(Continuation.java:107) > at test.TestNullBug.main(TestNullBug.java:32) > Caused by: java.lang.ClassNotFoundException: null > at > org.apache.commons.javaflow.ContinuationClassLoader.findClass(ContinuationClassLoader.java:419) > at > org.apache.commons.javaflow.ContinuationClassLoader.loadClass(ContinuationClassLoader.java:306) > at java.lang.ClassLoader.loadClass(ClassLoader.java:268) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336) > ... 6 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-192) Tagged input and output streams
[ https://issues.apache.org/jira/browse/IO-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jukka Zitting updated IO-192: - Attachment: IO-192.patch This came up on the Tika mailing list, so I'm attaching the current state of the patch I have. It still needs tests and more javadocs, but the basic functionality should already be in place. > Tagged input and output streams > --- > > Key: IO-192 > URL: https://issues.apache.org/jira/browse/IO-192 > Project: Commons IO > Issue Type: New Feature > Components: Streams/Writers >Reporter: Jukka Zitting >Priority: Minor > Attachments: IO-192.patch > > > I'd like to introduce two new proxy streams, TaggedInputStream and > TaggedOutputStream, that tag all exceptions thrown by the proxied streams. > The goal is to make it easier to detect the source of an IOException when > you're dealing with multiple different streams. For example: > {code} > InputStream input = ...; > OutputStream output = ...; > TaggedOutputStream proxy = new TaggedOutputStream(output); > try { > IOUtils.copy(input, proxy); > } catch (IOException e) { > if (proxy.isTagged(e)) { > // Could not write to the output stream > // Perhaps we can handle that error somehow (retry, cancel?) > e.initCause(); // gives the original exception from the proxied stream > } else { > // Could not read from the input stream, nothing we can do > throw e; > } > } > {code} > I'm working on a patch to implement such a feature. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (VFS-235) DelegateFile objects are not refreshed properly
DelegateFile objects are not refreshed properly --- Key: VFS-235 URL: https://issues.apache.org/jira/browse/VFS-235 Project: Commons VFS Issue Type: Bug Affects Versions: 1.0 Reporter: Guillaume Nodet WHen using a virtual file system, this fs will create DelegateFile objects. When asked for refreshing its data (for example when the cache strategy is set to "on resolve"), the associated file object is not refreshed, which means the data may be out dated. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.