开发者

Getting java.lang.NoClassDefFoundError: javax/net/SocketFactory while sending email using mail.jar

开发者 https://www.devze.com 2023-02-23 08:54 出处:网络
My jsf web application using mail.jar and activation.jar to send email both of these and other dependent jars are in CLASSPATH, (the application is running in tomcat)

My jsf web application using mail.jar and activation.jar to send email both of these and other dependent jars are in CLASSPATH, (the application is running in tomcat) But I get following Exception

java.lang.NoClassDefFoundError: javax/net/SocketFactory
    java.lang.ClassLoader.findBootstrapClass(Native Method)
    java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:892)
    java.lang.ClassLoader.loadClass(ClassLoader.java:302)
    java.lang.ClassLoader.loadClass(ClassLoader.java:300)
    sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    java.lang.ClassLoader.loadClass(ClassLoader.java:252开发者_如何学Python)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)
    com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
    javax.mail.Service.connect(Service.java:317)
    javax.mail.Service.connect(Service.java:176)
    javax.mail.Service.connect(Service.java:125)

I added required jsse.jar (which is the Java`s standard jar) to my application libs as well, but still the issue persists. I doubt now that the jsse.jar in jre is corrupt which is causing this issue. I am using jre 1.6.0_13.

Can someone help me solving this error?


That class in particular is a standard class provided by the JVM. Check that the JVM installation isn't corrupted, missing files, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消