You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Malcolm Kendall (JIRA)" <ji...@apache.org> on 2012/05/09 11:40:06 UTC
[jira] [Created] (JSPWIKI-728) JNDI mail context lookup fails with
JBoss 5.1
Malcolm Kendall created JSPWIKI-728:
---------------------------------------
Summary: JNDI mail context lookup fails with JBoss 5.1
Key: JSPWIKI-728
URL: https://issues.apache.org/jira/browse/JSPWIKI-728
Project: JSPWiki
Issue Type: Bug
Components: Servlet Container/Java compatibility
Affects Versions: 2.8.4
Environment: All
Reporter: Malcolm Kendall
Use of "java:comp/env" does not work with JBoss JNDI.
Modify MailUtil.getJNDIMailSession() to
Context initCtx = new InitialContext();
if (jndiName.startsWith( "java:" ))
{
session = (Session) initCtx.lookup( jndiName );
}
else
{
Context ctx = (Context) initCtx.lookup( JAVA_COMP_ENV );
session = (Session) ctx.lookup( jndiName );
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (JSPWIKI-728) JNDI mail context lookup fails with
JBoss 5.1
Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JSPWIKI-728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harry Metske closed JSPWIKI-728.
--------------------------------
Resolution: Invalid
Assignee: Harry Metske
> JNDI mail context lookup fails with JBoss 5.1
> ---------------------------------------------
>
> Key: JSPWIKI-728
> URL: https://issues.apache.org/jira/browse/JSPWIKI-728
> Project: JSPWiki
> Issue Type: Bug
> Components: Servlet Container/Java compatibility
> Affects Versions: 2.8.4
> Environment: All
> Reporter: Malcolm Kendall
> Assignee: Harry Metske
> Priority: Minor
>
> Use of "java:comp/env" does not work with JBoss JNDI.
> Modify MailUtil.getJNDIMailSession() to
> Context initCtx = new InitialContext();
> if (jndiName.startsWith( "java:" ))
> {
> session = (Session) initCtx.lookup( jndiName );
> }
> else
> {
> Context ctx = (Context) initCtx.lookup( JAVA_COMP_ENV );
> session = (Session) ctx.lookup( jndiName );
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (JSPWIKI-728) JNDI mail context lookup fails with
JBoss 5.1
Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JSPWIKI-728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Harry Metske updated JSPWIKI-728:
---------------------------------
Priority: Minor (was: Major)
Mslcolm,
can you provide more specifics on why/how JBoss is failing here ?
Did you use a proper deployment descriptor to map the component name the the jndi name ?
For example (web.xml) something like:
{noformat}
<resource-ref>
<res-ref-name>mail/MyMailSession</res-ref-name>
<res-type>javax.mail.Session</res-type>
</resource-ref>
{noformat}
regards,
Harry
> JNDI mail context lookup fails with JBoss 5.1
> ---------------------------------------------
>
> Key: JSPWIKI-728
> URL: https://issues.apache.org/jira/browse/JSPWIKI-728
> Project: JSPWiki
> Issue Type: Bug
> Components: Servlet Container/Java compatibility
> Affects Versions: 2.8.4
> Environment: All
> Reporter: Malcolm Kendall
> Priority: Minor
>
> Use of "java:comp/env" does not work with JBoss JNDI.
> Modify MailUtil.getJNDIMailSession() to
> Context initCtx = new InitialContext();
> if (jndiName.startsWith( "java:" ))
> {
> session = (Session) initCtx.lookup( jndiName );
> }
> else
> {
> Context ctx = (Context) initCtx.lookup( JAVA_COMP_ENV );
> session = (Session) ctx.lookup( jndiName );
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (JSPWIKI-728) JNDI mail context lookup fails
with JBoss 5.1
Posted by "Malcolm Kendall (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JSPWIKI-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273060#comment-13273060 ]
Malcolm Kendall commented on JSPWIKI-728:
-----------------------------------------
Hi Harry,
Yes you are correct, I did not use any deployment descriptor in web.xml.
It was just an installation out of the box.
Please close this then as resolved.
tbh. first time I have heard of the <resource-ref> element.
> JNDI mail context lookup fails with JBoss 5.1
> ---------------------------------------------
>
> Key: JSPWIKI-728
> URL: https://issues.apache.org/jira/browse/JSPWIKI-728
> Project: JSPWiki
> Issue Type: Bug
> Components: Servlet Container/Java compatibility
> Affects Versions: 2.8.4
> Environment: All
> Reporter: Malcolm Kendall
> Priority: Minor
>
> Use of "java:comp/env" does not work with JBoss JNDI.
> Modify MailUtil.getJNDIMailSession() to
> Context initCtx = new InitialContext();
> if (jndiName.startsWith( "java:" ))
> {
> session = (Session) initCtx.lookup( jndiName );
> }
> else
> {
> Context ctx = (Context) initCtx.lookup( JAVA_COMP_ENV );
> session = (Session) ctx.lookup( jndiName );
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira