You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Maarten Bosteels (JIRA)" <ji...@apache.org> on 2008/01/10 22:37:34 UTC
[jira] Created: (DIRMINA-510) Spring version of chat example breaks
Spring version of chat example breaks
-------------------------------------
Key: DIRMINA-510
URL: https://issues.apache.org/jira/browse/DIRMINA-510
Project: MINA
Issue Type: Bug
Components: Example
Affects Versions: 2.0.0-M1
Reporter: Maarten Bosteels
Assignee: Maarten Bosteels
Priority: Trivial
org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
...
see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DIRMINA-510) Spring version of chat example breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Bosteels closed DIRMINA-510.
------------------------------------
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Bosteels resolved DIRMINA-510.
--------------------------------------
Resolution: Fixed
fixed serverContext.xml and added a junit test to avoid regressions
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on DIRMINA-510 started by Maarten Bosteels.
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557985#action_12557985 ]
Maarten Bosteels commented on DIRMINA-510:
------------------------------------------
> Question is will Spring create a nice URL for you in your example and use the current ResourceLoader to resolve the URL?
Spring was able to resolve the "classpath:/serverContext.xml" so I guess it's using the current ResourceLoader
(and converting the string value to a URL using an implicitly available ResourceEditor)
It took me a while to find out all the changes I had to make to serverContext.xml and I wondered: is it really that important to get rid of the Spring dependency ?
IMO the KeyStoreFactoryBean with an org.springframework.core.io.Resource property was more convenient than what we have now.
At least for Spring users.
http://mina.apache.org/report/1.1/apidocs/org/apache/mina/integration/spring/ssl/KeyStoreFactoryBean.html
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557950#action_12557950 ]
Maarten Bosteels commented on DIRMINA-510:
------------------------------------------
Suppose you have this bean definition:
<bean id="keyStoreFactory" class="o.a.m.filter.ssl.KeyStoreFactory">
<property name="data" value="classpath:/serverContext.xml"/>
</bean>
Problem is that KeyStoreFactory has several overloaded setData() methods and it's unpredictable which one Spring is gonna call.
I suggest to rename the overloaded setData methods to setDataUrl(), setDataFile(), and setDataInputStream()
Not sure if the last one needs to be public ?
Objections anyone ?
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRMINA-510) Spring version of chat example breaks
Posted by "Maarten Bosteels (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Bosteels updated DIRMINA-510:
-------------------------------------
Fix Version/s: 2.0.0-M1
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557966#action_12557966 ]
Niklas Therning commented on DIRMINA-510:
-----------------------------------------
I have no objections to rename the methods.
The important thing is that KeyStoreFactory will play nicely with Spring's Resources. Before when we had KeyStoreFactoryBean I think you would pass a Resource object which meant that you could e.g. load stuff from your webapp's context and use context relative URL in a web environment. That's very convenient but I'm not sure that we would get that same support now when KeyStoreFactory cannot depend on Spring anymore.
Question is will Spring create a nice URL for you in your example and use the current ResourceLoader to resolve the URL?
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (DIRMINA-510) Spring version of chat
example breaks
Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557990#action_12557990 ]
niklas@trillian.se edited comment on DIRMINA-510 at 1/11/08 6:11 AM:
------------------------------------------------------------------
Actually, I would agree. I think the ssl FactoryBeans were quite handy and what we have now in filter.ssl isn't as convenient. I wouldn't mind it if the ssl FactoryBeans were resurrected.
was (Author: niklas@trillian.se):
Actually, I would agree. I think the ssl FactoryBeans were quite handy and what we have now in filter.ssl isn't as convenient. I would mind it if the ssl FactoryBeans were resurrected.
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557924#action_12557924 ]
Niklas Therning commented on DIRMINA-510:
-----------------------------------------
<QUOTE>
Has anybody noticed that the Spring version of chat example breaks? The
trouble maker is
mina-examples/src/main/resources/org/apache/mina/example/chat/serverContext.xml,
in which there is still classes already removed from trunk long ago, such
as:
- org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean
- org.apache.mina.integration.spring.ssl.BogusTrustManagerFactory
- org.apache.mina.integration.spring.ssl.SslContextFactoryBean
- org.apache.mina.integration.spring.DefaultIoFilterChainBuilderFactoryBean
</QUOTE>
The three first missing classes now live in org.apache.mina.filter.ssl. The last one should be replaced with org.apache.mina.common.DefaultIoFilterChainBuilder directly because it now has the setFilters() method.
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRMINA-510) Spring version of chat example
breaks
Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRMINA-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557990#action_12557990 ]
Niklas Therning commented on DIRMINA-510:
-----------------------------------------
Actually, I would agree. I think the ssl FactoryBeans were quite handy and what we have now in filter.ssl isn't as convenient. I would mind it if the ssl FactoryBeans were resurrected.
> Spring version of chat example breaks
> -------------------------------------
>
> Key: DIRMINA-510
> URL: https://issues.apache.org/jira/browse/DIRMINA-510
> Project: MINA
> Issue Type: Bug
> Components: Example
> Affects Versions: 2.0.0-M1
> Reporter: Maarten Bosteels
> Assignee: Maarten Bosteels
> Priority: Trivial
> Fix For: 2.0.0-M1
>
>
> org.apache.mina.example.chat.SpringMain because of ClassNotFoundException
> Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.mina.integration.spring.ssl.KeyStoreFactoryBean] for bean with name 'keyStore' defined in class path resource [org/apache/mina/example/chat/serverContext.xml]; nested exception is java.lang.ClassNotFoundException
> ...
> see http://www.nabble.com/Spring-related-mina-example-code-breaks-to14735748s16868.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.