Re: [configuration] recursive inclusion of xml files with fileNames tag

2012-04-20 Thread Oliver Zemann
Hi Oliver ;)
Thanks for your help.

I tried it with the following code/config:

public static void main(String[] args) {
CombinedConfiguration conf = null;
try {
DefaultConfigurationBuilder builder = new
DefaultConfigurationBuilder(new File(conf/conf.xml));

conf = builder.getConfiguration(true);
} catch (Exception ex) {
ex.printStackTrace();
}
IteratorString keys = conf.getKeys();
}

conf.xml:
?xml version=1.0 encoding=UTF-8?
configuration

configuration fileName=conf1.xml /
configuration fileName=conf2.xml /
configuration fileName=conf3.xml /

/configuration

conf1.xml:
?xml version=1.0 encoding=UTF-8?
conf1
nameconf1/name
xml fileName=conf1extend.xml /
/conf1

conf1extend.xml:
?xml version=1.0 encoding=UTF-8?
ext
nameextended/name
/ext

but i get:
Caused by: org.apache.commons.configuration.ConfigurationRuntimeException:
No ConfigurationProvider registered for tag name
at 
org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:1293)
at 
org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:336)
... 14 more

Its a simple string so i am sure this should work out of the box,
shouldnt it? I did not find any parameter like datatype which i
could pass to the config element.

Thanks for your help.

Oli

Am 19. April 2012 22:09 schrieb Oliver Heger oliver.he...@oliver-heger.de:
 Hi Oliver,

 Am 19.04.2012 16:05, schrieb Oliver Zemann:

 Hi,

 just a short question:
 is it possible to include recursive all xml files that are referenced
 by any already included xml?
 eg.:

 root.xml:
 ?xml version=1.0 encoding=UTF-8?
 additional
         xml fileName=other.xml config-name=another/
 /additional

 other.xml:
 ?xml version=1.0 encoding=UTF-8?
  xml fileName=other1.xml config-name=another1/
 xml fileName=other2.xml config-name=another2/
 ...

 ?

 I tried it but they are simply ignored. Only the first recursion level
 (other.xml) is handled, all elements in other1.xml other2.xml ... are
 ignored.
 Can i somewhere put a recursive flag to the configuration?
 Thanks.


 IIUC, the configuration element is the one you are looking for. You can
 use it in a configuration definition file processed by
 DefaultConfigurationBuilder to include another definition file. This works
 recursively.

 So rather than using xml tags to include files, make use of
 configuration elements. More details can be found in the user's guide [1].

 Oliver

 [1]
 http://commons.apache.org/configuration/userguide/howto_configurationbuilder.html#Configuration_definition_file_reference


 -
 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



[daemon] Problems installing starting a service with procrun

2012-04-20 Thread P.N.


Hello!

Getting different problems using commons-daemon/procrun.exe:
- Sometimes cannot start the service, probably depends on
  what I'm changing which way (using batch files or the
  management console etc.), also seems to be dependend on
  what I'm doing first. As a result of this, wrapper looks
  instable. Probably I'll investigate it further, if I'll
  have some more time.
- When I've got the service running (not stable, though),
  I've also got a command box shown, which I'd like to
  disappear.
- stdout/stderr had not been logged.

This is my command:
C:\MyServiceDircommons-daemon\prunsrv.exe //IS//ServiceID 
--DisplayName=Name of Service --Description=Service description 
--Install=C:\MyServiceDir\commons-daemon\prunsrv.exe 
--Classpath=C:\MyServiceDir\lib\xalan.jar;C:\MyServiceDir\lib\activation.jar;MyServer.jar 
--DependsOn=RpcSs ++DependsOn=Nla ++DependsOn=BITS 
--Jvm=C:\jdk1.6.0\jre\bin\server\jvm.dll --JvmMx=512 
--JvmOptions=-Dsome_option=value --StartPath=C:\MyServiceDir 
--Startup=auto --StartParams=-para1:val1;-para2:val2 
++StartParams=-test:some path --ServiceUser=.\MyAdmin 
--ServicePassword=MyPassword

--StartMode=jvm --StartClass=my.class.for.Service --StartMethod=start
--StopMode=jvm --StopClass=my.class.for.Service --StopMethod=stop 
--StdOutput=auto --StdError=auto --LogPath=C:\MyServiceDir\log 
--LogLevel=Debug --LogJniMessages=1 --Type=interactive --PidFile=pid


What am I doing wrong?

Kind regards
Peter


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



Re: [daemon] Problems installing starting a service with procrun

2012-04-20 Thread P.N.

P.N. schrieb:


Hello!

...

This is my command:
C:\MyServiceDircommons-daemon\prunsrv.exe //IS//ServiceID
--DisplayName=Name of Service --Description=Service description
--Install=C:\MyServiceDir\commons-daemon\prunsrv.exe
--Classpath=C:\MyServiceDir\lib\xalan.jar;C:\MyServiceDir\lib\activation.jar;MyServer.jar
--DependsOn=RpcSs ++DependsOn=Nla ++DependsOn=BITS
--Jvm=C:\jdk1.6.0\jre\bin\server\jvm.dll --JvmMx=512
--JvmOptions=-Dsome_option=value --StartPath=C:\MyServiceDir
--Startup=auto --StartParams=-para1:val1;-para2:val2
++StartParams=-test:some path --ServiceUser=.\MyAdmin
--ServicePassword=MyPassword
--StartMode=jvm --StartClass=my.class.for.Service --StartMethod=start
--StopMode=jvm --StopClass=my.class.for.Service --StopMethod=stop
--StdOutput=auto --StdError=auto --LogPath=C:\MyServiceDir\log
--LogLevel=Debug --LogJniMessages=1 --Type=interactive --PidFile=pid

What am I doing wrong?



Just noticed, stability problems resulted from networking problems, sorry.

So these problems are left:
1. Console window - why is it there and how to hide it?
2. After adding --ServiceUser and --ServicePassword, the
   description is no more added to the windows service
3. Service login is not registered correctly
   (Without the auth parameters, --Type is ignored,
with auth parameters login is LOCALSERVICE/interactive)

BTW, running WinXP.

Kind regards
Peter




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



[daemon] Problems installing starting a service with procrun

2012-04-20 Thread Peter Nabbefeld


Hello!

Getting different problems using commons-daemon/procrun.exe:
- Sometimes cannot start the service, probably depends on
  what I'm changing which way (using batch files or the
  management console etc.), also seems to be dependend on
  what I'm doing first. As a result of this, wrapper looks
  instable. Probably I'll investigate it further, if I'll
  have some more time.
- When I've got the service running (not stable, though),
  I've also got a command box shown, which I'd like to
  disappear.
- stdout/stderr had not been logged.

This is my command:
C:\MyServiceDircommons-daemon\prunsrv.exe //IS//ServiceID 
--DisplayName=Name of Service --Description=Service description 
--Install=C:\MyServiceDir\commons-daemon\prunsrv.exe 
--Classpath=C:\MyServiceDir\lib\xalan.jar;C:\MyServiceDir\lib\activation.jar;MyServer.jar 
--DependsOn=RpcSs ++DependsOn=Nla ++DependsOn=BITS 
--Jvm=C:\jdk1.6.0\jre\bin\server\jvm.dll --JvmMx=512 
--JvmOptions=-Dsome_option=value --StartPath=C:\MyServiceDir 
--Startup=auto --StartParams=-para1:val1;-para2:val2 
++StartParams=-test:some path --ServiceUser=.\MyAdmin 
--ServicePassword=MyPassword

--StartMode=jvm --StartClass=my.class.for.Service --StartMethod=start
--StopMode=jvm --StopClass=my.class.for.Service --StopMethod=stop 
--StdOutput=auto --StdError=auto --LogPath=C:\MyServiceDir\log 
--LogLevel=Debug --LogJniMessages=1 --Type=interactive --PidFile=pid


What am I doing wrong?

Kind regards
Peter

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



Re: [math] UnivariateRealSolver in math3

2012-04-20 Thread Luc Maisonobe
Le 19/04/2012 18:43, Bernard GODARD a écrit :
 Well, let's say you have a framework which requires solving
 an equation deep down, and you want to pass a solver from the
 outside. I admit this is exotic, and in all of the examples I've
 seen the usage of a solver in such a framework was ultimately part
 of a function evaluation, an should probably be encapsulated as
 such.
 
 This is exactly my problem. I have a module that computes a satellite
 orbit. The most useful method returns the satellite state at the
 desired time. To do so, it has to solve an equation deep down. The
 solver is passed to the constructor during initialization and can also
 be changed using setter/getter.

I understand your point, but in this case the solvers should either have
the same API or if you want to support both solvers that use only
function values and solvers that also use the derivative, you can use
two constructors, two setters and two fields for storing the solvers.
Only one of the fields would be non-null at any time.

 I could of course have a unique solver that is transparent to the user
 of my module (except for accuracy tuning that could be passed to the
 constructor) but then the user does not get as much freedom.

I would suggest something along this line, and especially using the Nth
order bracketing solver with a setting for 5th order. It does not need
derivatives, it is as fast (or faster) than Newton (higher order) and
provides the very interesting bracket selection feature at convergence.

best regards,
Luc

 
   Bernard
 
 -
 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] Problems installing starting a service with procrun

2012-04-20 Thread sebb
On 20 April 2012 14:11, P.N. peter.nabbef...@gmx.de wrote:
 P.N. schrieb:


 Hello!

 ...


 This is my command:
 C:\MyServiceDircommons-daemon\prunsrv.exe //IS//ServiceID
 --DisplayName=Name of Service --Description=Service description
 --Install=C:\MyServiceDir\commons-daemon\prunsrv.exe

 --Classpath=C:\MyServiceDir\lib\xalan.jar;C:\MyServiceDir\lib\activation.jar;MyServer.jar
 --DependsOn=RpcSs ++DependsOn=Nla ++DependsOn=BITS
 --Jvm=C:\jdk1.6.0\jre\bin\server\jvm.dll --JvmMx=512
 --JvmOptions=-Dsome_option=value --StartPath=C:\MyServiceDir
 --Startup=auto --StartParams=-para1:val1;-para2:val2
 ++StartParams=-test:some path --ServiceUser=.\MyAdmin
 --ServicePassword=MyPassword
 --StartMode=jvm --StartClass=my.class.for.Service --StartMethod=start
 --StopMode=jvm --StopClass=my.class.for.Service --StopMethod=stop
 --StdOutput=auto --StdError=auto --LogPath=C:\MyServiceDir\log
 --LogLevel=Debug --LogJniMessages=1 --Type=interactive --PidFile=pid

 What am I doing wrong?


 Just noticed, stability problems resulted from networking problems, sorry.

 So these problems are left:
 1. Console window - why is it there and how to hide it?
 2. After adding --ServiceUser and --ServicePassword, the
   description is no more added to the windows service
 3. Service login is not registered correctly
   (Without the auth parameters, --Type is ignored,
    with auth parameters login is LOCALSERVICE/interactive)

 BTW, running WinXP.

What version of DAEMON are you using?

I can see you are using Java 1.6, but which build?

Why are you using --Type=interactive?

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



[sanselan] Source Repository not found

2012-04-20 Thread Thad Humphries
Where can I check out the Sanselan source? The site instructions are not
working for me:

$ svn checkout 
http://svn.apache.org/repos/asf/commons/proper/sanselan/trunkcommons-sanselan
svn: URL 'http://svn.apache.org/repos/asf/commons/proper/sanselan/trunk'
doesn't exist


I'm interested in making a simple addition for a project I'm working on.
Down the road, I'd like to contribute, especially to the TIFF area.

-- 
Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be --Christopher
Marlowe, *Doctor Faustus* (v, 121-24)


Re: [sanselan] Source Repository not found

2012-04-20 Thread sebb
On 20 April 2012 16:33, Thad Humphries thad.humphr...@gmail.com wrote:
 Where can I check out the Sanselan source? The site instructions are not
 working for me:

 $ svn checkout 
 http://svn.apache.org/repos/asf/commons/proper/sanselan/trunkcommons-sanselan
 svn: URL 'http://svn.apache.org/repos/asf/commons/proper/sanselan/trunk'
 doesn't exist

The project is in the process of being renamed; try the following instead:

$ svn checkout http://svn.apache.org/repos/asf/commons/proper/imaging/trunk


 I'm interested in making a simple addition for a project I'm working on.
 Down the road, I'd like to contribute, especially to the TIFF area.

 --
 Hell hath no limits, nor is circumscrib'd In one self-place; but where we
 are is hell, And where hell is, there must we ever be --Christopher
 Marlowe, *Doctor Faustus* (v, 121-24)

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



Re: [configuration] recursive inclusion of xml files with fileNames tag

2012-04-20 Thread Oliver Heger

Hi Oliver,

Am 20.04.2012 08:59, schrieb Oliver Zemann:

Hi Oliver ;)
Thanks for your help.

I tried it with the following code/config:

public static void main(String[] args) {
 CombinedConfiguration conf = null;
 try {
 DefaultConfigurationBuilder builder = new
DefaultConfigurationBuilder(new File(conf/conf.xml));

 conf = builder.getConfiguration(true);
 } catch (Exception ex) {
 ex.printStackTrace();
 }
 IteratorString  keys = conf.getKeys();
 }

conf.xml:
?xml version=1.0 encoding=UTF-8?
configuration

 configuration fileName=conf1.xml /
 configuration fileName=conf2.xml /
 configuration fileName=conf3.xml /

/configuration

conf1.xml:
?xml version=1.0 encoding=UTF-8?
conf1
 nameconf1/name
 xml fileName=conf1extend.xml /
/conf1

conf1extend.xml:
?xml version=1.0 encoding=UTF-8?
ext
 nameextended/name
/ext

but i get:
Caused by: org.apache.commons.configuration.ConfigurationRuntimeException:
No ConfigurationProvider registered for tag name
at 
org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:1293)
at 
org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:336)
... 14 more

Its a simple string so i am sure this should work out of the box,
shouldnt it? I did not find any parameter like datatype which i
could pass to the config element.


The problem is the name element. The XML file included by the 
configuration element can only contain elements declaring other 
configuration sources like xml or properties. (It must conform to 
the same format as supported by DefaultConfigurationBuilder.) If you 
want to give the included configuration a name, use this syntax:


configuration
  xml fileName=conf1extend.xml config-name=conf1 /
/configuration

Oliver



Thanks for your help.

Oli

Am 19. April 2012 22:09 schrieb Oliver Hegeroliver.he...@oliver-heger.de:

Hi Oliver,

Am 19.04.2012 16:05, schrieb Oliver Zemann:


Hi,

just a short question:
is it possible to include recursive all xml files that are referenced
by any already included xml?
eg.:

root.xml:
?xml version=1.0 encoding=UTF-8?
additional
 xml fileName=other.xml config-name=another/
/additional

other.xml:
?xml version=1.0 encoding=UTF-8?
  xml fileName=other1.xml config-name=another1/
xml fileName=other2.xml config-name=another2/
...

?

I tried it but they are simply ignored. Only the first recursion level
(other.xml) is handled, all elements in other1.xml other2.xml ... are
ignored.
Can i somewhere put a recursive flag to the configuration?
Thanks.



IIUC, theconfiguration  element is the one you are looking for. You can
use it in a configuration definition file processed by
DefaultConfigurationBuilder to include another definition file. This works
recursively.

So rather than usingxml  tags to include files, make use of
configuration  elements. More details can be found in the user's guide [1].

Oliver

[1]
http://commons.apache.org/configuration/userguide/howto_configurationbuilder.html#Configuration_definition_file_reference



-
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: Procrun fails to stop service

2012-04-20 Thread James Wang
Konstantin:
Thanks for your response.
I am running procrun 1.0.7.  32 bit.
This happened in our customer's server. I have not been able to replicate it in 
our own server environment. As soon as I do it, I will send you the details.
I have not seen any long strings or paths in the configuration or installation. 
But I will keep this in mind as I continue to investigate.
Thanks again!


 James Wang

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Thursday, April 19, 2012 5:19 PM
To: Commons Users List
Subject: Re: Procrun fails to stop service

2012/4/19 James Wang james.w...@infor.com

 I wonder anybody else has experienced the problem with procrun failing to 
 stop a service. The error from the log says:



 Failed to stop 'service name' service

 The data area passed to a system call is too small.



 The service is running on Windows 2008 R2 64 bit. It is obviously a resource 
 allocation matter, but is it possible that procrun is the cause?

 Any suggestion will be greatly appreciated.


1. What version of procrun?
2. The message likely comes from GetLastError() call, i.e. from the OS.  I'd 
help if you enable debug logging to get more details (the log level is 
configurable in prunmgr dialog).
3. Do you have unusually long strings or paths somewhere in your configuration?

Best regards,
Konstantin Kolinko

-
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