[jboss-jira] [JBoss JIRA] (WFLY-3257) NPE in MailSessionService.getValue()

Paul Benedict (JIRA) issues at jboss.org
Mon Apr 14 15:38:34 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12961743#comment-12961743 ] 

Paul Benedict commented on WFLY-3257:
-------------------------------------

Yes, I got it at deploy time. I think you're right that the mail session failed to start but I can't find anything in the boot logs that would indicate that. However, I did some testing and found this error occurs when the server's network connection is down, but the error is still unintuitive/unhelpful to explain the dependent service failed. Instead of throwing a NPE, perhaps a check can be done and log the mail session failed to start?
                
> NPE in MailSessionService.getValue()
> ------------------------------------
>
>                 Key: WFLY-3257
>                 URL: https://issues.jboss.org/browse/WFLY-3257
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Mail
>    Affects Versions: 8.0.0.Final
>         Environment: Windows 8.1
>            Reporter: Paul Benedict
>            Assignee: Tomaz Cerar
>
> I am getting this error when injecting my mail session. I don't know what's causing it and the injection used to work.
> {code}
> Caused by: java.lang.RuntimeException: JBAS011875: Resource lookup for injection failed: java:/mail/LocalMailHost
> 	at org.jboss.as.naming.deployment.ContextNames$BindInfo$1$1.getReference(ContextNames.java:304) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:140) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	... 128 more
> Caused by: javax.naming.NamingException [Root exception is java.lang.NullPointerException]
> 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:142) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:81) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:202) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:188) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	at org.jboss.as.naming.deployment.ContextNames$BindInfo$1$1.getReference(ContextNames.java:302) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	... 129 more
> Caused by: java.lang.NullPointerException
> 	at org.jboss.as.mail.extension.MailSessionService.getValue(MailSessionService.java:72)
> 	at org.jboss.as.mail.extension.MailSessionManagedReferenceFactory.getReference(MailSessionManagedReferenceFactory.java:57)
> 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:140) [wildfly-naming-8.0.0.Final.jar:8.0.0.Final]
> 	... 134 more
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list