Re: EOS/EOL date for Apache WS Commons Util Plug-in​

2022-07-28 Thread Bernd Eckenfels
Hello,

You are mailing the wrong Apache project (none of those are Commons). Also, 
none of the ASF project have commercial support and you normally find the 
statements on updates and recent ess on each projects homepage.

BTW maybe coordinate such questions with the Ericsson Open Source Office.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: Abhishek Kant Rattan 
Gesendet: Thursday, July 28, 2022 8:34:44 AM
An: user@commons.apache.org 
Betreff: EOS/EOL date for Apache WS Commons Util Plug-in​

Hi,

Could you please provide me End of life/End of support detail for below:


  1.  Apache WS Commons Util Plug-in​ - Version 1.0.0
  2.  ​Apache XML-RPC 1.5.3
  3.  Apache thrift  ​0.16.0
  4.  Apache Commons Net​  3.8.0
  5.  Apache Avro  1.11.0



Regards,
Abhishek


Re: [codec]

2022-07-19 Thread Bernd Eckenfels
The minimum version required is java 7, I don’t see open issues with later 
versions. If you encounter problems, feel free to report them.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Abhishek Kant Rattan 
Gesendet: Tuesday, July 19, 2022 4:53:27 PM
An: user@commons.apache.org 
Betreff: [codec]

Hello team,

Version 1.15 is supported with Java 11 or Java 17?


Thanks & Regards,
[http://mediabank.ericsson.net/internet-media/Email_logo_Ericsson.png]

Abhishek Kant Rattan
Senior Engineer
BDGS SA BSS PDU BSS PDG EC GG Support
Mobile: +91 8586980609
abhishek.kant.rat...@ericsson.com

ericsson.com

[http://mediabank.ericsson.net/internet-media/Email_Message.gif]

Our commitment to Technology for 
Good 
and Diversity and 
Inclusion contributes 
to positive change.
Follow us on: Facebook 
LinkedIn 
Twitter

This communication is confidential. Our email terms: 
www.ericsson.com/en/legal/privacy/email-disclaimer



Re: [codec]

2022-07-19 Thread Bernd Eckenfels
Hello,

Apache a commons are a number of community supported open source projects, 
there is no guaranteed support provided. The good thing is you can always join 
the project and help.

Having said that, 1.15 is the current released version, so if a new version is 
released you only need to upgrade to get the fixes and new features.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Abhishek Kant Rattan 
Gesendet: Dienstag, Juli 19, 2022 5:51 PM
An: user@commons.apache.org 
Betreff: [codec]

Hello Team,

We want to know the End of support and End of life for apache Common codec 
version  1.15.


Thanks & Regards,
[http://mediabank.ericsson.net/internet-media/Email_logo_Ericsson.png]

Abhishek Kant Rattan
Senior Engineer
BDGS SA BSS PDU BSS PDG EC GG Support
Mobile: +91 8586980609
abhishek.kant.rat...@ericsson.com

ericsson.com

[http://mediabank.ericsson.net/internet-media/Email_Message.gif]

Our commitment to Technology for 
Good 
and Diversity and 
Inclusion contributes 
to positive change.
Follow us on: Facebook 
LinkedIn 
Twitter

This communication is confidential. Our email terms: 
www.ericsson.com/en/legal/privacy/email-disclaimer



Re: DBCP Database Connection Pools without transactionnal NO autocommit

2022-06-06 Thread Bernd Eckenfels
Just a BTW I think the two statements are not from you/DBCP but the driver 
emits them when you use the setAutocommit(). In some cases drivers remember the 
state and don’t emit something, in most cases they do. So a config option to 
not set/reset that state on checking/checkout - if you need to minimize the 
number of roundtrips - would be good for DBCP.

This would be setting defaultAutocommit to thr value you like and setting 
autocommitOnReturn to false to avoid resetting it. And your code should not 
call the setter, at least not without checking if it’s needed (it will depend 
on the driver if this causes a select).

I think Auto commit would be great if your log statements are a single atomic 
unit as it greatly reduces roundtrips and transaction time - if you still need 
to make multiple inserts in different tables perhaps consider calling a stored 
procedure instead?

 (And also some batching, but that can become tricky if you keep the 
connections for extended transactions). I am not sure how good the dbappender 
from log4j is in this regard.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Gary Gregory 
Gesendet: Monday, June 6, 2022 7:22:26 PM
An: Commons Users List 
Betreff: Re: DBCP Database Connection Pools without transactionnal NO autocommit

Any news?

Gary

On Thu, Jun 2, 2022 at 12:32 PM Gary Gregory  wrote:
>
> BTW, if that still does not work for you, make sure your are using the latest 
> version of DBCP and of your JDBC Driver. Please report which versions you are 
> using. If you are still stuck, the only way we can realistically help you 
> here is if you provide a PR with a reproducible test case using the H2 in 
> memory database, see the existing tests for inspiration. If you cannot 
> reproduce the issue, then this might be specific to your database of JDBC 
> driver, in which case, we would still need a standalone application that 
> reproduces the issue.
>
> Gary
>
> On Thu, Jun 2, 2022, 08:22 Gary Gregory  wrote:
>>
>> It might be simpler to avoid custom Java code. Is there a reason you are not 
>> using the log4j2-jdbc-dbcp2 module?
>>
>> For example 
>> https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-jdbc-dbcp2/src/test/resources/log4j2-jdbc-dbcp2.xml
>>
>> Gary
>>
>> On Thu, Jun 2, 2022, 08:13 Sébastien Jachym 
>>  wrote:
>>>
>>> I'm logging with log4j2
>>>
>>> log4j2.xml :
>>> 
>>> 
>>> 
>>> >> method="getConnection" />
>>> ...
>>> 
>>> 
>>>
>>> ConnectionFactory class :
>>> public static Connection getConnection() throws SQLException {
>>> dataSource = new org.apache.commons.dbcp2.BasicDataSource();
>>> dataSource.setUp ( url, user, pass, driver )
>>>
>>> dataSource.setDefaultAutoCommit(false);
>>> dataSource.setAutoCommitOnReturn(false);
>>> dataSource.setRollbackOnReturn(false);
>>> dataSource.setValidationQuery("SELECT 1");
>>>
>>> //Connection connection = dataSource.getConnection();
>>> //connection.setAutoCommit(true); // no change, first is SET
>>> autocommit=(0|1) and log4j2 next is SET autocommit=0
>>> //return connection;
>>> return dataSource.getConnection();
>>>
>>> In code call :
>>> org.apache.logging.log4j.Logger.trace("hello")
>>>
>>> Finally calling logger,
>>> use JDBC Appender
>>> and get a connection from the BasicDataSource pool.
>>> And continu outside my code with the unwanted transactional statement.
>>> For writing log in my database.
>>>
>>> -Message d'origine-
>>> De : Gary Gregory 
>>> Envoyé : jeudi 2 juin 2022 11:23
>>> À : Commons Users List 
>>> Objet : Re: DBCP Database Connection Pools without transactionnal NO
>>> autocommit
>>>
>>> Something is not clear to me: are you in control of calling JDBC or are you
>>> using Log4j's JDBC Appender or something else? You description is not
>>> detailed enough for me to understand who does what.
>>>
>>> Gary
>>>
>>> On Wed, Jun 1, 2022, 19:49 Sébastien Jachym <
>>> sebastien.jac...@agri-commerce.fr> wrote:
>>>
>>> > Hello,
>>> > Thank you Gary for you reply, but it doesn’t work with configuring
>>> > BasicDataSource with :
>>> >dataSource.setDefaultAutoCommit(false);
>>> >dataSource.setAutoCommitOnReturn(false);
>>> >dataSource.setRollbackOnReturn(false);
>>> >
>>> > There are changes, but always transactional with "SET autocommit" :
>>> > SELECT @@session.transaction_isolation SELECT 1 -- ValidationQuery
>>> > dans ConnectionFactory SET autocommit=0 SET SQL_SELECT_LIMIT=1 select
>>> >
>>> > date,logger,level,message,exception,pid,idUtilisateur,version,ip,marke
>>> > rSimpleName,sqlLastInsertId,sqlTimeMillis
>>> > from log4j2 where 1=0
>>> > SET SQL_SELECT_LIMIT=DEFAULT
>>> > insert into log4j2
>>> >
>>> > (date,logger,level,message,exception,pid,idUtilisateur,version,ip,mark
>>> > erSimpleName,sqlLastInsertId,sqlTimeMillis)
>>> > values (... the values ...)
>>> > 

Re: [vfs] About hadoop-hdfs-client dependency

2022-05-16 Thread Bernd Eckenfels
Yes, those dependencies can be left out. The optional=True seems to be missing 
for one of the libs. If you get a new manager it will not load the provide if 
it can’t load the dependencies.

If you want you could contribute a jira ticket and a patch. Thanks for 
notifying us.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Xavier Courangon 
Gesendet: Monday, May 16, 2022 10:35:18 AM
An: user@commons.apache.org 
Betreff: [vfs] About hadoop-hdfs-client dependency

Hello,

We are using commons-vfs2 to create files in memory.
However we are wondering why hadoop-hdfs-client dependency is not optional ?
We don't really need support for HDFS in our case.
Moreover it brings these additional transitive dependencies (vfs 2.9.0):

   - org.apache.hadoop : hadoop-hdfs-client : 3.3.1
  - com.squareup.okhttp : okhttp : 2.7.5
 - com.squareup.okio : okio : 1.6.0


Can we explicitly exclude  hadoop-hdfs-client dependency without fear of
side effects ?
If so, shouldn't this dependency be optional ?

Thanks

Xavier C


Re: Plan for Java 17 on Apache Components

2022-03-29 Thread Bernd Eckenfels
Hello Shivaraj,

Good to hear that you trust the open source from Apache Commons.

Regarding your question I would ask you to do the testing for yourself. The 
following should help you with it:

Each project publishes a documentation where the minimum versions are 
published, not all publish test results for later Java versions, but it should 
usually work. The plan certainly is, that all projects (in recent versions) 
should work on the latest Java LTS (or newer).

 Besides testing it for yourself (it does also depend on the usage, your system 
configuration, class- and module path) you could also review the bug trackers 
of the projects and see if there is any open bugs or pending releases for 17+.

Don’t hesitate to report your negative findings as bugs or report your positive 
test results here with the community.

Gruss
Bernd

Von: Shivaraj Sivasankaran 
Gesendet: Dienstag, März 29, 2022 11:35 AM
An: user@commons.apache.org 
Cc: M Vasanthakumar 
Betreff: Plan for Java 17 on Apache Components

Hi,

Am Shivaraj from Ericsson India Global Private Limited, we have our own 
software to meet the business need and we used below FOSS to achieve certain 
functionalities. Since we have a plan to upgrade existing java runtime 
environment to Java 17 we need to know the compatibility of the below 
components that can run on top of Java 17. Please let us know the plan/roadmap 
of upgrading to java 17, it would be helpful if you are giving matrix table for 
components and their supported java version (including java 17).


Vendor
Software Name
Version
Apache
Commons IO
2.4
Apache
Commons Lang3
3.12.0
Apache
Commons Net
3.8.0
Apache
Commons Pool
2.11.1
Apache
Commons BeanUtils
1.9.3
Apache
Commons Codec
1.15
Apache
Commons Collections
4.4
Apache
Commons CSV
1.9.0
Apache
Commons FileUpload
1.4

Regards,
Shivaraj Sivasankaran.


Re: FtpClient is blocked by win7/10's firewall.

2022-03-10 Thread Bernd Eckenfels
You can add the Java launcher (maybe a private copy for your ftp client) as a 
new application in the Advanced Windows Firewall allow rules and allow it to 
open all ports.

Alternative would be to specify a local bind port and allow that one by number 
in the firewall. That probably requires code changes in your client.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: kiter ke 
Gesendet: Thursday, March 10, 2022 8:27:27 AM
An: user@commons.apache.org 
Betreff: FtpClient is blocked by win7/10's firewall.

Hi,everybody!

I’m trying to use FtpClient to download files from VSFtp server.But it’s still 
blocked by windows 7’s firewall.

While I close the firewall, the ftp client is working. If the firewall is 
working, the ftp client can not download any bytes from server.

And I have set the mode to  PASSIVE_LOCAL_DATA_CONNECTION_MODE by 
enterLocalPassiveMode().

Is there any helpful advice for me?

I would be appreciate it if you reply me soon.


从 Windows 版邮件发送



Re: [VFS] jsch thread hanging while reading from SFTP

2022-02-25 Thread Bernd Eckenfels
VFS is not very well suited to parallel usage, especially not if the meta data 
operations are relatively slow. One thing you can do (besides checking why the 
particular operation which blocks is slow) is to use multiple instances of the 
filesystems I think. (Won’t work with the default manager as this is a 
singleton).

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Shekhar B 
Gesendet: Friday, February 25, 2022 6:16:17 PM
An: user@commons.apache.org 
Betreff: [VFS] jsch thread hanging while reading from SFTP

I have noticed slowness in reading data from SFTP server, I have 10
parallel processes running in the different containers which are reading
this data and slowness is usually observed in one or two containers
randomly. I am using commons-vfs to read data from SFTP server and I have
extended SFTP related classes to add some sort logic. I am using centos-7.9
to host my SFTP server. I have noticed the reader thread is in blocked
state and waiting for monitor thread to release lock.

Can someone please guide me on how to fix this issue.


Thread dump:

"Thread-135" #150 prio=5 os_prio=0 tid=0x7f1e3808d800 nid=0x3a2
waiting for monitor entry [0x7f1ea5eed000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:306)
- waiting to lock <0x0005cedf23f8> (a
org.apache.commons.vfs2.provider.sftp.MySftpFileSystem)
at 
org.apache.commons.vfs2.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:301)
at 
org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:76)
at 
org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:56)
at 
org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:711)
at 
org.apache.commons.vfs2.impl.DefaultVfsComponentContext.resolveFile(DefaultVfsComponentContext.java:46)
at 
org.apache.commons.vfs2.provider.AbstractLayeredFileProvider.findFile(AbstractLayeredFileProvider.java:54)
at 
org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:711)
at 
org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:677)
at 
org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:632)
at 
com.sqlstream.aspen.namespace.filevfs.FileVFSInputSource$FileReader.run(FileVFSInputSource.java:894)
at java.lang.Thread.run(Thread.java:748)
"Thread-134" #149 daemon prio=1 os_prio=0 tid=0x7f1e381e7800
nid=0x3a1 in Object.wait() [0x7f1ea6af9000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.io.PipedInputStream.read(PipedInputStream.java:326)
- eliminated <0x0005d821ea90> (a
com.jcraft.jsch.Channel$MyPipedInputStream)
at java.io.PipedInputStream.read(PipedInputStream.java:377)
- locked <0x0005d821ea90> (a
com.jcraft.jsch.Channel$MyPipedInputStream)
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2909)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2935)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1643)
at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
at 
org.apache.commons.vfs2.provider.sftp.MySftpFileObject.doListChildrenResolved(MySftpFileObject.java:376)
at 
org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1081)
- locked <0x0005cedf23f8> (a
org.apache.commons.vfs2.provider.sftp.MySftpFileSystem)
at 
com.sqlstream.aspen.namespace.filevfs.MyFileMonitor$FileMonitorAgent.checkForNewChildren(MyFileMonitor.java:458)
at 
com.sqlstream.aspen.namespace.filevfs.MyFileMonitor$FileMonitorAgent.check(MyFileMonitor.java:543)
at 
com.sqlstream.aspen.namespace.filevfs.MyFileMonitor$FileMonitorAgent.access$200(MyFileMonitor.java:376)
at 
com.sqlstream.aspen.namespace.filevfs.MyFileMonitor.run(MyFileMonitor.java:321)
at java.lang.Thread.run(Thread.java:748)


Re: [logging] How to configure transitive Commons Logging dependency without affecting the entire Java environment?

2021-11-26 Thread Bernd Eckenfels
Hello,

Not sure how PDFBox works, but if you cannot specify a logger, than you will 
need to register a global common s logging SPI which in turn forwards the log 
events to your thread local logger. Or you use log4j impl, and then append such 
an Appender or Category to log4j.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: Bernhard Fey 
Gesendet: Friday, November 26, 2021 5:56:47 PM
An: user@commons.apache.org 
Betreff: [logging] How to configure transitive Commons Logging dependency 
without affecting the entire Java environment?

Hello,

While integrating PDFBox into our PDF library we ran into an issue with its 
usage of Commons Logging. During our research we only found ways to globally 
configure logging for the entire Java environment, which we cannot do:
Our use case is that our customers use our library in their Java environment to 
create PDFs and optionally merge them with existing PDFs. The latter is being 
migrated to use PDFBox.
Logging in our library is handled by a separate Java logger instance for each 
conversion. Multiple conversions can be executed at the same time, in different 
threads.
Our goal is to forward the log output of each PDFBox operation to the logger of 
the conversion that invoked it.
However, as we are shipping a library, to be used in an arbitrary Java 
environment, we cannot do any configuration that affects the entire 
environment, e.g. all Commons Logging loggers or all loggers used by PDFBox no 
matter if executed by our library or another one.

Thanks in advance.

Bernhard FeyProduct Development
Team Martha
- - - - - - - - - - - - - - - -
RealObjects GmbH
Altenkesseler Str. 17/B6
66115 Saarbrücken, Germany
Tel +49 (0)681 98579 0
Fax +49 (0)681 98579 29
http://www.realobjects.com
bernhard@realobjects.com
- - - - - - - - - - - - - - - -
Commercial Register: Amtsgericht Saarbrücken, HRB 12016
Managing Directors: Michael Jung, Markus Neurohr
VAT-ID: DE210373115



Re: [io] FileUtils.listFiles activates forces OneDrive files to download?

2021-11-20 Thread Bernd Eckenfels
BTW the Windows directory stream in NIO passes the file meta attributes from 
FindNextFile, it does not have to open/stat the files. Maybe this is the reason 
why it does Not need to resolve them (and it’s generally more efficient than 
using traditional Files.list).


--
http://bernd.eckenfels.net

Von: Gary Gregory 
Gesendet: Friday, November 19, 2021 6:29:25 PM
An: Commons Users List 
Betreff: Re: [io] FileUtils.listFiles activates forces OneDrive files to 
download?

If this is considered a kind of symbolic link, then you could try
passing java.nio.file.LinkOption.NOFOLLOW_LINKS to one of the Commons IO
APIs.

Gary

On Fri, Nov 19, 2021 at 10:49 AM Rod Widdowson 
wrote:

> > It sounds like it is up to OneDrive to do what it pleases when you ask it
> > for a file reference...
>
> FWIW and technically you need to send FILE_FLAG_OPEN_NO_RECALL at the
> Win32 level.  But I am not sure that helps anyone.
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


Re: [csv] Does the library provide means to circumvent CSV injection

2021-11-11 Thread Bernd Eckenfels
Hello,

I don’t really agree, a generic CSV tool should have a flag to protect against 
this, since it is a very common requirement. The situation is very unfortunate, 
this is why there is no good solution by default, but I can asume many software 
vendors working in the area of windows based enterprise desktops and exporting 
files with CSV downloads want to enable this.

Having said that, not sure if actually quoting is enough and all should prefer 
xml based office formats anyway.

I won’t mind to accept a tester patch for such an option. Maybe even 
unsafe-pass-default/quote-injection/reject-injection enum.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: sebb 
Gesendet: Thursday, November 11, 2021 3:42:08 PM
An: Commons Users List 
Cc: Gary Gregory ; ms...@acm.org 
Betreff: Re: [csv] Does the library provide means to circumvent CSV injection

On Thu, 11 Nov 2021 at 11:36, P. Ottlinger  wrote:
>
> Hi guys,
>
> thanks for your reply.
>
> Maybe I'm misinterpreting something but I thought that it could be made
> possible to configure CSVFormat-object when writing the CSV data in a
> way that any data with possibly corrupting values (as shown on the OWASP
> page) will mask the whole contents of the cell.
>
> Thus a library such as commons-csv would be able to lower the risk for
> CSV injection and not every client/customer would have to manually
> create this protecting logic.
>
> To my mind it's a simple parser for "dangerous" tokens that quotes the
> given data with additional   as we do not need to write
> functioning Excel formulas into CSV.
>
> WDYT?

As the others have said, this is the wrong place to be looking to fix
the problem.

CSV files are used for lots of things other than spreadsheets, so what
is dangerous in one application might be essential in another.

Besides, not all CSV files will be processed by Commons CSV on their
route to a spreadsheet app.

Such checks need to be made at the input to the application that processes it.

> Cheers,
> Phil
>
> Am 10.11.21 um 20:53 schrieb Gary Gregory:
> > I agree with Matt. CSV is just a container, it doesn't know or care what
> > the concept of a "formula" is.
> >
> > Gary
>

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Apache Common VFS Version and Java 11

2021-05-17 Thread Bernd Eckenfels
It’s not really a question of „last supported“ it is the „minimum runtime 
requirement“. VFS is compiled with Java 8 and therefore you can’t use it 
(easily) with Java 7 or older (depending on the VFS version). All Java after 8 
should work and if there are problems, it’s a good idea to report them here.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Vivek Madangeri 
Gesendet: Monday, May 17, 2021 4:44:17 PM
An: user@commons.apache.org 
Betreff: Apache Common VFS Version and Java 11


For one of our applications, we use Java 11 and would like to know if Apache 
Commons VFS package is supported with Java 11
When I see the requirements for VFS it gives me Java 8 the last supported 
version.
Appreciate if you can please reply at the earliest convenience.
Thanks in advance!!


Thanks!!

Regards,
Vivek Madangeri




Re: Apache Common VFS Version and Java 11

2021-05-14 Thread Bernd Eckenfels
I have not done formal testing of all features, but we use it in production on 
Java 11.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Vivek Madangeri 
Gesendet: Friday, May 14, 2021 3:23:22 PM
An: user@commons.apache.org 
Betreff: Apache Common VFS Version and Java 11


For one of our applications, we use Java 11 and would like to know if Apache 
Commons VFS package is supported with Java 11
When I see the requirements for VFS it gives me Java 8 the last supported 
version.
Appreciate if you can please reply at the earliest convenience.
Thanks in advance!!


Thanks!!

Regards,
Vivek Madangeri



Re: [dbcp2] No error/warning when returning a connection twice

2021-04-14 Thread Bernd Eckenfels
I think the important point for connection pols is, that a double close is not 
harming a returned „physical“ connection. This is done by throwing away the 
logical checked out wrapper connection - disassociating it from the pooled one. 
(And also never exposing the physical connection, which is a problem with the 
unwrap API)

If that is done, the wrapper can basically chose how to behave: compatible 
(ignore the close after it is disassociated with the pooled physical 
connection) or log a warning or even throw — I see no harm in offering all 3 
options.

But the first property (do not reuse wrapper connections) is absolutely crucial 
for corruption protection (and also for Timeouts, cancels and reconnects). I 
haven’t checked dhcp, but i can’t imagine it does not do that correctly.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: Gary Gregory 
Gesendet: Wednesday, April 14, 2021 9:59:50 PM
An: Commons Users List 
Betreff: Re: [dbcp2] No error/warning when returning a connection twice

Hi,

That's a tough sell IMO because (1) the JDBC specification does not require
this behavior AND (2) it would break existing applications. What is the
harm is having nothing happen when you close a closed connection?

What am I missing?

Gary


On Wed, Apr 14, 2021, 14:47 Christopher Schultz <
ch...@christopherschultz.net> wrote:

> All,
>
> I have had an application for years which I run in development with
> maxsize=1 so I can catch any double-check-out errors as soon as they
> might read their ugly heads.
>
> But I never considered double-return logic errors.
>
> I recently wrote a "single connection pool" which is bare-bones and just
> creates a single JDBC connection and hands it out to anyone who wants
> it. It counts borrows vs returns and it was vomiting whenever we called
> a particular method which, evidently, has been double-closing
> connections for years.
>
> I had expected that DBCP2 would be objecting to double-closes, but
> evidently not.
>
> I checked, and there is no configuration that I can find to enable some
> kind of error/notification when double-closes are performed.
>
> Is that something the project would be interested in adding?
>
> I'm talking about something like this:
>
> Connection conn = dbcp.getConnection();
>
> // do stuff
>
> conn.close(); // great, returns to pool
> conn.close(); // should bomb
>
> Thanks,
> -chris
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


Re: [vfs] is there any way to treat a file in a zip-file to a FileObject?

2020-07-24 Thread Bernd Eckenfels
Yes, the VFS providers can be nested and the access is controlled by a layered 
URL, something like zip:file:/dir/1.zip!2.jpg can be resolved into a FileObject.

The second example here does the same for entries in a JAR file: 
https://commons.apache.org/proper/commons-vfs/api.html

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: Xeno Amess 
Gesendet: Friday, July 24, 2020 7:51:07 AM
An: user@commons.apache.org 
Betreff: [vfs] is there any way to treat a file in a zip-file to a FileObject?

As title.
for example, 2.jpg is in 1.zip, and what I want is a FileObject
representing 2.jpg, but I don't want to extract it to a virtual file, what
I want is read/write it directly treating it as a FileObject.
Is there any ways in doing this?
If not, should I implement one?


Re: [daemon] Procrun UnsatisfiedLinkError with JNI project

2020-05-12 Thread Bernd Eckenfels
Hello,

You can create a new service with any binary you want to run. This will not 
answer service control commands, so it will fail to respond, but the binary is 
started and can do your testing. You just won't get desktop access. (This is 
similar to what psexec does).

I would suspect context specific things like PATH or generally environment, 
registry, possibly certificates and of course access to UNC or mounted 
directories (and desktop session) be affected by local system.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Adam Retter 
Gesendet: Tuesday, May 12, 2020 4:15:32 PM
An: Commons Users List 
Betreff: Re: [daemon] Procrun UnsatisfiedLinkError with JNI project

Thanks for your response Mark, further comments inline below -

> It shouldn't.
>
> Maybe a permissions problem? Although running as LocalService is should
> be fine.

So I am using the `--ServiceUser=LocalSystem` flag - to run under the
LocalSystem account. (i.e. NOT `NT Authority\Local Service`).

> I guess check the obvious. Does the dll exist where the app is looking?

It does exist yes. I have a working theory in fact that it loads the
DLL, but it is the dependencies of that DLL (which will be various
Windows system DLL's) that it can't load.

> Can LocalSystem read that file etc.

Do you know - Is there someway that I can directly execute code under
"LocalSystem" to see if I can reproduce the problem outside of
Procrun?




--
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: commons-dbcp2 source code read

2020-04-14 Thread Bernd Eckenfels
It seems to forward the call from this.activate() to the delegee 
("this.connection.activate()"). So  this is not a endless recursion by itself  
(unless "this.connection" points back to "this" or to a chain of delegated 
connections looping back to itself. Both should not be the case normally.

I am not sure how often this.connection is actually another delegation 
(instanceof), so it might not be called often anyway.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: shi feng qiang 
Gesendet: Tuesday, April 14, 2020 4:33:35 AM
An: user@commons.apache.org 
Betreff: commons-dbcp2 source code read

I amd reading code of commons-dbcp2 source, but a piece of codes confused me.
That is  
https://github.com/apache/commons-dbcp/blob/master/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
 of DelegatingConnection.java .


protected void activate() {
closed = false;
setLastUsed();
if (connection instanceof DelegatingConnection) {
((DelegatingConnection) connection).activate();// 615 todo this 
line
}
}

((DelegatingConnection) connection).activate();
can this call occur infinite recursive?

best regards!


Re: JSVC bug or developer oversight?

2020-03-23 Thread Bernd Eckenfels
Helll,

I don't Have the built env here, but this should work, just duplicate any of 
the existing options:

378<https://gitbox.apache.org/repos/asf?p=commons-daemon.git;a=blob;f=src/native/unix/native/arguments.c;h=8160c72944a7d7dae9cc8d43ec244f43a664a82f;hb=HEAD#l378>
 else if (!strcmp(argv[x], "-disablesystemassertions")) {
379<https://gitbox.apache.org/repos/asf?p=commons-daemon.git;a=blob;f=src/native/unix/native/arguments.c;h=8160c72944a7d7dae9cc8d43ec244f43a664a82f;hb=HEAD#l379>
 args->opts[args->onum++] = strdup(argv[x]);
380<https://gitbox.apache.org/repos/asf?p=commons-daemon.git;a=blob;f=src/native/unix/native/arguments.c;h=8160c72944a7d7dae9cc8d43ec244f43a664a82f;hb=HEAD#l380>
 }
else if (!strcmp(argv[x], "--enable-preview)) {
args->opts[args->onum++] = strdup(argv[x]);
}



--
http://bernd.eckenfels.net

Von: ken edward 
Gesendet: Monday, March 23, 2020 6:05:44 PM
An: Commons Users List 
Betreff: Re: JSVC bug or developer oversight?

I tried JDK_JAVA_OPTIONS and it does not seem to work either. I don't
suppose you could send me a source patch for the ability to pass the
--enable_preview parameter?

On Fri, Mar 20, 2020 at 10:57 PM Bernd Eckenfels 
wrote:

> Hello,
>
> Seems not possible to pass options beside the known ones:
>
>
> https://gitbox.apache.org/repos/asf?p=commons-daemon.git;a=blob;f=src/native/unix/native/arguments.c;h=8160c72944a7d7dae9cc8d43ec244f43a664a82f;hb=HEAD#l425
>
> One option is to pass all unknown options to java, another is to pass only
> the missing --enable-preview and lastly an repeatable option  --add-jvm-arg
> "--enable-preview". I think passing the options might be most flexible, but
> it needs to make sure to correctly detect spaces
>
> --start --enable-preview -splash:"/Home/Insane User/foto.jpg"
>
> Maybe adding the one missing option is fastest.
>
> As a workaround, maybe you can use environment variable JDK_JAVA_OPTIONS?
>
> Bernd
> --
> http://bernd.eckenfels.net
> 
> Von: ken edward 
> Gesendet: Friday, March 20, 2020 9:12:57 PM
> An: Commons Users List 
> Betreff: JSVC bug or developer oversight?
>
> Hello,
>
> How do you pass a command line parameter such as --enable-preview while
> using JSVC?
>
> jsvc -help  shows -X and -D but neither of these are appropriate for an
> openjdk command line parameter like --enable-preview ?!?!?!?
>
> -D=
> set a Java system property
> -X
> set Virtual Machine specific option
>
> Ken
>


Re: JSVC bug or developer oversight?

2020-03-20 Thread Bernd Eckenfels
Hello,

Seems not possible to pass options beside the known ones:

https://gitbox.apache.org/repos/asf?p=commons-daemon.git;a=blob;f=src/native/unix/native/arguments.c;h=8160c72944a7d7dae9cc8d43ec244f43a664a82f;hb=HEAD#l425

One option is to pass all unknown options to java, another is to pass only the 
missing --enable-preview and lastly an repeatable option  --add-jvm-arg 
"--enable-preview". I think passing the options might be most flexible, but it 
needs to make sure to correctly detect spaces

--start --enable-preview -splash:"/Home/Insane User/foto.jpg"

Maybe adding the one missing option is fastest.

As a workaround, maybe you can use environment variable JDK_JAVA_OPTIONS?

Bernd
--
http://bernd.eckenfels.net

Von: ken edward 
Gesendet: Friday, March 20, 2020 9:12:57 PM
An: Commons Users List 
Betreff: JSVC bug or developer oversight?

Hello,

How do you pass a command line parameter such as --enable-preview while
using JSVC?

jsvc -help  shows -X and -D but neither of these are appropriate for an
openjdk command line parameter like --enable-preview ?!?!?!?

-D=
set a Java system property
-X
set Virtual Machine specific option

Ken


Re: Technical Support Expiration Date

2019-11-12 Thread Bernd Eckenfels
You need to define what you mean by support. In most cases open Source 
components should be considered as „not commercially supported“ unless you have 
a contract with a commercial entity which is willing to give you this 
guarantee. Having said that, assuming all proper commons component have 
community support or the latest version only is a good start. This could mean 
you might need topfit bugs yourself, but you can submit them for upstream 
inclusion if they are applicable.

All projects you mentioned beside commons-logging are properly supported, for 
commons-logging is kind of sustained support, I can’t imagine anybody would use 
it for new projects.

Gruss
Bernd


--
http://bernd.eckenfels.net


Von: Comeche Nolla, Sergi 
Gesendet: Dienstag, November 12, 2019 4:40 PM
An: Commons Users List
Betreff: RE: Technical Support Expiration Date

Hi Gary,

Thank you for your response, and sorry for the crossposting, and the confusing 
reporting this. I was a bit confused on where to ask this question.

Since we are doing an analysis of obsolescence plan of the whole softwares used 
in one of our release, we need to track all the EOL support for each software 
and make decisions whether to keep the version or migrate to new one, depending 
on longevity of the support given.

I understand that older version will have very limited support for your part, 
hence we should think about migrating to newer versions if we want support.

Thanks again for that.
Regards,
Sergi

-Original Message-
From: Gary Gregory 
Sent: martes, 12 de noviembre de 2019 16:35
To: Commons Users List 
Subject: Re: Technical Support Expiration Date

Hi Sergi,

[Please don't cross-post to all the lists on our CC]

There is no "expiration date" on our components. We are all volunteers here and 
we put in our time and support where we best see fit.

In general, we are more likely to fix/support current versions. For example, 
this means that if there a fix done to commons-logging, currently at 1.2, it 
would be released in a future 1.2.1 or 1.3. If you cannot use
1.2 and you are stuck on 1.1.1, it is very unlikely that I would take the time 
to release 1.1.2. Mileage may vary for other volunteers.

Gary

On Tue, Nov 12, 2019 at 10:23 AM Comeche Nolla, Sergi < 
scome...@eservicios.indra.es> wrote:

> Hello,
>
> I work for a long-term project which requires strong and stable
> technical support for every software used.
>
> I want to know how long you are providing technical support for the
> following SW products:
>
> - Commons-io 2.1
> - Commons-beanutils 1.8.3
> - Commons-codec 1.4
> - Commons-dbcp 1.3
> - Commons-digester 2.1
> - Commons-logging 1.1.1
>
> Please I appreciate so much that you can give me expiration dates for
> each of these software products!
>
> Thank you!
> Sergi
>
> 
>
> Este correo electr?nico y, en su caso, cualquier fichero anexo al
> mismo, contiene informaci?n de car?cter confidencial exclusivamente
> dirigida a su destinatario o destinatarios. Si no es vd. el
> destinatario indicado, queda notificado que la lectura, utilizaci?n,
> divulgaci?n y/o copia sin autorizaci?n est? prohibida en virtud de la
> legislaci?n vigente. En el caso de haber recibido este correo
> electr?nico por error, se ruega notificar inmediatamente esta
> circunstancia mediante reenv?o a la direcci?n electr?nica del remitente.
> Evite imprimir este mensaje si no es estrictamente necesario.
>
> This email and any file attached to it (when applicable) contain(s)
> confidential information that is exclusively addressed to its recipient(s).
> If you are not the indicated recipient, you are informed that reading,
> using, disseminating and/or copying it without authorisation is
> forbidden in accordance with the legislation in effect. If you have
> received this email by mistake, please immediately notify the sender
> of the situation by resending it to their email address.
> Avoid printing this message if it is not absolutely necessary.
>



Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Si no es vd. el destinatario indicado, queda 
notificado que la lectura, utilización, divulgación y/o copia sin autorización 
está prohibida en virtud de la legislación vigente. En el caso de haber 
recibido este correo electrónico por error, se ruega notificar inmediatamente 
esta circunstancia mediante reenvío a la dirección electrónica del remitente.
Evite imprimir este mensaje si no es estrictamente necesario.

This email and any file attached to it (when applicable) contain(s) 
confidential information that is exclusively addressed to its recipient(s). If 
you are not the indicated recipient, you are informed that reading, using, 
disseminating and/or copying it without authorisation is forbidden in 
accordance with the 

Re: commons-vfs-2.4.1 - Question re. usage of VFS.getManager()

2019-10-29 Thread Bernd Eckenfels
Hello

I think the problem in your case is that the default filesystem manager does 
not know about the ftp: scheme. The error message is a bit missleading (since a 
fix done, probably we should file a bug for this).

The default manager does try to load the FtpProvider and tries to register it 
with ftp: so I assume loading of the provider failed. Maybe you are missing 
dependencies like commons-net (see the website for the dependencies per 
provider).

For debugging you can print manager.getSchemes() to see the available schemes 
(providers).
Gruss
Bernd


--
http://bernd.eckenfels.net


Von: Erwin Hogeweg 
Gesendet: Mittwoch, Oktober 30, 2019 3:29 AM
An: Commons Users List
Betreff: commons-vfs-2.4.1 - Question re. usage of VFS.getManager()

All -

I am trying to set up a VFS but I struggled a while to get past a 
FileSystemException. After looking at the VFS source code I understood what was 
going on, and I was able to create a work-around. However, I am not sure that 
what I hacked together is the right approach so I am looking for some guidance 
from the experts here…

This is what I was trying to do:

FileObject path = VFS.getManager().resolveFile("ftp://ftp.gnu.org/README;, new 
FileSystemOptions());

The issue is, or at least appears to be, that the FileSystemManager doesn’t 
have a baseFile so the resolveFile blows up with this exception:

org.apache.commons.vfs2.FileSystemException: Could not find file with URI 
"ftp://ftp.gnu.org/README; because it is a relative path, and no base URI was 
provided.
at 
org.apache.commons.vfs2.FileSystemException.requireNonNull(FileSystemException.java:87)

I could not find how/where to define that baseFile so I eventually settled on 
this work-around:

StandardFileSystemManager fsManager = (StandardFileSystemManager) 
VFS.getManager(); // YUCK!
fsManager.setBaseFile(new File("")); // Another YUCK.
FileObject path = fsManager.resolveFile("ftp://ftp.gnu.org/README;, opts);

That works, and now I end up with the correct (expected) path. It doesn’t feel 
right though so any advice would be greatly appreciated.


Cheers,

Erwin




Re: Apache Commons VFS2 version 2.4.2 release?

2019-10-28 Thread Bernd Eckenfels
Hello,

Jurrie if you make contributors spent their time defending themself you won’t 
speed up the process. If you need it urgently just compile it yourself. A 
release takes time, especially if it is done in people’s sparetime.

Gruss
Bernd


--
http://bernd.eckenfels.net


Von: Jurrie Overgoor 
Gesendet: Montag, Oktober 28, 2019 9:46 AM
An: user@commons.apache.org
Betreff: Re: Apache Commons VFS2 version 2.4.2 release?

Hi Gary,

Err... really?

On the 6th of October you wrote that you were "waiting for feedback on
VFS-733 before cutting an RC." So I waited a week.

Then, on the 17th of October you wrote that "once Woosan is done with PR
52 we can create an RC". So I waited 10 days.

Now, you write that "we are sorting out a new module" which is blocking
an RC.

So what's next? :)

I mean, I totally get the "it's done when it's done" thing. But this is
more like saying "it's done, except for XYZ" and then thinking of
something new to put into the next release. That way, it'll never be done.

Jurrie



On 27-10-19 23:39, Gary Gregory wrote:
> We are sorting out a new module ATM, I think that once we are done with
> that, we can propose an RC...
>
> Gary
>
> On Sun, Oct 27, 2019 at 2:48 PM Jurrie Overgoor  wrote:
>
>> Hi Gary,
>>
>> https://github.com/apache/commons-vfs/pull/52 was merged to master 10
>> days ago. Could you release the RC for 2.5.0 please?
>>
>> With kind regards,
>>
>> Jurrie
>>
>>
>> On 17-10-19 16:44, Gary Gregory wrote:
>>> I think that once Woonsan is done with
>>> https://github.com/apache/commons-vfs/pull/52 we can create an RC for
>> 2.5.0.
>>> Gary
>>>
>>>
>>> On Wed, Oct 16, 2019 at 10:34 AM Jurrie Overgoor 
>> wrote:
 Hi Gary,

 VFS-733 was changed to status 'closed' a week ago. Could you release the
 RC please?

 Again: if there's anything I can help with, let me know.

 With kind regards,

 Jurrie



 On 06-10-19 23:41, Gary Gregory wrote:
> Jurrie,
>
> The next release will be labeled 2.5.0 and I am waiting on feedback for
> https://issues.apache.org/jira/browse/VFS-733 before cutting an RC.
>
> Gary
>
> On Mon, Sep 30, 2019 at 8:54 AM Gary Gregory 
 wrote:
>> Jurrie,
>>
>> Nothing is blocking the release of 2.4.2 but for a PMC member to take
 the
>> time to do so. If no one gets to it, I might within a week or two.
>>
>> You are welcome to improve the code base with PRs on GitHub :-)
>>
>> Gary
>>
>>
>> On Mon, Sep 30, 2019 at 6:04 AM Jurrie Overgoor 
 wrote:
>>> Hello everyone,
>>>
>>> I'm trying to upgrade commons-vfs2 from 2.1. Specifically, I need
>>> VFS-688 and VFS-360, which are introduced in commons-vfs2 2.3.
>>>
>>> But I run into VFS-727, which is also introduced in commons-vfs2 2.3.
>>> The bug is solved in 2.4.2, but that version is not yet released.
>>>
>>> 2.4.2 has some unsolved issues: VFS-651, VFS-613, VFS-600, VFS-596,
>>> VFS-586, VFS-500, VFS-298. Are these issues blocking the release of
>>> 2.4.2? (They are all older than 2.4.1.)
>>>
>>> Would it be possible to release 2.4.2? What can I do to help with
>> this?
>>> With kind regards,
>>>
>>> Jurrie
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>>> For additional commands, e-mail: user-h...@commons.apache.org
>>>
>>>
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org


>> -
>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>> For additional commands, e-mail: user-h...@commons.apache.org
>>
>>

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Apache Commons VFS2 version 2.4.2 release?

2019-10-17 Thread Bernd Eckenfels
Happens locally under Windows with Java8, not sure why (but I thought it was 
already mentioned on the dev list. Will provide more details later if it’s not 
know .


--
http://bernd.eckenfels.net


Von: Gary Gregory 
Gesendet: Donnerstag, Oktober 17, 2019 8:06 PM
An: Commons Users List
Betreff: Re: Apache Commons VFS2 version 2.4.2 release?

Hi Bernd,

Where do you see tests failing?

I see green builds:

- https://github.com/apache/commons-vfs/actions
- https://travis-ci.org/apache/commons-vfs (except Java 14-EA)

Gary

On Thu, Oct 17, 2019 at 11:21 AM Bernd Eckenfels 
wrote:

> What about the failing DefaultFileMonitor tests, do we know what’s going
> on with those? (I saw them on Windows while validating my last commit)? Is
> that VFS-299 related?
>
> --
> https://Bernd.eckenfels.net
>
> 
> Von: Gary Gregory 
> Gesendet: Donnerstag, Oktober 17, 2019 4:45 PM
> An: Commons Users List
> Betreff: Re: Apache Commons VFS2 version 2.4.2 release?
>
> I think that once Woonsan is done with
> https://github.com/apache/commons-vfs/pull/52 we can create an RC for
> 2.5.0.
>
> Gary
>
>
> On Wed, Oct 16, 2019 at 10:34 AM Jurrie Overgoor  wrote:
>
> > Hi Gary,
> >
> > VFS-733 was changed to status 'closed' a week ago. Could you release the
> > RC please?
> >
> > Again: if there's anything I can help with, let me know.
> >
> > With kind regards,
> >
> > Jurrie
> >
> >
> >
> > On 06-10-19 23:41, Gary Gregory wrote:
> > > Jurrie,
> > >
> > > The next release will be labeled 2.5.0 and I am waiting on feedback for
> > > https://issues.apache.org/jira/browse/VFS-733 before cutting an RC.
> > >
> > > Gary
> > >
> > > On Mon, Sep 30, 2019 at 8:54 AM Gary Gregory 
> > wrote:
> > >
> > >> Jurrie,
> > >>
> > >> Nothing is blocking the release of 2.4.2 but for a PMC member to take
> > the
> > >> time to do so. If no one gets to it, I might within a week or two.
> > >>
> > >> You are welcome to improve the code base with PRs on GitHub :-)
> > >>
> > >> Gary
> > >>
> > >>
> > >> On Mon, Sep 30, 2019 at 6:04 AM Jurrie Overgoor 
> > wrote:
> > >>
> > >>> Hello everyone,
> > >>>
> > >>> I'm trying to upgrade commons-vfs2 from 2.1. Specifically, I need
> > >>> VFS-688 and VFS-360, which are introduced in commons-vfs2 2.3.
> > >>>
> > >>> But I run into VFS-727, which is also introduced in commons-vfs2 2.3.
> > >>> The bug is solved in 2.4.2, but that version is not yet released.
> > >>>
> > >>> 2.4.2 has some unsolved issues: VFS-651, VFS-613, VFS-600, VFS-596,
> > >>> VFS-586, VFS-500, VFS-298. Are these issues blocking the release of
> > >>> 2.4.2? (They are all older than 2.4.1.)
> > >>>
> > >>> Would it be possible to release 2.4.2? What can I do to help with
> this?
> > >>>
> > >>> With kind regards,
> > >>>
> > >>> Jurrie
> > >>>
> > >>>
> > >>>
> > >>> -
> > >>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > >>> For additional commands, e-mail: user-h...@commons.apache.org
> > >>>
> > >>>
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
>


Re: Apache Commons VFS2 version 2.4.2 release?

2019-10-17 Thread Bernd Eckenfels
What about the failing DefaultFileMonitor tests, do we know what’s going on 
with those? (I saw them on Windows while validating my last commit)? Is that 
VFS-299 related?

--
https://Bernd.eckenfels.net


Von: Gary Gregory 
Gesendet: Donnerstag, Oktober 17, 2019 4:45 PM
An: Commons Users List
Betreff: Re: Apache Commons VFS2 version 2.4.2 release?

I think that once Woonsan is done with
https://github.com/apache/commons-vfs/pull/52 we can create an RC for 2.5.0.

Gary


On Wed, Oct 16, 2019 at 10:34 AM Jurrie Overgoor  wrote:

> Hi Gary,
>
> VFS-733 was changed to status 'closed' a week ago. Could you release the
> RC please?
>
> Again: if there's anything I can help with, let me know.
>
> With kind regards,
>
> Jurrie
>
>
>
> On 06-10-19 23:41, Gary Gregory wrote:
> > Jurrie,
> >
> > The next release will be labeled 2.5.0 and I am waiting on feedback for
> > https://issues.apache.org/jira/browse/VFS-733 before cutting an RC.
> >
> > Gary
> >
> > On Mon, Sep 30, 2019 at 8:54 AM Gary Gregory 
> wrote:
> >
> >> Jurrie,
> >>
> >> Nothing is blocking the release of 2.4.2 but for a PMC member to take
> the
> >> time to do so. If no one gets to it, I might within a week or two.
> >>
> >> You are welcome to improve the code base with PRs on GitHub :-)
> >>
> >> Gary
> >>
> >>
> >> On Mon, Sep 30, 2019 at 6:04 AM Jurrie Overgoor 
> wrote:
> >>
> >>> Hello everyone,
> >>>
> >>> I'm trying to upgrade commons-vfs2 from 2.1. Specifically, I need
> >>> VFS-688 and VFS-360, which are introduced in commons-vfs2 2.3.
> >>>
> >>> But I run into VFS-727, which is also introduced in commons-vfs2 2.3.
> >>> The bug is solved in 2.4.2, but that version is not yet released.
> >>>
> >>> 2.4.2 has some unsolved issues: VFS-651, VFS-613, VFS-600, VFS-596,
> >>> VFS-586, VFS-500, VFS-298. Are these issues blocking the release of
> >>> 2.4.2? (They are all older than 2.4.1.)
> >>>
> >>> Would it be possible to release 2.4.2? What can I do to help with this?
> >>>
> >>> With kind regards,
> >>>
> >>> Jurrie
> >>>
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> >>> For additional commands, e-mail: user-h...@commons.apache.org
> >>>
> >>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>


Re: I have a question about apache email license.

2019-08-07 Thread Bernd Eckenfels
Hello,

It is probably unlikely that somebody can give you a legal interpretation 
(especially with CDDL), but let me suggest you this: publish it anyway, even 
better try to merge it upstream.

Gruss
Bernd


--
http://bernd.eckenfels.net


Von: 이준균 
Gesendet: Mittwoch, August 7, 2019 11:13 AM
An: user@commons.apache.org
Betreff: I have a question about apache email license.

Hello I\'m a Korean developer I do not good at English I beg your
understanding Question 1If I modify apache email source, should I make
modified source public? For example, in githubThe apache email library
refers to javaxmail library (CDDL + GPL 20), so I think it should publish
the source of the modified apache email Is this correct? please reply Thank
you


Re: org.apache.commons.lang3.time.StopWatch resolution

2019-06-07 Thread Bernd Eckenfels
A 10ms sleep is problematic as a test case since some OS only allow Worse Timer 
Resolution (for some like Windows it even depends on which timer is currently 
active, the default timer uses 15,6ms which is only changed in latest Windows 
10 I think). So the variation you see is more likely caused by the delay you 
use and less likely caused by System.nanoTime (as used by Stopwatch). For your 
test (not sure how valuable that is) I would go with 100ms sleep and allow 
85-115ms stopwatch results.


--
http://bernd.eckenfels.net


Von: Erwin Hogeweg 
Gesendet: Freitag, Juni 7, 2019 2:21 PM
An: Commons Users List
Betreff: Re: org.apache.commons.lang3.time.StopWatch resolution

Thanks for the replies and the links gents. Still confused. I can understand 
that you can’t expect nanosecond resolution but the diff I noticed is 1-6 ms... 
on a 10 ms interval. Those are eternities in modern day CPUs.

I am planning to use the stopwatch with a second resolution so this test is 
kinda irrelevant but I am still surprised by the result. I might take a look at 
the implementation later to get a better understanding.

Thanks again for the help.


Erwin

El jun. 6, 2019, a la(s) 22:41, Remko Popma  escribió:

> Timers and elapsed time in Java is an interesting topic. Can be a moving 
> target though...
>
> Some recent articles:
> https://hazelcast.com/blog/locksupport-parknanos-under-the-hood-and-the-curious-case-of-parking/
>
> https://hazelcast.com/blog/locksupport-parknanos-under-the-hood-and-the-curious-case-of-parking-part-ii-windows/
>
> Remko.
>
> (Shameless plug) Every java main() method deserves http://picocli.info
>
>> On Jun 7, 2019, at 6:13, Gary Gregory  wrote:
>>
>> The OS' clock resolution is in play here, which depending on your OS will
>> give you varying results. Also, on Java 9, you get better clock resolution
>> for certain APIs. Kinda messy...
>>
>> Gary
>>
>> On Thu, Jun 6, 2019 at 4:28 PM Erwin Hogeweg 
>> wrote:
>>
>>> Hi,
>>>
>>> I am tad confused about the StopWatch resolution. I have a very basic
>>> JUnit test that starts a stopwatch, wait for 10ms and then stops it, and
>>> checks the value. In about 40% of the cases it is less than the 10ms wait
>>> time.
>>>
>>> Is that expected? What is my blind spot?
>>>
>>>
>>> Regards,
>>>
>>> Erwin
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>>> For additional commands, e-mail: user-h...@commons.apache.org
>>>
>>>


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [csv] How to prevent formula injection

2019-03-28 Thread Bernd Eckenfels
Unless you use QuoteMode.NONE or the wrong quoteChar you should be fine. 1.5 
quoted more cases than 1.6 but both should quote all known critical characters.

Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: RaguNath Hariharan 
Gesendet: Mittwoch, März 27, 2019 3:08 PM
An: user@commons.apache.org
Betreff: [csv] How to prevent formula injection

Hi Team,

I am using Apache commons CSV 1.5 for generating CSV file. However I got to
know there is possibility on formula injection. Is there any option to
prevent formula injection ?

Regards
Ragunath


Re: user@commons.apache.org

2018-12-19 Thread Bernd Eckenfels
Hello Bo,

Sounds like you want to ask the Tomcat user mailing-list, instead.

Gruss
Bernd
--
http://bernd.eckenfels.net

Von: Bo 
Gesendet: Donnerstag, Dezember 20, 2018 5:07 AM
An: user@commons.apache.org
Betreff: user@commons.apache.org

I'm trying to migrate a custom app running Tomcat5.5.17 to Tomcat7. This 
application is installed in its own folder on the root directory of a Windows 
2008 R2 64-bit machine. The application itself was originally "installed" via 
the unzip method, and its tomcat folder is inside of the application folder, 
which itself is placed in the C:\ root drive. As a test, to confirm I'm doing 
this right, I go to Apache Tomcat archive pages and download the .zip for 
Tomcat 5.5.17 ( https://archive.apache.org/dist/tomcat/tomcat-5/v5.5.17/ ) and 
unzip it and see if I can do a successful in place migration from the existing 
version to the exact same version from a clean install etc and it works 100%. 
During this process I also was able to use WinMerge tool to find all folder and 
file diffs and comparing the two different tomcat5.5.17 folders side by side to 
see exactly what values and lines changed from the fresh install to the already 
installed version... I will include a short summary of all said relevant and 
pertinent edits/changes at the end of this message.

Long story short, next I'm trying to migrate from Tomcat 5.5.17 to Tomcat7. I 
see that the officially supported route is two paths, migrating/updating 1 
level at a time, from Tomcat5.5 to Tomcat 6 and then from Tomcat6 to Tomcat7. 
There doesn't seem to be a single migration instruction or guide to go from 
directly Tomcat5.5 to Tomcat7. In any case, its logical enough that I can 
combine or merge all the changes from 5.5 to 6 and 6 to 7 to be able to infer 
what is the total effective elements of change needed to do the successful 
upgrading from version 5.5.17 to version 7.

see http://tomcat.apache.org/migration-6.html
http://tomcat.apache.org/migration-7.html

So I first download Tomcat7 the zip file from here : 
http://mirror.olnevhost.net/pub/apache/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92-windows-x86.zip

Then I unzip it and put it in my application directory, after first renaming 
and backing up the existing old tomcat folder etc...

I use the service.bat to install the service for tomcat7, and confirm that it 
starts, I can see the status page just fine... so I proceed to install the 
custom application.

I do step by step, initially just copying over the application folder in the 
webapps from the tomcat5 to tomcat7 folder, then I restart the tomcat7 service, 
sign back in to the status page, and I see the application is now listed under 
the List Applications section. I try to run/start it but of course it won't run 
or start yet giving error of : "FAIL - Application at context path /qms could 
not be started"

I realize some major structural changes occured from version 5.5 to version 6, 
namely detailed here about the merging and consolidation of some directories 
and especially related to lib folders into a single \tomcat\lib folder in 
version 6 and version 7.

So I copy/paste and transplant all the stuff in \common\endorsed and 
\common\lib and \shared\lib to the right locations in the tomcat7 and I follow 
that with updating the tomcat-users.xml in conf


Then I restart the tomcat7 service, and go back to the status page to start up 
my custom application but instead of getting a "FAIL - Application at context 
path /qms could not be started" error message, I'm now getting a new error 
message that states:

Description The origin server did not find a current representation for the 
target resource or is not willing to disclose that one exists.
Apache Tomcat/7.0.92

I googled around and people advised that need to use Eclipse tool to help, but 
my server doesn't have it installed, the application was originally never built 
with it, never used it and didn't come with it, plus furthermore it doesn't 
appear some of the solutions are relevant to the issue that I'm facing...

What can I do to get this to work on tomcat7?


\\\

diff changes from tomcat.initialoriginal to tomcat5517zip


in C:\VE4_0\tomcat.initialoriginal\bin
jmx.jar LEFT SIDE ONLY

=
In
C:\VE4_0\tomcat.initialoriginal\bin\service.bat


LINE 103 "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions 
"-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed
 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9000 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false" --StartMode jvm --StopMode jvm
vs "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions 
"-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed"
 --StartMode jvm --StopMode jvm

LINE 108 "%EXECUTABLE%" //US//%SERVICE_NAME% 

Re: [fileupload] Whatever happened to v1.4.0 binaries?

2018-12-04 Thread Bernd Eckenfels
Hello,

There is no 1.4 Release, see the tags here: 
https://git-wip-us.apache.org/repos/asf?p=commons-fileupload.git

The latest CI snapshot seems to be 6 month old:

https://builds.apache.org/job/commons-fileupload/lastBuild/commons-fileupload$commons-fileupload/

The site is labeled with 1.4 snapshot as this is the next upcoming version, not 
the best routine commonly used by Apache commons projects.

Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: vaibhav singh 
Gesendet: Dienstag, Dezember 4, 2018 11:59 AM
An: user@commons.apache.org
Betreff: [fileupload] Whatever happened to v1.4.0 binaries?

Hi,
Sorry if this question has been asked before, but I cannot for the life of
me find v1.4.0 jars which were released around Aug-Sep of last year. The
link "
https://repository.apache.org/content/repositories/snapshots/commons-fileupload/commons-fileupload/1.4-SNAPSHOT/;
is dead, and there is nothing on the Wayback machine as well. Can someone
help me out?

--

Regards,
Vaibhav Singh


Re: Procrun procsrv.exe --Type=interactive. Service Cannot place icon in system tray.

2018-10-03 Thread Bernd Eckenfels
AFAIK with recent Windows Security improvements there is a separation between 
services and Desktop, the session a service get cannot anymore display GUI 
controls.

The NoInteractiveService setting can be turned off, but you should probably 
not. It is described here: 
https://docs.microsoft.com/en-us/windows/desktop/services/interactive-services

This is not specific to Java, however with Java it will be specifically hard to 
use all the required system functions to make it work and still secure.

I would say, just don’t use it.
Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: Anthony Holland 
Gesendet: Donnerstag, Oktober 4, 2018 1:42 AM
An: user@commons.apache.org
Betreff: Procrun procsrv.exe --Type=interactive. Service Cannot place icon in 
system tray.

Hi

I have wrapped up a java/scala program in a jar and can use it as a service
using procsrv. It installs, can be started and stopped. Great.

It contains some code that places an icon in the system tray. This code is
executed "successfully" (including SystemTray.isSupported returning true),
but the icon does not actually appear in the system tray. I tried showing a
window too - and the behaviour is the same. Nothing shows. I pass the
parameter --Type=interactive, and the only effect that it set the checkbox
in the services properties dialog that says "Allow service to interact with
desktop". It still doesn't show the GUI. In that dialog I've changed the
account to my own account, too. No effect.

I can get the GUI to show either by just running the program using java, or
by using "procsrc run ".

Arguably a service should not have a GUI, but the --Type=interactive flag
seems to imply that this is supported, and I'd like to make it work.

Thank you
Anthony


Re: [pool] Possible deadlock or user error (me) commons-pool 2.5.0

2018-09-08 Thread Bernd Eckenfels
Hello Bruce,

This sounds a bit like a discussion we had about missing wakeups. I think it’s 
was related to depleted pools. Didn’t find the discussion, hopefully somebody 
else recalls the conditions? I think it was not fixed.

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: Bruce Milner 
Gesendet: Samstag, September 8, 2018 8:19 PM
An: user@commons.apache.org
Betreff: Re: [pool] Possible deadlock or user error (me) commons-pool 2.5.0

Hello,

I did a while back, but my understanding of DBCP is that it has one pool
per database and we have thousands.

With the number of nodes serving the application multiplied by the
number of databases, it could easily exceed maximum number of
connections to existing SQL database server. The individual databases
are mostly shared by one database server each have individual schemas.
We keep track of the database URL and switch the connection via
connector.setCatalog(). We also have some that co-exist, so the
connection pool has the smarts to decide if it needs a catalog change.

The commons pool has been working great so far, and this is the only
case I have see where we ended up in this state. We haven't seen this
with load tests, but this once in production.

I was hoping if this exposed a bug, could get fixed in the pool code. I
don't have a reproduction case at this time. I forgot to mention that
the environment is java 8 141 with Connector/J 5.1.45

--bruce

On 9/7/2018 5:05 PM, Gary Gregory wrote:
> Hi,
>
> A side question: Have you tried Apache Commons DBCP (which is based on
> Commons Pool)?
>
> https://commons.apache.org/proper/commons-dbcp/
>
> Gary
>
> On Fri, Sep 7, 2018 at 5:24 PM Bruce Milner 
> wrote:
>
>> Hello,
>>
>> I am using commons-pool2-2.5.0 for a MySQL connection pooler. The reason
>> for not using out-of-the-box is that the existing code relies on
>> changing catalogs at runtime reusing an existing connection. The
>> original design was to use multiple databases using the same connection
>> and this cannot be changed.
>>
>> I recently replaced a lot of hand crafted code with the commons-pool2
>> implementation.
>>
>> The issue I have is that one server I manage went into a state where
>> there are plenty of connections, but none are being returned to the
>> pool. They are all stuck on a lock inside of
>> GenericKeyedObjectPool.returnObject.
>>
>> The config is basically
>> GenericKeyedObjectPoolConfig config = new
>> GenericKeyedObjectPoolConfig();
>> config.setBlockWhenExhausted(true);
>> config.setMaxTotal(120);
>> config.setMaxTotalPerKey(60);
>> config.setTestOnBorrow(true);
>> config.setTimeBetweenEvictionRunsMillis(6);
>> config.setMinEvictableIdleTimeMillis(0); // don't starve
>> connections because of catalog switches.
>> /**
>> * For database connections, use FIFO so that we get rid of
>> older connections first before newer ones.
>> */
>> config.setLifo(false);
>> return new GenericKeyedObjectPool(new
>> PooledConnectionFactory(), config);
>>
>> There are 150 of these threads waiting on a lock to release connections
>> java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for <0x0006471cd7d8> (a
>> java.util.concurrent.locks.ReentrantLock$NonfairSync)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>>
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>> at
>>
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
>> at
>>
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
>> at
>>
>> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
>> at
>> java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
>> at
>>
>> org.apache.commons.pool2.impl.LinkedBlockingDeque.hasTakeWaiters(LinkedBlockingDeque.java:1389)
>> at
>>
>> org.apache.commons.pool2.impl.GenericKeyedObjectPool.hasBorrowWaiters(GenericKeyedObjectPool.java:849)
>> at
>>
>> org.apache.commons.pool2.impl.GenericKeyedObjectPool.returnObject(GenericKeyedObjectPool.java:551)
>> at
>>
>> com.ilrn.util.sql.connectionpooler.ConnectionPooler.releaseConnection(ConnectionPooler.java:358)
>> at
>>
>> com.ilrn.util.sql.connectionpooler.PooledConnection.close(PooledConnection.java:141)
>> at
>>
>> com.ilrn.util.sql.connectionpooler.ConnectionPooler.safeClose(ConnectionPooler.java:480)
>>
>> and 158 of these threads waiting to open connections.
>> java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for <0x0006471cd7d8> (a
>> java.util.concurrent.locks.ReentrantLock$NonfairSync)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>>
>> java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
>> at
>>
>> 

Re: [dbcp] Unnecessary ROLLBACK's with BasicDataSource

2018-08-21 Thread Bernd Eckenfels
Hello,

Can you proof that this puts additional pressure on the database? It does make 
some uneccessary round-trips but the database will just ignore the rollbacks 
when there are no open changes/transactions IMHO. Did you see somewhere on the 
database otherwise?

Using rolllback unconditionally to reset the state of transactions is easier 
and more reliable than actually trying to keep track. If it does indeed affect 
the database it would be a bit more work to come up with another solution.
Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: Andrey Shcheglov 
Gesendet: Dienstag, August 21, 2018 5:01 PM
An: user@commons.apache.org
Betreff: [dbcp] Unnecessary ROLLBACK's with BasicDataSource

Hello,

If BasicDataSource (version 1.4, as I'm limited to Java 1.6) is
configured with defaultAutoCommit=false, then two extra ROLLBACK's are
executed, one when a database connection is taken from the pool, and
another one when returning a connection to the pool.

The corresponding stack traces are (/Oracle Thin/'s T4CConnection example):

> T4CConnection(PhysicalConnection).rollback() line: 1950
> PoolableConnection(DelegatingConnection).rollback() line: 368
> PoolableConnectionFactory.passivateObject(Object) line: 685
> BasicDataSource.validateConnectionFactory(PoolableConnectionFactory)
> line: 1559
> BasicDataSource.createPoolableConnectionFactory(ConnectionFactory,
> KeyedObjectPoolFactory, AbandonedConfig) line: 1545
> BasicDataSource.createDataSource() line: 1388
> BasicDataSource.getConnection() line: 1044

and

> T4CConnection(PhysicalConnection).rollback() line: 1950
> PoolableConnection(DelegatingConnection).rollback() line: 368
> PoolableConnectionFactory.passivateObject(Object) line: 685
> GenericObjectPool.addObjectToPool(Object, boolean) line: 1379
> GenericObjectPool.returnObject(Object) line: 1342
> PoolableConnection.close() line: 90
> PoolingDataSource$PoolGuardConnectionWrapper.close() line: 191

Thus, each successful database transaction is a sequence of:

1. ROLLBACK (connection taken from the pool)
2. do something with the database connection (application code)
3. COMMIT (application code)
4. ROLLBACK (connection closed)

(instead of a single COMMIT), while each failed one is a sequence of

1. ROLLBACK (connection taken from the pool)
2. do something with the database connection (application code)
3. ROLLBACK (application code)
4. ROLLBACK (connection closed)

(instead of a single ROLLBACK).

This behaviour applies an additional pressure to the redo and undo
subsystems (particularly, in /Oracle/ case, but the problem holds for
any database accessed via /commons-dbcp/, e. g.: I observed the same
issue with /MySQL/).

*Question 1*: how can I get rid of these extra ROLLBACK's while still
having my data source configured with defaultAutoCommit=false (i. e.
without the need to manually call setAutoCommit(false) for each
connection taken from the data source)?

*Question 2* (I'm aware I may be barking up the wrong tree, but still):
alternatively, how can I mitigate the issue from /Oracle/ side (i. e.
without changing my code or replacing libraries)?

Regards,
Andrey.

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Unpacking VMDK via 7z

2018-08-04 Thread Bernd Eckenfels
I guess the most simple explanation is that this is not a 7z Archive, have you 
tried the normal zip archives instead? (The 7zip program supports multiple 
formats)

--
https://Bernd.eckenfels.net


Von: Dan Tran 
Gesendet: Samstag, August 4, 2018 6:27 PM
An: Commons Users List
Betreff: Re: Unpacking VMDK via 7z

here is the stack trace

Caused by: java.io.IOException: Bad 7z signature
at 
org.apache.commons.compress.archivers.sevenz.SevenZFile.readHeaders(SevenZFile.java:326)
at 
org.apache.commons.compress.archivers.sevenz.SevenZFile.(SevenZFile.java:241)
at 
org.apache.commons.compress.archivers.sevenz.SevenZFile.(SevenZFile.java:108)
at 
org.apache.commons.compress.archivers.sevenz.SevenZFile.(SevenZFile.java:262)


Thanks

-D

On Fri, Aug 3, 2018 at 11:21 PM, Dan Tran  wrote:

> Hi
>
> I have a vmware's vmdk file with no problem to unpack using my windows 7z
> command
>
> however, common-compress error out at
>
> SevenZFile sevenZFile = new SevenZFile(my.vmdk.file)
>
> with "Bad 7z signature" error message
>
> am I missing something obvious?
>
> Thanks
>
> -D
>


Re: commons-daemon on windows, not honoring JvmMx setting?

2018-04-26 Thread Bernd Eckenfels
So how does the visible memory usage differ?

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Alex O'Ree <spyhunte...@gmail.com>
Sent: Thursday, April 26, 2018 9:00:24 PM
To: Commons Users List
Subject: Re: commons-daemon on windows, not honoring JvmMx setting?

--Jvm pointed directly at JRE/bin/server/jvm.dll or /bin/client/jvm.dll
(this part is populated based on tomcat's service.bat
--JvmMx 300
--StartMode jvm
--StopMode jvm

I've also tried adding the standard jvm xmx setting in ++JvmOptions however
it didn't appear to have any affect.
When running from the command line with java -Xmx300m -jar my.jar the
setting is honored. Tested by setting the Xmx to 100m which will cause OOM.

What is right for the service wrapper?


On Thu, Apr 26, 2018 at 11:39 AM, Bernd Eckenfels <e...@zusammenkunft.net>
wrote:

> Depends on a number of factors, but with Java I typically not start to
> worry because of a few 100mb (especially since there are quite a few
> different metrics, real virtual or resident).
>
> But since your question is about the service runner I would definitely
> compare it to java.exe launcher and let us know.
>
> What command line arguments do you use and how many threads are active?
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: Alex O'Ree <alexo...@apache.org>
> Sent: Thursday, April 26, 2018 5:33:55 PM
> To: Commons Users List
> Subject: Re: commons-daemon on windows, not honoring JvmMx setting?
>
> So 500mb overhead is normal?
>
> On Thu, Apr 26, 2018, 8:36 AM Mark Thomas <ma...@apache.org> wrote:
>
> > On 26/04/18 11:32, Alex O'Ree wrote:
> > > I had it set to 300, task mgr listed it at 800
> >
> > That looks normal.
> >
> > "Maximum Java Heap Size" != "Maximum OS Memory footprint"
> >
> > Mark
> >
> > >
> > > On Mon, Apr 16, 2018, 9:59 AM Mark Thomas <ma...@apache.org> wrote:
> > >
> > >> On 16/04/18 14:37, Alex O'Ree wrote:
> > >>>  I've been experimenting with prunsrv and have been able to get my
> java
> > >>> process to fire up as a windows service when using the "jvm" mode
> > >> (couldn't
> > >>> get java or exe to work). I am noticing that the setting "--JvmMx"
> does
> > >> not
> > >>> seem to be honored. According to the docs, it should.
> > >>>
> > >>>> Maximum memory pool size in MB. (Not used in *exe* mode.)
> > >>>
> > >>> Either my configuration is wrong or I'm just not understanding
> > something.
> > >>> Any ideas?
> > >>>
> > >>
> > >> Define "not honored".
> > >>
> > >> Mark
> > >>
> > >> -
> > >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > >> For additional commands, e-mail: user-h...@commons.apache.org
> > >>
> > >>
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
> On Apr 26, 2018 8:36 AM, "Mark Thomas" <ma...@apache.org> wrote:
>
> On 26/04/18 11:32, Alex O'Ree wrote:
> > I had it set to 300, task mgr listed it at 800
>
> That looks normal.
>
> "Maximum Java Heap Size" != "Maximum OS Memory footprint"
>
>
> Mark
>
>
> >
> > On Mon, Apr 16, 2018, 9:59 AM Mark Thomas <ma...@apache.org> wrote:
> >
> >> On 16/04/18 14:37, Alex O'Ree wrote:
> >>>  I've been experimenting with prunsrv and have been able to get my java
> >>> process to fire up as a windows service when using the "jvm" mode
> >> (couldn't
> >>> get java or exe to work). I am noticing that the setting "--JvmMx" does
> >> not
> >>> seem to be honored. According to the docs, it should.
> >>>
> >>>> Maximum memory pool size in MB. (Not used in *exe* mode.)
> >>>
> >>> Either my configuration is wrong or I'm just not understanding
> something.
> >>> Any ideas?
> >>>
> >>
> >> Define "not honored".
> >>
> >> Mark
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> >> For additional commands, e-mail: user-h...@commons.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>


Re: commons-daemon on windows, not honoring JvmMx setting?

2018-04-26 Thread Bernd Eckenfels
Depends on a number of factors, but with Java I typically not start to worry 
because of a few 100mb (especially since there are quite a few different 
metrics, real virtual or resident).

But since your question is about the service runner I would definitely compare 
it to java.exe launcher and let us know.

What command line arguments do you use and how many threads are active?

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Alex O'Ree 
Sent: Thursday, April 26, 2018 5:33:55 PM
To: Commons Users List
Subject: Re: commons-daemon on windows, not honoring JvmMx setting?

So 500mb overhead is normal?

On Thu, Apr 26, 2018, 8:36 AM Mark Thomas  wrote:

> On 26/04/18 11:32, Alex O'Ree wrote:
> > I had it set to 300, task mgr listed it at 800
>
> That looks normal.
>
> "Maximum Java Heap Size" != "Maximum OS Memory footprint"
>
> Mark
>
> >
> > On Mon, Apr 16, 2018, 9:59 AM Mark Thomas  wrote:
> >
> >> On 16/04/18 14:37, Alex O'Ree wrote:
> >>>  I've been experimenting with prunsrv and have been able to get my java
> >>> process to fire up as a windows service when using the "jvm" mode
> >> (couldn't
> >>> get java or exe to work). I am noticing that the setting "--JvmMx" does
> >> not
> >>> seem to be honored. According to the docs, it should.
> >>>
>  Maximum memory pool size in MB. (Not used in *exe* mode.)
> >>>
> >>> Either my configuration is wrong or I'm just not understanding
> something.
> >>> Any ideas?
> >>>
> >>
> >> Define "not honored".
> >>
> >> Mark
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> >> For additional commands, e-mail: user-h...@commons.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
>
>
On Apr 26, 2018 8:36 AM, "Mark Thomas"  wrote:

On 26/04/18 11:32, Alex O'Ree wrote:
> I had it set to 300, task mgr listed it at 800

That looks normal.

"Maximum Java Heap Size" != "Maximum OS Memory footprint"


Mark


>
> On Mon, Apr 16, 2018, 9:59 AM Mark Thomas  wrote:
>
>> On 16/04/18 14:37, Alex O'Ree wrote:
>>>  I've been experimenting with prunsrv and have been able to get my java
>>> process to fire up as a windows service when using the "jvm" mode
>> (couldn't
>>> get java or exe to work). I am noticing that the setting "--JvmMx" does
>> not
>>> seem to be honored. According to the docs, it should.
>>>
 Maximum memory pool size in MB. (Not used in *exe* mode.)
>>>
>>> Either my configuration is wrong or I'm just not understanding
something.
>>> Any ideas?
>>>
>>
>> Define "not honored".
>>
>> Mark
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
>> For additional commands, e-mail: user-h...@commons.apache.org
>>
>>
>


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org


Re: [DBCP] troubleshooting pool activity (tomcat version)

2018-03-23 Thread Bernd Eckenfels
I think it is best you direct your tomcat pool related questions and comments 
about their documentation to the tomcat mailing lists. (On the other hand the 
tomcat documentation on their own pool including a description why they don't 
use dbcp 1.x looks rather comprehensive to me: 
https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Introduction)

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Shawn Heisey 
Sent: Saturday, March 24, 2018 2:09:59 AM
To: user@commons.apache.org
Subject: Re: [DBCP] troubleshooting pool activity (tomcat version)

On 3/23/2018 5:19 PM, Phil Steitz wrote:
> That's the documentation for the alternative pool.  Use this instead:
> https://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP)_Configurations

This does not really explain how to configure Tomcat.  It says "go see
the DBCP documentation for parameters you can use."  I do see some
Resource configurationsfurther down on the page ... and they do not have
a "factory" attribute at all.  Is that the difference?

The only resource I have is Tomcat documentation, and whatever nuggets
were *left out* of the Tomcat documentation that I might learn here.  If
this were source code, I could get it all working.  Especially using
DBCP2.  But there's no code for me to modify -- I only have Resource
configurations in tomcat's context.xml file.

Since there doesn't appear to be any documentation for setting it up the
way you think I should be setting it up ... can you guide me to writing
a new configuration?

The config I'm planning has evolved a little bit since the last time I
shared it.  Here's an example of its current state:



If you think I should be doing something different, please tell me
exactly what you think I should change, and tell me *why* you think each
of those changes is a good idea.  And then maybe I can discuss
documentation deficiencies with the Tomcat community.


> Yes, that is a borrow.
> There is another, um, "feature" that I forgot to mention in ye olde
> DBCP 1.x.  As documented here
> https://commons.apache.org/proper/commons-dbcp/api-1.4/org/apache/commons/dbcp/BasicDataSource.html#getRemoveAbandoned()
> removal will only happen with your config if there are 57+
> connections out.

That seems like a REALLY bad way to handle it!  Hopefully that's changed
in the newest 1.x and 2.x versions!

Does this affect Tomcat too?  How about the
"org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" that we currently
have configured?  I was planning to use abandonWhenPercentageFull="50",
which is specific to Tomcat.  The property description looks like it
will fix that issue.  I think I'll just leave it out, which the
documentation says will make connections ALWAYS eligible for removal
once they've reached the abandoned timeout.

Thanks,
Shawn


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [net] Problem with completePendingCommand and large files > 600MB

2017-10-25 Thread Bernd Eckenfels
426 sounds like a server error, did you try to use a different client with your 
server?

Gruss
Bernd
--
http://bernd.eckenfels.net

From: SeungWook Kim 
Sent: Wednesday, October 25, 2017 6:34:02 PM
To: user@commons.apache.org
Subject: [net] Problem with completePendingCommand and large files > 600MB

Hi,
  I am having a problem with commons-net version* 3.6* and with large files
> 600MB and offset and length that does not include the whole file.

I have included the test code below that appears to fail with large files >
600 MB and an offset and length that does not include the whole file. If I
choose a smaller file like 90KB with offset and length, it works
successfully. If I choose a large file > 600MB with offset and length that
INCLUDES the entire file, it also works successfully. The
completePendingCommand replies back with "426 Failure writing network
stream" when the file is large > 600MB AND the offset and length is not the
entire file.

  I believe this is a bug but not sure. I did a quick look in the postings
and did not see anything that is exactly like it. Any feedback is greatly
appreciated.



*** Need to specify serverName, userName,...absOutputFile below***
***Start of Test code***

public class FtpTest {
private static Logger log = LoggerFactory.getLogger(FtpTest.class);

private static final int DEFAULT_TIMEOUT = 10*1000;

@Before
public void setup() {

}

@Test
public void test() {
String serverName = "***";
String userName = "***";
String password = "***";
String absRemoteFileName = "***";
final long offset = ***;
final long length = ***;
String absOutputFile = "***";

FTPClient ftpClient = new FTPClient();
try {
ftpClient.connect(serverName);
int reply = ftpClient.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
String lastReply = ftpClient.getReplyString();
fail(lastReply);
}
ftpClient.addProtocolCommandListener(new
PrintCommandListener(new PrintWriter(System.out),
true));
ftpClient.setKeepAlive(true);
ftpClient.setSoTimeout(DEFAULT_TIMEOUT); //set to 10 seconds
//turn on SO_LINGER w/ timeout of 0 to cause connection to be
aborted immediately and to discard any
// pending data.
ftpClient.setSoLinger(true, 0);
if(ftpClient.login(userName, password)) {
ftpClient.enterLocalPassiveMode();
if(FTPReply.isPositiveCompletion(ftpClient.getReplyCode()))
{
log.info("Successfully connected in Passive Mode and
logged into {}", serverName);

ftpClient.setFileTransferMode(FTP.STREAM_TRANSFER_MODE);
ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
ftpClient.setRestartOffset(offset);
File writeToFile = new File(absOutputFile);

try (InputStream inputStream =
ftpClient.retrieveFileStream(absRemoteFileName);
 OutputStream outputStream =
FileUtils.openOutputStream(writeToFile)) {
if(inputStream == null || outputStream == null) {
fail("One of the input/output stream is null");
}
final int BUFFER_SIZE = 4096;
byte[] buffer = new byte[BUFFER_SIZE];
int bytesRead;
int len = (int)length;
int bufferSize = length > BUFFER_SIZE ? BUFFER_SIZE
: len;
while ((bytesRead = inputStream.read(buffer, 0,
bufferSize)) != -1) {
len -= bytesRead;
bufferSize = len > BUFFER_SIZE ? BUFFER_SIZE :
len;

outputStream.write(buffer, 0, bytesRead);

if(len <= 0) {
break;
}
}


} finally {
if(ftpClient.completePendingCommand()) {
log.info("Successful complete pending command");
} else {
fail("Unsuccessful complete pending command");
}
}

} else {
fail("Problem entering passive mode. All modern ftp
server supports passive mode, but " +
serverName + " doesn't??");

}
} else {
fail("Bad credentials to server " + serverName);
}

} catch (Exception e) {
fail(e.toString() + "\n" + e.getStackTrace().toString());
}
}
}

***End of Test code***

Thank you
-Seung


Re: FTPFile check if path is absolute

2017-09-14 Thread Bernd Eckenfels
VFS has no real/clear concept of relative file path (at least not for FileName 
or File objects). For some providers (like FTP) there are some hacks in regards 
to login directories. So yes maybe isAbsolute() can and should be implemented, 
however it is not clear how.

Do you have a specific usecase?

Gruss
Bernd

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Onder SEZGIN 
Sent: Thursday, September 14, 2017 7:39:59 AM
To: user@commons.apache.org
Subject: FTPFile check if path is absolute

Hi,

When i check;

https://github.com/apache/commons-net/blob/trunk/src/main/java/org/apache/commons/net/ftp/FTPFile.java

This class does not have such a method like .isAbsolute().

Is there a specific reason why we dont have such method?
Or do you have a suggested way to do such check?

Thanks
Önder


Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
Hello,

Not sure I understand your question, for current VFS you need VFS Core, VFS 
Sandbox Provider and jCIFS library. 
https://commons.apache.org/proper/commons-vfs/download.html describes how to 
build the Sandbox code.

The new version with a modern (and better licensed) smbj variant will be 
included when it is ready, the work is going on here: 
https://github.com/codyswanson4/commons-vfs/commits/trunk thanks to Cody 
Swanson.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran <prabhuu161...@gmail.com>
Sent: Wednesday, September 13, 2017 4:11:26 PM
To: Commons Users List
Subject: Re: How to list out files from UNC path?

Am more interested to use apache license libraries only.

Can you please tell me that Jcifs applicable under common-vfs library or
both libraries different?
On 13-Sep-2017 6:51 PM, "Bernd Eckenfels" <e...@zusammenkunft.net> wrote:

> I think the code looks fine, the URL needs to be in VFS syntax (you need
> to convert the UNC path into "smb://host/share/dir" and the SMB provider
> with jcifs library needs to be on the classpath.
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 2:42:44 PM
> To: Commons Users List
> Subject: Re: How to list out files from UNC path?
>
> Hi Bernd,
>
> Thanks for your response.
>
> I have tried commons-vfs-2.1.jar with following code to get files inside
> folder in windows OS.
>
> StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
> "username", "password");
> FileSystemOptions opts = new FileSystemOptions();
> DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
> auth);
> FileObject fo =
> VFS.getManager().resolveFile("servername\\directory\\foldername",
> opts);
> FileObject[] fos=fo.getChildren();
>
> In that works correctly when i mount the servername\\directory\\folder
> into my fileexplorer.
>
> Since am using this command "net use /d *" to delete default credentials
> stored in windows while accessing unc path.Because my UNC path process one
> time validation for credentials.Once validation success for one time then
> next time it not prompts for credentials it directly enters into folder.
>
> Once i executed that net use command successfully then run my api using vfs
> jar it could not get children of that shared folder present in UNC Path.
>
> am googling but not find better solution.
>
> Could you give any suggestion for solve that issue?
>
> Best,
> Mahendran
>
>
>
> On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
> wrote:
>
> > Hello,
> >
> > Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> > directly connect to a SMB1.0 server (and use the normal VFS API to list
> > files). However for licensing reasons we do not ship binaries, so you
> have
> > to compile the provider on your own. The other problem is, that it only
> > supports SMB1.0 with increasingly gets switched off.
> >
> > A new component which fixes both problems (based on smbj) is in the
> makes.
> > You can check the development mailing list archive for the Github fork. I
> > haven't however yet used it personally so I am not quite sure how far it
> is
> > (but I would assume listing files works).
> >
> > Gruss
> > Bernd
> > --
> > http://bernd.eckenfels.net
> > 
> > From: prabhu Mahendran <prabhuu161...@gmail.com>
> > Sent: Wednesday, September 13, 2017 12:41:52 PM
> > To: user@commons.apache.org
> > Subject: How to list out files from UNC path?
> >
> > Hi All,
> >
> > Is this possible to list out files present in UNC
> > Path(//hostname/foldername) with valid credentials using VFS library?
> >
> > Generally I wants to get files present in network folder in which needs
> > credentials  to access files.
> >
> > Now i need to list out files using java api.
> >
> > Can anyone suggest me way to do that?
> >
> > Thanks,
> > Mahendran
> >
>


Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
I think the code looks fine, the URL needs to be in VFS syntax (you need to 
convert the UNC path into "smb://host/share/dir" and the SMB provider with 
jcifs library needs to be on the classpath.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran <prabhuu161...@gmail.com>
Sent: Wednesday, September 13, 2017 2:42:44 PM
To: Commons Users List
Subject: Re: How to list out files from UNC path?

Hi Bernd,

Thanks for your response.

I have tried commons-vfs-2.1.jar with following code to get files inside
folder in windows OS.

StaticUserAuthenticator auth = new StaticUserAuthenticator("domainname",
"username", "password");
FileSystemOptions opts = new FileSystemOptions();
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
auth);
FileObject fo =
VFS.getManager().resolveFile("servername\\directory\\foldername", opts);
FileObject[] fos=fo.getChildren();

In that works correctly when i mount the servername\\directory\\folder
into my fileexplorer.

Since am using this command "net use /d *" to delete default credentials
stored in windows while accessing unc path.Because my UNC path process one
time validation for credentials.Once validation success for one time then
next time it not prompts for credentials it directly enters into folder.

Once i executed that net use command successfully then run my api using vfs
jar it could not get children of that shared folder present in UNC Path.

am googling but not find better solution.

Could you give any suggestion for solve that issue?

Best,
Mahendran



On Wed, Sep 13, 2017 at 5:08 PM, Bernd Eckenfels <e...@zusammenkunft.net>
wrote:

> Hello,
>
> Yes and no. With the Cifs provider contained in the VFS Sandbox you can
> directly connect to a SMB1.0 server (and use the normal VFS API to list
> files). However for licensing reasons we do not ship binaries, so you have
> to compile the provider on your own. The other problem is, that it only
> supports SMB1.0 with increasingly gets switched off.
>
> A new component which fixes both problems (based on smbj) is in the makes.
> You can check the development mailing list archive for the Github fork. I
> haven't however yet used it personally so I am not quite sure how far it is
> (but I would assume listing files works).
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> 
> From: prabhu Mahendran <prabhuu161...@gmail.com>
> Sent: Wednesday, September 13, 2017 12:41:52 PM
> To: user@commons.apache.org
> Subject: How to list out files from UNC path?
>
> Hi All,
>
> Is this possible to list out files present in UNC
> Path(//hostname/foldername) with valid credentials using VFS library?
>
> Generally I wants to get files present in network folder in which needs
> credentials  to access files.
>
> Now i need to list out files using java api.
>
> Can anyone suggest me way to do that?
>
> Thanks,
> Mahendran
>


Re: How to list out files from UNC path?

2017-09-13 Thread Bernd Eckenfels
Hello,

Yes and no. With the Cifs provider contained in the VFS Sandbox you can 
directly connect to a SMB1.0 server (and use the normal VFS API to list files). 
However for licensing reasons we do not ship binaries, so you have to compile 
the provider on your own. The other problem is, that it only supports SMB1.0 
with increasingly gets switched off.

A new component which fixes both problems (based on smbj) is in the makes. You 
can check the development mailing list archive for the Github fork. I haven't 
however yet used it personally so I am not quite sure how far it is (but I 
would assume listing files works).

Gruss
Bernd
--
http://bernd.eckenfels.net

From: prabhu Mahendran 
Sent: Wednesday, September 13, 2017 12:41:52 PM
To: user@commons.apache.org
Subject: How to list out files from UNC path?

Hi All,

Is this possible to list out files present in UNC
Path(//hostname/foldername) with valid credentials using VFS library?

Generally I wants to get files present in network folder in which needs
credentials  to access files.

Now i need to list out files using java api.

Can anyone suggest me way to do that?

Thanks,
Mahendran


Re: [cli] absolute file path parsing

2017-08-16 Thread Bernd Eckenfels
If this is unix/Linux you cannot type \ on the command line without quoting, 
that's not related to Java. You can double the backslash or put it in "quotes". 
If you expect more characters which should not interpreted by the shell, use 
single quotes. CLI cannot work around this, it simply does not get the 
character passed. Since this affects all Linux commands you won't need to deal 
with this.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Roger Crerie 
Sent: Tuesday, August 15, 2017 4:55:31 PM
To: user@commons.apache.org
Subject: [cli] absolute file path parsing

I am using the apache.commons.cli CommandLineParser and am running into the 
following problem.

$ java -jar ./target/sorteria-0.0.1-SNAPSHOT-jar-with-dependencies.jar -f 
C:\shared\HCPAnywhere\AW001_3.0.0.20.iso -t ISO
test = C:sharedHCPAnywhereAW001_3.0.0.20.iso
File = C:sharedHCPAnywhereAW001_3.0.0.20.iso

When getting the -f option which is going to be an absolute file path the 
parser removes the \ character.  If I use \\ this works fine

$ java -jar ./target/sorteria-0.0.1-SNAPSHOT-jar-with-dependencies.jar -f 
C:\\shared\\HCPAnywhere\\AW001_3.0.0.20.iso -t ISO
test = C:\shared\HCPAnywhere\AW001_3.0.0.20.iso
File = C:\shared\HCPAnywhere\AW001_3.0.0.20.iso


I don't want the end user of this tool to have to know to do this though.  Is 
there a way for the parser to handle the \ character?  Maybe in the creation of 
the options?  What I have for creating this option is

Option file = new Option("f", "file", true, "Absolute File and Location");
file.setRequired(true);
options.addOption(file);

Roger
roger.cre...@hds.com


Re: Jsvc start/stop and threads

2017-06-05 Thread Bernd Eckenfels
These are just examples, depending on your use case. But I would agree that 
thread is a bad one, as it is quite normal to create and start them in start.

Gruss
Bernd
--
http://bernd.eckenfels.net

From: Andrea Lo Pumo 
Sent: Monday, June 5, 2017 12:30:41 PM
To: Commons Users List
Subject: Re: Jsvc start/stop and threads

So I need to create the thread inside start() and not in init().
Why in the documentation it is suggested to create threads in init()?
"void init(String[] arguments): Here open configuration files, create a
trace file, create ServerSockets, Threads"

Thanks for the prompt reply.

2017-06-05 12:27 GMT+02:00 Greg Thomas :

> If you're terminating your thread, you'll simply need to start a new one.
>
> Greg
>
> On 5 June 2017 at 11:24, Andrea Lo Pumo  wrote:
>
> > I am creating a thread in init(), and starting it in start().
> > In the user guide, there is written:
> > "void stop(): Inform the Thread to terminate the run(), close the
> > ServerSockets".
> > So in stop() I am interrupting my thread.
> > In the apidocs, there is written "the container may restart the Daemon by
> > calling start() after stop().". But, if my thread has finished, it cannot
> > be restarted again. (Thread.start() cannot be called after the thread has
> > completed execution).
> > So, what should I do?
> >
> > Thanks.
> >
>


Re: NPE in getRemoteAdress

2016-08-28 Thread Bernd Eckenfels
Hello,

I am not sure about your NPE, but this code here ignores the result of
the read call. It cannot deal with short reads:

 Am Sun, 28 Aug 2016
15:50:36 +0200 schrieb Oliver Zemann :
> byte b[] =new byte[4096];
> while (inputStream.read(b) != -1) {
>   fos.write(b);
>   bytesWritten += b.length;


Gruss
Bernd

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [fileupload] UTF-8 encoding issue

2016-08-01 Thread Bernd Eckenfels
Hello,

http headers are essentially ASCII. Especially for things like the
boundary. The arguments (filename) might be QP, but not all browsers
like that.

Gruss
Bernd

Am Mon, 1 Aug 2016 12:10:24 -0700
schrieb Gary Gregory :

> I can see that
> in org.apache.commons.fileupload.FileUploadBase.getBoundary(String)
> we have:
> 
>   boundary = boundaryStr.getBytes("ISO-8859-1");
> 
> Should that be:
> 
>   boundary = boundaryStr.getBytes(headerEncoding);
> 
> ?
> 
> Gary
> 
> On Mon, Aug 1, 2016 at 11:01 AM, Campbell, Lance 
> wrote:
> 
> > There is still an issue.
> > I had a typo in my email.  There should not have been the line
> > resp.setContentType("UTF-8");
> >
> > Sorry.
> >
> >
> >
> > -Original Message-
> > From: Campbell, Lance [mailto:la...@illinois.edu]
> > Sent: Monday, August 01, 2016 12:51 PM
> > To: 'user@commons.apache.org' 
> > Subject: [fileupload] UTF-8 encoding issue
> >
> > Commons File Upload 1.3.2
> >
> > I am using the commons file upload version 1.3.2 via servlets for
> > apache-tomcat 8.  All of my servlets work with UTF-8 except for
> > when I am using the commons file upload library.  It seems to be
> > setting the encoding to "ISO-8859-1" .  I have set both the request
> > and response headers to UTF-8.  I have also set the Java VM to use
> > UTF-8.
> >
> > How can I get around this issue?
> >
> > I have read online to do the following:
> > req.setCharacterEncoding("UTF-8");
> > resp.setContentType("UTF-8");
> > resp.setCharacterEncoding("UTF-8");
> >
> > I have also read to set this at the form:
> >
> > accept-charset="UTF-8"
> >
> > It seems like your code is hardcoding the encoding to "ISO-8859-1"
> > in the class FileUploadBase.
> >
> > Why not allow us to set the encoding in a method then use the
> > "ISO-8859-1" as a fall back?
> >
> > Thanks,
> >
> > Lance Campbell
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
> 
> 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs]Issue creating HttpClient timeout

2016-07-27 Thread Bernd Eckenfels
Hello,

I am not sure I understand how the configuration of HTTPClient with
HttpConnectionManagerParams works. Especially not what the 

* ConnectionManager set methods must be called after the host & port
* and proxy host & port are set in the HostConfiguration.

comment means. But I guess since you have problems with missing
timeouts, the way it is currently done does not work.

Can you please open a JIRA for this problem?

https://issues.apache.org/jira/browse/VFS

If you want you can also attach your patch. I hope somebody who is more
familier with Apache HttpClient can comment on it.

Gruss
Bernd



 Am Mon, 25 Jul 2016
12:04:48 -0700 schrieb Feiyi Xiang :

> Hi,
> 
> My name is Ben and recently we met an issue that the thread got stuck
> during the http connection using HttpClient. And It showed that the
> connection timeout was set to 0, which was not what we set. let me
> briefly show here how we are using VFS2: Create a FileSystemOptions
> with timeout set:
> 
> final FileSystemOptions fso = new FileSystemOptions();
> final HttpFileSystemConfigBuilder httpBuilder =
> HttpFileSystemConfigBuilder.getInstance();
> httpBuilder.setConnectionTimeout(fso, connectionTimeout);
> httpBuilder.setSoTimeout(fso, soTimeout);
> 
> Create a FileObject using FileSystemManager:
> 
> vfs2FileManager.resolveFile(fileLocation, fso);
> 
> Finally get the input stream using DefaultFileContent:
> 
> final InputStream instr = fileObject.getInputStream();
> 
> We noticed that in executeMethod() of HttpMethodDirector, line 153,
> it is setting the connection timeout using client's params. However,
> in HttpClientFactory, it's setting fileSystemOptions in
> connectionMgrParams, and the HttpClient's params would not have this
> value. So we did the following to make it work: In package
> org.apache.commons.vfs2.provider.http, HttpClientFactory, added line
> 148 and 149:
> client.getParams().setConnectionManagerTimeout(connectionMgrParams.getConnectionTimeout());
> client.getParams().setSoTimeout(connectionMgrParams.getSoTimeout());
> Please let me know your thought about this and if there is a patch
> needed, or is there something we are missing or doing wrong ?
> 
> Thanks!
> 
> Ben
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [cli] Submiting patches

2016-04-17 Thread Bernd Eckenfels
Hello,

if you have a concerete bug you should open a JIRA ticket and attach
your fix (first search if the ticket already exists).

If you want to discuss the direction your patch is taking, it is better
to write a note to dev@commons "I am working on CLI-x and would
like to submit a patch which does x".

You can also sent small patches to the dev mailinglist or open a Github
PR.

It is described here: 
https://github.com/apache/commons-cli/blob/trunk/CONTRIBUTING.md

Thanks for considering to contribute.

Gruss
Bernd


 Am Sun, 17 Apr 2016
22:38:43 +0700 schrieb Nayana Hettiarachchi :

> Patches to what
> 
> Sent via mobie
> On Apr 17, 2016 22:28, "Isuranga Perera" 
> wrote:
> 
> > Can anybody tell me how to submit my patches.
> >
> > Thank You,
> > Isuranga Perera
> >
> 

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [IO] Query on Veracode issue

2016-02-10 Thread Bernd Eckenfels
We discused the same (for an older Version) here:

https://issues.apache.org/jira/browse/IO-461?jql=text%20~%20%22veracode%22

Basically this is wrapper around a dangerous API, you might not use it
in your code. If you do, you need to review your code. 

Note that the topic was quite popular with the Shellshock hype, but
there are more (lingering) problems with spawning executables,
constructing environment variables and command lines.

Unfortunatelly (or not?) the lib does not shield you from those.

Gruss
Bernd


 Am Wed, 10 Feb
2016 11:14:09 -0200 schrieb Edson Richter :

> 
> 
>  Mark Thomas escreveu 
> 
> > On 10/02/2016 12:00, Parag Joshi wrote:
> > > Hi,
> > > 
> > > 
> > > 
> > > I am using Apache Commons IO v2.4 (commons-io-2.4.jar) in one of
> > > my projects. My organization uses Veracode to scan the deliveries
> > > of my project. Veracode scans the projects for vulnerability
> > > issues and flags the flaws if the code and/or third-party
> > > libraries used in the project are vulnerable for some external
> > > attacks.
> > > 
> > > 
> > > During the recent scan the Veracode system flagged an issue in
> > > commons-io-2.4.jar.
> > > 
> > > 
> > > Below are the details:
> > > 
> > > 
> > > *CWE ID:* 78
> > > 
> > > http://cwe.mitre.org/data/definitions/78.html
> > > 
> > > *Name:* Improper Neutralization of Special Elements used in an OS
> > > Command ('OS Command Injection')
> > > 
> > > *Module:* commons-io-2.4.jar
> > > 
> > > *Source:* FileSystemUtils.java: *Line#* 535
> > > 
> > > *Attack Vector: *java.lang.Runtime.exec
> > > 
> > > *Description:* This call to java.lang.Runtime.exec() contains a
> > > command injection flaw. The argument to the function is
> > > constructed using user-supplied input. If an attacker is allowed
> > > to specify all or part of the command, it may be possible to
> > > execute commands on the server with the privileges of the
> > > executing process. The level of exposure depends on the
> > > effectiveness of input validation routines, if any. The first
> > > argument to exec() contains tainted data from the variable
> > > cmdAttribs. The tainted data originated from earlier calls to
> > > java.lang.string.!operator_javanewinit,
> > > java.io.file.!operator_javanewinit,
> > > org.apache.commons.io.filesystemutils.freespacekb,
> > > org.apache.commons.io.filesystemutils.freespacekb,
> > > org.apache.commons.io.filenameutils.normalize,
> > > org.apache.commons.io.filenameutils.getprefixlength, and
> > > org.apache.commons.io.filesystemutils.freespace.
> > > 
> > > *Remediation:* Validate all user-supplied input to ensure that it
> > > conforms to the expected format, using centralized data
> > > validation routines when possible. When using black lists, be
> > > sure that the sanitizing routine performs a sufficient number of
> > > iterations to remove all instances of disallowed characters. Most
> > > APIs that execute system commands also have a "safe" version of
> > > the method that takes an array of strings as input rather than a
> > > single string, which protects against some forms of command
> > > injection.
> > > 
> > > Now, my organization needs an assessment report for the above
> > > issue from the author of the third-party library which in this
> > > case it is Apache. Can you please provide me the assessment
> > > report for above issue?
> > 
> > With my ASF security team member hat on:
> > No.
> > 
> > > Is this a known issue?
> > 
> > That question is based on the assumption that an issue exists.
> > 
> > > And is it safe to use commons-io-2.4.jar keeping in mind the
> > > above issue?
> > 
> > No idea. It is your code using the library so they only person who
> > can say how the library is used is you.
> > 
> > Is if possible to use this library in such a way as to expose you
> > to a remote code execution vulnerability? Sure. It is also possible
> > to use the library safely. How you use it is up to you and you have
> > to take responsibility for that.
> > 
> > Mark
> > 
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> 
> Also, considering Apache Commons is an Open Source software, you are
> welcome to download sources, develop a "patch" and contribute back,
> making world a safer place for all of us.
> 
> Regards, 
> 
> Edson Richter 

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] New Properties for FtpFileSystemConfigBuilder

2015-12-07 Thread Bernd Eckenfels
Hello Roger,

sounds useful to me. Do you plan to parse a string range ("1-100") or
define a min and max property?

Gruss
Bernd

 Am Mon, 7 Dec 2015 13:26:35 -0800
schrieb Roger Membreno :

> Hello Apache Community, how are you doing?
> 
> We use Commons VFS in our FTP connection projects, and for a recent
> project we only able to connect to our FTP site when using Passive
> mode.  If we used Active mode we could login to the FTP site but all
> files in the directory did not exist and could not be accessed.
> 
> Since our server is behind a firewall with NAT translation we
> determined that the data connection could not be established even if
> we opened up some ports on the firewall.  We were able to connect to
> the FTP site using a stanadalone FTPClient by setting the following
> properties to match our NAT security settings:
> setReportActiveExternalIPAddress()
> client.setActivePortRange()
> 
> With these properties set the PORT command issued by our client to
> the FTP site will create a valid data connection.  What I'd like to
> do is submit a change via GitHub that does the following:
> 1. Add "reportActiveExternalIPAddress" and "activePortRange"
> properties to the class
> org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder 2.
> Ehance createConnection in
> org.apache.commons.vfs2.provider.ftp.FtpClientFactory to read these
> new FtpFileSystemConfigBuilder properties from the config instance
> and set them on the FTPClient.
> 
> Let me know if you have any questions.  If you think this is a good
> change I'll make a new issue in JIRA for this enhancement.  I also
> think that these changes could help resolve VFS-201 (
> https://issues.apache.org/jira/browse/VFS-201)
> 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS2] What is the best way to convert regular FIle to FileObject

2015-07-25 Thread Bernd Eckenfels
Hello,

you can use FileSystemManager.toFileObject(File):

https://commons.apache.org/proper/commons-vfs/apidocs/org/apache/commons/vfs2/FileSystemManager.html#toFileObject%28java.io.File%29

Gruss
Bernd

Am Sat, 25 Jul 2015 18:13:14 +0300
schrieb Alexander Nozik alta...@gmail.com:

 Hello,
 I've got a program, part of which is based on regular local file
 system and part is file system independent. So sometimes I need to
 convert regular local Files to VFS FileObjects. What is the simplest
 way to do that? It should be very simple, but I haven't found it in
 the documentations.
 
 With best regards, Alexander Nozik.
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS2] What is the best way to convert regular FIle to FileObject

2015-07-25 Thread Bernd Eckenfels
Hello,

yes you always need a configured FSM for anything VFS. If you do not
have special needs you can use the system global auto configured one:

FileObject fo = VFS.getManager().toFileObject(file);

See also http://commons.apache.org/proper/commons-vfs/api.html

Gruss
Bernd


 Am Sat, 25 Jul 2015
18:28:36 +0300 schrieb Alexander Nozik alta...@gmail.com:

 Tried that. In order to do so, I need to create that manager first.
 If I try to create either DefaultFileSystemManager or 
 StandardFileSystemManager and use them, I get FileSystemException: 
 Could not find a file provider which can handle local files. in both 
 cases. I believe I need to somehow build a provider for local files,
 but it not obvious from documentation how to do so. If I try to use 
 DefaultLocalFileProvider directly it throws internal
 NullPointerException. Could you provide a code to build local file
 system?
 
 
 On 25-Jul-15 18:17, Bernd Eckenfels wrote:
  Hello,
 
  you can use FileSystemManager.toFileObject(File):
 
  https://commons.apache.org/proper/commons-vfs/apidocs/org/apache/commons/vfs2/FileSystemManager.html#toFileObject%28java.io.File%29
 
  Gruss
  Bernd
 
  Am Sat, 25 Jul 2015 18:13:14 +0300
  schrieb Alexander Nozik alta...@gmail.com:
 
  Hello,
  I've got a program, part of which is based on regular local file
  system and part is file system independent. So sometimes I need to
  convert regular local Files to VFS FileObjects. What is the
  simplest way to do that? It should be very simple, but I haven't
  found it in the documentations.
 
  With best regards, Alexander Nozik.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
  For additional commands, e-mail: user-h...@commons.apache.org
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
  For additional commands, e-mail: user-h...@commons.apache.org
 
 
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



[dbcp] Abandon Connection - not Logging in standalone

2015-07-23 Thread Bernd Eckenfels
Hello,

I noticed that with Oracle drivers you cannot kill a busy connection
by closing it (since close(), _getPC(), isOpen() and stmt.close() all
will synchronize on the (busy) physical connection.

I noticed this in a custom persistence layer, so I thought to check out
if DBCP handles this situation.

I have a test program here:

https://gist.github.com/ecki/345ee08ac97820972fe7

First of all it does not log DBCP messages. I am not sure what is
needed to get it going. As you can see in the output the deliberate
debug() message is printed so the general LogFactory should be set up.

When I run the program with acfg.setRemoveAbandonedTimeout(12) it
suceeds, since the c3 is only idle for 10s. When I run it with (4) it
will (so it seems) close the connection and I get a exception on next
use. However I dont see a log message about the abandoned connection
and the usage tracking. Ideas?

A second thing, from the abandoned tracker I had the impression the
usage is counted at the begin of exec. So if a execution takes 20s as
in my case, it should be considered abandoned. But it seems not to be
the case. Is it recognizing it is busy when the exec does not return?
If this is the case, is there also a way to kill/destroy connections
beeing used too long?

Gruss
Bernd

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] announcing an Azure Blob Storage Provider

2015-03-26 Thread Bernd Eckenfels
Am Thu, 26 Mar 2015 11:26:26 +0100
schrieb Benedikt Ritter brit...@apache.org:

 We could add a section with 3rd party providers to our website...

There is a related projects in the Wiki:

https://wiki.apache.org/commons/VFS

I have added vfs-azure.

Gruss
Bernd

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] FileSystemException: Could not load VFS configuration

2015-03-25 Thread Bernd Eckenfels
Am Wed, 25 Mar 2015 17:48:03 +0100
schrieb Helge Waastad he...@waastad.org:

 If I bundle the commons-vfs2 (2.1-SNAPSHOT/2.0) with the rar I get
 then exception:
 FileSystemException: Could not load VFS configuration from
 jar:file:/home/helge/Skrivebord/jca-parent/acme-war/target/apache-tomee/apps/acme-ra-1.0-SNAPSHOT/commons-vfs2-2.1-SNAPSHOT.jar!/org/apache/commons/vfs2/impl/providers.xml

Is this JAR and with the resource existing or not?

 If I add vfs2-commons to tomee/lib and provided in my rar, then its
 working OK.
 
 Is this how it's supposed to work?

The default configuration mechanism resolves providers.xml via the
classloader of the StandardFileSystemManager class. It retrieves the
URL for that resource and loads it.

You might want to overwrite the init() method or somple create the
DefaultFileSystemManager and configure it yourself.

(I am not entirely sure why it does not work in your scenario).

Gruss
Bernd

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: Apache common pooling 2

2015-02-03 Thread Bernd Eckenfels
Hello,

instead of the SFTP connections you can pool channels or sessions. Each
of them will only have a single borrower, but multiple threads could
use the same physical connection. 

This is possible because ssh protocol allows some multiplexing. But in
most scenarios I am not sure if the work is work it.

BTW: I think unlike JCA wich allows a seperation between logical
connections and managed connections the Pool does not offer a ready
solution for that kind of abstraction (especially not related to
tearing down all channels when one fails or initiating new physical
connections starting with a given utilisation).

Gruss
Bernd

BTW: something I would really like to see is a JDBC pool where you get
connection stubs which get bound late to actual JDBC sessions. This
helps code which holds on to the object and does not return it ASAP.


Am Tue, 3 Feb 2015 18:28:01 -0500
schrieb James Carman ja...@carmanconsulting.com:

 On Tue, Feb 3, 2015 at 5:07 PM, Matthew Huckaby
 matthew.huck...@gmail.com wrote:
 
  JC Perhaps you'd be more interested in a cache rather than a
  JC pool?
 
  If the intention is to share an SFTP session/client reference
  between threads, check-in and check-out could be important.
 
 
 I was assuming that the true intent was to really share the instances
 between threads.  If that's the case, then a cache might be more
 appropriate.  However, as you point out, it's probably not wise to
 share those connections with SFTP anyway, so pooling really is what
 you want.  You're going to have to do some form of serialization of
 the messages/requests (whatever they're called) going across that
 connection.  May as well let commons-pool do it for you by
 borrow/return pattern.
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [daemon] Problem using procrun for Java service

2015-01-28 Thread Bernd Eckenfels
Hm,

you can try the following:

a) specify the JVM directly, maybe the auto does not work outside a
user session.
b) try tu use the prunmsgr to edit the settings instead of the command
line
c) turn on logging and check the logfile

Is the S:\ drive a share? can you try with a local disk as well?
(permission)

What is the user you use to start the service? try to enter a user
account (do this in the service manager so the user gets the required
permission).

Gruss
Bernd


Am Wed, 28 Jan 2015 10:31:58 -0500
schrieb Wong, Nancy nancy.w...@spdji.com:

 I have installed my java application as a Windows service using
 following:
 
 prunsrv.exe //IS//SG_FileSync --Install=S:\Automation\prunsrv.exe
 --Jvm=auto --Startup=auto --StartMode jvm
 --Classpath=S:\Automation\SG_FileSync.jar --StartClass=SyncFile
 --StartMethod=main
 
 I can run the program successfully in console mode:
 
 prunsrv.exe //TS//SG_FileSync
 
 But I cannot start the service directly in Windows, or using
 prunsrv.exe //ES//SG_FileSync or via prunmgr.  I get the following
 error message:
 
 The system cannot find the file specified.  Failed to start service.
 
 What am I able to run my application in console mode but not using ES?
 
 Thanks,
 Nancy
 
 
 
 
 The information contained in this message is intended only for the
 recipient, and may be a confidential attorney-client communication or
 may otherwise be privileged and confidential and protected from
 disclosure. If the reader of this message is not the intended
 recipient, or an employee or agent responsible for delivering this
 message to the intended recipient, please be aware that any
 dissemination or copying of this communication is strictly
 prohibited. If you have received this communication in error, please
 immediately notify us by replying to the message and deleting it from
 your computer. McGraw Hill Financial reserves the right, subject to
 applicable local law, to monitor, review and process the content of
 any electronic message or information sent to or from McGraw Hill
 Financial e-mail addresses without informing the sender or recipient
 of the message. By sending electronic message or information to
 McGraw Hill Financial e-mail addresses you, as the sender, are
 consenting to McGraw Hill Financial processing any of your personal
 data therein.
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [configuration] Adding CData to xml property

2015-01-08 Thread Bernd Eckenfels
Hello,

it does not work to set a value with a valid CDATA tag, that is what
the API is about: it will automatically properly escape all strings so
it cannot be produce broken xml.

I guess it does not allow you to influence the escape style (so that
you can enforce it to use CDATA), but the question is do you really
need it - using character entities might just work as well.

Gruss
Bernd


 Am Thu, 8 Jan 2015 11:30:28 +0530
schrieb jeevi tesh jeevitesh...@gmail.com:

 Hi martin,
 Thanks for the helping hand.
 
 I tried with the approach which you said but no fruit.
 StringBuffer cDataTagStart= new StringBuffer();
 cDataTagStart.append(3C![CDATA[);
 cDataTagStart.append(]]3E);
 
 xmlContentOfMetaData.addProperty(Resource.ResourceURL,
 cDataTagStart);
 
 Still Its adding Special charters
 ResourceURL003C![CDATA[]]003E/ResourceURL
 
 Also tried with below approach
 cDataTagStart.append(lt;![CDATA[);
 cDataTagStart.append(]]gt;);
 
 cDataTagStart.append(003C![CDATA[);
 cDataTagStart.append(]]003E);
 
 cDataTagStart.append(\u003C![CDATA[);
 cDataTagStart.append(]]\u003E);
 
 None of the above resulted in adding ![[CData Tag
 
 Thanks
 
 On Wed, Jan 7, 2015 at 9:03 PM, Martin Gainty mgai...@hotmail.com
 wrote:
 
 
 
   Date: Tue, 6 Jan 2015 18:40:07 +0100
   From: oliver.he...@oliver-heger.de
   To: user@commons.apache.org
   Subject: Re: [configuration] Adding CData to xml property
  
  
  
   On 06.01.2015 17:55, jeevi tesh wrote:
Hi,
   
Need to add CDATA into XML Property element, but special
character are getting added. Here is my code. Please give your
thoughts on the same.
   
Here is the code.
   
String cDataTagStart=\\![CDATA[;
   
String cDataTagEnd=]]\\;
   
credentialsURL =cDataTagStart+credentialsURL+cDataTagEnd;
   
xmlContentOfMetaData = CredentialProvider.*getInstance*();
   
xmlContentOfMetaData.addProperty(Resource(-1).ResourceName,
  resourceName);
   
xmlContentOfMetaData.addProperty(Resource.ResourceURL,
  credentialsURL);
   
   
   
But Special characters are getting added
   
ResourceNameTESTRESOURCENAME/ResourceName
   
ResourceURL\![CDATA[TESTCredentialsURLS2]]\/ResourceURL
   
  
   XMLConfiguration ensures that for newly added or updated
   properties valid XML is generated. Therefore, special characters
   are encoded automatically. This frees applications from the
   burden to do the encoding manually. However, there is less
   control of the XML generated.
  
   Currently, XMLConfiguration does not supported the generation of
   CDATA sections. You may want to add a feature request in our bug
   tracking system [1].
 
  MGIn the meanwhile why not use StringBuffer to concatenate the
  MGUnicode
  equivalent for your CDATA
  MGexample: this prints the Unicode equivalent of the divisor
  MGcharacter '÷' System.out.println(\\u +
  Integer.toHexString('÷'|0x1).substring(1) )
 
   Oliver
  
   [1]
  
  http://commons.apache.org/proper/commons-configuration/issue-tracking.html
  
   
Thanks
   
jeevitesh
   
  
   -
   To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
   For additional commands, e-mail: user-h...@commons.apache.org
  
 
 
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] How to properly clear VFS Ram filesystem

2014-12-28 Thread Bernd Eckenfels
Hello,

there are a number of leak fixes in the trunk (upcoming 2.1), this
might be needed to get the close really purge the cache. Arbi, can you
check and let us know if it works in 2.0 and if not, if 2.1 is fine?

(and yes, I also wonder why we have no .close() on FileSystem :) 

Gruss
Bernd


Am Wed, 24 Dec 2014
17:45:23 +0100 schrieb Martin van den Bemt mll...@mvdb.net:

 FileSystemManager manager = VFS.getManager();
 FileObject root = manager.resolveFile(ram:/);
 manager.closeFileSystem(root.getFileSystem());
 
 should do the trick.

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [daemon] Unable to read tomcat.pid file created by Tomcat process

2014-11-11 Thread Bernd Eckenfels
Am Tue, 11 Nov 2014 00:09:57 -0500
schrieb Anil Ambati aamb...@us.ibm.com:
 Why does the Tomcat server keep the PID file locked, preventing other 
 processes to even read the file? Is there a work around or solution
 for this problem?

I think the reason for that is, that you can this way detect if the
process is still running: if it is locked, then it is running.

Of course this makes it hard to read the file. To work around this I
guess a native library is needed. (Or you execute cmd /C type
file.pid). Not sure if any component offers this (might be a good
addition to commons-daemon).

Gruss
Bernd

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



AW: [FTP and FTPS] using char[] password instead of String

2014-11-05 Thread Bernd Eckenfels
Hello,

i am hated at work to introduce char[] parameters for passwords, and after 
having a few years of experience with it I can say they are hardly worth it: 
Most often the caller has strings to work with anyway and need to copy them to 
char Array or the called Code Works with strings, or it is hard for the caller 
and callee to agree when to zero the Content. And if You Look closely with all 
generational collectors a string object typically survives not even the first 
eden copy (typically seconds).

having Said that, it might be good to consider CharSequence in future APIs.

Bernd

-- 
http://bernd.eckenfels.net

- Ursprüngliche Nachricht -
Von: Nicholas Castorina nicholas.castor...@openmarket.com
Gesendet: ‎05.‎11.‎2014 19:01
An: user@commons.apache.org user@commons.apache.org
Betreff: [FTP and FTPS] using char[] password instead of String

Howdy,
Is there a way to use the FTPSClient.login(username, password) where password 
is a char[] instead of a String?  Strings are immutable and don't get removed 
from memory until garbage collection.  That means that the password can 
possibly be recovered from a memory dump.  However, if password was a char[], I 
could do Arrays.fill(password, ' ') and there would be no traces of the 
password in memory once I was done with using it.

For a more detailed explanation of this, you can go to 
http://stackoverflow.com/questions/8881291/why-is-char-preferred-over-string-for-passwords.

I didn't see an option for a char[] instead of String for password, but I could 
have missed one.  If there is not currently a way to use a char[], you could 
also probably get away with changing the password from type String to 
CharSequence (the interface that String implements).  That way FTPSClient is 
backwards compatible and you can clear passwords after use by using a 
CharBuffer (also implements CharSequence) instead of a String.

Thanks,
Nicholas Castorina

This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp


Re: [POOL-276] Validation code invoked on unexpected timing.

2014-09-03 Thread Bernd Eckenfels
Hello,

your JIRA report looks good! I took the liberty to modify
it a bit and included JIRA markup {code} before and after the code, so
it does do formatting and syntax highliting.

BTW: I added some more print in my local version of your reproducer and
adding the thread name, so it is clear when things are happening. The
output reproduces the following sequence:

1409804599167 mainCreated 0 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804599229 mainWrapped 0 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804599229 main  Validated 1 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804599229 main   Borrowed 1 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804602256 Timer-0   Returning 1 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804602256 main  Validated 2 
379cbef5-3e40-4f39-af5f-ac3e76506e81
1409804602256 main Borrowed Again 2 
379cbef5-3e40-4f39-af5f-ac3e76506e81

Just in case anybody wondered, it is happening after the return in the borrow 
thread.

Gruss
Bernd


 Am Thu, 4 Sep 2014 12:27:39
+0900 schrieb Noriyuki Torii torii7...@gmail.com:

 Hi, Phil.
 Thanks for your response.
 
 I opened a ticket for this issue as POOL-276.
 In fact, I am a newbie of JIRA.  So if there are any mistakes on this
 ticket, please let me know.
 
 Regards,
 
 2014-09-04 10:35 GMT+09:00 Phil Steitz phil.ste...@gmail.com:
  On 9/3/14 9:27 AM, Noriyuki Torii wrote:
  Hi, all.
 
  I found BasePooledObjectFactory.validateObject() of commons-pool
  sometimes called
  on unexpected timing and I cannot identify the cause.
  So I would like to ask some advice.
 
  I've configured the pool so as to the validateObject() would be
  invoked only on instance
  creation, but sometimes it was invoked for non-fresh instance on
  borrowing.
 
  I also attach small reproduction code below.
  Can anyone tell it is because some lack of configurations, or,
  actual pool's bug?
 
  Thanks for reporting this.  Looks like it could be a pool bug.  Do
  you mind opening a JIRA ticket for this?
 
  Phil
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [math] JDBC output to generate statistical results.

2014-08-26 Thread Bernd Eckenfels
Hello,

First of all: Your DBMS might have SQL methods to calculate typical aggregates. 
This is not only easier to program, but also most likely faster and less 
resource intensive than doing it in an extra application.

But since this is the commons list: If You want to use the Commons Math 
functions you have to present the set of values (in your case as an array). And 
since there is no adapter for result sets (I think) building the array would be 
done inside the loop. The most natural thing is to use an ArrayList to append 
the values in the loop,  but then you have to convert the resulting Double[] 
into double[]. The ArrayUtils in Apache Commons Lang could do that (but if you 
need to process millions of numbers it is not the most efficient way to do it).

untested:

ArrayListDouble times = new ArrayList();
while(rset.next()) {
  times.add(Double.valueOf(rset.getDouble(T));
}
double timesArray[] = ArrayUtils.toPrimitive(times.toArray());

And then you can use this array for the Math statistics.

Gruss
bernd


-- 
http://bernd.eckenfels.net

- Ursprüngliche Nachricht -
Von: Kulpanowski, David dkulpanow...@leegov.com
Gesendet: ‎26.‎08.‎2014 15:55
An: Commons Users List user@commons.apache.org
Betreff: RE: [math] JDBC output to generate statistical results.

Thank you Mr. Ritter:

Two issues:
1.) I am attempting to obtain univariate statistics from thousands of ambulance 
responses. For example, ambulance responses (in seconds) 534, 678, 943, 194 
would be a mean of 587 seconds. Not by row, but rather as summary statistics.
2.) It appears that Apache Commons Math is needing a Double value. So I change 
it as shown below.
Note on 2) Even though I am needing summary statistics I move the lines of code 
into the loop just to see what would happen.I just want to get it to work 
because it appears the problem is the type of variable (int, double, array). 

while (rset.next())
{
double values = 
rset.getDouble(M_SecondsAtStatus);
System.out.println(values);
System.out.println(min:  + 
StatUtils.min(values));
System.out.println(max:  + 
StatUtils.max(values));
System.out.println(mean:  + 
StatUtils.mean(values));
System.out.println(product:  + 
StatUtils.product(values));
System.out.println(sum:  + 
StatUtils.sum(values));
System.out.println(variance:  + 
StatUtils.variance(values));
}

A red underline in Eclipse shows up and my mouse hovers over it. The error 
message is the following:

The method min(double[]) in the type StatUtils is not applicable for the 
arguments (double)

I then change the values variable to double[] as shown below:

double[] values = rset.getDouble(M_SecondsAtStatus);

java doesn't like this either. It gives a red underlined error message:
Type mismatch: cannot convert from double to double[]


I guess this boils down to two questions:
1.) How do I output a double[] array from database output?
2.) How do I output this double[] into a variable that Apache Commons Math will 
accept?
ok, maybe three questions:
3.) Other people are using Apache Commons Math to understand their database 
data better. How are they doing it? A lot of guys have massive mainframe 
databases filled with health care data etc. They are doing sophisticated math 
with their data. How are they doing it?

-Original Message-
From: Benedikt Ritter [mailto:brit...@apache.org] 
Sent: Tuesday, August 26, 2014 9:15 AM
To: Commons Users List
Subject: Re: [math] JDBC output to generate statistical results.

 In you're code the variable values is defined within the scope of the
while loop.

D'oh worst of typos... should be in your code of corse ;-)

2014-08-26 15:13 GMT+02:00 Benedikt Ritter brit...@apache.org:

 Hello David,

 the problem you're encountering is a problem with scopes. A variable 
 is only available in the scope it was defined. In you're code the 
 variable values is defined within the scope of the while loop. This 
 means, that the variable is only defined between the curly brackets of the 
 while loop.

 Your System.out statements try to access the values variable, which is 
 no longer accessible, since the flow of control has already left the 
 scope it was definied in (by finishing the iteration over the ResultSet).

 What you need to do is move the other System.out statements into the 
 loop like so:


 while (rset.next())
 {
int values = rset.getInt(M_SecondsAtStatus);
System.out.println(values);


   // I am hoping to derive useful statistics 
 from my database, such as
  // the following.this uses Jakarta Commons Math
 

Re: [math] JDBC output to generate statistical results.

2014-08-26 Thread Bernd Eckenfels
Hello David,

if you download and include commons-lang3.jar in your classpath Eclipse
will recognize ArrayUtils and allow you to import
org.apache.commons.lang3.

Here is the Javadoc for it:
http://commons.apache.org/proper/commons-lang/javadocs/api-release/index.html

Greetings
Bernd

BTW: Commons Developers: I do wonder if this would be a good feature for
dbutils. It has currently a RowProcessor, but that works either in
Object[] or needs to map to beans. Returning a simple type array for a
single column might be usefull?


  Am Tue, 26 Aug 2014
11:37:12 -0400 schrieb Kulpanowski, David dkulpanow...@leegov.com:

 Messrs. Worden and Eckenfels:
 
 Thank you both for your kind assistance. 
 
 Mr. Worden: 
 your solution works perfectly. This is exactly what I am looking for. 
 
 Mr. Eckenfels:
 Please excuse my lack of java coding skills. I am working on it by
 taking on projects at my job. I think your solution will work and I
 want to use it in my code because I am now going to use Apache
 Commons Math for more sophisticated statistics such as regression and
 hypothesis testing. For example, is the mean average ambulance
 response time in Cape Coral the statistically significantly different
 from the mean average response time in Fort Myers. I anticipate
 needing your code so I need to ask for additional help:
 
 In the final line of code Eclipse is putting a red underline under
 ArrayUtils. 
 
 ArrayListDouble times = new ArrayList();
 while (rset.next())
 {
 times.add(Double.valueOf(rset.getDouble(M_SecondsAtStatus)));
 }
 double timesArray[] = ArrayUtils.toPrimitive(times.toArray());
 
 My mouse hovers over it and the message is: ArrayUtils cannot be
 resolved. Eclipse offers nine quick fixes:
 1.) create class ArrayUtils.
 2.) create constant ArrayUtils
 3.) create local variable ArrayUtils
 4.) change to ArgUtils
 5.) change to Array
 6.) change to Arrays
 7.) create field ArrayUtils
 8.) create parameter ArrayUtils
 9.) fix project set up
 
 Which one should I use to output my data in a format Apache Commons
 Math will utilize in its functions?
 
 
 -Original Message-
 From: Brent Worden [mailto:brent.wor...@gmail.com] 
 Sent: Tuesday, August 26, 2014 11:00 AM
 To: Commons Users List
 Subject: Re: [math] JDBC output to generate statistical results.
 
 Another alternative is to use a
 org.apache.commons.math3.stat.descriptive.DescriptiveStatistics
 object to collect all the data and then use it to compute the summary
 statistics you need.  Using it alleviates the need for doing all
 explicit type casting and conversion:
 
 DescriptiveStatistics ds = new DescriptiveStatistics();
 while(rset.next()) {
 int observation = rset.getInt(M_SecondsAtStatus);
 ds.addValue(observation);
 }
 
 System.out.println(min:  + ds.getMin());
 System.out.println(max:  + ds.getMax()); ...
 
 HTH,
 
 Brent
 
 
 On Tue, Aug 26, 2014 at 9:41 AM, Bernd Eckenfels
 e...@zusammenkunft.net wrote:
 
  Hello,
 
  First of all: Your DBMS might have SQL methods to calculate typical 
  aggregates. This is not only easier to program, but also most
  likely faster and less resource intensive than doing it in an extra
  application.
 
  But since this is the commons list: If You want to use the Commons 
  Math functions you have to present the set of values (in your case
  as an array). And since there is no adapter for result sets (I
  think) building the array would be done inside the loop. The most
  natural thing is to use an ArrayList to append the values in the
  loop,  but then you have to convert the resulting Double[] into
  double[]. The ArrayUtils in Apache Commons Lang could do that (but
  if you need to process millions of numbers it is not the most
  efficient way to do it).
 
  untested:
 
  ArrayListDouble times = new ArrayList();
  while(rset.next()) {
times.add(Double.valueOf(rset.getDouble(T));
  }
  double timesArray[] = ArrayUtils.toPrimitive(times.toArray());
 
  And then you can use this array for the Math statistics.
 
  Gruss
  bernd
 
 
  --
  http://bernd.eckenfels.net
 
  - Ursprüngliche Nachricht -
  Von: Kulpanowski, David dkulpanow...@leegov.com
  Gesendet: ‎26.‎08.‎2014 15:55
  An: Commons Users List user@commons.apache.org
  Betreff: RE: [math] JDBC output to generate statistical results.
 
  Thank you Mr. Ritter:
 
  Two issues:
  1.) I am attempting to obtain univariate statistics from thousands
  of ambulance responses. For example, ambulance responses (in
  seconds) 534, 678, 943, 194 would be a mean of 587 seconds. Not by
  row, but rather as summary statistics.
  2.) It appears that Apache Commons Math is needing a Double value.
  So I change it as shown below.
  Note on 2) Even though I am needing summary statistics I move the 
  lines of code into the loop just to see what would happen.I just
  want to get it to work because it appears the problem is the type
  of variable (int, double, array).
 
  while (rset.next

Re: Rule profiles for community projects on nemo

2014-08-06 Thread Bernd Eckenfels
Hello,

I actually prefer that style its my company default. :) 

But that rule was only one of the things which might be customizeable
for different OSS projects (on nemo).

Gruss
Bernd


Am Wed, 6 Aug 2014 16:08:21 -0400
schrieb Gary Gregory garydgreg...@gmail.com:

 I've wanted to fix the silly old { } style in VFS for a long time. I
 think I even queried the community about it a long time ago and got no
 objections. Feel free to have your IDE reformat it all ;-)
 
 Gary
 
 
 On Wed, Aug 6, 2014 at 3:54 PM, Bernd Eckenfels
 e...@zusammenkunft.net wrote:
 
  On nemo.sonarqube.org are a number of usefull open source projects
  are measured.
 
  I wonder if it is possible to influence the rules used
  for a specific project? Apche VFS has braces-on-new-line coding
  style and this results in 4098 major(!) issues. (besides I wonder if
  this is really a major event?)
 
 
  http://nemo.sonarqube.org/dashboard/index/org.apache.commons:commons-vfs2-project
 
  Gruss
  Bernd
 
  -
  To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
  For additional commands, e-mail: user-h...@commons.apache.org
 
 
 
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] Current status?

2014-08-01 Thread Bernd Eckenfels
Hello,

It hasnt seen much activity but we still are working slowly towards a 2.1 
Version. It is a bit unclear how it fits into newer Java offered FileSystem 
abstractions, but it has still quite a few Providers no other solutions offer.

-- 
http://bernd.eckenfels.net

- Ursprüngliche Nachricht -
Von: Rob Walker r...@ascert.com
Gesendet: ‎01.‎08.‎2014 08:33
An: user@commons.apache.org user@commons.apache.org
Betreff: [vfs] Current status?

Commons VFS seems to be useful to help with a number of aspects I'm 
looking at, but I'm concered about it's current development state.

It seems a little dormant in terms of recent development activity and 
fixing, and the web pages have a number of broken links.

Is this still an active and viable project to consider using?

-- Rob


Ascert - Taking systems to the edge
www.ascert.com


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS][WebDAV] access throws ClassCastException: ArrayList cannot be cast Node

2014-08-01 Thread Bernd Eckenfels
Hello Jörg,

is this (or a similiar installation) somewhere available over the
internet, I would like to debug what types are returned here.

(I am not sure I understand what this has to do with XMLConfiguration)

I dont think it is a problem of your code, that casting problem should
never happen. Feel free to open a Jira Bug for it.

https://issues.apache.org/jira/browse/VFS

Gruss
Bernd


 Am Fri, 1
Aug 2014 11:26:09 +0200 schrieb Jörg Wille joerg.wi...@gmail.com:

 @Gary: I am using 2.1-SNAPSHOT Rev.:1609711
 @Martin: I can understand - to an extent - what you write about the
 difference between XMLConfiguration and PropertyConfiguration.
 But can you explain why is this topic special to webdav in general or
 maybe only in combination with Alfresco?
 And most importantly, how can I get WebDav to work? From reading on
 the projects's web-site, I was in the believe that WebDav is a
 supported filesystem.
 Am I doing something wrong in my code? Are there any examples I can
 have a look at?
 

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] support JCIFS

2014-05-23 Thread Bernd Eckenfels
I Wonder if we should add the sandbox providers to the normal providers.xml 
with a existence condition, so you get it preconfigured as soon as the JAR is 
on the classpath.

(i noticed there is some Service discovery plugin stuff in the 
StandardfileSystemManager, but I guess this will not pick up the sandbox Lib?)

 Am 23.05.2014 um 06:42 schrieb Gary Gregory garydgreg...@gmail.com:
 
 It's up to you ;-) is not included in the main project because of the license 
 IIRC.
 
 Gary
 
 div Original message /divdivFrom: Sandhya Rajagopalan 
 sandhya_rajagopa...@symantec.com /divdivDate:05/22/2014  18:30  
 (GMT-05:00) /divdivTo: user@commons.apache.org /divdivSubject: [vfs] 
 support JCIFS /divdiv
 /divHi,
 When are you going to support JCIFS? I see this is your sandbox. Can I add 
 jcifs in providers.xml to start using it?
 
 -Sandhya

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS] LAST_MODIFIED vs GET_LAST_MODIFIED

2014-05-17 Thread Bernd Eckenfels
Hello,

I have created https://issues.apache.org/jira/browse/VFS-527 for it.

I think this is a two phase process as I would prefer not to break API
compatibility and stay with the 2.1 version.

It would be allowed to deprecate the LAST_MODIFIED and maybe a bite
more cleanly describe the behaviour of GET/SET_LAST_MODIFIED_xxx (like:
GET_LAST_MODIFIED allows to get the last modified date of files, it
might also work on directories). or something?

Gruss
Bernd


 Am Sat, 17 May 2014
15:38:26 +0100 schrieb Schalk Cronjé ysb...@gmail.com:

 Suggestion [1]
 
 Marking LAST_MODIFIED as deprecated, updating the docs to state that 
 GET_LAST_MODIFIED means that the last modification time for a file or 
 can be retrieved.
 
 Suggestion [2]
 
 Mark both GET_LAST_MODIFED and LAST_MODIFIED as deprecated.
 
 Split GET_LAST_MODIFIED into a GET_LAST_MODIFIED_FILE and 
 GET_LAST_MODIFIED_FOLDER. I am saying this as by example on S3 it is 
 possible to get the last modification time of a blob, but not on 
 something marked as a directory marker.
 
 Disclaimer: Maybe it is possible to get modification time on
 directory marker on S3, but i have based it upon what jClouds can do.
 
 On 17/05/2014 15:19, Gary Gregory wrote:
  I suppose... not sure what the best path is. You pick ;)
 
  Gary
 
 
   Original message 
  From: Bernd Eckenfels
  Date:05/16/2014 21:42 (GMT-05:00)
  To: Schalk Cronjé
  Cc: user@commons.apache.org
  Subject: Re: [VFS] LAST_MODIFIED vs GET_LAST_MODIFIED
 
  Hallo,
 
  Really no idea, it is not used anywhere. And GET_LAST_MODIFIED is
  there since the 1.0 API, so it can not even be explained with
  backward compatibility. There is also nothing in JIRA or the Wiki.
 
  I guess I would put a deprecated tag in javadoc and forget about it?
 
  Gruss
  Bernd
 
 
  Am Wed, 14 May 2014 22:52:19 +0100 schrieb Schalk
  Cronjé ysb...@gmail.com:
 
   One more Capability question. Javadoc states that
  
   GET_LAST_MODIFIED: File get last-modified time is supported.
   LAST_MODIFIED: File last-modified time is supported.
  
   These seems to be the same thing. Furthermore there is no
   reference to LAST_MODIFIED in the core code base, only to
   GET_LAST_MODIFIED (and also to SET_LAST_MODIFIED_xxx). Is
   LAST_MODIFIED a deprecated capability?
  
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
  For additional commands, e-mail: user-h...@commons.apache.org
 
 
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS] LAST_MODIFIED vs GET_LAST_MODIFIED

2014-05-16 Thread Bernd Eckenfels
Hallo,

Really no idea, it is not used anywhere. And GET_LAST_MODIFIED is
there since the 1.0 API, so it can not even be explained with
backward compatibility. There is also nothing in JIRA or the Wiki.

I guess I would put a deprecated tag in javadoc and forget about it?

Gruss
Bernd


Am Wed, 14 May 2014 22:52:19 +0100 schrieb Schalk
Cronjé ysb...@gmail.com:

 One more Capability question. Javadoc states that
 
 GET_LAST_MODIFIED: File get last-modified time is supported.
 LAST_MODIFIED: File last-modified time is supported.
 
 These seems to be the same thing. Furthermore there is no reference
 to LAST_MODIFIED in the core code base, only to GET_LAST_MODIFIED
 (and also to SET_LAST_MODIFIED_xxx). Is LAST_MODIFIED a deprecated
 capability?
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS] What does GET_TYPE entail?

2014-05-15 Thread Bernd Eckenfels
Hello,

I think to recall it is related to the getType(), especially is this a
file or a directory.

All core providers besides URL define the capability. URL provider can
only tell 404/200 apart but has no concept of Directories.

Thats why there are no decisions made on the capability, it is just a
statement of the provider how doGetType() can be understood.

I am however not sure where I read that. And this test here seems to
suggest otherwise (because you would expect HttpFileSystem to not
declare GET_TYPE:
http://svn.apache.org/repos/asf/commons/proper/vfs/tags/sandbox/src/test/org/apache/commons/vfs/test/UrlStructureTests.java)


Gruss
Bernd



 Am Wed, 14 May 2014 19:52:43 +0100
schrieb Schalk Cronjé ysb...@gmail.com:

 The description for Capabilities.GET_TYPE states that The file type
 can be determined. Does this mean it can be determined in
 
 - A way similar to Unix 'file' command?
 
 OR
 
 - A way similar to MIME Content-type?
 
 Secondly can someone point me to where is actually been used in the
 core code to make a decision? I cannot find anything in core.
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] Outdated filesystem capability info in site?

2014-05-02 Thread Bernd Eckenfels
Hello,

that is a good point, I added a link to the apidocs in Trunk for 2.1.

http://svn.apache.org/viewvc?view=revisionrevision=1592042

Greetings
Bernd

Am Fri, 2 May 2014 06:16:53 -0700 (PDT)
schrieb Woonsan Ko woon_...@yahoo.com:

 Ah, thanks for the explanation.
 It can help someone like me if the page contains a link to [1] for
 the capability definitions.
 
 Cheers,
 
 Woonsan
 
 [1]
 http://commons.apache.org/proper/commons-vfs/apidocs/org/apache/commons/vfs2/Capability.html
 
 
 
 
  On Thursday, May 1, 2014 9:55 PM, Bernd Eckenfels
  e...@zusammenkunft.net wrote:
   Hello,
  
  I think directory content refers to directories which can also be
  read as a stream. For example for WebDAV XML properties. FTP has no
  such thing.
  
  BTW: I am currently working in getting 2.1 out the door, so it
  might be a good time to have a look at the trunk and speak up on
  showstoppers.
  
  Gruss
  Bernd
  
  Am Thu, 1 May
  2014 17:54:28 -0700 (PDT) schrieb Woonsan Ko woon_...@yahoo.com:
  
  
   Hi,
  
   I'm working with ftp file system (VFS 2.0) and it seems working
  fine when listing children. But the page [1] says it doesn't
  support 'Directory Content' capability yet.
  
   Is the information (also on sftp and some others) outdated?
  
   Regards,
  
   Woonsan
  
  
   [1] http://commons.apache.org/proper/commons-vfs/filesystems.html
  
   -
   To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
   For additional commands, e-mail: user-h...@commons.apache.org
  
  
  


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [vfs] Outdated filesystem capability info in site?

2014-05-01 Thread Bernd Eckenfels
Hello,

I think directory content refers to directories which can also be
read as a stream. For example for WebDAV XML properties. FTP has no
such thing.

BTW: I am currently working in getting 2.1 out the door, so it might be
a good time to have a look at the trunk and speak up on showstoppers.

Gruss
Bernd

Am Thu, 1 May
2014 17:54:28 -0700 (PDT) schrieb Woonsan Ko woon_...@yahoo.com:

 Hi,
 
 I'm working with ftp file system (VFS 2.0) and it seems working fine
 when listing children. But the page [1] says it doesn't support
 'Directory Content' capability yet.
 
 Is the information (also on sftp and some others) outdated?
 
 Regards,
 
 Woonsan
 
 
 [1] http://commons.apache.org/proper/commons-vfs/filesystems.html
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [VFS] Next release date

2014-04-23 Thread Bernd Eckenfels
Hello,

I can do some preparation work like reviewing the open issue, verifying
the completeness of the changelog, maybe writing some release/upgrade
notes and checking the dependency versions.

I dont feel fit in doing the actual release, maybe you can assist me
with that gary. What else would you need me to do before?

(continue to discuss this on the developer list)

Bernd



 Am Wed, 23 Apr 2014 11:38:20
-0400 schrieb Gary Gregory garydgreg...@gmail.com:

 ASAP would be good, but I do not have to time ATM.
 
 Gary
 
 
 On Tue, Apr 15, 2014 at 7:06 AM, Edouard Lemaistre 
 edouard.lemais...@enovea.net wrote:
 
  Hi, all
 
  I browse the VFS JIRa release page and no release date is planned.
  Have you planned any release soon ? I'm interested by some corrected
  issues.
 
  Kind regards,
  --
 
  Edouard Lemaistre * Technical project manager * Enovea /
  CrystalStream *
 
  2 ter, rue Georges Charpak * 76130 Mont Saint Aignan  *  France  *
  T + 33 (0) 2 32 18 22 01  *  Standard +33 (0) 2 32 18 22 00 *
  edouard.lemais...@enovea.net nom.pre...@enovea.net *
 
  www.crystalstream.net : Real time Clearing  Order Book solutions
  on ETD
 
  www.crystalrec.com : Multi Asset Reconciliation solution
 
  www.enovea.net : Corporate site
 
 
  CrystalStream Help Desk :
  support.crys...@enovea.net   + (33) 232 182 200
 
 
 
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [exec] Using Commons Exec for context-sensitive execution

2014-04-02 Thread Bernd Eckenfels
Hello,

did you try to write actual line endings?

I tested your code and it worked on Windows (cygwin bash) after adding
\n like:

os.write(export MY_VAR=test\n);
os.flush();
os.write(echo myvar:$MY_VAR\n);

Gruss
Bernd

I also think the use of the common-executor makes this whole stuff
unecesary complicated. Especially if the alternative is a Java7 with
ProcessBuilder and redirectOutput();


Am Wed, 2 Apr 2014 01:54:30 -0700 (PDT)
schrieb yalmasri ysralma...@yahoo.com:

 posting to fix the formatting on other mailing archives
 
 
 
 --
 View this message in context:
 http://apache-commons.680414.n4.nabble.com/exec-Using-Commons-Exec-for-context-sensitive-execution-tp4661652p4661653.html
 Sent from the Commons - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



Re: [email] Problem reading Java-generated HTML emails with Outlook 2010

2014-03-24 Thread Bernd Eckenfels
Hello Tomas,

did you follow the Userguide example?

http://commons.apache.org/proper/commons-email/userguide.html

Greetings
Bernd

Am Mon, 24 Mar 2014 12:43:16 +0100
schrieb Tomás García Rodríguez toma...@servicioexterno.inditex.com:

 Hi,
 
 I am having trouble when creating emails from Java using HtmlEmail. I
 need to send them to an Outlook 2010 client, and it shows the HTML
 code as plain text, it does not interpret the mentioned code.
 
 Is necessary to set any property before sending the email?
 
 Thanks a lot!
 
 Greetings,
 
 Tomas Garcia
 
 Tomás García Rodríguez
 
 toma...@servicioexterno.inditex.com
 Tel: +34 981185400
 
 
 
 En el caso de haber recibido este mensaje por error, le rogamos que
 nos lo comunique por esta misma vía, proceda a su eliminación y se
 abstenga de utilizarlo en modo alguno. If you receive this message by
 error, please notify the sender by return e-mail and delete it. Its
 use is forbidden.
 
 


-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org