You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Denis Robert (JIRA)" <ji...@apache.org> on 2011/09/22 14:19:25 UTC

[jira] [Created] (CAMEL-4478) Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.

Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.
-------------------------------------------------------------------------------------------------------------------------------

                 Key: CAMEL-4478
                 URL: https://issues.apache.org/jira/browse/CAMEL-4478
             Project: Camel
          Issue Type: Bug
    Affects Versions: 2.8.1
         Environment: Windows 7 64-bit, jdk 1.6.0_20
            Reporter: Denis Robert


In org.apache.camel.component.printer.PrinterProducer, the line:

setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());

reconstructs a UNC path which is expected to match the name of a PrintService on the system. For local printers on Windows, the name of the PrintService is simply the name of the printer without the host and any backslashes, so the PrinterProducer is never able to find them.

So when config.getHostname() is "localhost", at least on Windows, the line should be simply:

setPrinter(config.getPrintername())

so that we'd have code like:

if ("localhost".equalsIgnoreCase(config.getHostname())) {
  setPrinter(config.getPrintername());
} else {
  setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());
}

This can only work if issue CAMEL-4477 about the error in parseURI() in PrinterConfiguration is also fixed.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-4478) Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-4478:
-------------------------------

    Component/s: camel-printer

> Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4478
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4478
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-printer
>    Affects Versions: 2.8.1
>         Environment: Windows 7 64-bit, jdk 1.6.0_20
>            Reporter: Denis Robert
>
> In org.apache.camel.component.printer.PrinterProducer, the line:
> setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());
> reconstructs a UNC path which is expected to match the name of a PrintService on the system. For local printers on Windows, the name of the PrintService is simply the name of the printer without the host and any backslashes, so the PrinterProducer is never able to find them.
> So when config.getHostname() is "localhost", at least on Windows, the line should be simply:
> setPrinter(config.getPrintername())
> so that we'd have code like:
> if ("localhost".equalsIgnoreCase(config.getHostname())) {
>   setPrinter(config.getPrintername());
> } else {
>   setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());
> }
> This can only work if issue CAMEL-4477 about the error in parseURI() in PrinterConfiguration is also fixed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4478) Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4478.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0
                   2.8.2
                   2.7.4
         Assignee: Claus Ibsen

Thanks for reporting.
                
> Because local PrintService objects on Windows have a name which is not their UNC path, the PrinterProducer can never find them.
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4478
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4478
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-printer
>    Affects Versions: 2.8.1
>         Environment: Windows 7 64-bit, jdk 1.6.0_20
>            Reporter: Denis Robert
>            Assignee: Claus Ibsen
>             Fix For: 2.7.4, 2.8.2, 2.9.0
>
>
> In org.apache.camel.component.printer.PrinterProducer, the line:
> setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());
> reconstructs a UNC path which is expected to match the name of a PrintService on the system. For local printers on Windows, the name of the PrintService is simply the name of the printer without the host and any backslashes, so the PrinterProducer is never able to find them.
> So when config.getHostname() is "localhost", at least on Windows, the line should be simply:
> setPrinter(config.getPrintername())
> so that we'd have code like:
> if ("localhost".equalsIgnoreCase(config.getHostname())) {
>   setPrinter(config.getPrintername());
> } else {
>   setPrinter("\\\\" + config.getHostname() + "\\" + config.getPrintername());
> }
> This can only work if issue CAMEL-4477 about the error in parseURI() in PrinterConfiguration is also fixed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira