org.apache.commons.lang.xwork.StringUtils location

2009-09-24 Thread Martin Gainty

Morning All

trying to locate commons-lang version which contains xwork StringUtils 
specifically
org.apache.commons.lang.xwork.StringUtils

Any advice would be greatly appreciated

thanks
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Thu, 24 Sep 2009 11:32:03 +0800
> Subject: Re: the Commons Configuration problem
> From: apachemav...@gmail.com
> To: user@commons.apache.org
> 
> Thanks , I dont need the update, so I think I can use a extra object
> to save the data from the property file.
> 
> 2009/9/24 Ralph Goers :
> >
> > On Sep 23, 2009, at 7:28 PM, maven apache wrote:
> >
> >> Hi:
> >> I found the Commons Configuration  can do most of read configuraion
> >> job for me ,so I want to have a try.
> >> But I am not sure the Commons Configuration how to read the file(for
> >> example a xml file), is it a Singleton?  Since if not, I think I
> >> should build a Singleton class to save the properties read by the
> >> Commons Configuration, if so , I can use the Commons Configuration
> >> directly.
> >> Thanks.
> >>
> >
> > Have you looked at
> > http://commons.apache.org/configuration/userguide/howto_xml.html#Accessing_properties_defined_in_XML_documents?
> >  If
> > the user's guide doesn't provide all the information you are looking for you
> > might want to describe your use case so others can give you advice on how to
> > do it.
> >
> > In answer to your specific question, no it is not a singleton. But if your
> > application keeps a reference to the configuration object you can retrieve
> > the properties as often as needed. If your application needs to allow the
> > configuration to be updated without restarting the application you should
> > not transfer the data to other objects. Instead, use a reloading strategy
> > and get the properties from the configuration every time they are needed.
> >
> > Ralph
> >
> > -
> > 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
> 
  
_
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

RE: Carl D. Cyrus/CLE/Sherwin-Williams is out of the office.

2009-10-09 Thread Martin Gainty

amazing in this global depression someone would be mindless enough to tell the 
whole world
"this employer is paying me to do absolutely nothing"

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> Date: Fri, 9 Oct 2009 08:22:41 -0400
> Subject: Re: Carl D. Cyrus/CLE/Sherwin-Williams is out of the office.
> From: jie...@gmail.com
> To: user@commons.apache.org
> CC: carl.d.cy...@sherwin.com
> 
> Better still, could you please learn how to use Lotus Notes? I realize
> it is a piece of rubbish, but still; it's pretty easy to disable Out
> of Office notifications for "Internet addresses".
> 
> On Fri, Oct 9, 2009 at 4:01 AM,   wrote:
> >
> > I will be out of the office starting  10/09/2009 and will not return until
> > 10/12/2009.
> >
> > For MQ related issues, contact Tom Advent, or Alan Flowers.
> >
> 
> -- 
> There are 10 types of people in this world, those
> that can read binary and those that can not.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  
_
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/

RE: DBCP woes (running out of cursors).

2009-10-14 Thread Martin Gainty

Connection
 StatementHandle(this is where the READONLY/UPDATABLE/FORWARD/REVERSE cursor is 
defined)
  ResultSet
  close ResultSet
 CloseStatementHandle
CloseConnection

closing ResultSet closes the ResultSet only but has no effect  on Statement 
Handle
closing StatementHandle closes ResultSet and StatementHandle
closing Connection closes all \

are you running as a Transaction?
Begin_Transaction
 Select into Buffer
 UPDATE/DELETE/Insert with dynamic variables
 COMMIT will flush to disk and close all handles
 Rollback will restore Transaction state to before Begin_Transaction state
END

if you display the queries here and we can help you show how to properly 
structure the statements you're using 
Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Wed, 14 Oct 2009 21:22:35 -0400
> From: ch...@christopherschultz.net
> To: us...@tomcat.apache.org
> CC: user@commons.apache.org
> Subject: Re: DBCP woes (running out of cursors).
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Bill,
> 
> On 10/14/2009 5:05 PM, Bill Davidson wrote:
> > Usually, we don't need that many [connections], but sometimes, we get hit 
> > really hard
> > with a lot of traffic and do need that many.  BTW, this is load balanced
> > across 4 servers that can each do 245 connections.
> 
> Is it possible that your server just doesn't want to allocate 245 * 4
> cursors, and that you are just hitting that barrier? I don't believe the
> JDBC driver cares at all how many cursors are allocated, so it's
> unlikely to be a client-side exception being thrown (or, if you prefer,
> it's a server-side error being represented by a client-side exception).
> 
> > I thought [logAbandoned and removeAbandoned] was for Connection leaks.
> 
> They are. I just thought it would be a good idea to enable these, just
> in case there was a case where leaks were occurring.
> 
> > If we had Connection leaks, then the old pools wouldn't work properly
> > either, because the old pools only kill connections when the servlets
> > "free" the Connection (the same as close() on a DBCP connection).
> > The Connection's are being sent back to the pool, but apparently with
> > open cursors lingering.
> 
> I though you said that after a connection was checked-out for 120
> seconds, it was forcibly closed by the connection pool.
> 
> >>I don't know a thing about Oracle-specific queries, but what does:
> >>
> >>>  v$open_cursor a
> >>
> >>mean? Does this explicitly open a new cursor, or use an existing one
> >>called a?
> > 
> > v$cursor is a view in the Oracle data dictionary that shows currently
> > open cursors in the current Oracle instance.  The sql_text column shows
> > the first 40-50 characters or so of SQL being executed for that cursor.
> > It shows them for both active and inactive sessions.  I'm only guessing
> > that the inactive sessions are from Connection's that are closed without
> > having all of their ResultSet's closed.  That might be incorrect.
> > Finding concrete information is difficult.
> 
> Oh, so this query is intended to find out what is happening on the
> server side, so you can see what cursors are open and what their queries
> are. I thought you meant that a query such 

RE: DBCP woes (running out of cursors).

2009-10-18 Thread Martin Gainty

Thanks Phil-

there is some undocumented behaviour noticed with the (presumably DBCP) cursors
i suspect the poster is allocating n number of (presumably updateable) cursors 
and then not using them 
the connection starves becuase the inactivity period is reached and 
consequently the cursors are released (as the statement handle is released)
then the poster attempts to reuse the cursor (presumably for update)

for this to be *solved* we're going to need a complete matrix of 
inactivity_period=1sec

step1
allocate 1 read cursor per connection and test
allocate 2 read cursors per connection and test
allocate n read cursors per connection and test

next 
alloocate 1 updateable cursor per connection and test
allocate 2 updateable currsors per connection and test
allocate n updateable cursors per connection and test

next 
allocate 1 read cursor and 1 updateable cursor per connection and test
allocate 2 read cursors and 2 updateable cursors per connection and test

increment inactivity_period by 1sec
goto step1

i can test this out with mysql or oracle here
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Sun, 18 Oct 2009 13:10:45 -0400
> From: phil.ste...@gmail.com
> To: user@commons.apache.org
> Subject: Re: DBCP woes (running out of cursors).
> 
> Bill Davidson wrote:
> > Bill Davidson wrote:
> >>Could maxOpenPreparedStatements possibly fix this?
> > 
> > Apparently it does.
> > 
> > The DBCP config docs need a better warning on poolPreparedStatements:
> > 
> > "*NOTE* - Make sure your connection has some resources left for the
> > other statements."
> > 
> > just doesn't quite cut it.  Something more like:
> > 
> > "Pooling PreparedStatement's may keep their cursors open in the database,
> > causing you to run out of cursors.  You should also set
> > maxOpenPreparedStatements to some value less than the maximum number
> > of cursors you can have on a Connection."
> > 
> > or something along those lines.
> 
> Sorry for the slow response.  Sounds like you have solved your
> problem.  I assume you are now getting SQLExceptions when you go
> past the maxOpenPreparedStatements limit. If not, there must be
> something else going on.
> 
> Thanks for the documentation feedback.  Fixed in trunk.
> 
> This example makes me think that better behavior here would be for
> the prepared statement pool to act as an LRU cache (rather than
> throwing SQLException when maxOpenPreparedStatements is exceeded).
> Interested in other opinions on this.
> 
> Phil
> 
> 
> > 
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> > 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/

RE: math KMeansPlusPlusClusterer Failing unittest

2009-10-20 Thread Martin Gainty

can we see the import statement for Test?
thanks,
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: ted.dunn...@gmail.com
> Date: Tue, 20 Oct 2009 09:50:21 -0700
> Subject: Re: math KMeansPlusPlusClusterer Failing unittest
> To: user@commons.apache.org
> 
> Can you say more about exactly what problem you are having?
> 
> On Tue, Oct 20, 2009 at 2:54 AM, VanIngen, Erik (FIES) <
> erik.vanin...@fao.org> wrote:
> 
> > Hi all,
> >
> > I have a problem with KMeansPlusPlusClusterer in the trunk. See below for
> > the
> > unittest. Am I doing something wrong here or is there a bug?
> >
> > Kind Regards,
> > Erik
> >
> >
> >
> >
> > @Test
> >public void testPerformClusterAnalysis2() {
> >KMeansPlusPlusClusterer transformer =
> >new KMeansPlusPlusClusterer(new
> > Random(1746432956321l));
> >EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] {
> >new EuclideanIntegerPoint(new int[] { 1959,325100
> > }),
> >new EuclideanIntegerPoint(new int[] { 1960,373200
> > }),
> >};
> >List> clusters =
> >transformer.cluster(Arrays.asList(points), 1, 1);
> >assertEquals(1, clusters.size());
> >
> >}
> >
> >
> 
> 
> -- 
> Ted Dunning, CTO
> DeepDyve
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/

RE: Managing content in an SCXML file

2009-11-03 Thread Martin Gainty

Cedric

a markup implies SGML..i assume this might be described as XSD or XML Schema 
Definition?
Can you describe the events this state-machine model would support?
can you describe the content each event would carry and or generate?
Can you describe what would be contained in the header for each Event?
Can you describe what the body would look like for each event?

You might be able to implement a simple listener that listens on fixed 
host/port and when message is received (EOT is achieved after receiving header 
and body)
you can hand the body of the message to device

can you confine the size of the message? 
if not you might want to implement a packet model to buffer the packets to a 
known structure
(as in some sort of linked-list) 
until body EOT is achieved 

sounds like a fun project!
Bon Chance
Martin Gainty 
__ 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: cedric.nico...@villefluide.fr
> To: user@commons.apache.org
> Subject: Managing content in an SCXML file
> Date: Tue, 3 Nov 2009 23:23:01 +0100
> 
> Dear Rahul and others,
> 
> I want to do a quite simple thing : having a state machine on a server
> controlling user interface of mobile clients. 
> The state machine would have a lot of states and complex stream, and for
> some specific states it will embedded a simple markup language content (e.g.
> an html subset) that will be delivered to the mobile client which when it
> receives it, interpret and display it.
> 
> For example the server state machine would have "connect" state that will be
> triggered when the mobile is establishing a connection, and would react by
> giving to the mobile client the content to be displayed. An simple example
> would be :
> 
> 
>   
>Welcome ! 
>text="Click here to continue" action ="send_OK"
> 
>text="Quit" action ="send_Quit" 
> 
>   
>   
> 
> 
> In that case the content in  tags will be retrieved by the Java
> code on void connect() method, and sent to the device. Server will listen to
> device and when receiving a message like send_OK, trigger this to the state
> machine.
> 
> To summarize I want to emulate a tiny web server hosting some tiny pages
> with a state machine.
> 
> I've gone through all the documentation of Commons Scxml, and didn't find an
> easy way to do this. The possible ways I see are to use a data model, but
> using  tags for setting my content seems to be quite heavy to write
> and don't know how to assign an XML tree to a data model node, and other
> possibility would be to use maybe custom actions, but how to describe in a
> simple way my XML like-content ?
> 
> Do you have a suggestion to do this in an easy and readable way ?
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  
_
Windows 7: Unclutter your desktop.
http://go.microsoft.com/?linkid=9690331&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009

RE: Commons-Compress tar entry name encoding

2009-12-04 Thread Martin Gainty

you'll need to accomodate russian cyrillic characters in your java code, xml 
files and database
either that or stick with english

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 4 Dec 2009 10:52:22 +0300
> Subject: Commons-Compress tar entry name encoding
> From: tezqatlip...@gmail.com
> To: user@commons.apache.org
> 
> Hellow,
> 
> May anyone help me? How can I create TarArchiveEntry with cyrillic name?
> 
> when i do that:
> TarArchiveEntry entry = new TarArchiveEntry(name);
> 
> where name = "например.doc"
> 
> in tar archive it represents as something like this: @ 
> I have tried  to encode  entry name string to various encodings, but
> in tar it represents as "" or other symbols.
> 
> best regards,
> anton kutergin
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  
_
Windows Live Hotmail is faster and more secure than ever.
http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_1:092009

RE: [Commons Math] Curious about Apache Commons Math

2010-03-19 Thread Martin Gainty

Bienvenue Luc!

can you provide examples of any advantages of using Apache Math project over 
the provided java.Math library?

Merci Beacoups!
Martin Gainty 
__ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 19 Mar 2010 23:14:55 +0100
> From: luc.maison...@free.fr
> To: user@commons.apache.org
> Subject: Re: [Commons Math] Curious about Apache Commons Math
> 
> Disc Magnet a écrit :
> > Hi,
> > 
> > I am new to this list and I wanted to know a few things about Apache Commons
> > Math. Is it an active project? Do you know any other open source projects or
> > open source/commercial organizations who use Apache Commons Math?
> 
> Commons math is an active project. Here is a search on the developpers
> mailing list archive:
> <http://commons.markmail.org/search/list:org.apache.commons.dev+%5Bmath%5D+order:date-backward>
> 
> In fact, the next release is currently on its way and should probably be
> published very soon.
> 
> The project is used by several different users but we don't know about
> all of them. An hint can be to look at the users list archive (see
> <http://commons.markmail.org/search/?q=list%3Aorg.apache.commons.users+[math]+order%3Adate-backward>).
> For what it's worth, I can say that it is used in operational space
> systems by commercial companies, national space agencies and astronomy
> research teams.
> 
> > 
> > Are there any contributions required for Commons Math? If so, what kind of
> > contributions would be helpful to the project?
> 
> If you wish to contribute, take a look at our JIRA issue tracking system
> <http://issues.apache.org/jira/browse/MATH> and at the contribution
> pages <http://www.apache.org/foundation/getinvolved.html>,
> <http://commons.apache.org/volunteering.html> and
> <http://commons.apache.org/patches.html>.
> 
> Luc
> 
> > 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  
_
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/210850552/direct/01/

RE: Serializable alternative to MultiHashMap

2010-03-19 Thread Martin Gainty

i had a requirement which called for accumulating a collection of known objects
so i used parameterised ArrayList e.g.
ArrayList

I have yet to discover any package which will support Collection(s) of 
Collection(s) 

anyone ?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: Serializable alternative to MultiHashMap
> Date: Wed, 17 Mar 2010 19:28:04 +0100
> From: adelino.reis_da_ro...@nsn.com
> To: user@commons.apache.org
> 
>  
> Hi, 
>  
> I have been using MultiHashMap and according to documentation
> this objects has been set as deprecated and it is recomended that we use
> MultiValueMap however MultiValueMap is not serializable.
>  
> Is there any serializable alternative to MultiValueMap ?
>  
> Case not, why do you decided to deprecate MultiHashMap before
> providing a Serializable alternative ?
>  
> Is it expected MultiValueMap to be serializable in the near
> future ?
>  
> Regards,
>  
> Adelino.
>  
>  
>  
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_2

RE: Adapting legacy request parameters into new POJO?

2010-04-12 Thread Martin Gainty

  commons-lang
  commons-lang
  2.4
  true



  commons-collections
  commons-collections
  3.2.1
  true



  antlr
  antlr
  2.7.7
  true



  net.sf.composite
  composite
  1.1


  

  
svn://development.spiderstrategies.com/morph/Morph
  



>mvn compile 
will compile the test examples

a quick grep for main reveals a couple of java testcases we can run
%MORPH_HOME%\src\net\sf\morph\MorphCommandlineTest.java
%MORPH_HOME%\src\net\sf\morph\MorphTestCase.java
%MORPH_HOME%\src\net\sf\morph\MorphTestRunner.java
%MORPH_HOME%\src\net\sf\morph\SpeedComparison.java

HTH
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: mknut...@baselogic.com
> Date: Mon, 12 Apr 2010 14:33:51 -0400
> Subject: Re: Adapting legacy request parameters into new POJO?
> To: user@commons.apache.org
> 
> Morph seems to have what I think I want, but I have spent the past few hours
> trying to get a simple example working, and the docs are wrong. It referes
> to many classes that doe not exist in the jar.
> 
> I also can not seem to find any other good examples. Can you point any out
> for me?
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://www.baselogic.com
> Blog: http://www.baselogic.com/blog/
> Linked IN: http://linkedin.com/in/mickknutson
> Twitter: http://twitter.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 
> 
> 
> On Mon, Apr 12, 2010 at 10:34 AM, Matt Benson  wrote:
> 
> >
> > On Apr 11, 2010, at 5:28 PM, Mick Knutson wrote:
> >
> >  I have an interesting issue I am trying to solve in a manageable way.
> >>
> >> I have a few dozen legacy JSP's that I am phasing out. But I have to do
> >> them
> >> 1by1. Each page create a POST of ~12 named request parameters that are ALL
> >> named different. VERY frustrating as there is no good convention.
> >>
> >> So, My thought is trying to create a Map for mapping the old names to the
> >> new names for each POST:
> >> Map reqParam = {"newName", "oldName"}
> >>
> >> Where I have a new POJO that has set/getNewName(..)
> >>
> >>
> >> Then, somehow copying from these old request properties from my request
> >> properties Map to the new one's in my new POJO.
> >>
> >> Once Mapped, I have no further use for the old names.
> >>
> >> Can someone help point me in the right direction to be able to use common
> >> Lang if possible?
> >>
> >>
> > Nothing comes to mind from [lang].  [beanutils] would probably allow you to
> > roll your own solution to this.  You might also want to look into
> > morph.sourceforge.net, whose PropertyNameMappingCopier would probably work
> > for you out of the box.
> >
> > HTH,
> > Matt
> >
> >
> >
> >> ---
> >> Thank You…
> >>
> >> Mick Knutson, President
> >>
> >> BASE Logic, Inc.
> >> Enterprise Architecture, Design, Mentoring & Agile Consulting
> >> p. (866) BLiNC-411: (254-6241-1)
> >> f. (415) 685-4233
> >>
> >> Website: http://www.baselogic.com
> >> Blog: http://www.baselogic.com/blog/
> >> Linked IN: http://linkedin.com/in/mickknutson
> >> Twitter: http://twitter.com/mickknutson
> >> Vacation Rental: http://tahoe.baselogic.com
> >> ---
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

RE: Adapting legacy request parameters into new POJO?

2010-04-14 Thread Martin Gainty

Hi Folks

took a while but i was able to run the morph testcase

 

%MORPH_HOME%\target\classes

java -classpath E:\MORPH\morph-1.1.1\target\
classes;%CLASSPATH% net.sf.morph.MorphCommandlineTest
log4j:WARN No appenders could be found for logger (net.sf.morph.transform.conver
ters.TextToTimeConverter).
log4j:WARN Please initialize the log4j system properly.
Sun Jan 30 18:51:02 EET 2005
1107103862000
Sun Jan 30 18:51:02 EET 2005
1107103862000
true
true
true
0

 

Hint: morph implements Spring framework with generics to instrument the beans 
classes..
most of the MORPH code uses the Spring 3.0 framework most notably HashMaps and 
ArrayLists but without required generic type parameters so with strict on the 
code wont compile

 

I would post the clean code but i'm hearing that EMC bought spring? ..i'll beg 
off posting any code until i find an Apache Spring site that supports OSS 
(OpenSource) 


thanks,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: mknut...@baselogic.com
> Date: Tue, 13 Apr 2010 06:20:50 -0400
> Subject: Re: Adapting legacy request parameters into new POJO?
> To: user@commons.apache.org
> 
> the compiler plugin is implicit in Maven. You should have access to it
> automatically.
> But, if the examples are the same as the PDF document, then it is wrong as
> there is no DelegatingCopier anywhere and that is a main class that is used
> in that example. So if it is missing, then the examples will not compile
> anyways.
> 
> ---
> Thank You…
> 
> Mick Knutson, President
> 
> BASE Logic, Inc.
> Enterprise Architecture, Design, Mentoring & Agile Consulting
> p. (866) BLiNC-411: (254-6241-1)
> f. (415) 685-4233
> 
> Website: http://www.baselogic.com
> Blog: http://www.baselogic.com/blog/
> Linked IN: http://linkedin.com/in/mickknutson
> Twitter: http://twitter.com/mickknutson
> Vacation Rental: http://tahoe.baselogic.com
> ---
> 
> 
> 
> On Mon, Apr 12, 2010 at 10:28 PM, Martin Gainty  wrote:
> 
> > for some reason the pom.xml that came with the morph project forgot the
> > maven-compile plugin ( so you cannot compile the examples) here is my
> > pom.xml for morph project
> >
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

RE: [Commons SCXML] - Parallel states and external invocation. Best practice.

2010-04-20 Thread Martin Gainty

Andy

the state is either triggered or not triggered depending on the boolean 
evaluation of  cond  e.g.

 
  
  
 

for now just try hardcoding cond to evaluate to true (and see if that will 
activate the state)

http://commons.apache.org/scxml/guide/scxml-documents.html#custom

sorry..did'nt mean to jump in mid-thread rahul!

Martin Gainty 
__ 
Note de déni et de confidentialité
 Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: RE: [Commons SCXML] - Parallel states and external invocation. Best 
> practice.
> Date: Tue, 20 Apr 2010 16:27:00 +0100
> From: amans...@globeop.com
> To: user@commons.apache.org
> 
> Sorry yes, the src attribute.
> 
> Essentially what I want to be able to do is something like :
> 
>  
> 
> 
> 
>   
> 
> 
>   
> 
>   
> 
> 
> 
> 
> 
>   
> 
> 
>   
> 
>   
> 
> 
> 
> 
> 
>   
> 
> When I tested it the sub statemachine would never fire. 
> 
> Thanks,
> Andy
> 
> -Original Message-
> From: Rahul Akolkar [mailto:rahul.akol...@gmail.com] 
> Sent: 20 April 2010 16:24
> To: Commons Users List
> Subject: Re: [Commons SCXML] - Parallel states and external invocation. Best 
> practice.
> 
> On Tue, Apr 20, 2010 at 9:46 AM, Andrew Mansfield  
> wrote:
> > Hi Rahul,
> >
> > One other question if I may and assuming it's possible.
> >
> > Can I start a new state machine from one of the sub states i.e. sub2 
> > (using src="my.xml") and have that follow the same logic i.e. the 
> > parallel execution will wait for the sub state machine to execute.
> >
> 
> 
> Do you mean src attribute of  (which has now been removed from latest 
> version of the W3C draft) or src attribute of  ?
> 
> 
> > I tried using the invoke with srctype of scxml and the document name 
> > but for whatever reason it didn't fire.
> >
> 
> 
> There isn't a srctype attribute on , did you mean type?
> 
> -Rahul
> 
> 
> > Regards,
> > Andy
> >
> > -Original Message-
> > From: Andrew Mansfield [mailto:amans...@globeop.com]
> > Sent: 20 April 2010 13:38
> > To: Commons Users List
> > Subject: RE: [Commons SCXML] - Parallel states and external invocation.
> > Best practice.
> >
> > That's a tidy solution. Worked a charm.
> >
> > Thanks,
> > Andy
> >
> > -Original Message-
> > From: Rahul Akolkar [mailto:rahul.akol...@gmail.com]
> > Sent: 19 April 2010 22:26
> > To: Commons Users List
> > Subject: Re: [Commons SCXML] - Parallel states and external invocation.
> > Best practice.
> >
> > On Mon, Apr 19, 2010 at 7:33 AM, Andrew Mansfield 
> > 
> > wrote:
> >> Hi,
> >>
> >> I am attempting to build a state machine that essentially models my 
> >> applications workflow.
> >>
> >> To do this I have built a simple custom component invoker that can be 
> >> executed from the  tag to execute Java code. The 
> >> 'id.invoke.done' event simply transitions to the next state in the 
> >> workflow. The flexibility is required as components will be plugged 
> >> in
> >
> >> for different configurations to change default behaviour often.
> >>
> >> e.g.
> >>
> >>   
> >> >> srcexpr="componentId1"/>
> >> >> target="s2" />
> >>
> >>
> >>
> >>
> >> >> srcexpr="componentId2"/>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> What I want to do is allow for parallel execution of states which 
> >> themselves have the abilty to invoke external code. I.e.
> >>
> >>
> >> >> srcexpr="componentId1"/>
> >> >> target="s2" />
> >>
> >>
> >>
> >> 

RE: Commons-net FTP and AIX 5.3 FTP Server

2010-04-23 Thread Martin Gainty

one possible problem is 
type i (if your sending/receiving machine is EBCDIC and
the file contains non-display data, e.g., COMP-3);
i know of one system that sends/receives EBCDIC.. an old ibm mainframe that the 
army abandoned in Saigon in 75..all other computer systems send/receive and 
process in ascii

i would strongly suggest setting type='a'
http://www.ucop.edu/irc/campus_specs/ftp/aixftp.html

what happens when you use issue the same series of commands at command-line 
prompt?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Fri, 23 Apr 2010 11:55:49 -0300
> Subject: Commons-net FTP and AIX 5.3 FTP Server
> From: rdg.du...@ibest.com.br
> To: user@commons.apache.org
> 
> Hello,
> 
> Let me explain what's happening: I have no problems connecting and uploading
> files to Linux, Windows or even SCO (yes, it still exists) FTP servers, but
> when I try to execute a simple command using FTPClient to AIX 5.3 I got the
> following exception:
> 
>1.
>org.apache.commons.net.MalformedServerReplyException: Could not
> parse response code.
>2. Server Reply: : The socket name is not available on this system.
>3. at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:316)
>4. at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:491)
>5. at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:533)
>6. at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582)
>7. at org.apache.commons.net.ftp.FTP.quit(FTP.java:790)
>8. at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:759
>)
>9.
>at 
> testes.integracao.FtpCommonsNetTest.testRiscf80(FtpCommonsNetTest.java:
>27)
>10. ...
> 
> org.apache.commons.net.MalformedServerReplyException: Could not parse
> response code. Server Reply: : The socket name is not available on this
> system. at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:316) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:491) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:533) at
> org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) at
> org.apache.commons.net.ftp.FTP.quit(FTP.java:790) at
> org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:759) at
> testes.integracao.FtpCommonsNetTest.testRiscf80(FtpCommonsNetTest.java:27)
> ... The code that generates the stack above is just that:
> 
>1. @Test
>2. public final void testRiscf80() throws Exception {
>3. FTPClient ftp = new FTPClient();
>4. try {
>5. ftp.connect(AIX_HOST_IP);
>6. ftp.login(AIX_USER, AIX_PASSWD);
>7. ftp.changeWorkingDirectory(
>"/riscf80/path/to/uploaded/files");
>8. File file = new File("some-dummy-file.gz");
>9. FileInputStream fis = new FileInputStream(file);
>10. ftp.storeFile(fileName, fis);
>// Line where exception occurs
>11. } finally {
>12. ftp.logout();
>13. ftp.disconnect();
>14. }
>15. }
> 
> @Test public final void testRiscf80() throws Exception { FTPClient ftp = new
> FTPClient(); try { ftp.connect(AIX_HOST_IP); ftp.login(AIX_USER,
> AIX_PASSWD); ftp.changeWorkingDirectory("/riscf80/path/to/uploaded/files");
> File file = new File("some-dummy-file.gz"); FileInputStream fis = new
> FileInputStream(file); ftp.storeFile(fileName, fis); // Line where exception
> occurs } finally { ftp.logout(); ftp.disconnect(); } } That was intriguing,
> so I performed some research and reached the following results printing all
> responses from the server while was just trying to list some folder files:
>

RE: [VFS] Trying To Use WebDAV

2010-04-27 Thread Martin Gainty

Guten Tag

on which container will you be implementing?

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> Subject: [VFS] Trying To Use WebDAV
> Date: Tue, 27 Apr 2010 11:49:35 -0700
> From: theresa.stewar...@airliquide.com
> To: user@commons.apache.org
> 
> Hi,
> 
>  
> 
> I was trying to use the following solution in order to obtain a
> FileObject using the WebDAV protocol (posted earlier on a thread):
> 
>  
> 
>  
> 
> WebdavFileSystemConfigBuilder builder =
> 
>  
> (WebdavFileSystemConfigBuilder)manager.getFileSystemConfigBuilder("webda
> v");
> 
> final String uri = System.getProperty(TEST_URI);
> 
> FileSystemOptions opts = new FileSystemOptions();
> 
> builder.setRootURI(opts, uri);
> 
> return manager.resolveFile(uri, opts);
> 
>  
> 
> and found out that builder.setRootURI(opts,uri); is not a choice on
> builder (not supported for the API I have).  Is there an alternative?
> 
>  
> 
> Is the TEST_URI the one constructed from:
> 
>  
> 
> Credentials credentials = credentialsBuilder.build();
> 
> String uri = credentials.toFileObjectURL();
> 
>  
> 
> Finally, how can the username and password be set?
> 
>  
> 
> Thanks,
> 
> Theresa
> 
>  
> 
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2

RE: [fileupload] How to limit an upload speed?

2010-05-04 Thread Martin Gainty

compress what you have before sending it up is the suggestion i can make

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 4 May 2010 13:36:43 +0300
> Subject: [fileupload] How to limit an upload speed?
> From: dens.busin...@gmail.com
> To: user@commons.apache.org
> 
> Hi. I'm working on an app (based on Spring as DI and MVC framework) that has
> a file upload function which is currently implemented using Spring Multipart
> Upload (which in it's turn utilizes commons fileupload libs). So what I'm
> looking for is a way to lower the upload bandwidth consumption. If it is
> possible with FileUpload libs, how can I accomplish that?
> 
> Please, see the original post:
> http://stackoverflow.com/questions/2738706/how-to-limit-an-upload-speed-in-java-servlet
> <http://stackoverflow.com/questions/2738706/how-to-limit-an-upload-speed-in-java-servlet>Thanks
> in advance for any help.
> 
> -- 
> Best regards, Denys.
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

RE: [scxml] templating/src/xinclude and returning a value(through datamodel/donedata)

2010-05-06 Thread Martin Gainty

Fabrizio-

from what ive read in the scxml doc you need to configure the datamodel and 
their respective data node children directly under the scm root node e.g.
http://www.w3.org/2005/07/scxml";
   version="1.0"
   initialstate="init-travel-plan">

  

//you can use the Data macro to reference the current value of the requested 
parameters e.g.
//Commons SCXML defines a Data()
   function for use in JEXL or EL expressions, for example:


//   The above expression extracts the arrival date from the hotelbooking
//   data in the documents datamodel and stores it in a scratch space variable
//   named "arrival". The first argument is value of the name attribute of the
//element and the second is the String value of the XPath
//   expression. If more than one matching nodes are found, the first one
//   is returned.   //this is different from your current implementation which 
uses data elements associated with a state e.g.
 http://www.w3.org/2005/07/scxml";
   version="1.0"
   initialstate="airline-ticket">

  

  
the association of this data would be to airline-ticket and could not be used 
in hotel or restaurant
a complete scxml tutorial is available at
http://commons.apache.org/scxml/guide/datamodel.html

HTH
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: fmorb...@gmail.com
> Date: Thu, 6 May 2010 10:24:17 -0700
> Subject: Re: [scxml] templating/src/xinclude and returning a value(through
> datamodel/donedata)
> To: user@commons.apache.org
> 
> Hi Rahul, thanks for the quick reply. i opened the JIRA ticket for the
> donedata as you suggested.
> But i still cannot get this to work even with your suggested
> modifications. Here is the log of execution (it seems that the
> assignment to AAA doesn't persist).
> 
> DEBUG 10:14:22.086 [Thread-1   ] [sax  ] endDocument()
> DEBUG 10:14:23.103 [Thread-1   ] [Context  ]
> _ALL_NAMESPACES = {=http://www.w3.org/2005/07/scxml,
> cs=http://commons.apache.org/scxml}
> DEBUG 10:14:23.129 [Thread-1   ] [ExpressionFactory]
> Parsing expression: 10;
> DEBUG 10:14:23.131 [Thread-1   ] [Context  ]
> _ALL_NAMESPACES = null
> DEBUG 10:14:23.131 [Thread-1   ] [Context  ] cook_time = 
> 10
> DEBUG 10:14:23.131 [Thread-1   ] [Context  ] AAA =
> [data: null]
> DEBUG 10:14:23.132 [Thread-1   ] [Context  ]
> _eventdata = null
> DEBUG 10:14:23.132 [Thread-1   ] [Context  ]
> _eventdatamap = {s1.entry=null}
> DEBUG 10:14:23.132 [Thread-1   ] [Context  ]
> _eventdata = null
> DEBUG 10:14:23.132 [Thread-1   ] [Context  ]
> _eventdatamap = {s11.entry=null, s1.exit=null, s2.entry=null}
> DEBUG 10:14:23.132 [Thread-1   ] [Context  ]
> _ALL_NAMESPACES = {=http://www.w3.org/2005/07/scxml,
> cs=http://commons.apache.org/scxml}
> DEBUG 10:14:23.133 [Thread-1   ] [ExpressionFactory]
> Parsing expression: AAA;
> DEBUG 10:14:23.133 [Thread-1   ] [ExpressionFactory]
> Parsing expression: 's3';
> DEBUG 10:14:23.134 [Thread-1   ] [ExpressionFactory]
> Parsing expression: 's3';
> DEBUG 10:14:23.134 [Thread-1   ] [SCXMLSemantics   ]
> : data node 'data' updated
> DEBUG 10:14:23.134 [Thread-1   ] [Context  ]
> _ALL_NAMESPACES = null
> DEBUG 10:14:23.134 [Thread-1   ] [Context  ]
> _eventdata = null
> DEBUG 10:14:23.134 [Thread-1   ] [Context  ]
> _eventdatamap = {s11.exit=null, s12.entry=null, null.change=nul

RE: Connection Pooling in Azure Cloud

2010-07-19 Thread Martin Gainty

tribes uses a multicast discovery with timed heartbeats to coordinate between 
participating members
http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

 

tribes allows comm to happen synchronously or asychnronously

http://tomcat.apache.org/tomcat-6.0-doc/config/cluster.html


Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: ted.dunn...@gmail.com
> Date: Mon, 19 Jul 2010 09:10:58 -0700
> Subject: Re: Connection Pooling in Azure Cloud
> To: user@commons.apache.org
> 
> Distributed applications need a good coordination layer.
> 
> Apache Zookeeper provides a very nice implementation for this.
> 
> On Mon, Jul 19, 2010 at 8:15 AM, Praveen Sripati
> wrote:
> 
> > Servers gets added and removed all the time
> > in the cloud. I am not sure if a change in DBCP or Driver is the right
> > approach, but it's a nice to have feature.
> >
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5

RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC but not when natively called

2010-07-22 Thread Martin Gainty

load in kdb and read the debug output back
http://www.aixmind.com/?p=637

 

hth
Martin Gainty 
__ 
do not alter ot disrupt this transmission. Thank You

 


> From: jason.c.bu...@wellsfargo.com
> To: user@commons.apache.org
> Date: Thu, 22 Jul 2010 17:18:56 -0500
> Subject: [daemon]UnsatisfiedLinkError: net exception thown through JSVC but 
> not when natively called
> 
> Hopefully the mailing list can help where I have failed after pulling my
> hair out for three days. Any advice will be greatly appreciated.
> 
> I have an AIX 5.2 machine with daemons 1.0.2 and IBM's latest JRE 6
> installed:
> 
> bash-3.1# ./jre/bin/java -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build pap3260sr8-20100409_01(SR8))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32
> jvmap3260sr8-20100401_55940 (JIT enabled, AOT enabled)
> J9VM - 20100401_055940
> JIT - r9_20100401_15339
> GC - 20100308_AA)
> JCL - 20100408_01
> 
> 1.0.2 is compiled with 
> 
> ./configure --with-java=$(JAVA_HOME)
> make
> 
> This includes a small patch to location.c and appsupport.m4 just to enable
> jsvc to find the jvm.cfg and libjvm.so files during startup.
> 
> I have a Java application that implements the Daemon class. I'm trying to
> update the JRE from 5 to 6 - this application worked fine under 5 and
> upgraded on other OSes to 6 with no issues. Part of the initialization of
> this class is a routine to create an RMI registry. A partial example is
> below:
> 
> From the Daemon class:
> 
> public void init(DaemonContext arg0) throws Exception
> {
> log.debug("Initializing client from the Daemon process.");
> 
> log.debug("Setting environment variables.");
> System.setProperty("javax.net.ssl.trustStore", "");
> System.setProperty("javax.net.ssl.trustStoreType", "jks");
> 
> 
> 
> log.debug("Initializing client.");
> client = new Client();
> if (arg0 == null)
> client.init(null);
> else
> client.init(arg0.getArguments());
> 
> 
> 
> hasInit = true;
> log.debug("Initializing done.");
> }
> 
> And from the Client class:
> 
> public void init(String[] cmdArgs)
> {
> log.debug("Initializing Client.");
> 
> 
> 
> try
> {
> // Set up RMI for . Start with the registry.
> if (rmiRegistry == null)
> {
> log.debug("Trying to start the rmi registry.");
> rmiRegistry = LocateRegistry.createRegistry(rmiport);
> log.debug("Registry started.");
> }
> 
> }
> catch (Exception e)
> 
> }
> 
> 
> When this process starts up through JSVC, it crashes in createRegistry with
> a UnsatisfiedLinkError. Below is the jsvc debug output:
> 
> 
> jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS --
> jsvc debug: | Detach: False
> jsvc debug: | Show Version: No
> jsvc debug: | Show Help: No
> jsvc debug: | Check Only: Disabled
> jsvc debug: | Stop: False
> jsvc debug: | Wait: 0
> jsvc debug: | Run as service: No
> jsvc debug: | Install service: No
> jsvc debug: | Remove service: No
> jsvc debug: | JVM Name: "null"
> jsvc debug: | Java Home: "null"
> jsvc debug: | PID File: "/run/client.pid"
> jsvc debug: | User Name: "null"
> jsvc debug: | Extra Options: 2
> jsvc debug: |
> "-Djava.class.path=./libs/commons-daemon.jar:./ClientSoftware.jar"
> jsvc debug: | Class Invoked: ".Daemon"
> jsvc debug: | Class Arguments: 0
> jsvc debug: +---
> jsvc debug: Home not specified on command line, using environment
> jsvc debug: Attempting to locate Java Home in /jre
> jsvc debug: Attempting to locate VM configuration file  home>/jre/jre/lib/jvm.cfg
> jsvc debug: Attempting to locate VM configuration file  home>/jre/lib/jvm.cfg
> jsvc debug: Attempting to locate VM configuration file  home>/jre/jre/lib/ppc/jvm.cfg
> jsvc debug: Attempting to locate VM configuration file  home>/jre/lib/ppc/jvm.cfg
> jsvc debug: Found VM configuration file at /jre/lib/ppc/jvm.cfg
> jsvc debug: Found VM j9vm definition in configuration
> jsvc debug: Checking library /jre/jre/lib/ppc/j9vm/libjvm.so
> jsvc debug: Checking library /jre/lib/ppc/j9vm/libjvm.so
> jsvc debug: Found VM client definition in configuration
> jsvc debug: Checking library /jre/jre/lib/ppc/client/libjvm.so
> jsvc debug: Checking library /jre/lib/ppc/client/libjvm.so
> jsvc debug: Cannot locate library for VM client (skipping)
> jsvc debug: Found VM server definition in configuration
> jsvc debug: Checking library /jre/jre/lib/ppc/server/lib

RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC but not when natively called

2010-07-23 Thread Martin Gainty

 

sometimes when programmers strip their debug code they also strip working code 
so the rule is

debug library always work..a programmer could'nt declare working code without a 
debug library

production library (without the debug statements) usually work..if not fall 
back to debug library

 

take a look at Doug Kileys solution for JSVC problem with Snow Leopard..he used 
1.02 commons daemon to fix

https://issues.apache.org/jira/browse/DAEMON-129

in this case the culprit was commons-daemon 1.01

upgrade to commons-daemon 1.01 with patches or

upgrade to commons-daemon 1.02 and see if that resolves

 

keep us apprised,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: jason.c.bu...@wellsfargo.com
> To: user@commons.apache.org
> Date: Thu, 22 Jul 2010 19:42:34 -0500
> Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC 
> but not when natively called
> 
> Thanks for the reply Martin, but I'm a little confused. After reading the
> page you sent, it seems kdb is a kernel debugger for processing system
> dumps. This is a java exception from the JVM running in user space. There
> is no dump file and unless I'm missing something, I don't know how the
> kernel trace is going to help me here. Can you perhaps just give a bit more
> information about what you had in mind? Thanks for taking the time to
> reply.
> 
> Jason
> 
> > -Original Message-
> > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > Sent: Thursday, July 22, 2010 5:28 PM
> > To: user@commons.apache.org
> > Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through
> > JSVC but not when natively called
> > 
> > 
> > load in kdb and read the debug output back
> > http://www.aixmind.com/?p=637
> > 
> > 
> > 
> > hth
> > Martin Gainty
> > __
> > do not alter ot disrupt this transmission. Thank You
> > 
> > 
> > 
> > 
> > > From: jason.c.bu...@wellsfargo.com
> > > To: user@commons.apache.org
> > > Date: Thu, 22 Jul 2010 17:18:56 -0500
> > > Subject: [daemon]UnsatisfiedLinkError: net exception thown through JSVC
> > but not when natively called
> > >
> > > Hopefully the mailing list can help where I have failed after pulling my
> > > hair out for three days. Any advice will be greatly appreciated.
> > >
> > > I have an AIX 5.2 machine with daemons 1.0.2 and IBM's latest JRE 6
> > > installed:
> > >
> > > bash-3.1# ./jre/bin/java -version
> > > java version "1.6.0"
> > > Java(TM) SE Runtime Environment (build pap3260sr8-20100409_01(SR8))
> > > IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32
> > > jvmap3260sr8-20100401_55940 (JIT enabled, AOT enabled)
> > > J9VM - 20100401_055940
> > > JIT - r9_20100401_15339
> > > GC - 20100308_AA)
> > > JCL - 20100408_01
> > >
> > > 1.0.2 is compiled with
> > >
> > > ./configure --with-java=$(JAVA_HOME)
> > > make
> > >
> > > This includes a small patch to location.c and appsupport.m4 just to
> > enable
> > > jsvc to find the jvm.cfg and libjvm.so files during startup.
> > >
> > > I have a Java application that implements the Daemon class. I'm trying
> > to
> > > update the JRE from 5 to 6 - this application worked fine under 5 and
> > > upgraded on other OSes to 6 with no issues. Part of the initialization
> > of
> > > this class is a routine to create an RMI registry. A partial example is
> > > below:
> > >
> > > From the Daemo

RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC but not when natively called

2010-07-23 Thread Martin Gainty

a)debug information is not available in production libraries..acquiring debug 
information (on libjvm)or any library will allow you to see ordinals, code, 
stack, heap ..all the segments..the guesswork goes away as all the information 
is available in the debug version of the library

b)did you try commons-daemon 1.02 ?


JNI interfaces are tricky you'll need info on:

 

binary cs/ip offsets and library-ordinals and more importantly library method 
parameters

 

calling interface from Java/jsvc/whatever and what parameters the client 
implements

keep in mind that byte alignment and word alignment are the same between the 2 
any other datatype from Java to C++ datatype need to be mapped..
which depends on the wordsize of the OS..32 bit vs 64bit ..big-endian vs 
little-endian

 

curious what the deltas are between the JRE5 and JRE6 libraries..specifically 
libjvm?

 

did you ping ibm support?
Martin  
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: jason.c.bu...@wellsfargo.com
> To: user@commons.apache.org
> Date: Fri, 23 Jul 2010 19:01:14 -0500
> Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC 
> but not when natively called
> 
> Sorry Martin, still at a loss. I don't get the reference as to how
> stripping debug code from libraries applies here (I understand what you're
> saying and agree with it, I just don't see how it is relevant here).
> 
> I have an application that ran fine under IBM JRE 5 and jsvc 1.0.1 and
> 1.0.2. I upgraded to IBM JRE 6 and now I get the link exception. The code
> hasn't changed - unless you're referring to the IBM JRE library? If that
> was the case, why would it work when the JVM is created by the JRE's
> bin/java command?
> 
> Perhaps someone knows of a way to get more debugging information from the
> JVM? As I showed in my previous post, we can see where in the code the link
> error is happening, but perhaps a more verbose JRE library would tell me
> why? Anyone know of such a thing?
> 
> Or have any other ideas?
> 
> Jason
> 
> 
> > -Original Message-
> > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > Sent: Friday, July 23, 2010 11:29 AM
> > To: user@commons.apache.org
> > Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through
> > JSVC but not when natively called
> > 
> > 
> > 
> > 
> > sometimes when programmers strip their debug code they also strip working
> > code so the rule is
> > 
> > debug library always work..a programmer could'nt declare working code
> > without a debug library
> > 
> > production library (without the debug statements) usually work..if not
> > fall back to debug library
> > 
> > 
> > 
> > take a look at Doug Kileys solution for JSVC problem with Snow Leopard..he
> > used 1.02 commons daemon to fix
> > 
> > https://issues.apache.org/jira/browse/DAEMON-129
> > 
> > in this case the culprit was commons-daemon 1.01
> > 
> > upgrade to commons-daemon 1.01 with patches or
> > 
> > upgrade to commons-daemon 1.02 and see if that resolves
> > 
> > 
> > 
> > keep us apprised,
> > Martin Gainty
> > __
> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> > 
> > 
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> > dient lediglich dem Austausch von Informationen und entfaltet keine
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierb

RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC but not when natively called

2010-07-26 Thread Martin Gainty

one more item on commons-daemon
 
I found out what the issue was. The commons-daemon-native.tar.gz file
contains archive library and object files in the unix directory that were
compiled on some other system. I would recommend that this tar file is
repackaged, doing a make clean in the unix directory before repackaging.
http://www.junlu.com/list/8/655090.html

keep us apprised,
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: jason.c.bu...@wellsfargo.com
> To: user@commons.apache.org
> Date: Fri, 23 Jul 2010 19:01:14 -0500
> Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through JSVC 
> but not when natively called
> 
> Sorry Martin, still at a loss. I don't get the reference as to how
> stripping debug code from libraries applies here (I understand what you're
> saying and agree with it, I just don't see how it is relevant here).
> 
> I have an application that ran fine under IBM JRE 5 and jsvc 1.0.1 and
> 1.0.2. I upgraded to IBM JRE 6 and now I get the link exception. The code
> hasn't changed - unless you're referring to the IBM JRE library? If that
> was the case, why would it work when the JVM is created by the JRE's
> bin/java command?
> 
> Perhaps someone knows of a way to get more debugging information from the
> JVM? As I showed in my previous post, we can see where in the code the link
> error is happening, but perhaps a more verbose JRE library would tell me
> why? Anyone know of such a thing?
> 
> Or have any other ideas?
> 
> Jason
> 
> 
> > -Original Message-
> > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > Sent: Friday, July 23, 2010 11:29 AM
> > To: user@commons.apache.org
> > Subject: RE: [daemon]UnsatisfiedLinkError: net exception thown through
> > JSVC but not when natively called
> > 
> > 
> > 
> > 
> > sometimes when programmers strip their debug code they also strip working
> > code so the rule is
> > 
> > debug library always work..a programmer could'nt declare working code
> > without a debug library
> > 
> > production library (without the debug statements) usually work..if not
> > fall back to debug library
> > 
> > 
> > 
> > take a look at Doug Kileys solution for JSVC problem with Snow Leopard..he
> > used 1.02 commons daemon to fix
> > 
> > https://issues.apache.org/jira/browse/DAEMON-129
> > 
> > in this case the culprit was commons-daemon 1.01
> > 
> > upgrade to commons-daemon 1.01 with patches or
> > 
> > upgrade to commons-daemon 1.02 and see if that resolves
> > 
> > 
> > 
> > keep us apprised,
> > Martin Gainty
> > __
> > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> > 
> > 
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> > dient lediglich dem Austausch von Informationen und entfaltet keine
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-
> > Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> > destinataire prévu, nous te demandons avec bonté que pour satisfaire
> > informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> > copie de ceci est interdite. Ce message sert à l'information seulement et
> > n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> >

RE: Static versus Transient Logger Declarations

2010-09-10 Thread Martin Gainty

Ray and crew
 
other than accomodating a main driver such as public static void main(String 
args[])  is there any reason for declaring any method or variable as static?
 
an intelligent logger (log4j) could reconfigure the appenders to redeploy 
CPU-intensive/memory-intensive/IO intensive (logging) operations to resources 
which can handle these loads (e.g. sockets)
 
 Logger root_logger = Logger.getRootLogger();
 BasicConfigurator.configure();
 try 
 {  //we dont want to bog down PRODUCTION appServer with lots of File IO so 
we'll send the logs to an external socket
   if(java.lang.System.getEnv("PRODUCTION")!=null)  
   {
   SocketAppender sock_appender = new SocketAppender(host, port);  
//assume host and port have been verified for the AppServer
   sock_appender.setName("SocketAppenderLog");
   sock_appender.activateOptions();
   root_logger.addAppender(sock_appender);
   }
   else
   {   //standard DailyRollingFileAppender (caution this is IO intensive)!
   DailyRollingFileAppender rolling_appender = new 
DailyRollingFileAppender();
   rolling_appender.setName("RollingFileLog");
   rolling_appender.setDatePattern("-MM-dd.'log'");
   rolling_appender.activateOptions();
   root_logger.addAppender(rolling_appender);
 }   
 int k=0;
  logger.debug("Message " + k++);
  logger.info("Info " + k++);
  logger.warn("Warn " + k++);
  logger.error("Error " + k++, new Exception("Just testing"));
  }
  catch(Exception e) 
      {
    System.err.println("problem with Logger exception is"+e.getMessage());
 } 
?
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy 
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése 
nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi 
alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen 
megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet 
tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: ray.cardi...@itt.com
> To: user@commons.apache.org
> Date: Fri, 10 Sep 2010 08:16:41 -0400
> Subject: RE: Static versus Transient Logger Declarations
> 
> I guess that aspect of it comes down to a personal philosophy more than 
> anything else. I typically try to help things like this bubble up so the 
> knowledge can be shared and pain can be avoided in a proactive way instead of 
> waiting for others to learn for themselves. So that's why I'm asking for 
> other communities to engage. I'm not actually trying to challenge the JBoss 
> contributors directly, or cause any "religious" wars over best practices. I 
> just want to see some solid reasoning on the topic so we can get the correct 
> knowledge out there and either validate the currently accepted practice, or 
> confirm that this other strategy should be the best practice. Once the 
> correct knowledge is out there, then each community can make solid design 
> decisions instead of succumbing to the "cargo cult code" phenomenon that 
> seems to be responsible for the current strategy that people think is a best 
> practice only because they see the pattern so frequently.
> 
> I'm not really worried about it, for the reasons you mentioned, but I do want 
> to see the "experts" in this area at least defend or amend the Apache Commons 
> Wiki content if it turns out to be bad information (as some in the 
> aforementioned thread seem to indicate).
> 
> Ray
> 
> 
> -Original Message-
> From: Adrian Crum [mailto:adrian.c...@yahoo.com] 
> Sent: Thursday, September 09, 2010 3:54 PM
> To: Commons Users List

RE: [math]How to do standardizing (normalizing)

2010-10-03 Thread Martin Gainty

Good Morning Erik/Phil

I just encountered a bug in maven-surefire-api factory which went something 
like this
All array references such as double[], float[],int[] gacked the factory loader 

reason:
this is not  a Class that the factory is looking for 

so what i did was for each situation where double[] double_array;

 

ArrayList double_array_list=new ArrayList();

for (int d=0;d Date: Sat, 2 Oct 2010 20:50:49 -0400
> From: phil.ste...@gmail.com
> To: user@commons.apache.org
> Subject: Re: [math]How to do standardizing (normalizing)
> 
> On 10/1/10 8:32 AM, VanIngen, Erik (FIPS) wrote:
> > Hi Luc and others,
> >
> > I have written the standardize function by myself (see below, including the 
> > tests). Would it be possible to have this added to Apache Math Commons?
> >
> 
> Thanks for contributing!
> 
> We should take discussion of this new feature to the dev list. It 
> would be great if you could open a JIRA ticket and attach a patch 
> including implementation code.
> 
> We can talk about how to integrate this into [math] in JIRA comments 
> and / or on the dev list. For now, I will just say that the 
> simplest way to add this would be to add a static method called 
> something like "normalize" to org.apache.commons.math.stat.StatUtils.
> 
> See http://commons.apache.org/patches.html for info on how to create 
> patches and attach them to JIRA tickets. Do not hesitate to ask 
> either on dev list or in private emails if you need help getting set up.
> 
> Thanks!
> 
> Phil
> 
> >
> >
> >
> >
> >
> > /**
> > * The standardise function does not seem to be in Apache math commons.
> > *
> > *
> > * @author Erik van Ingen
> > *
> > */
> > public class Standardize {
> >
> > /**
> > * Standardise the series, so in the end it is having mean of 0 and a 
> > standard deviation of 1.
> > *
> > *
> > * @param series
> > * @return
> > */
> > public static double[] run(double[] series) {
> > DescriptiveStatistics stats = new DescriptiveStatistics();
> >
> > // Add the data from the array
> > for (int i = 0; i< series.length; i++) {
> > stats.addValue(series[i]);
> > }
> >
> > // Compute mean and standard deviation
> > double currentMean = stats.getMean();
> > double currentstandardDeviation = stats.getStandardDeviation();
> >
> > // z = (x- mean)/standardDeviation
> > double[] newSeries = new double[series.length];
> >
> > for (int i = 0; i< series.length; i++) {
> > newSeries[i] = (series[i] - currentMean) / currentstandardDeviation;
> > }
> > return newSeries;
> > }
> >
> > }
> >
> >
> >
> > public class StandardizeTest {
> >
> > /**
> > * Run the test with the values 50 and 100 and assume standardized values 
> > with a dinstance of 0.01
> > */
> > @Test
> > public void testRun1() {
> > double series[] = { 50, 100 };
> > double expectedSeries[] = { -0.7, 0.7 };
> > double[] out = Standardize.run(series);
> > for (int i = 0; i< out.length; i++) {
> > assertEquals(out[i], expectedSeries[i], 0.01);
> > }
> >
> > }
> >
> > /**
> > * Run with 77 random values, assuming that the outcome has a mean of 0 and 
> > a standard deviation of 1.
> > *
> > *
> > *
> > */
> > @Test
> > public void testRun2() {
> > int length = 77;
> > double series[] = new double[length];
> >
> > for (int i = 0; i< length; i++) {
> > series[i] = Math.random();
> > }
> >
> > double standardizedSeries[] = Standardize.run(series);
> >
> > DescriptiveStatistics stats = new DescriptiveStatistics();
> >
> > // Add the data from the array
> > for (int i = 0; i< length; i++) {
> > stats.addValue(standardizedSeries[i]);
> > }
> >
> > double distance = 1E-10;
> > assertEquals(0.0, stats.getMean(), distance);
> > assertEquals(1.0, stats.getStandardDeviation(), distance);
> >
> > }
> >
> > }
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Luc Maisonobe [mailto:luc.maison...@free.fr]
> > Sent: 29 September 2010 18:54
> > To: Commons Users List
> > Subject: Re: [math]How to do standardizing (normalizing)
> >
> >
> > Le 29/09/2010 12:13, VanIngen, Erik (FIPS) a écrit :
> >> Hi Apache Commons Math users
> >>
> >> I am looking for an easy way of standardizing my values a mean 0 and a
> >> standard deviation of 1. What is the best way to do that?
> >>
> >> I have tried this:
> >> DescriptiveStatistics stats = new DescriptiveStatistics();
> >> // adding values
> >> 
> >> // Compute Mean and StandardDeviation
> >> double mean = stats.getMean();
> >> double std = stats.getStandardDeviation();
> >>
> >> and then standardize each value according z = (x- mean)/std
> >>
> >> But I would like to have just a function of standardize an array
> >> according the parameters mean and std. Is there something like this in
> >> Apache Math Commons?
> >
> > I don't think we have such a function.
> >
> > Luc
> >
> >>
> >> Erik
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> >> For additional commands, e-mail: user-h...@commons.apache.org
> >>
> >>

RE: Commons Configuration 1.7

2010-10-19 Thread Martin Gainty
vnet.hudson.plugins
  email-ext
  2.10-SNAPSHOT


commons-logging
commons-logging
1.0.4


ant
ant
1.6.2
true


commons-net
commons-net
1.4.1
true



commons-collections
commons-collections
3.1
true


jdom
jdom
1.0
true


commons-httpclient
commons-httpclient
2.0.2
true


com.jcraft
jsch
0.1.23
true


xml-apis
xml-apis
1.0.b2
true


oro
oro
2.0.8
true


junit
junit
3.8.1
test






src/main/java

**/*.java



..
META-INF

NOTICE.txt



..

LICENSE.txt







org.apache.maven.plugins
maven-compiler-plugin

1.3
1.3




org.apache.maven.plugins
maven-jar-plugin



test-jar






org.apache.maven.plugins
maven-antrun-plugin


generate-test-resources

















org.apache.maven.plugins
maven-surefire-plugin



test.basedir
target/test-data

        








HTH
Martin Gainty 
__ 
Please do not alter or disrupt this transmission. Thank You




> From: ronak.pa...@baesystems.com
> To: user@commons.apache.org
> Date: Mon, 18 Oct 2010 17:51:30 -0700
> Subject: RE: Commons Configuration 1.7
> 
> Hi Ralph,
> 
> The issue is:
> 
> https://issues.apache.org/jira/browse/VFS-301.
> 
> It's still open...and I don't see any patches. 
> 
> This bug is a blocker for me and so I have to drop down to using java.io.File 
> to do my actual file reading which is not desirable.
> 
> Thanks,
> 
> Ronak Patel
> 
> -Original Message-
> From: Ralph Goers [mailto:ralph.go...@dslextreme.com] 
> Sent: Monday, October 18, 2010 5:47 PM
> To: Commons Users List
> Subject: Re: Commons Configuration 1.7
> 
> What is the issue number?  Did it have a patch with it?
> 
> Ralph
> 
> On Oct 18, 2010, at 5:39 PM, Patel, Ronak Avinash (US SSA) wrote:
> 
> > Hi Ralph,
> > 
> > That's great news!!
> > 
> > I was wondering if you also happened to fix the bug related to setting 
> > marks and resetting the InputStream being returned by the 
> > FileObject#FileContent object.
> > 
> > Last I remember, it still wasn't addressed.
> > 
> > Thanks,
> > 
> > Ronak Patel
> > 
> > -Original Message-
> > From: Ralph Goers [mailto:ralph.go...@dslextreme.com] 
> > Sent: Monday, October 18, 2010 5:36 PM
> > To: Commons Users List
> > Subject: Re: Commons Configuration 1.7
> > 
> > 
> > On Oct 18, 2010, at 12:47 PM, Oliver Heger wrote:
> > 
> >> Am 14.10.2010 02:02, schrieb Patel, Ronak Avinash (US SSA):
> >>> Hi,
> >>> 
> >>> I have a situation where I need to use the 
> >>> VFSFileMonitorReloadingStrategy  class mentioned in this post: 
> >>> https://issues.apache.org/jira/browse/CONFIGURATION-202.
> >>> However, there is no mention of when this class w

RE: [ANNOUNCEMENT] Apache Commons Exec 1.1 Released

2010-10-24 Thread Martin Gainty

Many Thanks to Siegfried and Konrad for the hard work they have contributed to 
fixing past bugs and implementing new features for common-exec
If you could provide a link I will download and run the testcases.

Vielen Danke,
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> Date: Sun, 24 Oct 2010 09:05:12 +0200
> From: siegfried.goes...@it20one.at
> To: d...@commons.apache.org; user@commons.apache.org
> Subject: [ANNOUNCEMENT] Apache Commons Exec 1.1 Released
> 
> The commons-exec-team is pleased to announce the commons-exec-1.1.jar 
> release!
> 
> A library to reliably execute external processes from within the JVM
> 
> Changes in this version include:
> 
> New features:
> 
> o Adding 'Argument' class and quote the arguments after expansion.
> o Added TutorialTest as a playground for new user and removed
> similar code from DefaultExecutorTest.
> o Added 'DefaultExecuteResultHandler'
> 
> Fixed Bugs:
> 
> o OpenVMS now uses symbols instead of logicals for environment variables.
> o String substitution handles now java.io.File instances in order to
> create a cross-platform file name.
> o The 'forever.bat' accidentally overwrite the 'forever.txt' instead
> of appending.
> o Process.waitFor should clear interrupt status when throwing
> InterruptedException Issue: EXEC-46. Thanks to Zimmermann Nir.
> o Because the ExecuteWatchdog is the only way to destroy asynchronous
> processes, it should be possible to set it to an infinite timeout,
> for processes which should not timeout, but manually destroyed
> under some circumstances. Issue: EXEC-44.
> 
> Changes:
> 
> o DefaultExecutor() now sets the working directory with the current
> working directory.
> o Added 'DefaultExecutorTest#testStdInHandling' to show how
> commons-exec can feed the 'stdin' of a child process.
> o Improved the documentation. Issue: EXEC-42. Thanks to Konrad Windzus.
> o Added a new section to the tutorial to show working with asynchronous
> processes. Thanks to Pablo Hoertner.
> 
> Have fun!
> 
> -commons-exec-team
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [exec] Re: Redirect shell output

2010-10-31 Thread Martin Gainty

you found a bug

any volunteers to rid the bug?

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
 

> Date: Sun, 31 Oct 2010 13:58:27 +
> From: johan_he...@yahoo.se
> To: user@commons.apache.org
> Subject: Re: [exec] Re: Redirect shell output
> 
> Hi again,
> 
> I have tried to wrap it in a script now and it works. I am just a bit 
> curious is there any reason why the command (pfexec zfs send 
> rpool/d...@f20101031 | gzip > F20101031.gz) can't work as it is?
> 
> Regards
> Johan
> 
> On 31/10/2010 12:34, Siegfried Goeschl wrote:
> > Hi Johan,
> >
> > sorry for bugging you - any progress from your side? We also 
> > appreciate success stories ... :-)
> >
> > Thanks in advance
> >
> > Siegfried Goeschl
> >
> > On 10/24/10 11:33 PM, Johan Hertz wrote:
> >> Hi Siegfried,
> >>
> >> It is a bit late for me to test this now, but thank you very much for
> >> pointing me in the right direction.
> >>
> >> Regards
> >> Johan
> >>
> >> On 24/10/2010 20:51, Siegfried Goeschl wrote:
> >>> Hi Johan,
> >>>
> >>> I used the following test
> >>>
> >>> >>> Start >>>
> >>> public void testMe() throws Exception {
> >>> if(OS.isFamilyUnix()) {
> >>> File testScript =
> >>> TestUtil.resolveScriptForOS("./src/test/scripts/standalone");
> >>> System.out.println("Executing the following test script : " +
> >>> testScript.getAbsolutePath());
> >>> Executor exec = new DefaultExecutor();
> >>> exec.setStreamHandler(new PumpStreamHandler());
> >>> CommandLine cl = new CommandLine(testScript);
> >>> exec.execute(cl);
> >>> assertTrue(new File("./target/mybackup.gz").exists());
> >>> }
> >>> }
> >>> <<< End <<<
> >>>
> >>> using
> >>>
> >>> cat pom.xml | gzip> ./target/mybackup.gz
> >>>
> >>> and it worked as expected
> >>>
> >>> Cheers,
> >>>
> >>> Siegfried Goeschl
> >>>
> >>> On 10/24/10 12:36 PM, Johan Hertz wrote:
>  Hi Paul,
> 
>  Sorry about that.
> 
>  /Regards
>  Johan
> 
>  On 24/10/2010 11:11, Paul Libbrecht wrote:
> > Johan,
> >
> > which project are you asking this from?
> > commons-exec?
> > Please read the netiquette of this list... you need to make this
> > clear otherwise you don't reach the right people.
> >
> > paul
> >
> >
> > On 24 oct. 2010, at 10:56, Johan Hertz wrote:
> >
> >> Hi,
> >>
> >> I am trying to redirect output using something like this:
> >>
> >> zfs send rpool/d...@test | gzip> mybackup.gz
> >>
> >> I can't find a way to do it, is there not a way similar to how ant
> >> do it?
> >> http://ant.apache.org/faq.html#shell-redirect-2
> >>
> >> Regards
> >> Johan
> >> __
> >> Använder du Yahoo!?
> >> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som
> >> finns http://se.mail.yahoo.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
> >
> >
> 
>  __
>  Använder du Yahoo!?
>  Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som
>  finns http://se.mail.yahoo.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
> >>>
> >>>
> >>
> >> __
> >> Använder du Yahoo!?
> >> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet som finns
> >> http://se.mail.yahoo.com
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> >> For additional commands, e-mail: user-h...@commons.apache.org
> >>
> >>
> >
> 
> __
> Använder du Yahoo!?
> Är du trött på spam? Yahoo! E-post har det bästa spamskyddet so

RE: [Primitives] Does anyone use this?

2010-11-02 Thread Martin Gainty

Brian
 
how does primitive collections implementation perform better than JDK 
collections?

thanks,
Martin 
__ 
please do not alter or disrupt this transmission. thank you



 

> Subject: Re: [Primitives] Does anyone use this?
> From: br...@pontarelli.com
> Date: Tue, 2 Nov 2010 11:32:01 -0600
> To: user@commons.apache.org
> 
> I would assume once you get out of the autoboxing caches the performance will 
> get even worse. It really depends on the application, but I've found a number 
> of spots where primitive collections work much better than autoboxing and JDK 
> collections.
> 
> -bp
> 
> 
> On Nov 2, 2010, at 11:25 AM, James Carman wrote:
> 
> > Yet another dependency to add to the mix.
> > 
> > On Tue, Nov 2, 2010 at 1:17 PM, Cogen, David - 1008 - MITLL
> >  wrote:
> >> 
> >> 
> >> From: jcar...@carmanconsulting.com [jcar...@carmanconsulting.com] On 
> >> Behalf Of James Carman [ja...@carmanconsulting.com]
> >> Sent: Tuesday, November 02, 2010 12:30 PM
> >> To: Commons Users List
> >> Subject: Re: [Primitives] Does anyone use this?
> >> 
> >> Premature optimization with JDK5. I'd say stick to the JDK classes if
> >> you can and only try to beef up space/performance if you need to.
> >> 
> >> 
> >> Normally I agree about evils of premature optimization. But ArrayListInt 
> >> is practically a drop-in replacement for ArrayList and I see no 
> >> reason not to use it if it is supported and reliable.
> >> 
> >> My test of 2 billion accesses (reads and writes) ran in 35% of the time 
> >> when I used ArrayListInt vs. ArrayList.
> >> -
> >> 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: [Primitives] Does anyone use this?

2010-11-02 Thread Martin Gainty

also lookup methods from factories will reliably lookup 
ArrayList when bean definition has attribute 
dependency-check="object" but wont lookup a collection of primitives such as 
int []PrimitiveDataTypeVariable even when the bean definition specified 
dependency-check="simple"
 
http://static.springsource.org/spring/docs/1.2.9/reference/beans.html

thanks,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: josiah.d.hasw...@hp.com
> To: user@commons.apache.org
> Date: Tue, 2 Nov 2010 18:42:29 +
> Subject: RE: [Primitives] Does anyone use this?
> 
> Gnu Trove includes a set of benchmarks vs. the JCF. I don't understand why 
> this is so controversial; a developer should be able to assess the 
> suitability of a library for his or her purposes without it turning into a 
> huge debate. If dependency-management is an issue, Trove is available from 
> numerous Ivy/Maven repositories. 
> 
> Joe H. | HP Software
> 
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com] 
> Sent: Tuesday, November 02, 2010 11:41 AM
> To: user@commons.apache.org
> Subject: RE: [Primitives] Does anyone use this?
> 
> 
> Brian
> 
> how does primitive collections implementation perform better than JDK 
> collections?
> 
> thanks,
> Martin 
> __ 
> please do not alter or disrupt this transmission. thank you
> 
> 
> 
> 
> 
> > Subject: Re: [Primitives] Does anyone use this?
> > From: br...@pontarelli.com
> > Date: Tue, 2 Nov 2010 11:32:01 -0600
> > To: user@commons.apache.org
> > 
> > I would assume once you get out of the autoboxing caches the performance 
> > will get even worse. It really depends on the application, but I've found a 
> > number of spots where primitive collections work much better than 
> > autoboxing and JDK collections.
> > 
> > -bp
> > 
> > 
> > On Nov 2, 2010, at 11:25 AM, James Carman wrote:
> > 
> > > Yet another dependency to add to the mix.
> > > 
> > > On Tue, Nov 2, 2010 at 1:17 PM, Cogen, David - 1008 - MITLL
> > >  wrote:
> > >> 
> > >> 
> > >> From: jcar...@carmanconsulting.com [jcar...@carmanconsulting.com] On 
> > >> Behalf Of James Carman [ja...@carmanconsulting.com]
> > >> Sent: Tuesday, November 02, 2010 12:30 PM
> > >> To: Commons Users List
> > >> Subject: Re: [Primitives] Does anyone use this?
> > >> 
> > >> Premature optimization with JDK5. I'd say stick to the JDK classes if
> > >> you can and only try to beef up space/performance if you need to.
> > >> 
> > >> 
> > >> Normally I agree about evils of premature optimization. But ArrayListInt 
> > >> is practically a drop-in replacement for ArrayList and I see no 
> > >> reason not to use it if it is supported and reliable.
> > >> 
> > >> My test of 2 billion accesses (reads and writes) ran in 35% of the time 
> > >> when I used ArrayListInt vs. ArrayList.
> > >> -
> > >> 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: [vfs] - Problem with httpclient

2011-02-03 Thread Martin Gainty

ssh username@magno (or whatever the IP is assigned to magno in hosts file)
>netstat -ab | grep 80

//if you do not have HTTPServer running on 80 you will get no results
//if you do have HTTPServer running on Port 80 you should see output

//also if your HttpClient executeMethod is declared as 
public int executeMethod(HostConfiguration hostconfig, final HttpMethod method, 
final HttpState state)
 throws IOException, HttpException 

//you should call executeMethod with all of the params initialised e.g.
try
{
 int n=client.executeMethod(hostconfig,method,state)
}
catch(IOException ioe)
{
 log.debug("Handle your IOException from client.executeMethod here");
}
catch(HttpException http_exception)
{
 log.debug("Handle your HttpException from client.executeMethod here");
}

Saludos Cordiales,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Thu, 3 Feb 2011 16:20:33 +0100
> From: i.ma...@fdi.ucm.es
> Subject: Re: [vfs] - Problem with httpclient
> To: user@commons.apache.org
> 
> I would like to emphasize that the URI is given by a insecure Globus
> GASS session (the files are transfered using wget, so the session is
> ok). This code does not fail with other kind of URIs.
> 
> Thus, are this kind of URIs valid for httpclient?
> 
> Regards.
> 
> On Wed, 2011-02-02 at 10:13 +0100, Ismael Marín Carrión wrote:
> > Dear all,
> > 
> > I am working in the development of a driver for a Grid system. In our
> > tests, we are using GridSAM, which use the httpclient and commons-vfs.
> > 
> > I am writing you to get some advise of how solving the next problem.
> > 
> > GridSAM invokes httpclient classes from the HttpClientFactory class
> > (org.apache.commons.vfs.provider.http), in the method
> > createConnection().
> > 
> > public static HttpClient createConnection(HttpFileSystemConfigBuilder
> > builder, String scheme,
> >   String hostname, int port,
> > String username,
> >   String password,
> > FileSystemOptions fileSystemOptions)
> > throws FileSystemException
> > {
> >  
> > client.executeMethod(new HeadMethod());
> > 
> >  }
> > 
> > I am not using any authentication mechanism, and so username and passwd
> > are null, but hostname, port and scheme has the proper values.
> > 
> > Thus, in executeMethod() method of the HttpClient class:
> > 
> > public int executeMethod(HostConfiguration hostconfig,
> > final HttpMethod method, final HttpState state)
> > throws IOException, HttpException  {
> > 
> >  HostConfiguration defaulthostconfig = getHostConfiguration();
> > if (hostconfig == null) {
> > hostconfig = defaulthostconfig;
> > }
> > URI uri = method.getURI();
> >
> > }
> > 
> > I received a null value for uri, while the hostconfig object has values
> > for host attribute, but not for localAddress attribute or any other.
> > Later it causes a NoHttpResponseException. 
> > 
> > The complete stack is:
> > 
> > 2011-02-01 17:11:49,050 ERROR [TransferAgentFactory] source URI is not
> > resolvable
> > org.apache.commons.vfs.FileSystemException: Could not connect to HTTP
> > server on "magno".
> > at
> > org.apache.commons.vfs.provider.http.HttpClientFactory.createConnection(HttpClientFactory.java:186)
> > at
> > org.apache.commons.vfs.provider.http.HttpClientFactory.createConnection(HttpClientFactory.java:53)
> > at
> > org.apache.commons.vfs.provi

RE: Question.

2011-02-11 Thread Martin Gainty

i usually stick to the saying "it it aint broke dont fix it .." apparently i am 
the only person that thinks time is better spent working on new features
instead of changing old code..
developers who force refactoring of implementation code because someone decided 
to demote a String param or return value to Object  (for no reason then excess 
time on their hands) produces an end result of endless iterations of 
re-factoring code (that should NEVER have to be refactored in the first place) 
is not my favourite past-time..

that said there are a few immutable exceptions to that rule :

Log4j has pretty much replaced functionality from commons-logging. e.g. 
defining Levels of output severe (nothing but worst) vs info (everything and 
the kitchen sink) and Appenders (SMTP and FTP as well as File and HTTP 
Appenders)..ceki thought of everything when he designed this library
i use log4j almost exclusively ..having come off a situation which used 
commons-logging i groaned thru CL which did'nt have the functionality i needed
if any developer here wants to go and replace (the largely untouched 
commons-logging codebase) with log4j functionality i say go for it!!!

http-commons is about to get a new facelift when IPV4 addresses run out..which 
is from my recollection immediately..we all need to bury the legacy IPv4 
addressing schema (it has served us well for almost 30 years) and go full speed 
ahead for accommodating IPv6 addresses into http-commons-(IPv6) library

any thoughts ???
Martin 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: Question.
> Date: Fri, 11 Feb 2011 15:09:54 -0500
> From: nadia.a...@cgi.com
> To: user@commons.apache.org
> 
> Hello Common Developers,
> 
>  
> 
> In my department, we have java modules on Unix, some of them uses third
> party tools like:  jasper, some uses hibernate,  .  Some modules
> uses more than one java third party tool.
> 
> Most of these third party tools uses commons in their code. Now we
> install all of these products in order Unix box and change the class
> path in order to use the third party tool in our modules.
> 
>  
> 
> The question is how to control different releases of commons within the
> same program? How compatible are your new releases with the older ones.?
> Is it safe to substitute always with the latest for all these third
> party tools?
> 
>  
> 
> Please advise.
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Nadia Ayar
> 
> Brokerage Services, Banking and Investment CGI Information Systems &
> Management Consultants Inc. Office Phone Number - (905) 762 2800 X4502.
> 125 Commerce Valley Drive West - 6th Floor Markham, ON L3T 7W4
> 
> CONFIDENTIALITY NOTICE: Proprietary/Confidential Information belonging
> to CGI Group Inc. and its affiliates may be contained in this message.
> If you are not a recipient indicated or intended in this message (or
> responsible for delivery of this message to such person), or you think
> for any reason that this message may have been addressed to you in
> error, you may not use or copy or deliver this message to anyone else.
> In such case, you should destroy this message and are asked to notify
> the sender by reply email. 
> 
>  
> 
  

RE: [Net] problem with listFiles(String pathname)

2011-02-25 Thread Martin Gainty

FTPFile[] ftpFiles=ftpClient.listFiles(fileName);if(ftpFiles.length==0)
{
//ABORT!!!
}

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.






> Date: Fri, 25 Feb 2011 10:10:29 +
> Subject: Re: [Net] problem with listFiles(String pathname)
> From: ffrancesc...@gmail.com
> To: user@commons.apache.org
> CC: seb...@gmail.com
> 
> 2011/2/24 sebb :
> > On 24 February 2011 18:12, Francesco Fazzini  wrote:
> >> Dear all,
> >>
> >> i need to retrieve metadata informations(FTPFile) from a specific file.
> >> This snippet of code I am using works fine in Unix, but not in my
> >> local machine(Windows).
> >
> > Are you targeting the same ftp server?
> > If not, are you sure they are serving the same files?
> 
> Yes this client is targeting the same FTP server, and i am running the
> client on two different OS. I tried also to connect to an another FTP
> server(so also other files) to check if it was an issue related to a
> specific FTP server but it is the same.
> 
> >
> >> FTPClient ftpClient= new FTPClient();
> >> if(!workingDirectory.equals("")){
> >> ftpClient.changeWorkingDirectory(workingDirectory);
> >> }
> >> FTPFile[] ftpFiles= ftpClient.listFiles(fileName);
> >> Date lastModified= ftpFiles[0].getTimestamp().getTime();
> >>
> >> //in the last line i get an ArrayIndexOutOfBoundsException
> >> because "listFiles()" returns an empty array.
> >
> > That's because the code does not find any files that match.
> >
> >
> >> I tried to sort out in these ways below, but it doesn't work the 
> >> same:
> >>
> >> 1)adding  "ftpClient.enterRemotePassiveMode();" just after
> >> the fist line("FTPClient ftpClient= new FTPClient();").
> >>
> >> 2)adding "ftpClient.enterLocalPassiveMode();" just after the
> >> first line("FTPClient ftpClient= new FTPClient();").
> >>
> >> 3)I tried also adding this configuration to the client:
> >>
> >> FTPClient ftpClient= new FTPClient();
> >> FTPClientConfig config= new 
> >> FTPClientConfig(FTPClientConfig.SYST_NT);
> >> ftpClient.configure(config);
> >> if(!workingDirectory.equals("")){
> >> ftpClient.changeWorkingDirectory(workingDirectory);
> >> }
> >> FTPFile[] ftpFiles= ftpClient.listFiles(fileName);
> >> Date lastModified= ftpFiles[0].getTimestamp().getTime();
> >>
> >> I would like it works with both environments, do you have any ideas?
> >
> > See above.
> >
> > Also, try adding control logging to the code:
> >
> >ftpClient = new FTPClient();
> >ftpClient.addProtocolCommandListener(new PrintCommandListener(
> >   new PrintWriter(System.out)));
> 
> Additional LOG (working case Unix):
> 
> CWD /pub/databases/files
> 250 "/pub/databases/files" is new cwd.
> SYST
> 215 UNIX Type: L8
> PORT 172,21,22,1,182,108
> 200 PORT command successful.
> LIST FILE_NAME
> 150 Opening ASCII mode data connection for /bin/ls.
> 226 Listing completed.
> 
> Additional LOG (not working case Windows):
> CWD /pub/databases/files
> 250 "/pub/databases/files" is new cwd.
> SYST
> 215 UNIX Type: L8
> PORT 172,22,69,22,193,11
> 200 PORT command successful.
> LIST FILE_NAME
> 550 Cannot connect to {IP_ADDRESS} - timed out.
> >
> >> Thanks in advance.
> >>
> >> Regards,
> >> Francesco
> >>
> >> -
> >> 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: [beanutils] Problems with BeanUtilsBean : Convert Date to String

2011-04-22 Thread Martin Gainty

org.apache.commons.beanutils.ConvertUtilsBean
{
private void register(Class clazz, org.apache.commons.beanutils.Converter 
converter) 
}

switch the arguments


Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Sat, 23 Apr 2011 01:20:03 +0800
> Subject: [beanutils] Problems with BeanUtilsBean : Convert Date to String
> From: david...@gmail.com
> To: user@commons.apache.org
> 
> I am trying to run BeanUtilsBean.getInstance().populate(...) but on the HTML
> form, there is a field that carries String representation of Date of Birth.
> The object bean has the field type of java.util.Date
> 
> Read some search from Ggl that have to build custom converters but not quite
> understand how to do that.
> 
> Anyone can help?
> 
> My code:
> 
> public static void main(String[] args) {
> 
> Map formData = new HashMap();
> 
> formData.put("email", new String[]{"da...@gmail.com"});
> 
> formData.put("firstName", new String[]{"danny"});
> 
> formData.put("lastName", new String[]{"miller"});
> 
> formData.put("dob", new String[]{"15-Apr-1980"});
> 
> formData.put("userName", new String[]{"dannymiller"});
> 
> try {
> Consumer consumer = new Consumer();
> 
> DateTimeConverter dtConverter = new DateConverter();
> 
> dtConverter.setPattern("dd/MMM/");
> 
> ConvertUtilsBean convertUtilsBean = new ConvertUtilsBean();
> 
> convertUtilsBean.deregister(Date.class);
> 
> convertUtilsBean.register(dtConverter, Date.class);
> 
> BeanUtilsBean beanUtilsBean = new
> BeanUtilsBean(convertUtilsBean, new PropertyUtilsBean());
> 
> beanUtilsBean.populate(consumer, formData);
> 
> 
> if (consumer != null) {
> 
> System.out.println(consumer.getEmail());
> 
> System.out.println(consumer.getFirstName());
> 
> System.out.println(consumer.getLastName());
> 
> System.out.println(consumer.getDob());
> 
> System.out.println(consumer.getUserName());
> 
> }
> } catch  (Exception e) {
> 
> e.printStackTrace();
> }
> }
> 
> The return error:
> 
> Apr 22, 2011 11:14:45 PM
> org.apache.commons.beanutils.converters.DateTimeConverter toDate WARNING:
> DateConverter does not support default String to 'Date' conversion. Apr 22,
> 2011 11:14:45 PM org.apache.commons.beanutils.converters.DateTimeConverter
> toDate WARNING: (N.B. Re-configure Converter or use alternative
> implementation) Exception in thread "main"
> org.apache.commons.beanutils.ConversionException: DateConverter does not
> support default String to 'Date' conversion. at
> org.apache.commons.beanutils.converters.DateTimeConverter.toDate(DateTimeConverter.java:468)
> at
> org.apache.commons.beanutils.converters.DateTimeConverter.convertToType(DateTimeConverter.java:343)
> at
> org.apache.commons.beanutils.converters.AbstractConverter.convert(AbstractConverter.java:156)
> at
> org.apache.commons.beanutils.converters.ConverterFacade.convert(ConverterFacade.java:60)
> at
> org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:470)
> at
> org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1008)
> at
> org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
> at com.ymatch.test.BeanTest.main(BeanTest.java:32)
  

RE: [Jelly] XML ForEach tag hangs

2011-04-29 Thread Martin Gainty

Czaba

which xml-parser are you implementing?
what is the version of which xml-parser you are implementing?

Martin 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Sat, 30 Apr 2011 03:02:09 +0200
> Subject: [Jelly] XML ForEach tag hangs
> From: csab...@gmail.com
> To: user@commons.apache.org
> 
> Hello there!
> 
> I'm trying to use the ForEach tag in Jelly's XML tag library. The
> following script works fine in a standard Java console application:
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
>   ...
> 
> 
> However, if using Jelly on an application server, from inside an EJB
> container (session bean), running the script above hangs, and 100% CPU
> utilisation comes. I realized while debugging that NodeComparator
> class' getDepth method gets into an infinite loop and never returns.
> 
> If I remove two "b" elements from the xml fragment above (so only one
> remains), it works fine. It also works if I change the second part of
> the above script to the following:
> 
> 
>   
> ...
>   
> 
> 
> Does anyone have any idea why is that happening? Any help is much appreciated.
> 
> Thank you:
> Csaba
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [Jelly] XML ForEach tag hangs

2011-04-30 Thread Martin Gainty

trying not to point fingers (at least until we have ALL the facts)
a similar incident happened on another apache project and an older version of 
xml-parser was at fault 
trying to determine the implemented xml-parser and the version in this case 
would *at least* isolate the problem to that parser

thanks paul!
Martin  
__ 
Jogi és Bizalmassági kinyilatkoztatás
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.





> Subject: Re: [Jelly] XML ForEach tag hangs
> From: p...@hoplahup.net
> Date: Sat, 30 Apr 2011 09:44:27 +0200
> To: user@commons.apache.org
> 
> Csaba,
> 
> As Martin has suggested, the underlying XML parser could be guilty.
> I would rather suspect an overly old dom4j or jaxen (that would be in the 
> container's classpath hence overriding the webapp's).
> 
> Are you able to find their version?
> Otherwise I can dig out a form of jwhich in jelly.
> 
> paul
> 
> 
> Le 30 avr. 2011 à 03:02, Csaba Győrffy a écrit :
> 
> > Hello there!
> > 
> > I'm trying to use the ForEach tag in Jelly's XML tag library. The
> > following script works fine in a standard Java console application:
> > 
> > 
> >  
> >
> >
> >
> >  
> > 
> > 
> > 
> >  ...
> > 
> > 
> > However, if using Jelly on an application server, from inside an EJB
> > container (session bean), running the script above hangs, and 100% CPU
> > utilisation comes. I realized while debugging that NodeComparator
> > class' getDepth method gets into an infinite loop and never returns.
> > 
> > If I remove two "b" elements from the xml fragment above (so only one
> > remains), it works fine. It also works if I change the second part of
> > the above script to the following:
> > 
> > 
> >  
> >...
> >  
> > 
> > 
> > Does anyone have any idea why is that happening? Any help is much 
> > appreciated.
> > 
> > Thank you:
> > Csaba
> > 
> > -
> > 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: [Jelly] XML ForEach tag hangs

2011-04-30 Thread Martin Gainty

if you are using a xml_parser_utility go to command line and type
bash>which xml_parser_utility

if not there is a build.xml and or pom.xml which will need to reference the 
xml-parser:

--in buildl.xml usually identified as a property to one of the constructed 
CLASSPATH
bash>vi build.xml
search for xml ( press / and type xml at bottom)
search for xerces (press / and type xerces at bottom)
quit vi (:q!)

--in pom.xml usually identified as a dependency
bash>vi  pom.xml 
search for xml ( press / and type xml at bottom)
search for xerces (press / and type xerces at bottom)
quit vi (:q!)

report back the exact version of the xml or xerces parser you see in either 
build.xml or pom.xml

thanks,
Martin 
__ 
Jogi és Bizalmassági kinyilatkoztatás
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.





> Date: Sat, 30 Apr 2011 15:40:53 +0200
> Subject: Re: [Jelly] XML ForEach tag hangs
> From: csab...@gmail.com
> To: user@commons.apache.org
> 
> Hi,
> 
> thank you very much for your responses. I'm already trying to
> determine the version of xml parser without much success yet.
> 
> Csaba
> 
> 2011/4/30 Martin Gainty :
> >
> > trying not to point fingers (at least until we have ALL the facts)
> > a similar incident happened on another apache project and an older version 
> > of xml-parser was at fault
> > trying to determine the implemented xml-parser and the version in this case 
> > would *at least* isolate the problem to that parser
> >
> > thanks paul!
> > Martin
> > __
> > Jogi és Bizalmassági kinyilatkoztatás
> >  Ez az
> > üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> > jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> > készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> > semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> > könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> > ezen üzenet tartalma miatt.
> >
> >
> >
> >
> >
> >> Subject: Re: [Jelly] XML ForEach tag hangs
> >> From: p...@hoplahup.net
> >> Date: Sat, 30 Apr 2011 09:44:27 +0200
> >> To: user@commons.apache.org
> >>
> >> Csaba,
> >>
> >> As Martin has suggested, the underlying XML parser could be guilty.
> >> I would rather suspect an overly old dom4j or jaxen (that would be in the 
> >> container's classpath hence overriding the webapp's).
> >>
> >> Are you able to find their version?
> >> Otherwise I can dig out a form of jwhich in jelly.
> >>
> >> paul
> >>
> >>
> >> Le 30 avr. 2011 à 03:02, Csaba Győrffy a écrit :
> >>
> >> > Hello there!
> >> >
> >> > I'm trying to use the ForEach tag in Jelly's XML tag library. The
> >> > following script works fine in a standard Java console application:
> >> >
> >> > 
> >> >  
> >> >
> >> >
> >> >
> >> >  
> >> > 
> >> >
> >> > 
> >> >  ...
> >> > 
> >> >
> >> > However, if using Jelly on an application server, from inside an EJB
> >> > container (session bean), running the script above hangs, and 100% CPU
> >> > utilisation comes. I realized while debugging that NodeComparator
> >> > class' getDepth method gets into an infinite loop and never returns.
> >> >
> >> > If I remove two "b" elements from the xml fragment above (so only one
> >> > remains), it works fine. It also works if I change the second part of
> >> > the above script to the following:
> >> >
> >> > 
> >> >  
> >> >...
> >> >  
> >> > 
> >> >
> >> > Does anyone have any idea why is that happening? Any help is much 
> >> > appreciated.
> >> >
> >> > Thank you:
> >> > Csaba
> >> >
> >> > -
> >> > 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: [Jelly] XML ForEach tag hangs

2011-05-03 Thread Martin Gainty

org.apache.commons.jelly.JellyException: file:/C:/maven-plugin/jelly/commons-jel
ly-1.0-src/test-classes/org/apache/commons/jelly/suite.jelly:29:43: 
This tag does not understand the 'select' attribute
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:232)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59
)
at org.apache.commons.jelly.TestJelly.main(TestJelly.java:32)

my ForEach tag doesnt support 'select' attribute
any idea where i can obtain the ForEach Tag with select attribute would be 
appreciated!

regarding parsers:
$JELLY_HOME>grep -S -l ".xerces" *.java
---
$JELLY_HOME>grep -S -l ".dom4j" *.java
.\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\XMLOutput.java
.\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\expression\xpath\XPath
Expression.java
.\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\tags\core\FileTag.java
.\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\xpath\XPathComparator.java
.\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\core\TestFileTag.java
.\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\test\xml\TestCData.java

looking good for dom4j (working) 
Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> From: mgai...@hotmail.com
> To: user@commons.apache.org
> Subject: RE: [Jelly] XML ForEach tag hangs
> Date: Fri, 29 Apr 2011 21:06:27 -0400
> 
> 
> Czaba
> 
> which xml-parser are you implementing?
> what is the version of which xml-parser you are implementing?
> 
> Martin 
> __ 
> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  Ez az
> üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> ezen üzenet tartalma miatt.
> 
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
> sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
> oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich 
> dem Austausch von Informationen und entfaltet keine rechtliche 
> Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen 
> wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci 
> est interdite. Ce message sert à l'information seulement et n'aura pas 
> n'importe quel effet légalement obligatoire. Étant donné que les email 
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter 
> aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> > Date: Sat, 30 Apr 2011 03:02:09 +0200
> > Subject: [Jelly] XML ForEach tag hangs
> > From: csab...@gmail.com
> > To: user@commons.apache.org
> > 
> 

RE: [Jelly] XML ForEach tag hangs

2011-05-04 Thread Martin Gainty

jelly.properties contains the declarator for xml defined as follows:
xml = org.apache.commons.jelly.tags.xml.XMLTagLibrary

suite.jelly contains a testcase for Czaba defined as follows:

  

   
 
 
 
   

 
   
   
 The current Element name and value is ${c} 
   
  
  
  


produces this output:
$JELLY_HOME\test-classes>java -classpath 
.;DOM4J_HOME\target\classes;.\target\classes org.apache.commons.jelly.TestJelly

.The current Element name and value is 
[org.dom4j.tree.DefaultElement@1815859 [Element: 
], 
org.dom4j.tree.DefaultElement@b1c260 [Element: ], 
org.dom4j.tree.DefaultElement@1908ca1 [Element: ]]
The current Element name and value is 
[org.dom4j.tree.DefaultElement@1815859
[Element: 
], org.dom4j.tree.DefaultElement@b1c260 [Element: 
], org.dom4j.tree.DefaultElement@1908ca1 [Element: 
]]
The current Element name and value is 
[org.dom4j.tree.DefaultElement@1815859 
[Element: 
], org.dom4j.tree.DefaultElement@b1c260 [Element: 
], org.dom4j.tree.DefaultElement@1908ca1 [Element: 
]]
Time: 0.172

from what i see here the parse and for-each iterator seems to be working for 
Jelly 1.0

Thanks Paul!
Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.





> Subject: Re: [Jelly] XML ForEach tag hangs
> From: p...@hoplahup.net
> Date: Tue, 3 May 2011 23:51:53 +0200
> To: user@commons.apache.org
> 
> Martin,
> 
> your x namespace prefix is not properly bound.
> Somewhere up in your script, you should have 
> 
> xmlns:x="jelly:xml"
> 
> hope it helps.
> 
> paul
> 
> 
> Le 3 mai 2011 à 22:59, Martin Gainty a écrit :
> 
> > 
> > org.apache.commons.jelly.JellyException: 
> > file:/C:/maven-plugin/jelly/commons-jel
> > ly-1.0-src/test-classes/org/apache/commons/jelly/suite.jelly:29:43: 
> > 
> > This tag does not understand the 'select' attribute
> > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:232)
> > at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
> > at org.apache.commons.jelly.tags.junit.CaseTag$1.runTest(CaseTag.java:59
> > )
> > at org.apache.commons.jelly.TestJelly.main(TestJelly.java:32)
> > 
> > my ForEach tag doesnt support 'select' attribute
> > any idea where i can obtain the ForEach Tag with select attribute would be 
> > appreciated!
> > 
> > regarding parsers:
> > $JELLY_HOME>grep -S -l ".xerces" *.java
> > ---
> > $JELLY_HOME>grep -S -l ".dom4j" *.java
> > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\XMLOutput.java
> > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\expression\xpath\XPath
> > Expression.java
> > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\tags\core\FileTag.java
> > .\commons-jelly-1.0-src\src\java\org\apache\commons\jelly\xpath\XPathComparator.java
> > .\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\core\TestFileTag.java
> > .\commons-jelly-1.0-src\src\test\org\apache\commons\jelly\test\xml\TestCData.java
> > 
> > looking good for dom4j (working) 
> > Martin Gainty 
> > __ 
> > Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
> > Vertraulichkeitanmerkung/Note de déni et de confidentialité
> > Ez az
> > üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> > jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
> > készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
> > semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
> > könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
> > ezen üzenet tartalma miatt.
> > 
> > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
> > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte 
> > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht 
> > dient lediglich dem Austausch von Informationen und entfaltet keine 
> > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von 
> > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas 

RE: Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader

2011-05-11 Thread Martin Gainty

Jim-

it seems you have a 3 Classloaders at play
System (configured at startup of command shell)
catalina (usually hardcoded at $CATALINA_HOME/lib)
webapp (usually hardcoded at $CATALINA_HOME/webappname/WEB-INF/lib

since jsvc.exe is being started at command line and only has knowledge of 
system classloader I would load the jar there first
vi
/home/jim/.bashrc for bash
/home/jim/.cshrc for cshell
/home/jim/.tcsh for tshell

export 
CLASSPATH=/usr/java/lib/tools.jar:/usr/local/share/tomcat6/bin/commons-daemon.jar:/usr/local/share/tomcat6/bin/bootstrap.jar:$CLASSPATH

hth/
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Wed, 11 May 2011 18:59:02 -0400
> From: jseym...@linxnet.com
> To: user@commons.apache.org
> Subject: Cannot find daemon loader 
> org/apache/commons/daemon/support/DaemonLoader
> 
> 
> Good Day,
> 
> The vital info:
> 
> Apache-Tomcat 6.0.32
> Java 1.5.0_22
> Sun Sparc Solaris 8 (SunOS 5.8 Generic_117000-05 sun4u)
> Ant 1.8.2
> GCC 3.4.6
> 
> Did everything just like the docs all said to do, and the result of
> trying to start-up jsvc is:
> 
> "Cannot find daemon loader
> org/apache/commons/daemon/support/DaemonLoader"
> 
> catalina.out:
> 
> Switching umask back to 022 from 077
> Using default JVM in /usr/java/jre/lib/sparcv9/server/libjvm.so
> Attemtping to load library /usr/java/jre/lib/sparcv9/server/libjvm.so
> JVM library /usr/java/jre/lib/sparcv9/server/libjvm.so loaded
> JVM library entry point found (0x7D087578)
> +-- DUMPING JAVA VM CREATION ARGUMENTS -
> | Version:   0x010004
> | Ignore Unrecognized Arguments: False
> | Extra options: 4
> |   "-Dcatalina.home=/usr/local/share/tomcat6" (0x)
> |   "-Dcatalina.base=/usr/local/share/tomcat6" (0x)
> |   "-Djava.io.tmpdir=/var/tmp" (0x)
> |   
> "-Djava.class.path=/usr/java/lib/tools.jar:/usr/local/share/tomcat6/bin/commons-daemon.jar:/usr/local/share/tomcat6/bin/bootstrap.jar"
>  (0x)
> +---
> | Internal options:  4
> |   "-Dcommons.daemon.process.id=188" (0x)
> |   "-Dcommons.daemon.process.parent=187" (0x)
> |   "-Dcommons.daemon.version=1.0.5" (0x)
> |   "abort" (0x98e4)
> +---
> Java VM created successfully
> Cannot find daemon loader org/apache/commons/daemon/support/DaemonLoader
> java_init failed
> Service exit with a return value of 1
> 
> 
> What's seen on the screen:
> 
> $ ./tomcat start
> +-- DUMPING PARSED COMMAND LINE ARGUMENTS --
> | Detach:  True
> | Show Version:No
> | Show Help:   No
> | Check Only:  Disabled
> | Stop:False
> | Wait:10
> | Run as service:  No
> | Install service: No
> | Remove service:  No
> | JVM Name:"null"
> | Java Home:   "/usr/java"
> | PID File:"/var/run/jsvc.pid"
> | User Name:   "nobody"
> | Extra Options:   4
> |   "-Dcatalina.home=/usr/local/share/tomcat6"
> |   "-Dcatalina.base=/usr/local/share/tomcat6"
> |   "-Djava.io.tmpdir=/var/tmp"
> |   
> "-Djava.class.path=/usr/java/lib/tools.jar:/usr/local/share/tomcat6/bin/commons-daemon.jar:/usr/local/share/tomcat6/bin/bootstrap.jar"
> | Class Invoked:   "org.apache.catalina.startup.Bootstrap"
> | Class Arguments: 0
> +---
> user changed to 'nobody'
> User 'nobody' validated
> A

RE: [beanutils] Issue with ContextClassLoaderLocal class.

2011-05-24 Thread Martin Gainty

place parser jars in location identified by java.endorsed.dirs
restart JBOSS container with -Djava.endorsed.dirs to point to location of 
parser jars 
-Djava.endorsed.dirs=$CATALINA_HOME/endorsed

http://docs.jboss.org/jbossweb/3.0.x/class-loader-howto.html

hth
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Subject: [beanutils] Issue with ContextClassLoaderLocal class.
> From: rammohan.natara...@tcs.com
> To: user@commons.apache.org
> Date: Tue, 24 May 2011 18:25:43 +0530
> 
> Hi,
>  
> We are working on migrating a J2EE application from WAS6.1 to JBoss EAP 5.0. 
> For unmarshalling of some custom XML we make use of commons-beanutils-1.8.3 
> within this application; and in the process, we have defined a custom type 
> converter for one of the XML tags.
> The registration of this converter happens in one EJB module within our EAR, 
> whereas theactual XML parsing occurs in another EJB module within the same 
> EAR.
> The org.apache.commons.beanutils.ContextClassLoaderLocal class ties 'global' 
> variables to a classloader instance in a map to ensure data isolation even if 
> the variable is referenced by multiple components running within a container.
> Here is the relevant code snippet from its get() method:
> 
> ClassLoader contextClassLoader = 
> Thread.currentThread().getContextClassLoader();
> if (contextClassLoader != null)
> {
> Object value = valueByClassLoader.get(contextClassLoader);
> if ((value == null) && 
> !valueByClassLoader.containsKey(contextClassLoader))
> {
> value = initialValue();
> valueByClassLoader.put(contextClassLoader, value);
> }
> return value;
> }
> 
> After all that background information, here is the problem:
> During the converter registration process, a BeanUtilsBean instance is 
> maintained in the ContextClassLoaderLocal map against the classloader of the 
> registration EJB module.
> During the parsing process, this map is queried to retreive the same 
> BeanUtilsBean instance, using the classloader of the parsing EJB module as 
> the key. In Websphere Application server, the classloader instance for the 
> registration module and the parser module are both same; the correct 
> BeanUtilsBean instance is retreived and processing proceeds as expected. 
> However, in JBoss EAP 5.0, the two classloader instances are different so 
> that the parser module fails to retreive the value from the map.
> Is this a problem with beanutils' design or an issue with JBoss? Please let 
> me know if I am missing something or if additional details are required.
> Thanks in advance.
> N.Rammohan.
> =-=-=
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: Samuel Pio Joseph is out of the office.

2011-06-29 Thread Martin Gainty

their employers must be loaded...these guys take a boatload of vacation

any suggestions on filtering out of  emails?

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Subject: Samuel Pio Joseph is out of the office.
> From: sajos...@inautix.co.in
> To: user@commons.apache.org
> Date: Wed, 29 Jun 2011 22:02:03 +0530
> 
> 
> I will be out of the office starting  06/29/2011 and will not return until
> 06/30/2011.
> 
> I will respond to your message when I return. Please contact  Vijayan
> Periasamy / Vinothkumar Alagesan/Shyam Visagan Nagendran for
> BAC/Diagnostics/ELF  related information.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [digester] Jaxenter interview about Digester3!!!

2011-07-12 Thread Martin Gainty

one of the situations I have seen is a traditional container will hot deploy 
refactored elements in a webapp descriptor.
Lately we've seen rather large descriptor complex data elements declared and 
populated thru annotations.
since each extension used its own 'digester-loader' so there was no ability to 
merge the 2 
will Digester3 Universal Deployer be able to load both annotations and 
traditional descriptor elements to a hot-deployable aware container
?
many thanks christian and simone
Martin
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> From: grobme...@gmail.com
> Date: Tue, 12 Jul 2011 20:00:14 +0200
> Subject: Re: [digester] Jaxenter interview about Digester3!!!
> To: user@commons.apache.org
> CC: d...@commons.apache.org
> 
> Reads great!
> Love to see things like that
> 
> On Tue, Jul 12, 2011 at 7:43 PM, Simone Tripodi
>  wrote:
> > Hi all guys,
> > just to share with you all a small interview I had with Jaxenter today
> > during lunch-time, I hope that my fellows appreciate how things have
> > been exposed!
> > Agreements section is not missing! :)
> > Have a nice day, all the best!
> > Simo
> >
> > [1] http://jaxenter.com/what-s-new-in-apache-commons-digester-3-0-36817.html
> >
> > http://people.apache.org/~simonetripodi/
> > http://www.99soft.org/
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
> 
> 
> 
> -- 
> http://www.grobmeier.de
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: Commons daemon - stop the service

2012-06-07 Thread Martin Gainty

a quick scan of the source gives us some cluesif  PID is not there procrun 
exits with a -1fd = open(args->pidf, O_RDONLY, 0);
if (!quiet)
log_debug("get_pidf: %d in %s", fd, args->pidf);
if (fd < 0) {
/* something has gone wrong the JVM has stopped */
return -1;
} later on with wait_child we check again if PID is not alive in which case 
a 1 is returned  /* check if the pid file process exists */
fd = open(args->pidf, O_RDONLY);
if (fd < 0 && havejvm) {
/* something has gone wrong the JVM has stopped */
return 1;
}else{ ...return 0; /* ready JVM started ..0 is returned to internal 
functions*/} /*if procrun returns 0 internally you're JVM is started*/  /*.. 
the chronology for procrun denoument..*/ stop_child() while (count > 0) {
sleep(1);
pid = get_pidf(args, true);
if (pid <= 0) {
/* JVM has stopped... the pid is non-existent*/
return 0;
}
count--;
}
signal(SIGTERM, controller);
signal(SIGINT, controller);while (waitpid(pid, &status, 0) != 
pid) {
/* Waith for process */
}/* The child must have exited cleanly */
if (WIFEXITED(status)) {
status = WEXITSTATUS(status);/* Delete the pid file */
if (args->vers != true && args->chck != true && status != 122)
unlink(args->pidf);/* If the child got out with 123 
he wants to be restarted */
/* See java_abort123 (we use this return code to restart when the 
JVM aborts) */
if (status == 123) {
log_debug("Reloading service");
/* prevent looping */
if (laststart + 60 > time(NULL)) {
log_debug("Waiting 60 s to prevent looping");
sleep(60);
}
continue;
}
/* If the child got out with 0 he is shutting down */
if (status == 0) {
log_debug("Service shut down");
return 0;
}remove_tmp_file(args);
log_debug("Shutdown or reload requested: exiting");/* Stop the service 
*/
if (java_stop() != true)
return 6;  /*cannot stop java*/
if (doreload == true)
ret = 123;
else
ret = 0;/* Destroy the service */
java_destroy();/* Destroy the Java VM */
if (JVM_destroy(ret) != true)
return 7;

 yes if all goes well the JVM should be destroyed
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 > From: james.w...@infor.com
> To: user@commons.apache.org
> Subject: RE: Commons daemon - stop the service
> Date: Thu, 7 Jun 2012 18:06:03 +
> 
> I have played with procrun a bit more and realized that SCM waits for at most 
> two minutes. After that, it shows a message saying it got no response from 
> the process and displays "stopping" as status on the service. But when the 
> process finally ends, it shows "stopped" status (you have to manually refresh 
> the SCM). 
> Procrun has a parameter "StopTimeout", which "Defines the timeout in seconds 
> that procrun waits for service to exit gracefully."  What happens after the 
> timeout period? Does procrun shut down the JVM?
> Thanks.
> 
> James
> 
&g

RE: [jxpath] Walk the path.

2012-06-23 Thread Martin Gainty

start with DefaultNavigator selecting the Iterator that most closely works for 
the level you need to work with
calculate  the delta(s) as necessary

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> From: orlando.cone...@sharpbox.com
> Date: Thu, 21 Jun 2012 11:08:54 +0100
> Subject: [jxpath] Walk the path.
> To: user@commons.apache.org
> 
> Dear Group.
> 
> 
> 
> Firstly, I have been using JXPath for over two years and am very grateful
> for what is a wonderful tool.
> 
> 
> 
> I do have one question though. I currently use XPath to navigate a Java
> Bean object graph, where each object implements a Map. However, I now need
> to be able to calculate the interdependencies between different expressions
> against an object graph.
> 
> 
> 
> For example, in the case of the path:
> 
> 
> 
> /foo/bar/tomorrow = 1 and /foo/two/three = 0
> 
> 
> 
> I would, ideally, like to be able to be able to make a call that returns
> the object for each axis of each expression. And so would return an array
> of Pointers for: [ foo, bar, tomorrow, two, three]
> 
> 
> 
> However, I suspect there is no utility class to do this, and was hoping I
> could gain access to the parse tree for an expression and then walk each
> axis of each path myself. However, I cannot see a way of doing this either,
> or if it is at all possible?
> 
> 
> 
> Once again, thank you for this library, and I should be in your debt for
> any assistance that can be provided.
> 
> 
> 
> Kind regards.
> 
> Orlando.
  

RE: [dbcp] prepared statement caching when connections are closed but connection pool still has connection

2012-07-27 Thread Martin Gainty

Folks-
in the case Of DelegatingStatement Statement iterator will close open Statement 
handles during the passivate stage of a DBCP connection_pool close..here is the 
code:
 protected void passivate() throws SQLException {
try {
// The JDBC spec requires that a Connection close any open
// Statement's when it is closed.
// DBCP-288. Not all the traced objects will be statements
List traces = getTrace();
if(traces != null) {
Iterator traceIter = traces.iterator();
while (traceIter.hasNext()) {
Object trace = traceIter.next();
if (trace instanceof Statement) {
((Statement) trace).close();

PoolableConnectionFactory does close old statement handles during connection 
initialiasation as seen here
  protected void initializeConnection(Connection conn) throws SQLException {
Collection sqls = _connectionInitSqls;
if(conn.isClosed()) {
throw new SQLException("initializeConnection: connection closed");
}
if(null != sqls) {
Statement stmt = null;
try {
stmt = conn.createStatement();
for (Iterator iterator = sqls.iterator(); iterator.hasNext();)
{
Object o = iterator.next();
if (o == null) {
throw new NullPointerException("null connectionInitSqls 
element");
}
// o might not be a String instance
String sql = o.toString();
stmt.execute(sql);
}
} finally {
if (stmt != null) {
try {
stmt.close();

PoolableConnectionFactory will also close statement handles during connection 
validation as evidenced here:
   public void validateConnection(Connection conn) throws SQLException {
String query = _validationQuery;
if(conn.isClosed()) {
throw new SQLException("validateConnection: connection closed");
}
if(null != query) {
Statement stmt = null;
ResultSet rset = null;
try {
stmt = conn.createStatement();
if (_validationQueryTimeout > 0) {
stmt.setQueryTimeout(_validationQueryTimeout);
}
rset = stmt.executeQuery(query);
if(!rset.next()) {
throw new SQLException("validationQuery didn't return a 
row");
}
} finally {
if (rset != null) {
try {
rset.close();
} catch(Exception t) {
// ignored
}
}
if (stmt != null) {
try {
stmt.close();

PoolingConnection does close Statement handles thru the innermostDelegate 
object as seen here
public void destroyObject(Object key, Object obj) throws Exception {
if(obj instanceof DelegatingPreparedStatement) {
((DelegatingPreparedStatement)obj).getInnermostDelegate().close();
} else {
((PreparedStatement)obj).close();
}
}

you will see identical behaviour with concrete class for PooledConnection 
.\cpdsadapter\PooledConnectionImpl which checks if the statement handle is 
Delegating or Prepared
  public void destroyObject(Object key, Object obj) throws Exception {
//_openPstmts--;
if (obj instanceof DelegatingPreparedStatement) {
((DelegatingPreparedStatement) obj).getInnermostDelegate().close();
} else {
((PreparedStatement) obj).close();
}
}

does this conform to your understanding ?
Martin 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bo

RE: [sanselan] Writing EXIF data to JPEG

2012-07-31 Thread Martin Gainty

EXIF_TAG_XPCOMMENT is a final constant which cannot be modified

package org.apache.commons.imaging.formats.tiff.constants;
public interface MicrosoftTagConstants {
public static final TagInfoXpString EXIF_TAG_XPCOMMENT = new 
TagInfoXpString(
"XPComment", 0x9c9c, -1,
TiffDirectoryType.EXIF_DIRECTORY_IFD0);

does this not conform to your understanding..
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Tue, 31 Jul 2012 16:45:35 -0700
> From: tiers...@gmail.com
> To: user@commons.apache.org
> Subject: Re: [sanselan] Writing EXIF data to JPEG
> 
> Hi
> 
> @Kasper did you get things working??
> 
> I'm trying to write an android application that lets me read and write user
> comments in JPEG files.
> I'm using sanselan since there is no user comments field in the Android
> ExifInterface API. The issue is that the USER_COMMENT and the XPCOMMENT
> remain unchanged.
> 
> Here is part of my code
> 
> IImageMetadata meta = null;
> meta = Sanselan.getMetadata(jpegImageFile);
> JpegImageMetadata jpegMetadata = (JpegImageMetadata) meta;
> TiffOutputSet set = new
> TiffOutputSet(TiffConstants.BYTE_ORDER_LITTLE_ENDIAN);
>   
> byte[] bytesXPComment =
> 
> ExifTagConstants.EXIF_TAG_XPCOMMENT.encodeValue(TiffFieldTypeConstants.FIELD_TYPE_ASCII,
>   "My xp comments", set.byteOrder);
> TiffOutputField xpcommentField = new
>   TiffOutputField(ExifTagConstants.EXIF_TAG_XPCOMMENT,
>   ExifTagConstants.EXIF_TAG_XPCOMMENT.dataTypes[0],
> bytesXPComment.length,
>   bytesXPComment);
> set.getOrCreateRootDirectory().add(xpcommentField);
>   
> byte[] bytesUserComment =
>
> ExifTagConstants.EXIF_TAG_USER_COMMENT.encodeValue(TiffFieldTypeConstants.FIELD_TYPE_ASCII,
>   "My user comments", set.byteOrder);
> TiffOutputField usercommentField = new
>   TiffOutputField(ExifTagConstants.EXIF_TAG_USER_COMMENT,
>   ExifTagConstants.EXIF_TAG_USER_COMMENT.dataTypes[0],
> bytesUserComment.length,
>   bytesUserComment);
> set.getOrCreateRootDirectory().add(usercommentField);
> 
> Thanking you in advance. 
> 
> 
> 
> --
> View this message in context: 
> http://apache-commons.680414.n4.nabble.com/sanselan-Writing-EXIF-data-to-JPEG-tp4451598p4637450.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
> 
  

FW: [email] Download on all mirrors broken?

2012-08-09 Thread Martin Gainty

Admin

can you fix broken link at
http://mirror.metrocast.net/apache//commons/email/source/commons-email-1.3-src.zip

Thanks!
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Thu, 9 Aug 2012 23:18:22 +0200
> Subject: [email] Download on all mirrors broken?
> From: stefan.at@googlemail.com
> To: user@commons.apache.org
> 
> Hello,
> 
> seems like the download for 1.3 is broken on all mirrors (or at least many
> of them - couldn't find one that works for 1.3, only 1.2 available).
> One might try yourself: http://commons.apache.org/email/download_email.cgi
> Please fix, thanks :-)
> 
> Best regards
> Stefan
  

RE: [jexl] empty() function crashes if called with int[]

2012-08-10 Thread Martin Gainty

{}
create the HashMap first with 0 entries
http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html

Objects are not primitive types and vice versa
Initialise ints as Integer first
new Integer(intValue);

Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> From: tomas.kuk...@siemens-enterprise.com
> To: user@commons.apache.org
> Subject: [jexl] empty() function crashes if called with int[]
> Date: Fri, 10 Aug 2012 13:07:26 +
> 
> Hi,
> 
> if the empty() function is called for variable containing int[] it causes an 
> exception:
> 
> java.lang.ClassCastException: [I cannot be cast to [Ljava.lang.Object;
>   at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:715)
>   at 
> org.apache.commons.jexl2.parser.ASTEmptyFunction.jjtAccept(ASTEmptyFunction.java:18)
>   at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1364)
>   at 
> org.apache.commons.jexl2.parser.ASTReturnStatement.jjtAccept(ASTReturnStatement.java:18)
>   at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:946)
>   at 
> org.apache.commons.jexl2.parser.ASTJexlScript.jjtAccept(ASTJexlScript.java:38)
>   at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232)
>   at 
> org.apache.commons.jexl2.ExpressionImpl.execute(ExpressionImpl.java:107)
> 
> See the example below.
> 
> 
> BTW how an empty map could be created? The {} literal is not valid jexl 
> syntax.
> 
> Best regards,
>   Tomas
> 
> -
> public class Test04 {
> 
>   private final static String[] SCRIPTS = {
>   "var x = null; return empty(x);",
>   "var x = ''; return empty(x);",
>   "var x = 'abc'; return empty(x);",
>   "var x = 0; return empty(x);",
>   "var x = 333; return empty(x);",
>   "var x = []; return empty(x);",
>   "var x = [1, 2]; return empty(x);",  // === ERROR ===
>   "var x = ['a', 'b']; return empty(x);",
>   // "var x = {}; return empty(x);",
>   "var x = {1:'A', 2:'B'}; return empty(x);",
>   };
> 
>   public static void main(String[] args) {
>   JexlEngine jexl = new JexlEngine();
>   JexlContext jc = new MapContext();
>   Script script;
> 
>   for (String stext : SCRIPTS) {
>   System.out.println(stext);
>   script = jexl.createScript(stext);
>   try {
>   Object ret = script.execute(jc);
>   System.out.println(ret);
>   } catch (Exception e) {
>   e.printStackTrace();
>   }
>   }
>   
>   }
> 
> }
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [email] Known security problems in 1.2?

2012-08-23 Thread Martin Gainty

If you're transmitting and receiving SSL connections you're ok ..otherwise 
you're running the risk of Man-in-the-middle interception

http://www.codeproject.com/Articles/98355/SMTP-Client-with-SSL-TLS

HTH,
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Thu, 23 Aug 2012 13:45:33 +0200
> Subject: Re: [email] Known security problems in 1.2?
> From: stefan.at@googlemail.com
> To: user@commons.apache.org; siegfried.goes...@it20one.at
> 
> Well, there could still be a malicious mail server sending modified replies
> ;-)
> 
> 
> 2012/8/21 Siegfried Goeschl 
> 
> > Hi Stefan,
> >
> > not that I'm aware of because we are talking about outgoing emails
> >
> > Cheers,
> >
> > Siegfried Goeschl
> >
> >
> > On 15.08.12 12:19, Stefan at WPF wrote:
> >
> >> Hello,
> >>
> >> as the latest release 1.2 is already quite old (from 2009) I am wondering
> >> if there are any known security problems to it or I can use it without
> >> concerns even though it' s already quite old?
> >>
> >> Best regards
> >> Stefan
> >>
> >>
> >
> > --**--**-
> > To unsubscribe, e-mail: 
> > user-unsubscribe@commons.**apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
  

RE: http proxy API

2012-08-23 Thread Martin Gainty

DIRECT



  Represents a direct connection, or the absence of a proxy.


HTTP



  Represents proxy for high level protocols such as HTTP or FTP.


SOCKS



  Represents a SOCKS (V4 or V5) proxy.
//in your case since you need to authentication via username and proxy you'll 
want to specify SOCKS
//then Generating a proxy you will need 2 parameters Proxy.Type which is SOCKS  
and

//then generate a SocketAddress
InetSocketAddress(String hostname,
  int port)

for your 2nd parameter SocketAddress

public Proxy(Proxy.Type type,
 SocketAddress sa)

Now you finally have a non-null valid Proxy object which is supplied as the 
parameter to URL.openConnection
then openConnection thru the proxy to the existing URL object is described at

http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URL.html#openConnection%28java.net.Proxy%29




You're going to need 
catch(IoException exp)
so Be aware of timeout issues as you need to establish a Socket connection thru 
the Proxy 
http://www.docjar.com/html/api/org/apache/harmony/luni/net/PlainSocketImpl.java.html

//if you're getting IOExceptions you're going to have to need to create a 
object of SocketImpl with a proxy
http://www.docjar.com/html/api/org/apache/harmony/luni/net/PlainSocketImpl.java.html
 public PlainSocketImpl(Proxy proxy) {
}

//then connecting with specific SocketOptions.SO_TIMEOUT
public void setOption(int optID, Object val) throws SocketException {
  318   if (optID == SocketOptions.SO_TIMEOUT) {

//then connecting using a specific timeout parameter
/**
  218* Connects this socket to the specified remote host address/port.
  219* 
  220* @param anAddr
  221*the remote host address to connect to
  222* @param aPort
  223*the remote port to connect to
  224* @param timeout
  225*a timeout where supported. 0 means no timeout
  226* @throws IOException
  227* if an error occurs while connecting
  228*/
  229   private void connect(InetAddress anAddr, int aPort, int timeout)
  230   throws IOException {

HTH,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Thu, 23 Aug 2012 07:02:56 -0700
> Subject: http proxy API
> From: volks...@gmail.com
> To: user@commons.apache.org
> 
> 
> 
> > Is there an API that can perform some diagnostics to verify the http proxy
> > configuration:
> >
> >  some thing like: boolean verifyProxyConfiguration(hostname, port,
> > basicAuth, username, passwd)
> >
> >  This method would do http  CONNECT handshake with the proxy and returns
> > success/failure. It would be be nice to capture any error message as well.
> >
> >

  

RE: [codec] Java 1.3 compliant base64 encoder / decoder

2012-08-23 Thread Martin Gainty

Im not sure what specific restrictions implementing a 1.3 JVM will impose but...

You can manipulate Base64 Images via encode and decode as byte[]
http://javadoc.google-api-java-client.googlecode.com/hg/1.3.1-alpha/

does this help?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Date: Thu, 23 Aug 2012 16:30:21 -0400
> Subject: Re: [codec] Java 1.3 compliant base64 encoder / decoder
> From: juliusdav...@gmail.com
> To: user@commons.apache.org
> 
> I think commons-codec-1.3.jar (coincidentally) should work with Java 1.3.
> 
> You can find it here:
> 
> http://archive.apache.org/dist/commons/codec/binaries/
> 
> Unfortunately commons-codec-1.3.jar is unable to do streaming Base64,
> but as long as you can fit everything in memory, it works great with
> byte[] arrays.
> 
> 
> Or you can try to back-port commons-codec-1.6 to work with Java 1.3.
> If you go that route I think you just need to pull out the following
> classes.  There are probably some modifications you'll need to make it
> compile under Java 1.3, but it might be possible.
> 
> Base64InputStream.java
> Base64.java
> Base64OutputStream.java
> BaseNCodecInputStream.java
> BaseNCodec.java
> BaseNCodecOutputStream.java
> 
> 
> You would also need to remove the implements declarations
> (BinaryEncoder, Encoder, BinaryDecoder, Encoder), and figure what to
> do with the EncodingException and DecodingException --- either pull
> those out and compile them, too, or replace with RuntimeException, or
> create your own.
> 
> Good luck!
> 
> yours,
> 
> Julius
> 
> 
> 
> On Thu, Aug 23, 2012 at 3:44 PM, Hendré Louw  wrote:
> > Hello
> >
> > I am working on a BlackBerry Java 1.3 compliant mobile application and want
> > to embed binary image data in a JSON structure. What version of the
> > commons-codec source can I use to adapt or just compile a Java 1.3
> > compliant base64
> > encoder/decoder?
> >
> > Hendré
> 
> 
> 
> -- 
> yours,
> 
> Julius Davies
> 604-222-3310 (Home)
> 
> $ sudo apt-get install cowsay
> $ echo "Moo." | cowsay | cowsay -n | cowsay -n
> http://juliusdavies.ca/cowsay/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: Samuel Pio Joseph is out of the office.

2012-09-03 Thread Martin Gainty

let me see if I get this right..

His employer is PAYING him NOT to come into the office?

Any clue how i can get a job like that?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.


> Subject: Samuel Pio Joseph is out of the office.
> From: sajos...@inautix.co.in
> To: user@commons.apache.org
> Date: Tue, 4 Sep 2012 10:01:04 +0530
> 
> 
> I will be out of the office starting  09/01/2012 and will not return until
> 09/05/2012.
> 
> I will respond to your message when I return. Please contact  Vinothkumar
> Alagesan/Vijayan Periasamy/Pavithran Vignesh for Diagnostics related
> efforts.
> 
> Please contact Albert J Stark/Kannan Perichiappan for any esclations.
> 
> please contact Vijayan Periasamy/Shyam Visagan Nagendran/Pavithran Vignesh
> for general BSM/Diagnostics/ELF  related information.
> 
> 
> **
> This message and any files or attachments sent with this message contain 
> confidential information and is intended only for the individual named.  If 
> you are not the named addressee, you should not disseminate, distribute, copy 
> or use any part of this email.  If you have received this message in error, 
> please delete it and all copies from your system and notify the sender 
> immediately by return Email.
> 
> Email transmission cannot be guaranteed to be secure or error-free as 
> information can be intercepted, corrupted, lost, destroyed, late, incomplete 
> or may contain viruses.  The sender, therefore, does not accept liability for 
> any errors or omissions in the contents of this message, which arise as a 
> result of email transmission.
> **
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [io] Are FileUtils and IOUtils thread safe?

2012-09-29 Thread Martin Gainty

Hi Sebb

public class FileUtils {

/**
 * Instances should NOT be constructed in standard programming.
 */
public FileUtils() {
super();
}

/**
 * The number of bytes in a kilobyte.
 */
public static final long ONE_KB = 1024;

/**
 * The number of bytes in a megabyte.
 */
public static final long ONE_MB = ONE_KB * ONE_KB;

/**
 * The number of bytes in a 50 MB.
 */
private static final long FIFTY_MB = ONE_MB * 50;

/**
 * The number of bytes in a gigabyte.
 */
public static final long ONE_GB = ONE_KB * ONE_MB;

/**
 * An empty array of type File.
 */
public static final File[] EMPTY_FILE_ARRAY = new File[0];

/**
 * The UTF-8 character set, used to decode octets in URLs.
 */
private static final Charset UTF8 = Charset.forName("UTF-8");

//---
/**
 * Returns the path to the system temporary directory.
 * 
 * @return the path to the system temporary directory.
 * 
 * @since Commons IO 2.0
 */
public static String getTempDirectoryPath() {
return System.getProperty("java.io.tmpdir");
}

how is public static immutable?
how is public static threadsafe?

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.




> Date: Sat, 29 Sep 2012 12:49:57 +0100
> Subject: Re: [io] Are FileUtils and IOUtils thread safe?
> From: seb...@gmail.com
> To: user@commons.apache.org
> 
> On 29 September 2012 04:20, Yungwei Chen  wrote:
> > Hi,
> >
> > I would like to know if FileUtils and IOUtils are thread safe. Thanks.
> 
> The classes themselves are immutable and so are thread safe.
> 
> However, many of them use JVM classes that may not be thread safe.
> 
> Also, methods that depend on the state of the file system may not be
> immune to external influences.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [sanselan] Removing GPS tags problem

2012-12-01 Thread Martin Gainty

Good Evening Piotr //assuming TiffOutputSet is a representation of the meta 
data acquired from your Tiff file//once you *acquired*  the output set from 
JpegMetadata
TiffOutputSet outputSet = exif.getOutputSet(); //then setting both the lat and 
long as doubles will effectively 0 out the GPS attributes...double 
longitude=0.0;double latitude=0.0;outputSet.setGPSInDegrees(longitude, 
latitude);
http://commons.apache.org/imaging/xref-test/org/apache/sanselan/sampleUsage/WriteExifMetadataExample.html
 does this not work for you?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 > Date: Sat, 1 Dec 2012 18:08:11 +0100
> Subject: [sanselan] Removing GPS tags problem
> From: ptrcza...@gmail.com
> To: user@commons.apache.org
> 
> Hi,
> I have a problem with removing gps data from photo.
> It's works  but also other tags unrelated with gps are removed
> 
> code  :
> 
> 
>  public void removeExifTag(File jpegImageFile, File dst) throws
> IOException, ImageReadException,
> 
>   ImageWriteException {
> OutputStream os = null;
> try {
> TiffOutputSet outputSet = null;
> 
> // note that metadata might be null if no metadata is found.
> IImageMetadata metadata = Imaging.getMetadata(
> jpegImageFile);
> JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
> if (null != jpegMetadata)
>   {
> // note that exif might be null if no Exif metadata is found.
> TiffImageMetadata exif = jpegMetadata.getExif();
> 
> if (null != exif)
>   {
> // TiffImageMetadata class is immutable (read-only).
> // TiffOutputSet class represents the Exif data to write.
> //
> // Usually, we want to update existing Exif metadata by
> // changing
> // the values of a few fields, or adding a field.
> // In these cases, it is easiest to use getOutputSet() to
> // start with a "copy" of the fields read from the image.
> outputSet = exif.getOutputSet();
> }
> }
> 
> if (null == outputSet) {
> // file does not contain any exif metadata. We don't need to
> // update the file; just copy it.
> IoUtils.copyFileNio(jpegImageFile, dst);
> return;
> }
> 
> {
> // Example of how to remove a single tag/field.
> // There are two ways to do this.
> 
> // Option 1: brute force
> // Note that this approach is crude: Exif data is organized in
> // directories. The same tag/field may appear in more than one
> // directory, and have different meanings in each.
> 
>   // outputSet.removeField(ExifTagConstants.EXIF_TAG_GPSINFO);
> 
> // Option 2: precision
> // We know the exact directory the tag should appear in, in this
> // case the "exif" directory.
> // One complicating factor is that in some cases, manufacturers
> // will place the same tag in different directories.
> // To learn which directory a tag appears in, either refer to
> // the constants in ExifTagConstants.java or go to Phil Harvey's
> // EXIF website.
> 
>  TiffOutputDirectory gpsDirectory = outputSet.getGPSDirectory();//
> <---
> if (null != gpsDirectory)
> {
> gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_LATITUDE);
> gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_LONGITUDE);
> 
> }
> }
> 
> os = new FileOutputStream(dst);
> os = new BufferedOutputStream(os);
> 
> new ExifRewriter().updateExifMetadataLossless(jpegImageFile, os,
> outputSet);
> 
> os.close();
> os = null;
> } finally {
> if (os != null)
> try {
> os.close();
> } catch (IOException e) {
> 
> }
> }
> }
> 
> I want to remove only gps position information from photo
  

RE: [net] Hostname verification with FTPSClient

2013-03-04 Thread Martin Gainty
Mads
 
>keytool -printcert -v -file CertificateIssuedByVerisignToVolvo.cer
Owner: O=Nokia
Issuer=Versign

If FTPSclient certificate hostname verification accepts any hostname other than 
the owner while you are attempting SSL transmission to Nokia then the 
"certificate hostname verification" is not working

If this is case please file JIRA for "certificate hostname verification 
enhancement"
https://issues.apache.org/jira/browse/NET
 
In the meanwhile 
1)request VPN access to the client which you can pass credentials with provided 
certificate
2)ssh with provided certificate
the validation of the provided cert will get you behind the firewall..in which 
case you will be able to execute ftp, scp,rcp
 
Tak,
Martin-

Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> To: user@commons.apache.org
> From: mads.lindstr...@gmail.com
> Subject: Re: [net] Hostname verification with FTPSClient
> Date: Fri, 1 Mar 2013 09:09:48 +
> 
> sebb  gmail.com> writes:
> 
> > 
> > On 28 February 2013 20:04, Mads Lindstrøm  gmail.com> 
> wrote:
> > > Hi
> > >
> > > I have implemented an application using
> > > org.apache.commons.net.ftp.FTPSClient. The application connects to the 
> > > FTPS
> > > server and everything works fine, except that FTPSClient connects to the
> > > FTPS server both when I use the hostname and when I use an IP adresss. 
> > > That
> > > is when I connect with FTPSClient.connect() it connects fine. 
> > > And
> > > when I connect with FTPSClient.connect() it connects fine. 
> > > This
> > > is wrong, as it means no hostname verification is going on. That is, the
> > > server certificate common name does not have to be equal to the hostname.
> > 
> > It's not clear to me what you think is wrong.
> > 
> > Are you saying that it should reject connections by IP address?
> 
> I would expect it to. If FTPSClient performs hostname verification (checking 
> that a certificate common name = hostname) how can it accepts connections by 
> IP address?
> 
> I also tried adding:
> 
> foobar 
> 
> to my hosts file and then I could also connect using "foobar" as hostname. 
> The 
> server certificate do not have "foobar" as common name.
> 
> > 
> > Or are you saying that the server certificate common name is different
> > from the hostname you are using, yet the connection is still accepted?
> 
> I am saying both. Well, now that I mentioned the "foobar" example I am saying 
> both.
> 
> 
> Regards,
> 
> Mads Lindstrøm
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [LANG] How to escape JSON data

2013-04-10 Thread Martin Gainty
so in other words if the following Text is inputted by JQuery to JSON Parser
 
Martin O'Sullivan sends XYZ to Maurizio D'Milano 

The JQuery-JSON Parse could possibly encode the tickmark embedded in the 
sirnames incorrectly
 
what if we frontend all calls to JQuery.parse with a Json_Encoder which would 
encode 

Martin O'Sullivan sends XYZ to the Maurizio D'Milano 

as

Martin O\u0027Sullivan sends XYZ  to Maurizio D\u0027Milano

conversely returning from JSON Parse the Json_Decoder would decode 

Martin O\u0027Sullivan sends XYZ  to Maurizio D\u0027Milano

as
Martin O'Sullivan sends XYZ to Maurizio D'Milano 

?
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> From: mcucchi...@apache.org
> Date: Wed, 10 Apr 2013 11:37:44 +0200
> Subject: Re: [LANG] How to escape JSON data
> To: user@commons.apache.org
> 
> Actually, when I was talking about the best way, I was asking for a
> "common" way.
> 
> On 10 April 2013 02:39, Daniel Pitts  wrote:
> > I might suggest looking into the json.org library.
> >
> >
> > On 4/9/13 7:36 AM, Maurizio Cucchiara wrote:
> >>
> >> OK,
> >> there is already an opened issue [1]
> >>
> >> [1] https://issues.apache.org/jira/browse/LANG-797
> >>
> >> Twitter :http://www.twitter.com/m_cucchiara
> >> G+ :https://plus.google.com/107903711540963855921
> >> Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> >> VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
> >>
> >> Maurizio Cucchiara
> >>
> >>
> >> On 9 April 2013 12:51, Maurizio Cucchiara  wrote:
> >>>
> >>> Hi guys,
> >>> what is the best way to escape json data?
> >>>
> >>> We (the Struts team) have been experiencing an issue [1] with the ECMA
> >>> Script translator (which, at first glance, could seem the right one).
> >>>
> >>> It turned out that the Java translator which best fits to JSON, but I
> >>> don't think it's a good solution to use a translator designed for
> >>> other needs.
> >>>
> >>> Should we define a custom translator?
> >>>
> >>> [1] https://issues.apache.org/jira/browse/WW-4041
> >>>
> >>>
> >>> Twitter :http://www.twitter.com/m_cucchiara
> >>> G+ :https://plus.google.com/107903711540963855921
> >>> Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> >>>
> >>> Maurizio Cucchiara
> >>
> >> -
> >> 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: [LANG] How to escape JSON data

2013-04-11 Thread Martin Gainty
we ran into a problem with single tickmarks in Struts-user with JSON parse 
method..to wit;
 
var json_parse = (function () {
"use strict";


// This is a function that can parse a JSON text, producing a JavaScript
// data structure. It is a simple, recursive descent parser. It does not use
// eval or regular expressions, so it can be used as a model for implementing
// a JSON parser in other languages.


// We are defining the function inside of another function to avoid creating
// global variables.


var at, // The index of the current character
ch, // The current character
escapee = {
'"':  '"',
'\\': '\\',
'/':  '/',
b:'\b',
f:'\f',
n:'\n',
r:'\r',
t:'\t'
},
text,


error = function (m) {


https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js
 
notice that the code gleefully ignores tickmarks so we need to rewrite..

can someone poke the bear and get crockford to do this or should we enlist Mr 
Koch?

?
Martin  
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 .

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> Date: Thu, 11 Apr 2013 09:32:10 +0200
> From: ebo...@apache.org
> To: user@commons.apache.org
> Subject: Re: [LANG] How to escape JSON data
> 
> Le 11/04/2013 00:26, Daniel Pitts a écrit :
> > Well, I'd be inclined to use the library written by the same people who
> > maintain the spec: http://www.json.org/java/index.html
> 
> If I'm not mistaken the "shall be used for Good, not Evil" clause is a
> field of use restriction, that's not an open source license.
> 
> http://debian.2.n7.nabble.com/The-Software-shall-be-used-for-Good-not-Evil-td1953402.html
> 
> 
> Emmanuel Bourg
> 
> 
  

RE: [daemon] JSVC re-exec requires execution with an absolute or relative path

2013-04-29 Thread Martin Gainty
If you are implementing on Linux 
 
classpath version mismatches can be overcome by executing version-specific 
maven-jsvc-plugin in pom.xml

  
   
 Maven-Jsvc-Plugin


grab the source here
 
https://github.com/jeroenr/Maven-Jsvc-Plugin

Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> Date: Mon, 29 Apr 2013 06:42:56 +0200
> From: mt...@apache.org
> To: user@commons.apache.org
> Subject: Re: [daemon] JSVC re-exec requires execution with an absolute or 
> relative path
> 
> On 04/28/2013 11:05 PM, John Boyer wrote:
> > Hello:
> >
> > I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec 
> > path error. I've sunk a lot of hours into this. I'm beginning to think I 
> > should have used the Java Service Wrapper Community Edition instead.
> >
> > Anyway, can anyone help me with this problem? Thank you for your time. John
> >
> 
> Like the log says. Use either absolute or relative paths.
> I presume you know what those concepts are.
> 
> Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in the 
> classpath
> means it can come from anywhere in the PATH.
> So use
> -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar
> (That's relative path)
> or
> -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar
> (That's absolute path)
> 
> 
> 
> Regards
> -- 
> ^TM
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [daemon] JSVC re-exec requires execution with an absolute or relative path

2013-04-30 Thread Martin Gainty
'Mornin John
 
so to recap

prepend /usr/local/bin/jsvc to $PATH
 
put "-jvm server -debug -home /usr/lib/jvm/java-6-openjdk" ON $JAVA_OPTS

prepend /usr/local/bin/commons-daemon-1.0.15.jar to $CLASSPATH
 
then automate the process with 
https://github.com/jeroenr/Maven-Jsvc-Plugin

glad you're on your way to a solution!

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  


> Subject: Re: [daemon] JSVC re-exec requires execution with an absolute or 
> relative path
> From: johnboye...@gmail.com
> Date: Mon, 29 Apr 2013 15:47:57 -0700
> To: user@commons.apache.org
> 
> Hi:
> 
> UPDATE: 
> The UNIX error message is referring to the absolute path of the jsvc 
> executable. When I invoked the executable with its absolute path it worked. I 
> assume it's the same problem on Mac OS X.
> 
> /usr/local/bin/jsvc -jvm server -debug -home /usr/lib/jvm/java-6-openjdk -cp 
> /usr/local/bin/commons-daemon-1.0.15.jar:myjar.jar MyDaemonClass
> 
> I'm really happy it's working now.
> 
> Regards,
> 
> John
> 
> On Apr 29, 2013, at 9:10 AM, John Boyer  wrote:
> 
> > UPDATE: Unfortunately, using the absolute and relative classpaths results 
> > in the same error.
> > 
> > We haven't been able to get this to work on UNIX or Mac OS X. I think we'll 
> > need to look at other alternatives such as the Java Service Wrapper.
> > 
> > UNIX Error: "JSVC re-exec requires execution with an absolute or relative 
> > path"
> > 
> > Mac OS X: "Cannot find daemon loader 
> > org/apache/commons/daemon/support/DaemonLoader"
> > 
> > Regards,
> > 
> > John
> > 
> > 
> > On Apr 29, 2013, at 8:46 AM, John Boyer  wrote:
> > 
> >> Hi TM:
> >> 
> >> Thanks, I will try this. In any case, I believe if the log message 
> >> mentioned the "classpath" explicitly it would have saved me a lot of time. 
> >> It's unclear what the real object of the sentence is or what path it's 
> >> referring to. Just spitting out the classpath in the log message would've 
> >> given me a clue as to what it was complaining about.
> >> 
> >> JSVC re-exec requires execution with an absolute or relative path
> >> 
> >> Thanks again,
> >> 
> >> John 
> >> 
> >> On Apr 28, 2013, at 9:42 PM, Mladen Turk  wrote:
> >> 
> >>> On 04/28/2013 11:05 PM, John Boyer wrote:
>  Hello:
>  
>  I'm trying to run jsvc on Ubuntu Linux (10.04.4). I'm getting a re-exec 
>  path error. I've sunk a lot of hours into this. I'm beginning to think I 
>  should have used the Java Service Wrapper Community Edition instead.
>  
>  Anyway, can anyone help me with this problem? Thank you for your time. 
>  John
>  
> >>> 
> >>> Like the log says. Use either absolute or relative paths.
> >>> I presume you know what those concepts are.
> >>> 
> >>> Reason for that is security. Having just 'commons-daemon-1.0.15.jar' in 
> >>> the classpath
> >>> means it can come from anywhere in the PATH.
> >>> So use
> >>> -cp ./commons-daemon-1.0.15.jar:./api-monitor.jar
> >>> (That's relative path)
> >>> or
> >>> -cp `pwd`/commons-daemon-1.0.15.jar:`pwd`/api-monitor.jar
> >>> (That's absolute path)
> >>> 
> >>> 
> >>> 
> >>> Regards
> >>> -- 
> >>> ^TM
> >>> 
> >>> -
> >>> 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: BeanUtils website broken links

2013-06-14 Thread Martin Gainty
https://issues.apache.org/jira/browse/BEANUTILS-442

Thanks Gerry!

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 
> Date: Fri, 14 Jun 2013 15:50:12 +1000
> Subject: BeanUtils website broken links
> From: gerry.g@gmail.com
> To: user@commons.apache.org
> 
> Hi,
> 
> Many links on BeanUtils website (javadoc, release notes, user guide) are
> broken:
> 
> http://commons.apache.org/proper/commons-beanutils/v1.8.3/apidocs/org/apache/commons/beanutils/package-summary.html
> http://commons.apache.org/proper/commons-beanutils/v1.8.3/apidocs/index.html
> 
> Please help fix it. And thanks for all the great work.
> 
> Kind Regards,
> *Gerry Tan*
  

RE: [vfs] The filesystem support table update (http://commons.apache.org/proper/commons-vfs/filesystems.html)

2013-08-12 Thread Martin Gainty
Keep in mind whatever file system you introduce to commons-io your new 
filesystem will need to support:
 
Utility classes   - with static methods to perform common tasksInput   - useful 
Input Stream and Reader implementationsOutput   - useful Output Stream and 
Writer implementationsFilters   - various implementations of file 
filtersComparators   - various implementations of java.util.Comparator for 
filesFile Monitor   - a component for monitoring file system events 
the first step is to file a JIRA with as much detail as possible on how vfs 
should be implemented
 
https://issues.apache.org/jira/browse/IO#selectedTab=com.atlassian.jira.plugin.system.project%3Aissues-panel

Martin 
__ 
Verzicht und Vertraulichkeitanmerkung

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

 
> Date: Mon, 12 Aug 2013 11:44:54 +0400
> Subject: [vfs] The filesystem support table update 
> (http://commons.apache.org/proper/commons-vfs/filesystems.html)
> From: ilya.rodio...@gmail.com
> To: user@commons.apache.org
> 
> Hello,
> I consider it's time to update the filesystem support table.
> As I know VFS supports directory listing for many types. incl. FTP and SFTP.
> The table is confusing.
> 
> Best regards,
> Ilya Rodinov.
  

RE: [DAEMON] Assigning JVM to a core

2013-10-10 Thread Martin Gainty
Gary

which version of os/arch are you targetting?

Martin 


  


> Date: Thu, 10 Oct 2013 22:08:09 -0400
> Subject: [DAEMON] Assigning JVM to a core
> From: garydgreg...@gmail.com
> To: user@commons.apache.org
> 
> Hi All:
> 
> Is there a way to tell [daemon] to run a JVM on a specific core within a CPU?
> 
> Gary
> 
> -- 
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> JUnit in Action, Second Edition
> Spring Batch in Action
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [DAEMON] Assigning JVM to a core

2013-10-16 Thread Martin Gainty
procaff  /wait 2 notepad.exe starts notepad.exe on CPU 1 synchronously
procaff  /run  1 notepad.exe starts notepad.exe on CPU 0 asynchronously
procaff  /set  3 4296 sets processor affinity of process with pid 4296 to 3
procaff  /set  3 foo.exe sets processor affinity of process "foo.exe"  to 3


Vielen Danke Thomas!
Martin 


  



> Date: Wed, 16 Oct 2013 17:51:51 +0200
> Subject: Re: [DAEMON] Assigning JVM to a core
> From: thomas.neidh...@gmail.com
> To: user@commons.apache.org
> 
> This link may help you:
> http://www.scalabiliti.com/blog/java_jvm_processor_affinity
> 
> 
> On Wed, Oct 16, 2013 at 4:38 PM, Gary Gregory wrote:
> 
> > Ping?
> >
> > On Thu, Oct 10, 2013 at 10:13 PM, Gary Gregory  > >wrote:
> >
> > > On Thu, Oct 10, 2013 at 10:11 PM, Martin Gainty 
> > > wrote:
> > > > Gary
> > > >
> > > > which version of os/arch are you targetting?
> > >
> > > Martin,
> > >
> > > I'm pretty sure our IT folks are looking at Windows 32 and/or 64-bit.
> > > If it matters I'll get the exact versions.
> > >
> > > Gary
> > >
> > > >
> > > > Martin
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >> Date: Thu, 10 Oct 2013 22:08:09 -0400
> > > >> Subject: [DAEMON] Assigning JVM to a core
> > > >> From: garydgreg...@gmail.com
> > > >> To: user@commons.apache.org
> > > >>
> > > >> Hi All:
> > > >>
> > > >> Is there a way to tell [daemon] to run a JVM on a specific core within
> > > a CPU?
> > > >>
> > > >> Gary
> > > >>
> > > >> --
> > > >> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> > > >> Java Persistence with Hibernate, Second Edition
> > > >> JUnit in Action, Second Edition
> > > >> Spring Batch in Action
> > > >> Blog: http://garygregory.wordpress.com
> > > >> Home: http://garygregory.com/
> > > >> Tweet! http://twitter.com/GaryGregory
> > > >>
> > > >> -
> > > >> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > > >> For additional commands, e-mail: user-h...@commons.apache.org
> > > >>
> > > >
> > >
> > >
> > >
> > > --
> > > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> > > Java Persistence with Hibernate, Second Edition
> > > JUnit in Action, Second Edition
> > > Spring Batch in Action
> > > Blog: http://garygregory.wordpress.com
> > > Home: http://garygregory.com/
> > > Tweet! http://twitter.com/GaryGregory
> > >
> >
> >
> >
> > --
> > E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> > Java Persistence with Hibernate, Second Edition<
> > http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
> >
  

RE: [dbcp] memory leak: org.apache.commons.pool.impl.CursorableLinkedList$Listable

2013-10-22 Thread Martin Gainty

weak references are GC'ed when you close() your CursorableLinkedList

when do you close your CursorableLinkedList?

if you have ehcache (or any other caching mechanism) you will want to be 
proactive
about removing the cache entries for connection-objects where connection times 
out or becomes invalid

Martin
  



> Date: Tue, 22 Oct 2013 11:30:16 +0200
> Subject: Re: [dbcp] memory leak: 
> org.apache.commons.pool.impl.CursorableLinkedList$Listable
> From: andrea.bo...@gmail.com
> To: user@commons.apache.org
> 
> The word "cache" pointed me to a possible cause of the memory usage:
> prepared statement cache.
> In fact I find a lot of different statements in the heap dump (around 4000
> statements, which are less than 1 objects instances of the class in the
> subject, but enough to ask myself if this is the reason).
> 
> I'll research in that direction.
> 
> Thank you.
> Andrea
> 
> 
> On Tue, Oct 22, 2013 at 10:42 AM, Mark Thomas  wrote:
> 
> > On 22/10/2013 09:27, Andrea Bosio wrote:
> > > Hello all,
> > >
> > > I have an application running on Tomcat, with dbcp 1.4, which shows an
> > > abnormal memory usage.
> > > Heap memory usage grows without releasing.
> > >
> > > Analyizing an heap dump with Eclipse Memory Analyzer, I find some strange
> > > objects instances of
> > > class org.apache.commons.pool.impl.CursorableLinkedList$Listable
> > >
> > > A few objects (10) occupy a large amount of memory (50Mb or so).
> >
> > That looks perfectly normal if a connection object takes around 5Mb.
> > That does seem a little large for a connection but you'd need to dig
> > into exactly what was taking up all that space. Depending on the
> > configured caches that could be fine too.
> >
> > > Then I have a big number of objects (10.000) each one occupying small
> > > amount of memory (less than 10kb).
> >
> > What is retaining the references to these objects?
> >
> > > I think that both situations are strange.
> >
> > Nothing reported so far looks strange.
> >
> > > Do you have any suggestion?
> >
> > Do more research.
> >
> > Mark
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> >
> >
> 
> 
> -- 
> Andrea Bosio
  

RE: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (77 > -1)

2014-02-16 Thread Martin Gainty

> Date: Sun, 16 Feb 2014 13:04:43 +
> Subject: Re: com.mysql.jdbc.PacketTooBigException: Packet for query is too 
> large (77 > -1)
> From: seb...@gmail.com
> To: user@commons.apache.org
> 
> This does not appear to be anything to do with any Apache Commons component.

> Try asking on the MySQL user list.

MG>hes not getting a kind of response from MySQL Support   so he asks here

MG>max_allowed_packet = 1M in $MYSQL_HOME/my.ini is the default setting for 
"Large Object support" in MySQL
MG>try updating the my.ini parameter max_allowed_packet = 1M and see if that 
solves your problem

> 
> On 16 February 2014 02:03, 心如止水 <707621...@qq.com> wrote:
> > Hi All ,
> >
> > I have encountered a problem in production environment :
> >
> > ### Error querying database. Cause: com.mysql.jdbc.PacketTooBigException: 
> > Packet for query is too large (77 > -1). You can change this value on the 
> > server by setting the max_allowed_packet' variable.
> > ### The error occurred while setting parameters
> > ### Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too 
> > large (77 > -1). You can change this value on the server by setting the 
> > max_allowed_packet' variable.
> > at 
> > org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
> > at 
> > org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:61)
> > at 
> > org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:53)
> > at 
> > org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:38)
> > at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:66)
> > at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:35)
> > at $Proxy408.queryById(Unknown Source)
> >
> > I am confused with the number -1 (the max allowed packet size ), how it can 
> > appear ?
> > And the other problem is when the database reover the service , the problem 
> > is still existing , otherwise I restart the
> > tomcat application ,then it's ok 
> >
> > Thanks.
> >
> >
> > Best Regards,
> > Guoan Hu
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 

  

RE: Sample to merge multiple tiffs

2014-03-11 Thread Martin Gainty
create a composite image based  on 2 existing images (.tiff files)


try batik users


Martin 
__ 


  



> From: irfan.moham...@wellsfargo.com
> To: user@commons.apache.org
> Subject: Sample to merge multiple tiffs
> Date: Tue, 11 Mar 2014 20:52:25 +
> 
> Hi,
> 
> I am looking to see if there is a way to merge multiple tiff files into a 
> single tiff file. I have not been to figure out exactly how to do this by 
> going through the Javadocs.
> 
> Regards,
> Irfan Mohammed
> 
> This message may contain confidential and/or privileged information. If you 
> are not the addressee or authorized to receive this for the addressee, you 
> must not use, copy, disclose, or take any action based on this message or any 
> information herein. If you have received this message in error, please advise 
> the sender immediately by reply e-mail and delete this message. Thank you for 
> your cooperation.
> 
> 
> 
> 
  

RE: Commons Configuration Web Site Broken

2014-03-13 Thread Martin Gainty

  


> Date: Thu, 13 Mar 2014 14:33:04 +
> Subject: Re: Commons Configuration Web Site Broken
> From: seb...@gmail.com
> To: user@commons.apache.org
> 
> On 12 March 2014 20:27, Oliver Heger  wrote:
> > Hit Matt,
> >
> > thanks for spotting this. It looks like an intermediate snapshot version
> > of the site has been deployed while experimenting with the new look & feel.
> >
> > Situation is worse because the latest 1.10 release has been made from a
> > special branch while the site in trunk still is based on the 1.9 version.

> >
> > @Site experts: What is the best option to fix this? I think the approach
> > suggested once by sebb would make sense: Create a branch from the 1.10
> > release tag, do some modifications (mainly switch to most recent commons
> > parent) and deploy from there?
MG>roll 2.x out to a special branch 
MG>(dont allow  trunk to have for more than one experimental branch)
MG>merge the 1.10 back to trunk
MG>then cut the 1.10 release candidate
MG>run your tests including smoke and loadrunner
MG>then vote on 1.10 being pushed to distros
MG>release the 1.10

MG>diff the 2.0 branch and resolve all insane deltas
MG>repeat the process enumerated above..

> > WDYT?
> 
> That the site issue should be discussed in a new mail thread on the
> dev list please.
> 
> > Oliver
> >
> > Am 12.03.2014 05:36, schrieb Matt Hughes:
> >> Hi, I'm trying to use commons configuration, but the web site is broken in
> >> a couple of ways. It references 2.0-SNAPSHOT, and the latest stable version
> >> it lists is 1.9.
> >>
> >> It doesn't appear to be possible to get to the JavaDoc for 1.9 or 1.10 at
> >> all.
> >>
> >> The download page and version history page refer to 1.9, but the latest
> >> release is 1.10, so all of the 1.9 download links are broken.
> >>
> >> It would be helpful for new users of commons configuration to be able to
> >> access javadoc and download the latest stable release through the web site
> >> without having to hunt around for the "archives..." link at the bottom of
> >> the download page or change the URL to find the 1.10 version.
> >>
> >> Thanks,
> >> mch
> >>
> >
> > -
> > 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]

2014-03-20 Thread Martin Gainty


  


> From: frederick.van-der-n...@hp.com
> To: user@commons.apache.org
> Subject: [daemon]
> Date: Thu, 20 Mar 2014 15:05:05 +
> 
> Hi,
> 
> I have been having an issue where the windows service I created will hang. I 
> was able to start my java program as a Network Service. It starts and stops 
> fine I can also send it a command from cmd to check the client status, but 
> whenever I send it a command to spawn a new thread it sits there hung up 
> until I end the process.
> 
> The program works fine in both eclipse and running it standalone from cmd. 
> Only when it is a service do I get issues.
> 
> Is this a limitation of procrun? What else could be causing the service to 
> lock up like this?
MG>I'll ask the obvious questions:
MG>Did you set the procrun -Jvm parameter so jvm.dll will load
MG>If so then youll need to set --StartMode jvm
 
MG>What is in your registry located at:
MG>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
MG>HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 
2.0\\Parameters
MG>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\ProcRun 
2.0\

MG>Also daemonizing a exe or java binary has these consequences:

When using the Java or exe modes, the Procrun service application (prunsrv) 
launches the target application in a separate process. The "stop" application 
needs to communicate somehow with the "start" application to tell it to stop. 
For example, using RPC. 


> 
> Thanks,
> Freddie
MG>Wo arbeitest du
MG>Martin 

RE: [configuration] Calling getConfiguration on DefaultConfigurationBuilder more than once permitted

2014-03-21 Thread Martin Gainty

  


> Date: Fri, 21 Mar 2014 22:45:29 +0100
> From: dont_k...@gmx.net
> To: user@commons.apache.org
> Subject: [configuration] Calling getConfiguration on 
> DefaultConfigurationBuilder more than once permitted
> 
> Hi,
> 
> is it permitted to call getConfiguration more than once on the same 
> instance of DefaultConfigurationBuilder like this:
> 
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> Configuration config = builder.getConfiguration(true);
> config = builder.getConfiguration(true);
> config = builder.getConfiguration(true);
> ...
> 
> The config.xml looks like this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> and the referenced file "test.properties" contains:
> a=a
> b=b
> c=c
> 
> I asked this question, because with the first call of getConfiguration 
> the "test.properties"-file is read 10 times (once for every 
> "config-at"), with the second call 20 times, with the third call 30 
> times and so on. So in the end the program slows down and after 100 
> calls it needs 200ms to read the properties.
 
MG>builder.getConfiguration(true) a Union between one DB Table and another DB 
Table
MG>if you want to 'merge' 2 groups together I suggest using OverrideCombiner
MG>ConfigurationNode combine(ConfigurationNode node1,  ConfigurationNode 
node2)
MG> 
http://www.docjar.com/html/api/org/apache/commons/configuration/tree/OverrideCombiner.java.html
> 
> I'm a little bit confused because my idea was to instantiate 
> DefaultConfigurationBuilder for performance reasons only once (as a 
> Singleton) and call getConfiguration subsequently to read "fresh" 
> properties.
> 
> Thanks
> Stefan
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [configuration] Calling getConfiguration on DefaultConfigurationBuilder more than once permitted

2014-03-22 Thread Martin Gainty

  


> Date: Sat, 22 Mar 2014 22:39:14 +0100
> From: dont_k...@gmx.net
> To: user@commons.apache.org
> Subject: Re: [configuration] Calling getConfiguration on 
> DefaultConfigurationBuilder more than once permitted
> 
> Hi Martin,
> 
> I found a solution which fits my requirements without this ugly 
> behaviour as described before. The trick is to configure the reloading 
> strategy and force the reload checking in "config.xml":
> 
> 
> 
> 
> 
> 
> 
MG>lets find out what forceReloadCheck and what it does
MG>/commons-configuration>grep -r -l forceReloadCheck *.*
.\src\main\java\org\apache\commons\configuration\CombinedConfiguration.java
.\target\classes\org\apache\commons\configuration\CombinedConfiguration.class

MG>forceReloadCheck has NO effect on 
DefaultConfigurationBuilder.getConfiguration()
protected CombinedConfiguration createAdditionalsConfiguration(
CombinedConfiguration resultConfig)
{
CombinedConfiguration addConfig =
 new CombinedConfiguration(new UnionCombiner()); //this will STILL pull 
UNION of entities

addConfig.setDelimiterParsingDisabled(resultConfig
.isDelimiterParsingDisabled());
addConfig.setForceReloadCheck(resultConfig.isForceReloadCheck());
addConfig.setIgnoreReloadExceptions(resultConfig
.isIgnoreReloadExceptions());
return addConfig;
}
MG>if this was chess ..i have just taken your queen
MG>your move..

> 
> 
> That just made my day :)
> 
> Thanks for your effort
> Stefan
> 
> Am 22.03.2014 02:17, schrieb Martin Gainty:
> > 
> >
> >
> >> Date: Fri, 21 Mar 2014 22:45:29 +0100
> >> From: dont_k...@gmx.net
> >> To: user@commons.apache.org
> >> Subject: [configuration] Calling getConfiguration on 
> >> DefaultConfigurationBuilder more than once permitted
> >>
> >> Hi,
> >>
> >> is it permitted to call getConfiguration more than once on the same
> >> instance of DefaultConfigurationBuilder like this:
> >>
> >> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> >> builder.setFile(new File("config.xml"));
> >> Configuration config = builder.getConfiguration(true);
> >> config = builder.getConfiguration(true);
> >> config = builder.getConfiguration(true);
> >> ...
> >>
> >> The config.xml looks like this:
> >> 
> >>
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >>
> >> and the referenced file "test.properties" contains:
> >> a=a
> >> b=b
> >> c=c
> >>
> >> I asked this question, because with the first call of getConfiguration
> >> the "test.properties"-file is read 10 times (once for every
> >> "config-at"), with the second call 20 times, with the third call 30
> >> times and so on. So in the end the program slows down and after 100
> >> calls it needs 200ms to read the properties.
> > 
> > MG>builder.getConfiguration(true) a Union between one DB Table and another 
> > DB Table
> > MG>if you want to 'merge' 2 groups together I suggest using OverrideCombiner
> > MG>ConfigurationNode combine(ConfigurationNode node1, ConfigurationNode 
> > node2)
> > MG> 
> > http://www.docjar.com/html/api/org/apache/commons/configuration/tree/OverrideCombiner.java.html
> >> I'm a little bit confused because my idea was to instantiate
> >> DefaultConfigurationBuilder for performance reasons only once (as a
> >> Singleton) and call getConfiguration subsequently to read "fresh"
> >> properties.
> >>
> >> Thanks
> >> Stefan
> >>
> >>
> >> -
> >> 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] Which Hadoop 2.x .jars are necessary with VFS HDFS access?

2014-04-08 Thread Martin Gainty
Roger-

 

look for hadoop-core
in the  section in your pom.xml

if  either

>mvn compile

>mvn package
cannot locate hadoop-core
you'll need to sync your  section in pom.xml for 

hadoop-core snapshots
hadoop-core releases


Ping back if you're calling no-joy

M-
  



> From: roger.whitc...@actian.com
> To: user@commons.apache.org
> Subject: [VFS] Which Hadoop 2.x .jars are necessary with VFS HDFS access?
> Date: Tue, 8 Apr 2014 21:46:09 +
> 
> Hi all,
> I've written a Commons VFS file browser using Apache Pivot (it's part of the 
> 2.1 upcoming release). Now I'm trying to use it to browse into HDFS files. I 
> got it to work with HDFS 1.x by simple including the hadoop-core .jar and a 
> couple of other commons .jars that are also needed. But, that approach 
> doesn't work for Hadoop 2.x. Specifically the "hadoop-core-xxx.jar" doesn't 
> exist anymore, and substituting the "hadoop-hdfs-.jar" doesn't work at 
> all. So, before I bang my head against the wall, does anyone here know what 
> .jars I would need for Hadoop 2.x to interface with the VFS HDFS provider?
> 
> Thanks,
> ~Roger Whitcomb
> 
> 
  

RE: VFS HDFS access

2014-04-12 Thread Martin Gainty
--Forwarded Message Attachment--
From: mgai...@hotmail.com
To: user@commons.apache.org
Subject: RE: [VFS] Which Hadoop 2.x .jars are necessary with VFS HDFS access?
Date: Sat, 12 Apr 2014 08:09:25 -0400




Morning Roger and Gary
 
Brandon Li figured this out last year by installing NFS on Wondows and then 
mounting a HDFS mountpoint

http://lucene.472066.n3.nabble.com/Mounting-HDFS-on-client-td4107671.html
 
Sorry for the long delay in response..Ive been knee deep in multiple house 
repair items..this has been a long costly winter

HTH
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

  

> Date: Fri, 11 Apr 2014 17:49:10 -0400
> Subject: Re: [VFS] Which Hadoop 2.x .jars are necessary with VFS HDFS access?
> From: garydgreg...@gmail.com
> To: user@commons.apache.org
> 
> FWIW, I've not had luck getting VFS with Hadoop 1.1.2 to work on Windows. I
> run the unit tests on a Linux VM. YMMV.
> 
> Gary
> 
> 
> On Fri, Apr 11, 2014 at 5:07 PM, Roger Whitcomb
> wrote:
> 
> > My client is on Windows 7, but the servers (Hadoop clusters) are mostly
> > Ubuntu (Cloudera VMs) for now.
> >
> > There doesn't seem to be any problem of Hadoop versions (i.e., it finds
> > and loads the Hadoop classes just fine), but it isn't being told what the
> > right configuration is.
> >
> > I've now seem some other postings elsewhere that seem to indicate that the
> > FS.defaultFS setting in the Configuration object has to point to the remote
> > system. So, I'm guessing that the VFS HdfsProvider needs to know some more
> > than I am telling it. Or maybe this is a change from Hadoop 1.x to 2.x?!
> >
> > Thanks,
> > ~Roger
> >
> > -Original Message-
> > From: Gary Gregory [mailto:garydgreg...@gmail.com]
> > Sent: Friday, April 11, 2014 12:58 PM
> > To: Commons Users List
> > Subject: Re: [VFS] Which Hadoop 2.x .jars are necessary with VFS HDFS
> > access?
> >
> > Curious: What OS are you on?
> >
> > We build trunk with Hadoop version 1.1.2, so who know what happens with a
> > newer version.
> >
> > I would start with trying to build VFS with the version of Hadoop you want
> > to use to see what happens...
> >
> > Gary
> >
> >
> > On Fri, Apr 11, 2014 at 3:51 PM, Roger Whitcomb
> > wrote:
> >
> > > Hi Martin,
> > > Well, I downloaded Hadoop 2.3.0 from one of the mirrors, and cannot
> > > find a "hadoop-corejar" file anywhere in that distribution. But I
> > > was able to track down sort of the minimum set of .jars necessary to
> > > at least (try to) connect using Commons VFS 2.1:
> > > commons-collections-3.2.1.jar
> > > commons-configuration-1.6.jar
> > > commons-lang-2.6.jar
> > > commons-vfs2-2.1-SNAPSHOT.jar
> > > guava-11.0.2.jar
> > > hadoop-auth-2.3.0.jar
> > > hadoop-common-2.3.0.jar
> > > log4j-1.2.17.jar
> > > slf4j-api-1.7.5.jar
> > > slf4j-log4j12-1.7.5.jar
> > >
> > > What's happening now is that I instantiated the HdfsProvider this way:
> > > private static DefaultFileSystemManager manager = null;
> > >
> > > static
> > > {
> > > manager = new DefaultFileSystemManager();
> > > try {
> > > manager.setFilesCache(new DefaultFilesCache());
> > > manager.addProvider("hdfs", new HdfsFileProvider());
> > > manager.setFileContentInfoFactory(new
> > > FileContentInfoFilenameFactory());
> > > manager.setFilesCache(new SoftRefFilesCache());
> > > manager.setReplicator(new DefaultFileReplicator());
> > > manager.setCacheStrategy(Cac

RE: [collections] Problems compiling w/gentoo

2014-04-18 Thread Martin Gainty
Known bug running commons-collections-3.2.1 on IBM JDK 1.5/1.6


https://www.mail-archive.com/dev@commons.apache.org/msg41702.html

 

HTH
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung


Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

  


> Date: Fri, 18 Apr 2014 15:45:17 -0600
> Subject: [collections] Problems compiling w/gentoo
> From: dcday...@gmail.com
> To: user@commons.apache.org
> 
> Hi all -
> 
> I am using gentoo to install common-collections-3.2.1. I keep getting
> errors like:
> 
> Buildfile:
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/build.xml
> 
> init:
> [echo]  commons-collections 3.2.1 
> 
> prepare:
> [mkdir] Created dir:
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/build
> 
> compile:
> [mkdir] Created dir:
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/build/classes
> [javac] Compiling 273 source files to
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/build/classes
> [javac]
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/src/java/org/apache/commons/collections/MultiHashMap.java:334:
> error: remove(Object,Object) in MultiHashMap cannot implement
> remove(Object,Object) in Map
> [javac] public Object remove(Object key, Object item) {
> [javac] ^
> [javac] return type Object is not compatible with boolean
> [javac]
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/src/java/org/apache/commons/collections/MultiMap.java:69:
> error: remove(Object,Object) in MultiMap clashes with remove(Object,Object)
> in Map
> [javac] public Object remove(Object key, Object item);
> [javac] ^
> [javac] return type Object is not compatible with boolean
> [javac]
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/src/java/org/apache/commons/collections/map/MultiKeyMap.java:200:
> error: remove(Object,Object) in MultiKeyMap cannot implement
> remove(Object,Object) in Map
> [javac] public Object remove(Object key1, Object key2) {
> [javac] ^
> [javac] return type Object is not compatible with boolean
> [javac]
> /var/tmp/portage/dev-java/commons-collections-3.2.1/work/commons-collections-3.2.1-src/src/java/org/apache/commons/collections/map/MultiValueMap.java:156:
> error: remove(Object,Object) in MultiValueMap cannot implement
> remove(Object,Object) in Map
> [javac] public Object remove(Object key, Object value) {
> [javac] ^
> [javac] return type Object is not compatible with boolean
> [javac] 4 errors
> 
> Any thoughts why this might be occurring?
> 
> Thanks!
> 
> -Collin
  

RE: Getting FTP Server Response as 7 from FTPClient api

2014-05-01 Thread Martin Gainty
is the FTP Server you are contacting AIX?
if so ...your cd command in your FTP script failed

http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zvm.v54.kijl0/retcds.htm

Martin Gainty 
__ 


> From: tarun.ku...@markit.com
> To: user@commons.apache.org
> Date: Thu, 1 May 2014 07:32:58 +0100
> Subject: Getting FTP Server Response as 7 from FTPClient api 
> 
> Hi Team,
> 
> While we are trying to retrieve file via FTPClient api
> On calling ftpClient.retrieveFileStream(fileName)  we are getting below 
> exception.
> 
> 
> org.apache.commons.net.MalformedServerReplyException: Could not parse 
> response code.
> Server Reply: 7 Entering Passive Mode (172,25,16,22,131,51).
> at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:315)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:490)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:534)
> at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:583)
> at org.apache.commons.net.ftp.FTP.pasv(FTP.java:882)
> at 
> org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:497)
> at 
> org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1333)
> at 
> com.markit.valuations.marketdata.reporting.checks.yieldcurevs.DatascopeRICCheck.getRicFromFiles(DatascopeRICCheck.java:202)
> 
> 
> Could not find response code 7 in FTP response list : 
> http://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
> 
> Can you please help us in knowing what could be underlying 
> issue and recommend solution.
> 
> Thanks,
> Tarun Kumar
> 
> 
> This e-mail, including accompanying communications and attachments, is 
> strictly confidential and only for the intended recipient. Any retention, use 
> or disclosure not expressly authorised by Markit is prohibited. This email is 
> subject to all waivers and other terms at the following link: 
> http://www.markit.com/en/about/legal/email-disclaimer.page
> 
> Please visit http://www.markit.com/en/about/contact/contact-us.page? for 
> contact information on our offices worldwide.
  

RE: StringEscapeUtils.escapeXml & XX

2014-05-05 Thread Martin Gainty
if you didnt catch XSS Vector at Javascript as it was coming in from Browser 
then you can write your own from:

http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/src-html/org/apache/commons/lang/StringEscapeUtils.html
private static void escapeJavaStyleString(Writer out, String str, boolean 
escapeSingleQuote,
   boolean escapeForwardSlash) throws IOException {{
//put XSS Vector attack mitigation  here
}

//Also in a webapp insert the configuration for owasp csrf guard 

Owasp.CsrfGuard.Config
config/Owasp.CsrfGuard.properties

//and of course the filter

CSRFGuard
org.owasp.csrfguard.CsrfGuardFilter

//and which extensions it will map to


CSRFGuard
*.jsf


CSRFGuard
*.jsp


//session listener


org.owasp.csrfguard.CsrfGuardListener





JavaScriptServlet

org.owasp.csrfguard.servlet.JavaScriptServlet

source-file
WEB-INF/customjs/Owasp.CsrfGuard.js


//where Owasp.CsrfGuard.js would contain something like:
/** determine if uri/url points to valid domain * */
function isValidUrl(src) {
var result = false;

/** parse out domain to make sure it points to our own * */
if(src.substring(0, 7) == "http://"; || src.substring(0, 8) == 
"https://";) {
var token = "://";
var index = src.indexOf(token);
var part = src.substring(index + token.length);
var domain = "";

/** parse up to end, first slash, or anchor * */
for(var i=0; i Date: Mon, 5 May 2014 00:55:22 -0700
> Subject: StringEscapeUtils.escapeXml & XX
> From: akash.delh...@gmail.com
> To: user@commons.apache.org
> 
> Hi,
> 
> I want to know much secure is escapeXml
> (org.apache.commons.lang.StringEscapeUtils.escapeXml) for preventing all
> XSS vectors ?
  

RE: [email] - Secure Password Authentication in Outlook

2014-05-27 Thread Martin Gainty


 
> From: a...@alard.net
> To: user@commons.apache.org
> Subject: [email] - Secure Password Authentication in Outlook
> Date: Tue, 27 May 2014 14:22:20 +0100
> 
> Hi all
> 
>  
> 
> I'm using the Apache Commons Email classes to send emails using SMTP. I'm
> connecting via SMTP so I don't have to support multiple configurations for
> different server providers (Outlook, Notes, ect).
> 
> As always, it's not that simple.
> 
>  
> 
> One of the options Microsoft provide is Secure Password Authentication. A
> bit of research shows this is something to do with NTLM, but I'm struggling
> a bit with understanding what bit is SPA, and what bit is NTLM. Not to worry
> about that for now.
> 
>  
> 
> My main question is, does the Apache Commons Email support SPA? If so, how
> do I set that? 
> 
MG>AFAIK commons-email does not support MS specific protocols
MG>the assumption that SMTPServer == SMTPSServer (Secure SMTP) is 
incorrectMG>Please change protocol to smtps  
MG>also javamail supports SMTPS natively
MG>http://www.rgagnon.com/javadetails/java-0570.htmlMG>Martin
> 
> Thanks
> 
>  
> 
> Alex
> 
  

RE: (beanutils) possible problem with beanutils being used by geoserver

2014-05-30 Thread Martin Gainty
you should ask this on glassfish-users but since I monitor both lists here is 
the solution

when you enable security manager in Glassfish
Changing Permissions for an ApplicationThe default policy for each domain 
limits the permissions of Java EE deployed applications to the minimal set of 
permissions required for these applications to operate correctly. Do not add 
extra permissions to the default set (the grant block with no codebase, which 
applies to all code). Instead, add a new grant block with a codebase specific 
to the applications requiring the extra permissions, and only add the minimally 
necessary permissions in that block.
If you develop multiple applications that require more than this default set of 
permissions, you can add the custom permissions that your applications need. 
The com.sun.aas.instanceRoot variable refers to the domain-dir. For example:

In general, you should add extra permissions only to the applications or 
modules that require them, not to all applications deployed to a domain. For 
example:
 
//this assumes classes from listContainer are all located in 
/applications/MyApp/ e.g.

listContainer

com.sun.enterprise.tools.admingui.jsf.component.Tail

 
and we KNOW that com.sun.enterprise.tools.admingui.jsf.component.Tail 
containing jar is located off of /applications/MyApp
grant codeBase "file:${com.sun.aas.instanceRoot}/applications/MyApp/-" 
{//choose the RuntimePermission which is appropriate
 permission java.lang.RuntimePermission "accessClassInPackage.*";
permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "defineClassInPackage.*";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.RuntimePermission "getenv.*";
//OR go for all of the classes permission java.lang.RuntimePermission "<>"}http://docs.oracle.com/cd/E26576_01/doc.312/e24930/securing-apps.htm#beabz

Martin
 
> Date: Fri, 30 May 2014 22:22:53 +0200
> From: oliver.he...@oliver-heger.de
> To: user@commons.apache.org
> Subject: Re: (beanutils) possible problem with beanutils being used by 
> geoserver
> 
> Hello Joel,
> 
> Am 29.05.2014 19:12, schrieb Joel Harris:
> > Hello,
> > 
> > I'm trying to utilize the Geoserver v2.5 application on glassfish v4 with
> > security manager enabled.
> > when I navigate to certain areas in the web application I get a beanutils
> > exception (toward the bottom of the stack trace below), trying to call a
> > getter that apparently doesn't exist. I'm not sure why this is aggravated
> > by enabling security manager, but perhaps it is bubbling up? This exception
> > does not show up with security manager disabled.
> > 
> > I have to keep security manager enabled, and can not allow "all
> > permissions" to the application.
> > Any help would be appreciated.
> 
> I am afraid I won't be a great help for your problem. It is completely
> new to me that the set of properties detected by beanutils depends on
> the existence of a security manager.
> 
> One thing I noticed from the stack trace: Could it be the case that the
> class in question is a proxy? Maybe those are affected by a security
> manager?
> 
> Oliver
> 
> > 
> > org.apache.wicket.WicketRuntimeException: Error attaching this container
> > for rendering: [MarkupContainer [Component id = listContainer]]
> > at
> > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1765)
> > 
> > at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
> > at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
> > at org.apache.wicket.Component.beforeRender(Component.java:1105)
> > at
> > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
> > 
> > at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
> > at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
> > at org.apache.wicket.Component.beforeRender(Component.java:1105)
> > at
> > org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
> > 
> > at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
> > at org.apache.wicket.Page.onBeforeRender(Page.java:1531)
> > at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
> > at org.apache.wicket.Component.beforeRender(Component.java:1105)
> > at org.apache.wicket.Component.prepareForRender(Component.java:2292)
> > at org.apache.wicket.Page.prepareForRender(Page.java:1521)
> > at org.apache.wicket.Component.prepareForRender(Component.java:2329)
> > at org.apache.wicket.Page.renderPage(Page.java:892)
> > at
> > org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
> > 
> > at
> > org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
> > 
> > at
> > org.apache.wicket.RequestCycle.processEvents

RE: Commons Config: Variable Interpolation

2014-07-11 Thread Martin Gainty


> From: ronald.difra...@capitalone.com
> To: user@commons.apache.org
> Date: Fri, 11 Jul 2014 11:02:45 -0400
> Subject: RE: Commons Config: Variable Interpolation
> 
> Just to complete it, the code looks like:
> 
> DefaultConfigurationBuilder factory = new 
> DefaultConfigurationBuilder("example.xml");
> Configuration config = factory.getConfiguration();

MG>no clue which properties are defined in example.xml so lets add a new 
property called mobile.rest.host here
MG>config.addProperty("mobile.rest.host", "maps.google.com");

> System.out.println("Host Name = " + config.getString("mobile.rest.host"));
MG>?
> 
> Ron DiFrango
> 
> 
> -Original Message-
> From: DiFrango, Ronald (CONT) [mailto:ronald.difra...@capitalone.com] 
> Sent: Friday, July 11, 2014 10:49 AM
> To: user@commons.apache.org
> Subject: Commons Config: Variable Interpolation
> 
> I'm attempting to perform Variable Interpolation as outlined here:
> 
> http://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#Variable_Interpolation
> 
> I'm using an XML file as the starter so I added the following blurb to the 
> beginning of the file:
> 
> 
>   
>   
>  
> config-class="org.apache.commons.configuration.interpol.ExprLookup">
>
>value="Class:java.net.InetAddress" />
>
>  
>   
>
MG>

  

MG>?

> 
> And then in my properties file that is loaded I did:
> 
> mobile.rest.host=${expr:$[net.localHost.hostName]}
> 
> But it did not work any thoughts on what I'm doing wrong?
> 
> Thanks,
> 
> Ron
> 
> 
> 
> 
> The information contained in this e-mail is confidential and/or proprietary 
> to Capital One and/or its affiliates. The information transmitted herewith is 
> intended only for use by the individual or entity to which it is addressed.  
> If the reader of this message is not the intended recipient, you are hereby 
> notified that any review, retransmission, dissemination, distribution, 
> copying or other use of, or taking of any action in reliance upon this 
> information is strictly prohibited. If you have received this communication 
> in error, please contact the sender and delete the material from your 
> computer.
> 
> 
> The information contained in this e-mail is confidential and/or proprietary 
> to Capital One and/or its affiliates. The information transmitted herewith is 
> intended only for use by the individual or entity to which it is addressed.  
> If the reader of this message is not the intended recipient, you are hereby 
> notified that any review, retransmission, dissemination, distribution, 
> copying or other use of, or taking of any action in reliance upon this 
> information is strictly prohibited. If you have received this communication 
> in error, please contact the sender and delete the material from your 
> computer.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: Commons Config: Variable Interpolation

2014-07-11 Thread Martin Gainty
Unfortunately the library is in pretty sad shape becuase of over-reliance on  a 
SAX Parser which has hardcoded values
and in your case the XML you provided was incorrect for at least 3 of those 
parameters

In the meanwhile feel free to use supplied 
org.apache.commons.configuration.CommonsConfigurationTest.java  instead

I will be filing a detailed JIRA as soon as I finish sending this email (and 
will copy you0

Many thanks for pointing out this show-stopping bug Ron!
Martin Gainty 
_
place inlined CommonsConfigurationTest.java in 
/src/test/java/org/apache/commons/configuration/CommonsConfigurationTest.java
mvn package will build and execute this test file
_

package org.apache.commons.configuration;

import org.w3c.dom.NodeList;

public class CommonsConfigurationTest extends junit.framework.TestCase
{
public CommonsConfigurationTest() { ; }
public CommonsConfigurationTest(String name)
{
super(name);

System.out.println("CommonsConfigurationTest::CommonsConfigurationTest(name) 
name="+name);
}
protected void setUp() throws Exception
{
System.out.println("CommonsConfigurationTest::setUp");
}
protected void tearDown() throws Exception
{
System.out.println("CommonsConfigurationTest::tearDown");
}
public org.apache.commons.configuration.XMLConfiguration config=null;
public java.io.File file  = null;
public org.w3c.dom.Document document = null;
public org.w3c.dom.NodeList rootNodeList = null;

public org.w3c.dom.NodeList configurationList = null;
public org.w3c.dom.NodeList headerList = null;
public org.w3c.dom.NodeList lookupsList = null;
public org.w3c.dom.NodeList lookupList = null;
public org.w3c.dom.NodeList variablesList = null;
public org.w3c.dom.NodeList variableList = null;
public java.util.Properties props = new java.util.Properties();
public org.w3c.dom.Node rootNode = null;
public void test()
{
//try
//{
   System.out.println("CommonsConfigurationTest::test before file = new 
java.io.File('configuration.xml') ");
   file= new java.io.File("C:/TEMP/configuration.xml");
   System.out.println("CommonsConfigurationTest::test file = "+file);
//}
//catch(java.io.IOException ex)
//{
//System.err.println("CommonsConfigurationTest::test has thrown 
IOException  message="+ex.getMessage());
//return;
//}
try
{

org.apache.commons.configuration.tree.DefaultExpressionEngine 
engine = new org.apache.commons.configuration.tree.DefaultExpressionEngine();
System.out.println("CommonsConfigurationTest::test LINE 51 engine = 
"+engine);
// Use a slash as property delimiter
engine.setPropertyDelimiter("/");
// Indices should be provided in curly brackets
engine.setIndexStart("{");
engine.setIndexEnd("}");
// For attributes use simply a @
engine.setAttributeStart("@");
engine.setAttributeEnd(null);
// A Backslash is used for escaping property delimiters
engine.setEscapedDelimiter("\\/");

// Now install this engine as the global engine
HierarchicalConfiguration.setDefaultExpressionEngine(engine);

// Access properties using the new syntax
//System.out.println("CommonsConfigurationTest::test() before 
config = new XMLConfiguration()");
//XMLConfiguration config = new XMLConfiguration();
//System.out.println("CommonsConfigurationTest::test() before 
config.load() LNE 35 config="+config);
//try
//{
//config.load("C:/TEMP/configuration.xml");
//}
//catch(Exception excp)
//{
//}

//try
   // {
//System.out.println("CommonsConfiguration::test() before 
document = config.getDocument()");
//document = config.getDocument();
//}
//catch(Exception excp)
//{
   // }
   if(document == null)
   {
System.out.println("CommonsConfigurationTest::test() LINE 88 
before fXmlFile = new java.io.File('C:/temp/configuration.xml'); ");
java.io.File fXmlFile = new 
java.io.File("C:/temp/configuration.xml");
System.out.println("CommonsConfigurationTest::test LINE 90 
fXmlFile = "+fXmlFile);
   javax.xml.parsers.DocumentBuilderFactory dbFactory = 
javax.xml.parsers.DocumentBuilderFactory.newInstance();
   System.out.println("CommonsConfigurationTest::test LINE 

RE: [daemon]

2014-07-17 Thread Martin Gainty
jsvc.exe -outfile stdout.out -errfile stderr.errcat stdout.out
cat stderr.err

report back the results
Martin

From: andrew.mar...@exactearth.com
To: user@commons.apache.org
Subject: [daemon]
Date: Thu, 17 Jul 2014 16:24:14 +










Hi,
 
I’m trying to run a java daemon using jsvc and the Daemon interface. The java 
project is a jar file which has a bunch of dependencies in a manifest file 
(including commons-daemon), and I add this jar file to the classpath when 
running jsvc.
 When I try to execute via jsvc however, I get this stacktrace in stderr:
 
java.lang.InstantiationException: com.mycomany.mypackage.MyClass
at java.lang.Class.newInstance(Class.java:359)
at 
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
17/07/2014 17:03:34 9904 jsvc.exec error: Cannot load daemon
17/07/2014 17:03:34 9903 jsvc.exec error: Service exit with a return value of 3
 
Where MyClass is the class that I pass into jsvc.
 
I have tried using the –verbose option to help diagnose the problem, and with 
that I can see in stdout that it loads all the dependencies from the manifest 
just fine, but no additional information is provided to help diagnose the 
problem.
 Is there a way to get more information about what causes this 
InstantationException?
 
Best,
Andrew











 
Andrew Martin


Software Engineering Co-op, Software Development | exactEarth Ltd.


 


60 Struck Ct. Cambridge, Ontario N1R 8L2


office. +1.519.622.4445 


email. andrew.mar...@exactearth.com



web. www.exactearth.com





 






This e-mail and any attachment is for authorized use by the intended 
recipient(s) only. It contains proprietary or confidential information and is 
not to be copied, disclosed to, retained or used by, any other party. If you 
are not
 an intended recipient then please promptly delete this e-mail, any attachment 
and all copies and inform the sender. Thank you.
  

RE: [daemon]

2014-07-17 Thread Martin Gainty
can you display PATH, CLASSPATH and JAVA_HOME please
assume:
PATH folder = folders for all executables?
CLASSPATH folders = contains all classes referenced by main java 
class..including local folder e.g. $CLASSPATH = .:$CLASSPATH ?
files that are read are in SAME directory where you executed jsvc.exe ?
JAVA_HOME is set to base folder of JAVA installation ?

what happens when you run the same class using java.exe mypackage.MyClass ?

Martin 
___


> From: andrew.mar...@exactearth.com
> To: user@commons.apache.org
> Subject: RE: [daemon]
> Date: Thu, 17 Jul 2014 16:42:51 +
> 
> The output is identical to what I sent in the last email:
> 
> java.lang.InstantiationException: mypackage.MyClass
> at java.lang.Class.newInstance(Class.java:359)
> at 
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> 17/07/2014 17:39:24 10600 jsvc.exec error: Cannot load daemon
> 17/07/2014 17:39:24 10599 jsvc.exec error: Service exit with a return value 
> of 3
> 
> This is from the error file. Nothing in the stdout file.
> 
> Andrew
> 
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com]
> Sent: July-17-14 12:37 PM
> To: Commons Users List
> Subject: RE: [daemon]
> 
> jsvc.exe -outfile stdout.out -errfile stderr.errcat stdout.out cat stderr.err
> 
> report back the results
> Martin
> 
> From: andrew.mar...@exactearth.com
> To: user@commons.apache.org
> Subject: [daemon]
> Date: Thu, 17 Jul 2014 16:24:14 +
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> I'm trying to run a java daemon using jsvc and the Daemon interface. The java 
> project is a jar file which has a bunch of dependencies in a manifest file 
> (including commons-daemon), and I add this jar file to the classpath when 
> running jsvc.
>  When I try to execute via jsvc however, I get this stacktrace in stderr:
> 
> java.lang.InstantiationException: com.mycomany.mypackage.MyClass
> at java.lang.Class.newInstance(Class.java:359)
> at 
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> 17/07/2014 17:03:34 9904 jsvc.exec error: Cannot load daemon
> 17/07/2014 17:03:34 9903 jsvc.exec error: Service exit with a return value of 
> 3
> 
> Where MyClass is the class that I pass into jsvc.
> 
> I have tried using the -verbose option to help diagnose the problem, and with 
> that I can see in stdout that it loads all the dependencies from the manifest 
> just fine, but no additional information is provided to help diagnose the 
> problem.
>  Is there a way to get more information about what causes this 
> InstantationException?
> 
> Best,
> Andrew
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Andrew Martin
> 
> 
> Software Engineering Co-op, Software Development | exactEarth Ltd.
> 
> 
> 
> 
> 
> 60 Struck Ct. Cambridge, Ontario N1R 8L2
> 
> 
> office. +1.519.622.4445
> 
> 
> email. andrew.mar...@exactearth.com
> 
> 
> 
> web. www.exactearth.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This e-mail and any attachment is for authorized use by the intended 
> recipient(s) only. It contains proprietary or confidential information and is 
> not to be copied, disclosed to, retained or used by, any other party. If you 
> are not  an intended recipient then please promptly delete this e-mail, any 
> attachment and all copies and inform the sender. Thank you.
> 
> 
> 
> Andrew Martin
> Software Engineering Co-op, Software Development | exactEarth Ltd.
> 60 Struck Ct. Cambridge, Ontario N1R 8L2
> office. +1.519.622.4445
> email. andrew.mar...@exactearth.com
> web. 
> 
> 
> This e-mail and any attachment is for authorized use by the intended 
> recipient(s) only. It contains proprietary or confidential information and is 
> not to be copied, disclosed to, retained or used by, any other party. If you 
> are not an intended recipient then please promptly delete this e-mail, any 
> attachment and all copies and inform the sender. Thank you.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [daemon]

2014-07-17 Thread Martin Gainty
i assume this is not a permissions issue

does your main class implement org.apache.commons.daemon.Daemon?

does your main class override init method?
@Override
public void init(DaemonContext dc) throws DaemonInitException, Exception 

does your main class override start method?
@Override
public void start() throws Exception 
does your classpath contain commons-daemon AND your jar e.g.
CLASSPATH="/usr/share/java/commons-daemon.jar":"/path/to/your.jar"

did you run jsvc.exe with -home parameter and -cp param e.g.

jsvc -home "$JAVA_HOME -cp $CLASSPATH mypackage.myClass ?

http://stackoverflow.com/questions/7687159/how-to-convert-a-java-program-to-daemon-with-jsvc

?
Martin 


> From: andrew.mar...@exactearth.com
> To: user@commons.apache.org
> Subject: RE: [daemon]
> Date: Thu, 17 Jul 2014 17:21:57 +
> 
> Hi Martin,
> 
> PATH= 
> /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/apache-maven-3.1.1/bin:/root/bin
> 
> I don't have JAVA_HOME set as an environment variable but I pass it into 
> jsvc:  /usr/lib/jvm/java-1.7.0
> 
> CLASSPATH: The  full pathname to my main jar. The manifest inside the jar has 
> the rest of the dependencies, including commons-daemon. I know this is fine, 
> because if I just run the jar using java -jar, it works. I also know that it 
> is being passed correctly to jsvc, because when I remove it I get a more 
> fundamental error.
> 
> Best,
> Andrew
> 
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com]
> Sent: July-17-14 1:03 PM
> To: Commons Users List
> Subject: RE: [daemon]
> 
> can you display PATH, CLASSPATH and JAVA_HOME please
> assume:
> PATH folder = folders for all executables?
> CLASSPATH folders = contains all classes referenced by main java 
> class..including local folder e.g. $CLASSPATH = .:$CLASSPATH ?
> files that are read are in SAME directory where you executed jsvc.exe ?
> JAVA_HOME is set to base folder of JAVA installation ?
> 
> what happens when you run the same class using java.exe mypackage.MyClass ?
> 
> Martin
> ___
> 
> 
> > From: andrew.mar...@exactearth.com
> > To: user@commons.apache.org
> > Subject: RE: [daemon]
> > Date: Thu, 17 Jul 2014 16:42:51 +
> >
> > The output is identical to what I sent in the last email:
> >
> > java.lang.InstantiationException: mypackage.MyClass
> > at java.lang.Class.newInstance(Class.java:359)
> > at 
> > org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> > 17/07/2014 17:39:24 10600 jsvc.exec error: Cannot load daemon
> > 17/07/2014 17:39:24 10599 jsvc.exec error: Service exit with a return value 
> > of 3
> >
> > This is from the error file. Nothing in the stdout file.
> >
> > Andrew
> >
> > -Original Message-
> > From: Martin Gainty [mailto:mgai...@hotmail.com]
> > Sent: July-17-14 12:37 PM
> > To: Commons Users List
> > Subject: RE: [daemon]
> >
> > jsvc.exe -outfile stdout.out -errfile stderr.errcat stdout.out cat 
> > stderr.err
> >
> > report back the results
> > Martin
> >
> > From: andrew.mar...@exactearth.com
> > To: user@commons.apache.org
> > Subject: [daemon]
> > Date: Thu, 17 Jul 2014 16:24:14 +
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > I'm trying to run a java daemon using jsvc and the Daemon interface. The 
> > java project is a jar file which has a bunch of dependencies in a manifest 
> > file (including commons-daemon), and I add this jar file to the classpath 
> > when running jsvc.
> >  When I try to execute via jsvc however, I get this stacktrace in stderr:
> >
> > java.lang.InstantiationException: com.mycomany.mypackage.MyClass
> > at java.lang.Class.newInstance(Class.java:359)
> > at 
> > org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:190)
> > 17/07/2014 17:03:34 9904 jsvc.exec error: Cannot load daemon
> > 17/07/2014 17:03:34 9903 jsvc.exec error: Service exit with a return value 
> > of 3
> >
> > Where MyClass is the class that I pass into jsvc.
> >
> > I have tried using the -verbose option to help diagnose the problem, and 
> > with that I can see in stdout that it loads all the dependencies from the 
> > manifest just fine, but no additional information is provided to help 
> > diagnose the problem.
> >  Is there a way to get more information about what causes this 
> > InstantationException?
> >
> > Bes

RE: [vfs] webdav access throws ClassCastException: ArrayList cannot be cast Node

2014-07-31 Thread Martin Gainty
org.w3c.dom.Node is at the heart of XML and is used by SAX,DOM and STAX
org.w3c.dom is currently not used by the Following implementations in 
commons-configurations:
properties
FileSystems such as VFS or Hadoop FS
DB 
unless of course we convert Properties/VFSFileEntitiesHadoop/DB to XML DOM Node 
which is not happening

to resolve these 2 distinct implementation paths i suggested a split in 
Functionality
one for XML (org.w3c.dom.Node)
and one for Properties/VFS/HDFS/DBEntities
So the solution seems to be a re-architecture...I have something running 
locally on my box which scans the file extension and then sets up the correct 
digesterRules and then sets up the XMLConfiguration for XML
but then uses PropertiesConfiguration for files which use a 
PropertyConfiguration for 
Properties, VFS, HadoopFS, DB

you can see clearly see this distinction in the rules initialisation within 
ConfigurationFactory.java
protected void initDigesterSectionRules(Digester digester, String matchString, 
boolean additional)

Martin


> Date: Thu, 31 Jul 2014 18:54:44 -0400
> Subject: Re: [vfs] webdav access throws ClassCastException: ArrayList cannot 
> be cast Node
> From: garydgreg...@gmail.com
> To: user@commons.apache.org
> 
> Is this in 2.0 or using the trunk version? If not trunk, can you check out
> trunk and test your scenario?
> 
> Gayr
> 
> 
> On Thu, Jul 31, 2014 at 4:43 PM, Jörg Wille  wrote:
> 
> > This is the first time I use VFS. But local and http file access works.
> > But using webdav (with *Alfresco* as server) does not work.
> > The Problem is similar to this one:
> >
> > http://mail-archives.apache.org/mod_mbox/commons-user/201109.mbox/%3C004001cc769b$ff3e6770$fdbb3650$@queres.com%3E
> >
> > *I am doing the following:*
> >
> > private static final String URL = "webdav://
> > admin:alfresco@192.168.66.124:8080/alfresco/webdav/firmware/";
> > DefaultFileSystemManager manager = new DefaultFileSystemManager();
> > manager.addProvider("file", new DefaultLocalFileProvider());
> > manager.addProvider("http", new HttpFileProvider());
> > manager.addProvider("webdav", new WebdavFileProvider());
> > manager.setCacheStrategy(CacheStrategy.ON_RESOLVE);
> > manager.setFilesCache(new SoftRefFilesCache());
> > manager.init();
> > final FileObject fileObject = manager.resolveFile(URL)
> > System.out.println("Name:" + fileObject.getName());
> > System.out.println("Attached:" + fileObject.isAttached());
> > try {
> > fileObject.isReadable();
> > } catch (Exception e) {
> > System.out.println("Message: " + e.getMessage() + "\nCause: " +
> > e.getCause()+ "\nStacktrace: " + getStackTrace(e));
> > }
> > try {
> > fileObject.getChildren();
> > } catch (Exception e) {
> > System.out.println("Message: " + e.getMessage() + "\nCause: " +
> > e.getCause()+ "\nStacktrace: " + getStackTrace(e));
> > }
> > try {
> > fileObject.isFolder();
> > } catch (Exception e) {
> > System.out.println("Message: " + e.getMessage() + "\nCause: " +
> > e.getCause()+ "\nStacktrace: " + getStackTrace(e));
> > }
> >
> > *Result:*
> >
> > Name:webdav://admin:alfresco@192.168.66.124:8080/alfresco/webdav/firmware/
> >
> > *Attached:false*
> >
> > Message: Could not determine if file "webdav://admin:***@
> > 192.168.66.124:8080/alfresco/webdav/firmware/" is readable.
> >
> > Cause: org.apache.commons.vfs2.FileSystemException: Could not determine the
> > type of file "webdav://admin:***@
> > 192.168.66.124:8080/alfresco/webdav/firmware/".
> >
> > Stacktrace: org.apache.commons.vfs2.FileSystemException: Could not
> > determine if file "webdav://admin:***@
> > 192.168.66.124:8080/alfresco/webdav/firmware/" is readable.
> >
> > …
> >
> > Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast
> > to org.w3c.dom.Node
> >
> > at
> >
> > org.apache.commons.vfs2.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:718)
> >
> > at
> >
> > org.apache.commons.vfs2.provider.webdav.WebdavFileObject.doGetType(WebdavFileObject.java:405)
> >
> > at
> >
> > org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1497)
> >
> > ... 57 more
> >
> >
> > Message: Could not list the contents of folder "webdav://admin:***@
> > 192.168.66.124:8080/alfresco/webdav/firmware/".
> >
> > Cause: java.lang.ClassCastException: java.util.ArrayList cannot be cast to
> > org.w3c.dom.Node
> >
> > Stacktrace: org.apache.commons.vfs2.FileSystemException: Could not list the
> > contents of folder "webdav://admin:***@
> > 192.168.66.124:8080/alfresco/webdav/firmware/".
> >
> > …
> >
> > Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast
> > to org.w3c.dom.Node
> >
> > at
> >
> > org.apache.commons.vfs2.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:718)
> >
> > at
> >
> > org.apache.commons.vfs2.provider.webdav.WebdavFileObject.doListChildrenResolved(WebdavFileObject.java:453)
> >
> > at
> >
> > org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFi

RE: [fileupload] - Question about uploading additional files other than the ones in the form?

2014-09-06 Thread Martin Gainty
Morning Konradthe uploader will need to have apriori knowledge  
of both:location of Main distro usually 'baseDir'
location of ancillary files..pics, classes, sources, html,css

This is the reason why you will never see an apache server provisioning 
individual files(except for SVN/GIT) source ctl

package ALL files(resource/source/classes/README/doc/etc) up into a jar and 
drop the jar into basedir and let your customers figure out how to 
untar/unzip/unjar the filehttp://maven.apache.org/plugins/maven-jar-plugin/
lets pickup this thread on us...@maven.apache.org
HTH
Martin-


> From: thekonradz...@hotmail.com
> To: user@commons.apache.org
> Subject: [fileupload] - Question about uploading additional files other than 
> the ones in the form?
> Date: Fri, 5 Sep 2014 20:05:03 -0400
> 
> Hello all,
> 
> I am basically uploading a file to my server, but within that file contains 
> path information to images that also need to be uploaded.  I am looking to 
> read the file mid stream and get the data for the images to upload.  It seems 
> I am able to do this, but if this is not possible will I be able save the 
> file, read it, and then be able to get these images?
> 
> I am curious about how I will go about grabbing the additional files?  I see 
> that streaming works with InputStream from JavaIO as well as something from 
> CommonsIO, so I figured I could configure something to work with the 
> fileupload stream.
> 
> I also thought that I could possibly try to create a form through my servlet 
> and pass the data through that, but I figured this would be the less 
> favorable approach.
> 
> If anyone has any advice or thoughts I would appreciate it... Thanks!
> 
> 
  

RE: [fileupload] - Question about uploading additional files other than the ones in the form?

2014-09-07 Thread Martin Gainty
with no details provided nobody could understand question your scenario you 
changed the question from how do I use fileupload  toHow do I use construct 
MIME multipart message containing non-ascii jpg/gif/etc files

In the case of MimeMultipart messages you should be following 
this:http://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMultipart.html
In an eventing system such as Apache HTTP Server Actions are the last step on a 
a form upload thereforeYOU CANNOT CHANGE the contents of a submitted form when 
the Apache HTTP Server has passed control via submit button to the predefined 
actionaction action="fup.cgi">
hiding the contents of action process function fup.cgi so that nobody can 
possibly understand what the process is doing was not the nicest thing to do..
In short ANY predefined action  can include additional files and 
thus will be able to repack the contents so that by the time you call 
fileupload  the 'package' will contain all the necessary files

If you are thinking of a servlet I would suggest using Tomcat but it seems you 
are using Apache and not sharing who is handling .cgi extensions from Apache 
httpd.conf 

Its been a long week for me and I can tell by your testiness its been a long 
week for youBe professional and you will get brief appropriate responses.
Provide no info and short testy insults to those who are trying to help you 
solve YOUR problem and your situation will be exacerbated
Your choice
Martin 
__ 

   


> From: thekonradz...@hotmail.com
> To: user@commons.apache.org
> Subject: RE: [fileupload] - Question about uploading additional files other 
> than the ones in the form?
> Date: Sat, 6 Sep 2014 15:29:12 -0400
> 
> I'm not sure you understood my question correctly, because I have no idea 
> what your answer is supposed to be.
> 
> Lets try this again.
> 
> I have an web app that uses Apache Commons FileUpload to upload files.  I am 
> using the streaming api to stream files up, and then save them to my server.  
> This has nothing to do with my war file, or application files, this has to do 
> with user submitted files that they themselves will be using on.
> 
> I haven't exactly done the saving, but I know I can save it to my own 
> filesystem, so I don't think there should be much of a problem saving it to 
> my server.
> 
> 
> What I am asking is this.
> 
> The FileUpload uses a multipart form which is how the data is sent.
> 
> 
> 
>   File to upload: 
>   Notes about the file: 
>   
>to upload the file!
> 
> With this I will select multiple files for upload.
> 
> The issue is, I am upload a file, that contains additional data for files to 
> be uploaded.  Lets call this file A.  File A has to be read in order to 
> upload additional files which are images.
> 
> So when we look at this.
> 
> // Check that we have a file upload request
> boolean isMultipart = ServletFileUpload.isMultipartContent(request);// Create 
> a new file upload handler
> ServletFileUpload upload = new ServletFileUpload();
> 
> // Parse the request
> FileItemIterator iter = upload.getItemIterator(request);
> while (iter.hasNext()) {
> FileItemStream item = iter.next();
> String name = item.getFieldName();
> InputStream stream = item.openStream();
> We see that the data for the file to be uploaded was sent over through a 
> request.
> 
> My question is basically I want to be able to add additional data to that 
> request, but I am not adding it myself.  Once I submit a file through the 
> form, I want to be able to submit more data, and how I do that is my 
> question.  I want to know what exactly is FileUpload doing to grab the images 
> and parse them into the Input Stream?  What exactly is the multipart/data 
> form doing to make this happened, that is what I'm really looking for.  I 
> will go look over the SRC, but I figured I would ask here.
> 
> 
> As I mentioned before I have a few options that I thought of.
> 
> 
> 1.  Red the data mid stream, and then upload the file(how do I upload)?
> 2.  Save the file then upload.
> 
> 
> A.  Use a Servlet to fake a form and pass the data to itself?
> 
> 
> So again, user selects file, I read file, then select other files from their 
> system that are needed for the first file, and upload them all up at the same 
> time.
> 
> Thanks!
> 
> > From: mgai...@hotmail.com
> > To: user@commons.apache.org
> > Subject: RE: [fileupload] - Question about uploading additional files other 
> > than the ones in the form?
> > Date: Sat, 6 Sep 2014 11:44:46 -0400
> > 
> > Morning Konradthe uploader will need to have apriori 
> > knowledge  of both:location of Main distro usually 'baseDir'
> > location of ancillary files..pics, classes, sources, html,css
> > 
> > This is the reason why you will never see an apache server provisioning 
> > individual files(except for SVN/GIT) source ctl
> > 
> > package

RE: [OT] - Can anyone add me to the Shiro mailing list?

2014-09-10 Thread Martin Gainty
Konrad-

start here
http://shiro.apache.org/mailing-lists.html

a few caveats ...before you send something out:
1)eliminate any proprietary info
2)be every so careful what you say as many people other than apache folk 
subscribe to this list
3)if you *think* you found a bug (anything which does not conform to published 
spec) file the bug here
https://issues.apache.org/jira/browse/SHIRO/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel

M-

> Date: Wed, 10 Sep 2014 18:00:45 +0100
> Subject: Re: [OT] - Can anyone add me to the Shiro mailing list?
> From: seb...@gmail.com
> To: user@commons.apache.org
> 
> On 9 September 2014 20:52, Konrad Zuse  wrote:
> > I'm sorry to bother the "Commons Users List" but is it possible for someone 
> > to add me to the Shiro Mailing list? I have been having issues getting the 
> > email confirmation to work, for some reason it worked for this one, which 
> > I'm glad; however after trying it again, Shiro is still not working for me 
> > it seems.  I tried all of the methods on the email, and even tried posting 
> > in the users forum, but nothing
> >
> > If someone could add me I would greatly appreciate it, thank you.
> 
> Only a moderator for the Shiro mailing list in question can do
> anything other than what you can do yourself.
> They are unlikely to be found here.
> 
> Are you sure that you are sending the mail to
> 
> user-subscr...@shiro.apache.org
> 
> And are you sure that you are sending plain text?
> And have you checked your SPAM folder for the confirmation request?
> And have you replied to the confirmation request?
> 
> You can also raise a bug request with Shiro.
> 
> >> Date: Mon, 8 Sep 2014 18:24:59 +0100
> >> From: ma...@apache.org
> >> To: user@commons.apache.org
> >> Subject: [OT] Re: [fileupload] - Question about uploading additional files 
> >> other than the ones in the form?
> >>
> >> On 08/09/2014 18:06, Dave Newton wrote:
> >> > On Sun, Sep 7, 2014 at 12:55 PM, Mark Thomas  wrote:
> >> >
> >> >> [...] banned from the Tomcat users mailing list [...]
> >> >
> >> >
> >> > Is there official Apache precedence for this? I tried that on the S2 list
> >> > and it didn't take.
> >>
> >> Technically, unsub them from user@ and sub them to user-deny@. If that
> >> doesn't work, contact infra.
> >>
> >> There isn't an official position on how to handle this sort of issue as
> >> far as I know. It is left to the community to decide.
> >>
> >> I've seen it happen a few times. In each case the banned person ignored
> >> repeated requests both privately and publicly to correct their
> >> behaviour, they were warned would would happen if they continued, they
> >> continued so the community banned them.
> >>
> >> In theory you could have a moderator get all dictatorial and start
> >> banning people for trivial stuff. In that case I'd expect the community
> >> to step in and deal with the moderator.
> >>
> >> Unless the community got very disfunctional, I don't see the board
> >> getting involved at all. I will say in all the cases I am aware of the
> >> project did include a note in their next board report as it was viewed
> >> as an unusual enough action to highlight to the board. The board
> >> response in all cases was "Fine. Carry on."
> >>
> >> If you have a determined troll then blocking them from the mailing list
> >> is unlikely to be effective. On the other hand, blocking an idiot takes
> >> less effort than creating a new e-mail account and subscribing to the
> >> mailing list so that is a game I'm happy to play if necessary.
> >>
> >> HTH,
> >>
> >> 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: Returning non-zero exit code in Windows

2014-09-25 Thread Martin Gainty


> From: srijithu...@india.com
> Date: Thu, 25 Sep 2014 19:27:33 +0530
> Subject: Returning non-zero exit code in Windows
> To: user@commons.apache.org
> 
> Hi All,
> 
>  I am making use of commons-daemon to get my java process started
> as a Windows Service. I am installing the service and launching it in jvm
> mode. I want to handle any error condition that occurs and I am returning a
> non-zero exit code, and I have set Recovery Options for my service. However
> I am not seeing the service being restarted. I have gone through
> http://comments.gmane.org/gmane.comp.jakarta.commons.issues/19191 and
> http://markmail.org/message/mkavfkirjqb37bqn and I see that this issue was
> fixed long back in 1.0.11.
> 
>  What I am doing is having an UncaughtExceptionHandler for my Java
> runtime and I am handling the same and doing a System.exit(-1). When I run
> my service prunsrv.exe separately from command prompt I am seeing that the
> exit code is -1, but somehow while running as a service, it is not working
> as expected.
> 
>  Can you let me know what I am doing wrong / if I have missed
> anything.
MG>open up DAEMON-306 bug at
MG>https://issues.apache.org/jira/browse/DAEMON-306
MG>and update the report with your bug..be prepared to supply complete 
environment 
MG>jvm version and location
MG>windows version
MG>sc status NameOfProcRunService
MG>as well as all applicable environment variables e.g
PATH
CLASSPATH
and these environment variables as well
set SERVICE_NAME=Daemon-Example

set PR_TEMP=C:/logs
set JAVA_EXECUTION_SERVICE_MODE=0

set INSTALL_FOLDER=C:\DEV\test\my-daemon-example\dist

set JAR_FILE=my-daemon-example-1.0-SNAPSHOT-jar-with-dependencies.jar

set PR_CLASS=com.antonio.castellon.App

set PR_INSTALL=C:\DEV\test\my-daemon-example\dist\prunsrv.exe 
MG>these issues are almost impossible to track down because there are multiple 
variables
MG>involving the JVM, procrun and host environment
MG>the more information you can provide on the application stack you are running
MG>the quicker you will get a solution
MG>Also please provide the source code you are running in the bug report
> 
> -- 
> Thanks & Regards,
> --
> A.Srijith.K.Unni
> Mail ID : srijith.u...@gmail.com
> Home Page : https://about.me/srijith
  

RE: [fileupload] multipart parsing failed: null?

2014-11-22 Thread Martin Gainty
Kristian/Thomas:
Would it help to take a look at the connection paramaters for ProxyPass?
max to throttle the max number of connections to backend?
ttl to throttle the time to live for inactive connections?
retry increase the amount of time for backend server people to reboot or fix 
the problem which is causing error state
E.g.
ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass
?
Martin

> Date: Fri, 21 Nov 2014 21:13:37 +0100
> From: kawazu...@gmail.com
> To: user@commons.apache.org
> Subject: Re: [fileupload] multipart parsing failed: null?
> 
> Hi Thomas;
> 
> thanks for your feedback.
> 
> > we have already received similar reports for previous versions of
> > fileupload, but failed to come up with a re-producible test case or to
> > track this problem down.
> >
> > Could you please create a new issue on our issue tracker and attach as
> > much information as possible?
> 
> Done so: https://issues.apache.org/jira/browse/FILEUPLOAD-262
> 
> I also have seen this issue before then and now but, right now, it seems 
> to manifest itself a bit more massive than before. Not sure why - or 
> which information to provide to allow for building a reliable test case 
> as I still fail to reproduce it too... :/
> 
> Best regards,
> Kristian
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [lang] SystemUtils and Cygwin

2015-01-01 Thread Martin Gainty



> Date: Thu, 1 Jan 2015 20:34:32 -0200
> From: cereda.pa...@gmail.com
> To: user@commons.apache.org
> Subject: [lang] SystemUtils and Cygwin
> 
> Dear friends,
> 
> I have to execute a certain system command according to the underlying 
> operating system; so far, SystemUtils works like a charm. But now I'm 
> facing a quite peculiar situation: I'd need to run a different code if 
> my Java application is being invoked from a Cygwin session.
> 
> I do not have a Windows machine (that's good!) so I cannot test how 
> things go (that's bad!). Do you guys know if it's possible to find out 
> if my code is running with Cygwin?
> 
> Any help is greatly appreciated. :)
MG>https://www.winehq.org/download/
MG>Ubuntu/RH/Debian/CentOS/Fedora/SUSE/Slackware/FreeBSD
> 
> All the best and a happy new year!
> 
> Paulo
MG>Buona Fortuna Paulo
MG>Martini
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [lang] SystemUtils and Cygwin

2015-01-02 Thread Martin Gainty




> Date: Fri, 2 Jan 2015 06:54:02 -0200
> From: cereda.pa...@gmail.com
> To: user@commons.apache.org
> Subject: Re: [lang] SystemUtils and Cygwin
> 
> Hello, Jörg!
> 
> Ah, thank you very much for the explanation. I now understand how a 
> process works under Cygwin (to be honest, I was suspecting it was just a 
> compatibility layer on top of a Windows runtime).
> 
> Now I'm almost a 100% sure the problem relies solely on my end. :) But 
> now I know how to solve it. :)
> 
> Cheers!
> 
> Paulo
> 
> On 01-01-2015 21:12, Jörg Schaible wrote:
> > Hi Paulo,
> >
> > Paulo Roberto Massa Cereda wrote:
> >
> >> Dear friends,
> >>
> >> I have to execute a certain system command according to the underlying
> >> operating system; so far, SystemUtils works like a charm. But now I'm
> >> facing a quite peculiar situation: I'd need to run a different code if
> >> my Java application is being invoked from a Cygwin session.
> >>
> >> I do not have a Windows machine (that's good!) so I cannot test how
> >> things go (that's bad!). Do you guys know if it's possible to find out
> >> if my code is running with Cygwin?
> >>
> >> Any help is greatly appreciated. :)
> >
> > What do you try to accomplish? Please understand, that all the Cygwin stuff
> > works only for applications compiled for Cygwin. Unless you don't have a JVM
> > compiled for the Cygwin core, every JVM is a native Windows application
> > which knowns nothing about Cygwin's Posix compatibility layer. Cygwin itself
> > forces therefore the launch of the Java runtime with an environment adjusted
> > for a pure Windows process.
MG>followup: wine *supposedly* intercepts all native calls to Windows and 
*routes* to the appropriate WINE library
MG>I used it once when a client wanted a Microsoft asmx script to run on IIS 
WebServer on a Ubuntu machine
MG>the problem as Jorg pointed out is that you will need to emulate all of the 
native calls for process management, MG>socket management,file management as 
Windows interfaces (as if you are running on a native windows box..)
MG>installed WINE Libraries will *supposedly* act as the shim layer between 
CYGWIN DLL and the actual native call MG>(POSIX) for all native calls 
(including JNI) routed to Windows DLLs ..here is a diagram:
MG> CYGWIN call to Windows CYGWIN DLL
MG> |
MG>V
MG>  WINE (Windows Emulation Libraries)
MG> |
MG>V
MG>  POSIX Library
MG>Please keep us apprised what your final solution is
> >
> >> All the best and a happy new year!
> >
> > Same to you.
> >
> > Cheers,
> > Jörg
> >
> >
> > -
> > 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: [configuration] Adding CData to xml property

2015-01-07 Thread Martin Gainty


> 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="\\

RE: [exec] Can't kill process?

2015-02-02 Thread Martin Gainty




> Date: Mon, 2 Feb 2015 10:45:44 +0100
> From: siegfried.goes...@it20one.com
> To: user@commons.apache.org
> Subject: Re: [exec] Can't kill process?
> 
> Mhmm - see 
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms686722(v=vs.85).aspx

MG>dont know if calling Paul Allen out of retirement to get this fixed would be 
an immediate solution
MG>Are you envisioning commons collection (possibly TreeList) which contains 
all process handles?
https://commons.apache.org/proper/commons-collections/javadocs/api-3.2.1/org/apache/commons/collections/list/TreeList.html

MG>walking thru parent and all Child handles to Call TerminateProcess with 
WaitForSingleObject on each handle?
https://msdn.microsoft.com/en-us/library/windows/desktop/ms687036%28v=vs.85%29.aspx
MG>Thoughts?
> 
> On 02.02.15 10:23, Peter Ashford wrote:
> > So is there no way to make something like this work?
> >
> > ps: 4770092 doesn't bring anything up in the Java bug database.  And that
> > killing-child-process anchor doesn't seem to exist either.
> >
> >
> >
> > On 2 February 2015 at 21:28, siegfried.goes...@it20one.com <
> > siegfried.goes...@it20one.com> wrote:
> >
> >> Hi Peter,
> >>
> >> I think you are starting two processes under Windows
> >>
> >> * one command line interpreter
> >> * the second one is the "hg log" command which is a child process of the
> >> command line interpreter
> >>
> >> When you kill the process the command line interpreter is killed but the
> >> second one (child process) is very likely still running since Windows has
> >> no real concept of a parent pid
> >>
> >> * http://commons.apache.org/proper/commons-exec/faq.html#
> >> killing-child-processes
> >> * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4770092
> >>
> >> Cheers,
> >>
> >> Siegfried Goeschl
> >>
> >>
> >>
> >> On 02.02.15 04:35, Peter Ashford wrote:
> >>
> >>> Hi there
> >>>
> >>> I'm trying to use ExecuteWatchDog.destroyProcess() to kill a running
> >>> process but it doesn't seem to work.  I've pasted a minimal test case
> >>> below
> >>> which shows what I'm trying to do: it creates a frame with a text area
> >>> which the process output is echoed to.  I've set it up so that ctrl + c
> >>> should kill the running process but it doesn't appear to work.
> >>>
> >>> This test case changes directory to y:\ (my mapped drive where my
> >>> mercurial
> >>> repository lives) and does a "hg log" which runs for a long time on my
> >>> machine, giving me time to kill the process).  If you wanted to run this
> >>> test, you'd have to choose a directory and long running process
> >>> appropriate
> >>> for your machine.
> >>>
> >>> I've confirmed that the break signal is being received - there's a write
> >>> to
> >>> std.err in the code that executes correctly.
> >>>
> >>> If anyone could help me with this, i'd really appreciate it!
> >>>
> >>> Cheers!
> >>>
> >>> Peter.
> >>>
> >>> 
> >>>
> >>> package jcon2;
> >>> import java.awt.Dimension;
> >>> import java.awt.event.KeyEvent;
> >>> import java.awt.event.KeyListener;
> >>> import java.io.BufferedOutputStream;
> >>> import java.io.File;
> >>> import java.io.IOException;
> >>> import java.io.OutputStream;
> >>> import javax.swing.JFrame;
> >>> import javax.swing.JScrollPane;
> >>> import javax.swing.JTextArea;
> >>> import javax.swing.ScrollPaneConstants;
> >>> import javax.swing.UIManager;
> >>> import javax.swing.text.Document;
> >>> import org.apache.commons.exec.*;
> >>>
> >>> public class Test implements KeyListener {
> >>>   JFrameframe;
> >>>   JTextArea text;
> >>>   Document  textDoc;
> >>>   boolean   breakFlag   = false;
> >>>   boolean   execProcessRunning;
> >>>   File  currentDir  = new File("y:\\");
> >>>   BufferedOutputStream execIn;
> >>>
> >>>   class JCStream extends OutputStream {
> >>>   public void write(int b) throws IOException {
> >>>   writeCon(new String(new byte[]{ (byte) b}));
> >>>   moveCaretToEnd();
> >>>   }
> >>>   }
> >>>
> >>>   public Test(){
> >>>   frame = new JFrame("JCon2");
> >>>   text  = new JTextArea();
> >>>   textDoc = text.getDocument();
> >>>   JScrollPane scroller = new JScrollPane(text);
> >>>
> >>> scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.
> >>> HORIZONTAL_SCROLLBAR_NEVER);
> >>>   frame.add(scroller);
> >>>   frame.setPreferredSize(new Dimension(600,800));
> >>>   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> >>>   text.addKeyListener(this);
> >>>   frame.pack();
> >>>   frame.setVisible(true);
> >>>   }
> >>>
> >>>
> >>>   /**
> >>>* Write to the console
> >>>* @param str The text to write
> >>>*/
> >>>   private void writeCon(String str){
> >>>   try {
> >>>   if(str != null && str.length()>0){
> >>>   textDoc.insertString(textDoc.getLength(), str, null);
> >>

RE: [dbcp] setting connection defaults

2015-09-06 Thread Martin Gainty
Container usually define attributes of DataSource it will support SO Tomcat 
will configure connection-pool thusly:
https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
HTH
Martin 
__ 

  


> Subject: Re: [dbcp] setting connection defaults
> To: user@commons.apache.org
> From: phil.ste...@gmail.com
> Date: Thu, 3 Sep 2015 18:57:27 -0700
> 
> On 9/3/15 12:26 PM, Pruitt, Byron S wrote:
> > What is the best to set properties like auto commit.  The DataSource 
> > interface doesn't expose anything.  The only thing I can find that supports 
> > these properties is BasicDataSource.
> 
> This depends on your application, but it's good to start with the
> defaults, which as of DBCP 2.x are the defaults set by the database
> driver.  You can change the default connection properties by
> specifying them in the BasicDataSource config or by setting them on
> the PoolableConnectionFactory if you are manually creating the
> PoolingDataSource.
> 
> Phil
> >
> > Thanks in advance.
> >
> >
> > Steve Pruitt
> >
> > -
> > 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: SCXML project

2016-01-24 Thread Martin Gainty
+1
Thanks Gary!
Martin Gainty 
__ 




> Date: Sat, 23 Jan 2016 14:07:08 -0800
> Subject: Re: SCXML project
> From: garydgreg...@gmail.com
> To: user@commons.apache.org
> 
> Guilherme,
> 
> I have not seen much activity. We are all volunteers here, if you want the
> project to move forward, feel free to talk on this list, create Jiras, and
> provide patches.
> 
> Gary
> On Jan 22, 2016 8:58 AM, "Guilherme Silveira" 
> wrote:
> 
> > Hi Folks
> >
> > I am new to FSM and new to SCXML.On the other hand, I am expert in
> > Simulink, expert in Java and expert in model based systems engineering.
> >
> > I am currently evaluating SCXML and I would like a*honest, non biased
> > opinion *on the status of SCXML project.
> >
> > What I would like to assert if this project has a future, the number of
> > developers, if the SCXML specification will ever reach a stable
> > statusand so on
> >
> > So far, I have noticed few integrations with proprietary softwares
> > Simulink Stateflow does not export to SCXML, neither does IBM Rhapsody.
> >
> > How difficult would it be to create custom tool for these integrations? And
> > most important, is it REALLY possible to implement in Java all the
> > functionalities of Simulink Stateflow, without any drawback, with a
> > friendly user experience and a steep learning curve?
> >
> > ps: I am not from telecom industry
> >
  

RE: SCXML project

2016-01-26 Thread Martin Gainty



mvn package doesnt package (testcase fails) currently  java.lang.NullPointerException: null at 
org.apache.commons.logging.impl.SLF4JLog.isDebugEnabled(SLF4JLog.java:49)at 
org.apache.commons.scxml2.env.SimpleContext.setLocal(SimpleContext.java:178) at 
org.apache.commons.scxml2.SCXMLExecutionContext.initializeIOProcessors(SCXMLExecutionContext.java:358)
   at 
org.apache.commons.scxml2.SCXMLExecutionContext.attachInstance(SCXMLExecutionContext.java:397)
   at 
org.apache.commons.scxml2.SCXMLExecutor.attachInstance(SCXMLExecutor.java:398)  
 at 
org.apache.commons.scxml2.SCXMLTestHelper.testInstanceSerializability(SCXMLTestHelper.java:258)
  at 
org.apache.commons.scxml2.SCXMLExecutorTest.testSCXMLExecutorTransitions02Sample(SCXMLExecutorTest.java:139)

correct this small bug lurking in 
org.apache.commons.scxml2.env.SimpleContext.java
   /** * Assigns a new value to an existing variable or creates a new one.  
   * The method allows to shaddow a variable of the same name up the * 
Context chain. * * @param name The variable name * @param value The 
variable value * @see org.apache.commons.scxml2.Context#setLocal(String, 
Object) * as someone forgot to initialize log toss a System.out.println 
*/public void setLocal(final String name, final Object value){
getVars().put(name, value);try{   if 
(log.isDebugEnabled())   {   
log.debug(name + " = " + String.valueOf(value));}   
}   catch(NullPointerException npe) {   
System.out.println("SimpleContext::setLocal log.isDebugEnabled() where 
log="+log+" name="+name+" throws NPE");  }}
*Obrigado Guilherme*
Martín

> Date: Mon, 25 Jan 2016 23:42:01 -0200
> Subject: Re: SCXML project
> From: guilhermecgss...@gmail.com
> To: user@commons.apache.org
> 
> Ok Folks,
> 
> 
> I will evaluate SCXML.
> 
> BTW, I found these paper and it sounds interesting:
> 
> http://cdn.intechopen.com/pdfs-wm/46457.pdf
> 
> It looks like it exports Stateflow to SCXML

MG>will Stateflow support Harel FSM?
MG>Please confirmMG>Obrigado!
> 
> On Sun, Jan 24, 2016 at 10:32 AM, Martin Gainty  wrote:
> 
> > +1
> > Thanks Gary!
> > Martin Gainty
> > __
> >
> >
> >
> >
> > > Date: Sat, 23 Jan 2016 14:07:08 -0800
> > > Subject: Re: SCXML project
> > > From: garydgreg...@gmail.com
> > > To: user@commons.apache.org
> > >
> > > Guilherme,
> > >
> > > I have not seen much activity. We are all volunteers here, if you want
> > the
> > > project to move forward, feel free to talk on this list, create Jiras,
> > and
> > > provide patches.
> > >
> > > Gary
> > > On Jan 22, 2016 8:58 AM, "Guilherme Silveira" <
> > guilhermecgss...@gmail.com>
> > > wrote:
> > >
> > > > Hi Folks
> > > >
> > > > I am new to FSM and new to SCXML.On the other hand, I am expert in
> > > > Simulink, expert in Java and expert in model based systems engineering.
> > > >
> > > > I am currently evaluating SCXML and I would like a*honest, non biased
> > > > opinion *on the status of SCXML project.
> > > >
> > > > What I would like to assert if this project has a future, the number of
> > > > developers, if the SCXML specification will ever reach a stable
> > > > statusand so on
> > > >
> > > > So far, I have noticed few integrations with proprietary softwares
> > > > Simulink Stateflow does not export to SCXML, neither does IBM Rhapsody.
> > > >
> > > > How difficult would it be to create custom tool for these
> > integrations? And
> > > > most important, is it REALLY possible to implement in Java all the
> > > > functionalities of Simulink Stateflow, without any drawback, with a
> > > > friendly user experience and a steep learning curve?
> > > >
> > > > ps: I am not from telecom industry
> > > >
> >
> >

  

RE: SCXML project

2016-01-28 Thread Martin Gainty
Hi Atecurrently testing what happens when log4j.properties or log4j.xml is 
missing (cured by inserting a working log4j.properties into scxml classpath)
I am currently experiencing this failure:
Javadoc failure with:

Caused by: org.apache.maven.plugin.MojoExecutionException: Error generating 
maven-javadoc-plugin:2.10.3:javadoc:Exit code: 1 - 
\scxml\src\main\java\org\apache\commons\scxml2\SCInstanceObjectInputStream.java:80:
 error: unexpected end tag:  * 
Here is the code:
 /** * Set custom class resolver callback, or null when no longer needed.   
  *  * Typically usage: *  * private void 
readObject(ObjectInputStream in) throws IOException,ClassNotFoundException {
 * ClassResolver currentClassResolver = null; * try { * 
if (in instanceof SCInstanceObjectInputStream) { * 
currentClassResolver = 
((SCInstanceObjectInputStream)in).setClassResolver(customClassResolver); *  
   } * ... // read Object(s) * } * finally {
 * if (in instanceof SCInstanceObjectInputStream) { * 
((SCInstanceObjectInputStream)in).setClassResolver(currentClassResolver); * 
} * } * } *  *  * @see 
org.apache.commons.scxml2.env.groovy.GroovyContext#readObject(ObjectInputStream)
 * @param classResolver custom class resolver */public 
ClassResolver setClassResolver(ClassResolver classResolver) {
ClassResolver old = this.classResolver;this.classResolver = 
classResolver;return old;}
fubars javadoc and fails the build..for now i can comment out the  and  
inside comments to bypass

Suggestions are welcomethanksMartin 
__ 




> Subject: Re: SCXML project
> To: user@commons.apache.org
> From: a...@douma.nu
> Date: Wed, 27 Jan 2016 22:10:50 +0100
> 
> On 2016-01-26 22:36, Martin Gainty wrote:
> >
> > mvn package doesnt package (testcase fails) currently
> >> classname="org.apache.commons.scxml2.SCXMLExecutorTest" time="0.03">
> >  
> >  java.lang.NullPointerException: null at
> >
> > org.apache.commons.logging.impl.SLF4JLog.isDebugEnabled(SLF4JLog.java:49) at
> >
> > org.apache.commons.scxml2.env.SimpleContext.setLocal(SimpleContext.java:178)
> >  at
> >
> > org.apache.commons.scxml2.SCXMLExecutionContext.initializeIOProcessors(SCXMLExecutionContext.java:358)
> >  at
> >
> > org.apache.commons.scxml2.SCXMLExecutionContext.attachInstance(SCXMLExecutionContext.java:397)
> >  at
> >
> > org.apache.commons.scxml2.SCXMLExecutor.attachInstance(SCXMLExecutor.java:398)
> >  at
> >
> > org.apache.commons.scxml2.SCXMLTestHelper.testInstanceSerializability(SCXMLTestHelper.java:258)
> >  at
> >
> > org.apache.commons.scxml2.SCXMLExecutorTest.testSCXMLExecutorTransitions02Sample(SCXMLExecutorTest.java:139)
> >
> > correct this small bug lurking in 
> > org.apache.commons.scxml2.env.SimpleContext.java
> >
> >   /**
> >   * Assigns a new value to an existing variable or creates a new one.
> >   * The method allows to shaddow a variable of the same name up the
> >   * Context chain.
> >   *
> >   * @param name The variable name
> >   * @param value The variable value
> >   * @see org.apache.commons.scxml2.Context#setLocal(String, Object)
> >   * as someone forgot to initialize log toss a System.out.println
> >   */
> >   public void setLocal(final String name, final Object value) {
> >   getVars().put(name, value);
> >   try {
> >   if (log.isDebugEnabled()) {
> >   log.debug(name + " = " + String.valueOf(value));
> >   }
> >   }
> >   catch(NullPointerException npe) {
> >   System.out.println("SimpleContext::setLocal log.isDebugEnabled() 
> > where log="+log+" name="+name+" throws NPE");
> >   }
> >   }
> >
> > *Obrigado Guilherme*
> > Martín
> 
> AFAICT the above NPE only can occur when configuring an invalid/wrong logging 
> class (like in the pom.xml for the maven-surefire-plugin) and/or through 
> explicitly set the the Log instance to null in SimpleContext.java.
> 
> When using a clean checkout/clone of the current SCXML git repository 
> (master) 
> this definitely is not the case, and mvn package works just fine.
> 
> So possibly you have local modifications, either to the pom.xml logging 
> configuration or otherwise causing this exception?
> 
> Rega

RE: SCXML project

2016-02-01 Thread Martin Gainty






> Subject: Re: SCXML project
> To: user@commons.apache.org
> From: a...@douma.nu
> Date: Mon, 1 Feb 2016 23:34:39 +0100
> 
> Hi Martin,
> 
> I've disabled JDK 8 javadoc doclint which should 'fix' your below problem.
> 
> BTW: can you please use properly wrapped/formatted plain text for your email?
> Like your previous message, content below is pretty much unreadable ...

MG>this is a freebie emailer I picked up in 96 whose primary format is HtmL and 
not plain text
MG>for paying work I use mgaint...@gmail.com (I also have mail username on my 
own site which supports plain text)
MG>Thanks Ate
> 
> Ate
> 
> On 2016-01-28 14:32, Martin Gainty wrote:
>> Hi Atecurrently testing what happens when log4j.properties or log4j.xml is 
>> missing (cured by inserting a working log4j.properties into scxml classpath)
>> I am currently experiencing this failure:
>> Javadoc failure with:
>>
>> Caused by: org.apache.maven.plugin.MojoExecutionException: Error generating 
>> maven-javadoc-plugin:2.10.3:javadoc:Exit code: 1 - 
>> \scxml\src\main\java\org\apache\commons\scxml2\SCInstanceObjectInputStream.java:80:
>>  error: unexpected end tag:  * 
>> Here is the code:
>> /** * Set custom class resolver callback, or null when no longer needed. *  
>> * Typically usage: *  * private void readObject(ObjectInputStream in) throws 
>> IOException,ClassNotFoundException { * ClassResolver currentClassResolver = 
>> null; * try { * if (in instanceof SCInstanceObjectInputStream) { * 
>> currentClassResolver = 
>> ((SCInstanceObjectInputStream)in).setClassResolver(customClassResolver); * } 
>> * ... // read Object(s) * } * finally { * if (in instanceof 
>> SCInstanceObjectInputStream) { * 
>> ((SCInstanceObjectInputStream)in).setClassResolver(currentClassResolver); * 
>> } * } * } *  * 
 * @see 
org.apache.commons.scxml2.env.groovy.GroovyContext#readObject(ObjectInputStream)
 * @param classResolver custom class resolver */ public ClassResolver 
setClassResolver(ClassResolver classResolver) {
> ClassResolver old = this.classResolver; this.classResolver = classResolver; 
> return old; }
>> fubars javadoc and fails the build..for now i can comment out the  and 
 inside comments to bypass
>>
>> Suggestions are welcomethanksMartin
>> ______
>>
>>
>>
>>> Subject: Re: SCXML project
>>> To: user@commons.apache.org
>>> From: a...@douma.nu
>>> Date: Wed, 27 Jan 2016 22:10:50 +0100
>>>
>>> On 2016-01-26 22:36, Martin Gainty wrote:
>>>>
>>>> mvn package doesnt package (testcase fails) currently
>>>> 
>>>> 
>>>> java.lang.NullPointerException: null at
>>>> org.apache.commons.logging.impl.SLF4JLog.isDebugEnabled(SLF4JLog.java:49) 
>>>> at
>>>> org.apache.commons.scxml2.env.SimpleContext.setLocal(SimpleContext.java:178)
>>>>  at
>>>> org.apache.commons.scxml2.SCXMLExecutionContext.initializeIOProcessors(SCXMLExecutionContext.java:358)
>>>>  at
>>>> org.apache.commons.scxml2.SCXMLExecutionContext.attachInstance(SCXMLExecutionContext.java:397)
>>>>  at
>>>> org.apache.commons.scxml2.SCXMLExecutor.attachInstance(SCXMLExecutor.java:398)
>>>>  at
>>>> org.apache.commons.scxml2.SCXMLTestHelper.testInstanceSerializability(SCXMLTestHelper.java:258)
>>>>  at
>>>> org.apache.commons.scxml2.SCXMLExecutorTest.testSCXMLExecutorTransitions02Sample(SCXMLExecutorTest.java:139)
>>>>
>>>> correct this small bug lurking in 
>>>> org.apache.commons.scxml2.env.SimpleContext.java
>>>>
>>>> /**
>>>> * Assigns a new value to an existing variable or creates a new one.
>>>> * The method allows to shaddow a variable of the same name up the
>>>> * Context chain.
>>>> *
>>>> * @param name The variable name
>>>> * @param value The variable value
>>>> * @see org.apache.commons.scxml2.Context#setLocal(String, Object)
>>>> * as someone forgot to initialize log toss a System.out.println
>>>> */
>>>> public void setLocal(final String name, final Object value) {
>>>> getVars().put(name, value);
>>>> try {
>>>> if (log.isDebugEnabled()) {
>>>> log.debug(name + " = " + String.valueOf(value));
>>>> }
>>>> }
>>>> catch(NullPointerException npe) {
>>>> System.out.println("SimpleContext::setLocal log.isDebugEnabled() where 
>>>> log="+log+" n

RE: [net] Getting MalformedServerReplyException in FTPClientExample Class

2016-04-01 Thread Martin Gainty
ALL of these files have Locale.ENGLISH hardcoded:
commons-net\src\main\java\org\apache\commons\net\ftp\FTPClient.javacommons-net\src\main\java\org\apache\commons\net\ftp\FTPClientConfig.javacommons-net\src\main\java\org\apache\commons\net\ftp\parser\DefaultFTPFileEntryParserFactory.javacommons-net\src\main\java\org\apache\commons\net\ftp\parser\MLSxEntryParser.javacommons-net\src\main\java\org\apache\commons\net\tftp\TFTPRequestPacket.javacommons-net\src\test\java\org\apache\commons\net\ftp\FTPClientConfigTest.javacommons-net\src\test\java\org\apache\commons\net\ftp\parser\FTPTimestampParserImplTest.java
Martín 
__ 
   


> Date: Sat, 2 Apr 2016 00:33:38 +0100
> Subject: Re: [net] Getting MalformedServerReplyException in FTPClientExample 
> Class
> From: seb...@gmail.com
> To: user@commons.apache.org
> 
> On 1 April 2016 at 23:17, Emerson Castañeda  wrote:
> > Hello
> >
> > I'm using FTPClientExample
> > class
> > with these parameters:
> 
> Which version?
> 
> >
> > java FTPClientExample -l -p SFTP 192.158.76.218:22 user pwd
> >
> >
> > I'm getting this exception:
> >
> > Could not connect to server.
> > org.apache.commons.net.MalformedServerReplyException: Could not parse
> > response code.
> > Server Reply: SSH-2.0-OpenSSH_5.3
> > at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:336)
> > at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:292)
> > at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:418)
> > at
> > org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:966)
> > at
> > org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:954)
> > at
> > org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:222)
> > at org.apache.commons.net.SocketClient.connect(SocketClient.java:189)
> > at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
> > at lib_ftputility.FTPClientExample.main(FTPClientExample.java:311)
> 
> There should be some more output before the exception.
> 
> >
> > Thanks in advance for your support
> >
> >
> > Emerson
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> For additional commands, e-mail: user-h...@commons.apache.org
> 
  

RE: [net] Getting MalformedServerReplyException in FTPClientExample Class

2016-04-01 Thread Martin Gainty
i tried to login to my FTP server with english username/password

english authenticates with username,password and ftp opens valid connection:
.\target\test-classes>java -classpath 
C:\Maven-plugin\commons-net\target\classes;.;%CLASSPATH% 
examples.ftp.FTPClientExample -l 12.123.12.12 n** **n
i tried to login to my FTP server with espanol Nombre de Usuario/Contrasuena:
espanol autenticación falta con 530:
.\target\test-classes>java -classpath 
C:\Maven-plugin\commons-net\target\classes;.;%CLASSPATH% 
examples.ftp.FTPClientExample -l 12.123.12.12 ñ** **ñ
?
Martín
__ 




> From: mgai...@hotmail.com
> To: user@commons.apache.org
> Subject: RE: [net] Getting MalformedServerReplyException in FTPClientExample 
> Class
> Date: Fri, 1 Apr 2016 19:51:38 -0400
> 
> ALL of these files have Locale.ENGLISH hardcoded:
> commons-net\src\main\java\org\apache\commons\net\ftp\FTPClient.javacommons-net\src\main\java\org\apache\commons\net\ftp\FTPClientConfig.javacommons-net\src\main\java\org\apache\commons\net\ftp\parser\DefaultFTPFileEntryParserFactory.javacommons-net\src\main\java\org\apache\commons\net\ftp\parser\MLSxEntryParser.javacommons-net\src\main\java\org\apache\commons\net\tftp\TFTPRequestPacket.javacommons-net\src\test\java\org\apache\commons\net\ftp\FTPClientConfigTest.javacommons-net\src\test\java\org\apache\commons\net\ftp\parser\FTPTimestampParserImplTest.java
> Martín 
> __ 
>
> 
> 
> > Date: Sat, 2 Apr 2016 00:33:38 +0100
> > Subject: Re: [net] Getting MalformedServerReplyException in 
> > FTPClientExample Class
> > From: seb...@gmail.com
> > To: user@commons.apache.org
> > 
> > On 1 April 2016 at 23:17, Emerson Castañeda  wrote:
> > > Hello
> > >
> > > I'm using FTPClientExample
> > > class
> > > with these parameters:
> > 
> > Which version?
> > 
> > >
> > > java FTPClientExample -l -p SFTP 192.158.76.218:22 user pwd
> > >
> > >
> > > I'm getting this exception:
> > >
> > > Could not connect to server.
> > > org.apache.commons.net.MalformedServerReplyException: Could not parse
> > > response code.
> > > Server Reply: SSH-2.0-OpenSSH_5.3
> > > at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:336)
> > > at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:292)
> > > at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:418)
> > > at
> > > org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:966)
> > > at
> > > org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:954)
> > > at
> > > org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:222)
> > > at org.apache.commons.net.SocketClient.connect(SocketClient.java:189)
> > > at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
> > > at lib_ftputility.FTPClientExample.main(FTPClientExample.java:311)
> > 
> > There should be some more output before the exception.
> > 
> > >
> > > Thanks in advance for your support
> > >
> > >
> > > Emerson
> > 
> > -
> > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
> > For additional commands, e-mail: user-h...@commons.apache.org
> > 
> 
  

RE: Last object in key path

2016-05-19 Thread Martin Gainty


   


> Date: Thu, 19 May 2016 10:51:24 -0700
> Subject: Last object in key path
> From: lon.varsc...@gmail.com
> To: user@commons.apache.org
> 
> Hey guys,
> 
> I’m trying to do something where right before setting a value, I want to
> lookup and call a validation routine.  I was looking for a method where I
> could get the target object for a given property, but I can’t seem to find
> one that’s exposed.
> 
> So for a key path of “key1.key2.key3” when setting a value, I’d like to try
> to lookup a method on the object represented by “key2” and call that first,
> and then conditionally call the set.  Any ideas?
MG>1)setup a Asynchronous Callback so when a known condition is met the 
Callback is invoked ...OR...
MG>2)implement An Eventing Framework like Felix for OSGI
> 
> Thanks,
> 
> Lon
  

RE: NPE in getRemoteAdress

2016-08-28 Thread Martin Gainty
where is connectionInfo initialised?

-M

> To: user@commons.apache.org
> From: oliver.zem...@gmail.com
> Subject: NPE in getRemoteAdress
> Date: Sun, 28 Aug 2016 15:50:36 +0200
> 
> Hi
> 
> i am trying to get some files from a FTP Server. When i use 
> retrieveFile(), it works, but i would like to add some listeners to it 
> (how many bytes got transfered etc.) so i used retrieveFileStream().
> Now i get some exceptions and no files are downloaded.
> 
> This is the part of the code:
> 
> @Override public void run() {
> 
>  try {
>  new File(destDir).mkdirs();
>  final File outFile =new File(destDir,ftpFile.getName());
>  final FileOutputStream fos =new FileOutputStream(outFile);
>  final InputStream inputStream =client.retrieveFileStream(sourceDir 
> +ftpFile.getName());
>  byte b[] =new byte[4096];//todo: would be nice to have such stuff in 
> the appl conf so users can 
> config it long bytesWritten =0;
>  while (inputStream.read(b) != -1) {
>  fos.write(b);
>  bytesWritten += b.length;
>  informDetailListeners(sourceDir +ftpFile.getName(), 
> bytesWritten);
>  bytesTransferedTotal += b.length;
>  informListeners(bytesTransferedTotal);
>  }
>  client.completePendingCommand();
>  informListenersWeFinishedOneFile(sourceDir +ftpFile.getName(), 
> bytesWritten);
>  fos.flush();
>  fos.close();
>  System.out.println(client.getReplyString());
>  }catch (Exception ex) {
>  System.out.println(client.getReplyString());
>  ex.printStackTrace();
>  }
> }
> 
> The NullpointerException occurs in retrieveFileStream() - when i step 
> into it i will get to FTPClient.java where it says:
> 
> final boolean isInet6Address =getRemoteAddress()instanceof Inet6Address;
> 
> getRemoteAddress() has this:return _socket_.getInetAddress();
> When i try to debug into this, it just jumps into my catch block with a 
> NullPointerException.
> When i add this method as watch, it says socket not connected - but it must 
> be connected ?!
> 
> The initialisation of the ftp Client is here:
> private void downloadTo(String destinationDir)throws IOException {
> 
>  //first, create the destination directory so we can write into that 
> final File file =new File(destinationDir +"/" +sfdlFile.getDescription());
>  file.mkdirs();
> 
>  //set up the connection and go to the directory we want final 
> ConnectionInfo connectionInfo =sfdlFile.getConnectionInfo();
>  final String sourceDir =sfdlFile.getRemoteSourceDir();
> 
>  final FTPClient client =new FTPClient();
> 
>  client.connect(connectionInfo.getHost(), connectionInfo.getPort());
>  System.out.println(client.getReplyString());
>  client.enterLocalPassiveMode();
>  System.out.println(client.getReplyString());
>  client.login(connectionInfo.getUsername(), connectionInfo.getPassword());
>  System.out.println(client.getReplyString());
>  client.setFileType(FTP.BINARY_FILE_TYPE);
>  System.out.println(client.getReplyString());
>  client.changeWorkingDirectory(sourceDir);
>  System.out.println(client.getReplyString());
> 
>  //now retrieve all files, recursive final ScheduledExecutorService 
> scheduledExecutorService = 
> Executors.newScheduledThreadPool(sfdlFile.getMaxThreads());
>  downloadDirectory(client, sourceDir, destinationDir +"/" 
> +sfdlFile.getDescription(), scheduledExecutorService);
> 
>  client.disconnect();
>  System.out.println(client.getReplyString());
>  //inform our downloader we finished }
> 
> The FTP Client is connected, the login worked, i get a lot of output from the 
> Server which seems to be fine.
> Can someone tell me whats wrong with that code? Is there something i did not 
> read in handling recursive downloads of (bigger) files ?
> 
> The output in my intellij:
> 220 >
> 
> 230 User logged in, proceed.
> 
> 200 Type set to I.
> 
> 250 Directory changed to /somedirectory
> 
> null
> null
> java.lang.NullPointerException
>   at 
> org.apache.commons.net.SocketClient.getRemoteAddress(SocketClient.java:672)
>   at 
> org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:819)
>   at 
> org.apache.commons.net.ftp.FTPClient._retrieveFileStream(FTPClient.java:1984)
>   at 
> org.apache.commons.net.ftp.FTPClient.retrieveFileStream(FTPClient.java:1971)
>   at 
> de.trustserv.jsfdl.app.sfdl.SFDLFileDownloader$DownloadRunnable.run(SFDLFileDownloader.java:145)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.

  1   2   >