You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Svyatoslav Shymkiv <ap...@mail.ru> on 2004/04/01 11:50:26 UTC

Re: Configuration TLSServerSocketFactory

Stephen McConnell wrote:
> Svyatoslav Shymkiv wrote:
> 
>> Hello.
>>
>> I have a problem configuring TLSServerSocketFactory in my Avalon 
>> application. When I try to configure it inside SocketManager block I 
>> get verification configuration error.
> 
> 
> A couple of questions:
> 
>   1. can you post the stack trace your getting?
>   2. have you tried to do this using merlin?
> 
> BTW your configuration looks ok to me.

1. Stack trace and phoenix.log:

Phoenix stack trace:
---------------BEGIN------------------
Running Phoenix:

Phoenix 4.1alpha

There was an uncaught exception:
---------------------------------------------------------
--- Message ---
Unable to validate configuration of component sockets of type 
org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Unable to 
validate configuration of component sockets of type 
org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:524) 
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:503) 
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:354) 
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:268)
at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:198)
at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:184)
at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:128)
at org.apache.avalon.phoenix.launcher.Main.main(Main.java:83)
-----------------END------------------

Phoenix.log:
---------------BEGIN------------------
..................................................................
INFO    2004-04-01 12:31:07.853 [Phoenix.] (): Verifying that the 
specified Blocks have valid types.
INFO    2004-04-01 12:31:07.886 [Phoenix.] (): Verifying that the 
specified BlockListeners have valid types.
WARN    2004-04-01 12:31:08.120 [Phoenix.] (): element "ssl-factory" was 
found where no element may occur at -1
WARN    2004-04-01 12:31:08.123 [Phoenix.] (): sockets failed validation 
due to: Unable to validate input according to schema
org.apache.avalon.framework.CascadingException: Unable to validate input 
according to schema at 
org.apache.avalon.phoenix.tools.configuration.ConfigurationBuilder.processValidationResults(ConfigurationBuilder.java:165)
at 
org.apache.avalon.phoenix.components.validator.DefaultConfigurationValidator.isValid(DefaultConfigurationValidator.java:133)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:512)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:503)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:354)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at 
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
rethrown from
org.realityforge.configkit.ValidateException: Unable to validate input 
according to schema
at 
org.realityforge.configkit.ConfigValidator.doValidate(ConfigValidator.java:296)
at 
org.realityforge.configkit.ConfigValidator.doValidate(ConfigValidator.java:249)
at 
org.realityforge.configkit.ConfigValidator.validate(ConfigValidator.java:234)
at 
org.apache.avalon.phoenix.components.validator.DefaultConfigurationValidator.isValid(DefaultConfigurationValidator.java:132)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:512)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.validateConfiguration(DefaultDeployer.java:503)
at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:354)
-----------------END------------------

2. I haven't tried it using merlin/maven because I don't quite 
anderstand how it works. But I tried to compile OpenIM and it works 
confusing me.

>> But when I try to configure it separately I get error about missing 
>> blockinfo. I tried to download new sources of Cornerstone componenes 
>> but I can't find blockinfo for TLSServerSocketFactory there. I think 
>> that writing blockinfo myself isn't right solution.
> 
> 
> You conclusion is correct.  The TLSServerSocketFactory is not a 
> component - this is handled by the DefaultSocketManager.
> 
> Stephen.

Svyatoslav Shymkiv


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Configuration TLSServerSocketFactory

Posted by Stephen McConnell <mc...@apache.org>.
Svyatoslav Shymkiv wrote:

> Stephen McConnell wrote:
> 
>> Svyatoslav Shymkiv wrote:
>>
>>> Hello.
>>>
>>> I have a problem configuring TLSServerSocketFactory in my Avalon 
>>> application. When I try to configure it inside SocketManager block I 
>>> get verification configuration error.
>>
>>
>>
>> A couple of questions:
>>
>>   1. can you post the stack trace your getting?
>>   2. have you tried to do this using merlin?
>>
>> BTW your configuration looks ok to me.
> 
> 
> 1. Stack trace and phoenix.log:

I just took a quick look at the DefaultSocketManager-schema.xml and it 
seems to me that it is saying that no child elements are allowed in the 
factory reference.  I.e. according to the schema the following is ok:

    <factory name="secure" 
class="org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory"/>

But content inside the factory is not.
So its seems to me that either (a) the schema needs to be updated, or 
(b) schema validation needs to be disabled.  I would suggest you disable 
schema validation as this will at least get you past this point. 
Unfortunately I don't know the details re. switching validation on/off - 
but it is there if I remember correctly.

> WARN    2004-04-01 12:31:08.120 [Phoenix.] (): element "ssl-factory" was 
> found where no element may occur at -1

> 
> 2. I haven't tried it using merlin/maven because I don't quite 
> anderstand how it works. But I tried to compile OpenIM and it works 
> confusing me.

Compared to Phoenix its drop dead simple. Take a look at the tutorial 
(which includes dozens of working examples). You don;t even have to 
update you component xinfo files - merlin recognizes and deals with 
these automatically.

http://avalon.apache.org/merlin/starting/tutorial/index.html

 From there - just create an xml file containing a root <container> 
(e.g. my-demo.block).  Add a <classloader> definition, and add the 
<component> elements you want using <component name="whatever" 
class="org.someplace.MyComponent"/>.

Then:

   $ merlin my-demo.block

If you need some help just post a note to the users list.

Cheers, Stephen.


-- 

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org