HTTP Status 500 - Internal Server Error
exception
javax.servlet.ServletException: java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
root cause
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.
Try to add the jar-library with the missing driver-class to the glassfish-runtime.
This is a duplicate to:
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Exception occurring. Why?
Related
I am using Java jre 1.8 on SUSE linux and i am getting exception on sun/security/tools/keytool/CertAndKeyGen class . I have build my code with JDK 1.8 with maven argument
<compilerArgument>-XDignore.symbol.file<compilerArgument>
for sun/security/tools/keytool/ on java 8 . Build was successful . After deploying it on jboss , i am getting the error with java.lang.NoClassDefFoundError . This is the complete stack trace :
JBWEB000309: type JBWEB000066: Exception report
JBWEB000068: message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: sun/security/tools/keytool/CertAndKeyGen
JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.
JBWEB000070: exception
java.lang.NoClassDefFoundError: sun/security/tools/keytool/CertAndKeyGen
com.sample.test.security.certificate.OracleJDKCertificateHelper.resetCertificate(OracleJDKCertificateHelper.java:68)
com.sample.test.service.singleton.CertificateService.resetCertificate(CertificateService.java:229)
com.sample.test.service.singleton.CertificateService.resetCertificate(CertificateService.java:219)
com.sample.test.service.singleton.LicenseService.postSaveOrUpdate(LicenseService.java:138)
com.sample.test.service.singleton.LicenseService.postSaveOrUpdate(LicenseService.java:54)
com.sample.test.service.singleton.SingletonServiceImpl.saveOrUpdate(SingletonServiceImpl.java:102)
com.sample.test.web.controllers.singleton.BaseSingletonController$2.doInSyncMode(BaseSingletonController.java:110)
com.sample.test.web.controllers.singleton.BaseSingletonController.doIfNotAsyncAction(BaseSingletonController.java:143)
com.sample.test.web.controllers.singleton.BaseSingletonController.processSubmit(BaseSingletonController.java:103)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
I have extracted rt.jar from SUSE Jre1.8 . I can see that rt.jar\sun\security\tools\keytool\CertAndKeyGen.class is existing in it . Then why i am getting java.lang.NoClassDefFoundError ?
Any help or suggestions ?
I am learning WebServices with JAX-B and Jasper. I can easily generate XML response, but I want to get JSON response, but I get error 500.
Here is exception:
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause
java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy [228]
Full server log: http://pastebin.com/Eq2KbyKJ
Okey, I tried with Tomcat, and it works, it seems that is Glassfish related problem, but I want to use Glassfish as server, since I use EJB in my projects.
It's a bug inside Eclipselink: https://bugs.eclipse.org/bugs/show_bug.cgi?id=463169 , try upgrading to the latest version?
So I got sort of strange situation. I have Spring webapp and in it I have JNDI datasource that I have defined in tomcat's server.xml to connect to mysql database
I have mysql-connector-java 5.1.2 in my Maven pom.
Application works when I start it from localhost, but when I deploy it to remote tomcat it is not getting the call to the database.
This Exception occurs :
Couldnt execute sql CALL shareholders_company_list(?)
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to create correct SQLException class instance, error class/codes may be incorrect. Reason:
** BEGIN NESTED EXCEPTION **
java.sql.SQLException
MESSAGE: Can't instantiate required class due to java.lang.ClassNotFoundException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
STACKTRACE:
java.sql.SQLException: Can't instantiate required class due to java.lang.ClassNotFoundException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException
Is there away to avoid this ClassNotFoundException, so that I can get full stack trace, since it seems that explicit error why this happens is in MySQLNonTransientConnectionException, and I can't seem to reach it.
import required version(if you don't have any preference go for latest) of mysql-connector-java-latestVersion.jar under tomcat\lib
My application is working with weblogic10.0 but in weblogic 12C it is showing following exception :
Servlet failed with an Exception
java.lang.UnsupportedOperationException
at javax.faces.context.ExternalContext.getRequestCharacterEncoding(ExternalContext.java:945)
at javax.faces.application.ViewHandler.initView(ViewHandler.java:477)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:115)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:25)
Truncated. see log file for complete stacktrace
can any one help me how to resolve it.
I am getting following error while starting my application:
SEVERE: Exception starting filter CSRF
java.lang.ClassNotFoundException: org.apache.catalina.filters.CsrfPreventionFilter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
Tried to find jar for org.apache.catalina.filters.CsrfPreventionFilter on findjar.com but could not find anything.
You should check your tomcat installation, since this is a tomcat class.
http://tomcat.apache.org/tomcat-6.0-doc/config/filter.html#CSRF_Prevention_Filter