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.
精彩评论