Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » javax.mail.Authenticator ClassNotFoundException for external smtp server(Environment is failing when trying to load javax.mail.Authenticator class for integrating with external smtp server)
javax.mail.Authenticator ClassNotFoundException for external smtp server [message #1461459] Tue, 04 November 2014 15:31 Go to next message
Shuchi Gupta is currently offline Shuchi GuptaFriend
Messages: 14
Registered: November 2014
Junior Member
Hi,

I am trying to configure a mail application in my process definition with an external SMTP server. I have added the following code:

web.xml
<resource-ref>
<description>Resource reference to a factory for javax.mail.Session ...</description>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>

context.xml
<Resource name="mail/Session"
type="javax.mail.Session"
auth="Container"
mail.smtp.host="smtp.sendgrid.net"
mail.transport.protocol="smtp"
mail.debug="true" />

After deploying the model, when I tried to load the Stardust portal, it gives me the following exception:

javax.faces.FacesException: Problem in renderResponse: /file:/Users/apple/services-ws/kontiki/services/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/VendorManagementPortal/WEB-INF/lib/ipp-views-common.jar!/META-INF/xhtml/login.xhtml @28,68 test="#{ippLoginDialog.pluginLoginStyleSheetPath !=null}" Error creating bean with name 'ippLoginDialog' defined in URL [jar:file:/Users/apple/services-ws/kontiki/services/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/VendorManagementPortal/WEB-INF/lib/ipp-views-common.jar!/META-INF/spring/ui-common-ipp-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/Authenticator
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:295)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:157)
at org.eclipse.stardust.ui.web.common.PortalD2DFaceletViewHandler.renderView(PortalD2DFaceletViewHandler.java:78)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:51)
at com.icesoft.faces.context.View$2$1.respond(View.java:86)
at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:242)
at com.icesoft.faces.context.View$2.serve(View.java:120)
at com.icesoft.faces.context.View.servePage(View.java:193)
at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:106)
at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:43)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:187)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:51)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:107)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:204)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.eclipse.stardust.ui.web.html5.EnhancedJarResourceFilter.doFilter(EnhancedJarResourceFilter.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.eclipse.stardust.ui.web.viewscommon.login.filter.LoginFilter.doFilter(LoginFilter.java:324)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
at org.eclipse.stardust.ui.web.plugin.support.PluginResourceRequestProcessor.handleRequest(PluginResourceRequestProcessor.java:107)
at org.eclipse.stardust.ui.web.plugin.support.PortalPluginContentFilter.doFilter(PortalPluginContentFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.facelets.tag.TagAttributeException: /file:/Users/apple/services-ws/kontiki/services/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/VendorManagementPortal/WEB-INF/lib/ipp-views-common.jar!/META-INF/xhtml/login.xhtml @28,68 test="#{ippLoginDialog.pluginLoginStyleSheetPath !=null}" Error creating bean with name 'ippLoginDialog' defined in URL [jar:file:/Users/apple/services-ws/kontiki/services/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/VendorManagementPortal/WEB-INF/lib/ipp-views-common.jar!/META-INF/spring/ui-common-ipp-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/Authenticator
at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
at com.sun.facelets.tag.TagAttribute.getBoolean(TagAttribute.java:79)
at com.sun.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:49)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109)
at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:273)
... 52 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ippLoginDialog' defined in URL [jar:file:/Users/apple/services-ws/kontiki/services/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/VendorManagementPortal/WEB-INF/lib/ipp-views-common.jar!/META-INF/spring/ui-common-ipp-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/mail/Authenticator
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:333)
at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
at org.springframework.web.context.request.SessionScope.get(SessionScope.java:92)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:329)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at org.springframework.web.jsf.DelegatingVariableResolver.resolveSpringBean(DelegatingVariableResolver.java:142)
at org.springframework.web.jsf.SpringBeanVariableResolver.resolveVariable(SpringBeanVariableResolver.java:46)
at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at com.sun.el.parser.AstValue.getValue(AstValue.java:85)
at com.sun.el.parser.AstNotEqual.getValue(AstNotEqual.java:20)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
... 68 more
Caused by: java.lang.NoClassDefFoundError: javax/mail/Authenticator
at org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessionFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)
at org.eclipse.stardust.common.log.LogUtils.listContext(LogUtils.java:111)
at org.eclipse.stardust.common.log.LogUtils.listContext(LogUtils.java:118)
at org.eclipse.stardust.common.config.ContextParameters.setContext(ContextParameters.java:155)
at org.eclipse.stardust.common.config.ContextParameters.setGlobalContext(ContextParameters.java:145)
at org.eclipse.stardust.common.config.ParametersFacade.setGlobalContext(ParametersFacade.java:122)
at org.eclipse.stardust.ui.web.admin.WorkflowFacade.<init>(WorkflowFacade.java:67)
at org.eclipse.stardust.ui.web.admin.AdminPortalSessionListener.intializeSession(AdminPortalSessionListener.java:33)
at org.eclipse.stardust.ui.web.viewscommon.beans.SessionContext.propagateNewSession(SessionContext.java:581)
at org.eclipse.stardust.ui.web.viewscommon.beans.SessionContext.initSession(SessionContext.java:443)
at org.eclipse.stardust.ui.web.viewscommon.beans.SessionContext.initSession(SessionContext.java:361)
at org.eclipse.stardust.ui.web.viewscommon.beans.SessionContext.initInternalSession(SessionContext.java:338)
at org.eclipse.stardust.ui.web.viewscommon.common.TechnicalUserUtils.login(TechnicalUserUtils.java:79)
at org.eclipse.stardust.ui.web.viewscommon.login.dialogs.LoginDialogBean.afterPropertiesSet(LoginDialogBean.java:138)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)
... 85 more
Caused by: java.lang.ClassNotFoundException: javax.mail.Authenticator
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 108 more

I have checked my classpath, mail.jar is present . Still I am getting a ClassNotFoundException.

Can anyone please help me?

Thanks,
Shuchi
Re: javax.mail.Authenticator ClassNotFoundException for external smtp server [message #1467816 is a reply to message #1461459] Mon, 10 November 2014 10:31 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Shuchi,
Can you please check you have added below mentioned two jars into WEB-INF/lib directory of your web-app, or you can add them into lib folder of your app server:
mail.jar
activation.jar

Thanks,
Rajkumar
Re: javax.mail.Authenticator ClassNotFoundException for external smtp server [message #1713607 is a reply to message #1467816] Thu, 05 November 2015 13:16 Go to previous messageGo to next message
Abhishek Jadhav is currently offline Abhishek JadhavFriend
Messages: 1
Registered: November 2015
Junior Member
Hi ,

i hv added both the jars but still getting same exception.. any suggestions?
Re: javax.mail.Authenticator ClassNotFoundException for external smtp server [message #1713695 is a reply to message #1713607] Fri, 06 November 2015 05:11 Go to previous message
Ashish Khole is currently offline Ashish KholeFriend
Messages: 28
Registered: April 2015
Junior Member
Hi Abhishek/Suchi,

Can you try adding the 2 jars(mail.jar and activation.jar) in container's (eg. tomcat) lib folder and try.

Thanks,
Ashish
Previous Topic:How to show data input in manual activity in the process history
Next Topic:How to change skin of Stardust mobile UI
Goto Forum:
  


Current Time: Tue Nov 20 11:38:38 GMT 2018

Powered by FUDForum. Page generated in 0.02421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top