Could not initialize class

Eclipse报错:Errors occurred during the build.
Errors running builder 'Faceted Project Validation Builder' on project 'lzfjr-site'.
Could not initialize class org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants

求各位大神,帮忙解决啊

2个回答

试试切换workspace,再不行,就更新eclipse(Help - check for updates)

找不到实体类 看看是不是hibernate 配置文件写错了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java.lang.NoClassDefFoundError: Could not initialize class
java.lang.Exception: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)rn at com.tesco.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:45)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rnrn ……rnrn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at com.tesco.interceptor.SessionValidateInterceptor.intercept(SessionValidateInterceptor.java:59)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)rn at com.tesco.filter.Log4jNdcFilter.doFilter(Log4jNdcFilter.java:41)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(Unknown Source)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)rn Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.tesco.action.ServiceLocator at com.tesco.action.BaseAction.getBean(BaseAction.java:48)rn at com.tesco.action.RegisterAction.regist(RegisterAction.java:136)rn ... 121 more
Could not initialize class com.demo.hibernate.util.HibernateSessionFactory
请教这个错误是怎么回事?rnjava.lang.NoClassDefFoundError: Could not initialize class com.demo.hibernate.util.HibernateSessionFactoryrnrnrnHibernateSessionFactory.java代码:rnpackage com.demo.hibernate.util;rnimport org.hibernate.HibernateException;rnimport org.hibernate.Session;rnimport org.hibernate.cfg.*;rnrnpublic class HibernateSessionFactory rnrn private static String CONFIG_FILE_LOCATION="/hibernate.cfg.xml";rn private static final ThreadLocal threadLocal= new ThreadLocal();rn private static final Configuration cfg = new Configuration();rn private static org.hibernate.SessionFactory sessionFactory;rn rn public static Session currentSession() throws HibernateExceptionrn Session session=(Session)threadLocal.get();rn if(session == null)rn if(sessionFactory == null)rn tryrn cfg.configure(CONFIG_FILE_LOCATION);rn sessionFactory=cfg.buildSessionFactory();rn rn catch(Exception e)rn System.out.println("%%%% Error Creating SessionFactory %%%%");rn e.printStackTrace();rn rn rn session=sessionFactory.openSession();rn threadLocal.set(session);rn rn return session;rn rn rn public static void closeSession() throws HibernateExceptionrn Session session=(Session)threadLocal.get();rn threadLocal.set(null);rn if(session != null)rn session.close();rn rn rnrn
Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
NULL 博文链接:https://smartgwt.iteye.com/blog/1252268
Nutch Could not initialize class
description The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: Could not initialize class org.apache.jsp.search_jsprn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: Could not initialize class org.apache.jsp.search_jsprn sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn java.lang.reflect.Constructor.newInstance(Unknown Source)rn java.lang.Class.newInstance0(Unknown Source)rn java.lang.Class.newInstance(Unknown Source)rn org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:142)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.rnrn今天刚接触JAVA 是开源Nutch 网页可以抓取可以了 就是不能搜索 搜索就提示以上信息
Could not initialize class com.sun.javafx.iio.jpeg.JPEGImageLoader
Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: Could not initialize class com.sun.javafx.iio.jpeg.JPEGImageLoader怎么解决这个问题
Could not initialize class com.stuman.dao.hibernate.HibernateUtil
type Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: Servlet execution threw an exceptionrn com.stuman.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:89)rnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: Could not initialize class com.stuman.dao.hibernate.HibernateUtilrn com.stuman.web.struts.action.LoginAction.execute(LoginAction.java:49)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn com.stuman.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:89)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.rnrn
Could not initialize class org.apache.jasper.el.ELContextImpl
HTTP Status 500 - java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImplrnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImplrnrndescription The server encountered an internal error that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImplrn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: Could not initialize class org.apache.jasper.el.ELContextImplrn org.apache.jasper.compiler.Validator$ValidateVisitor.prepareExpression(Validator.java:1568)rn org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:747)rn org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:954)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)rn org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)rn org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)rn org.apache.jasper.compiler.Node$Root.accept(Node.java:475)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)rn org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/7.0.39 logs.rnrn怎么解决?
java.lang.NoClassDefFoundError: Could not initialize class jihe.Test3
public class index extends Action rn rn rn public ActionForward execute(ActionMapping mapping, ActionForm form,rn HttpServletRequest request, HttpServletResponse response) throws Exception rn rn Test3 t=new Test3();rn rn List m= t.findAllUser();rn rn request.setAttribute("sutao", m);rn rn rn //request.removeAttribute(mapping.getAttribute());rn rn return mapping.findForward("ss");rn rnrn就是这个ACTION不知道有没有错?
java.lang.NoClassDefFoundError: Could not initialize class com.jacob.com.ComThre
本地main测试所有方法都正常,各种转换都可以.rn放tomcat里面跑起来后,一切正常.rn进行word转换时候,出现如下报错rnjdk是1.7的.rnjar包是1.18版本的,jdk/bin先考过dll了rnsystem32里面也考了.rnjava.lang.NoClassDefFoundError: Could not initialize class com.jacob.com.ComThread
java.lang.NoClassDefFoundError: Could not initialize class cn.elvis.utils.JdbcUt
写的jdbc工具类,前期写了测试正确,但发布到tomcat中就报这样的错误。rnjavax.servlet.ServletException: Servlet execution threw an exceptionrnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: Could not initialize class cn.elvis.utils.JdbcUtilsrn cn.elvis.dao.impl.UserDaoImpl.find(UserDaoImpl.java:180)rn cn.elvis.service.impl.BusinessServiceImpl.register(BusinessServiceImpl.java:15)rn cn.elvis.web.controller.RegisterServlet.doGet(RegisterServlet.java:40)rn cn.elvis.web.controller.RegisterServlet.doPost(RegisterServlet.java:77)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:641)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rnrn下面是我的工具类代码rn[code=Java]rnpublic final class JdbcUtils rnrn private static String driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";rn private static String url="jdbc:sqlserver://localhost:1433;DatabaseName=JspWebDb";rn private static String user="sa";rn private static String psw="12345";rn rn private JdbcUtils()rn rn private static JdbcUtils instanse=new JdbcUtils();rn rn public static JdbcUtils getInstanse()rn rn return instanse;rn rn rn staticrn tryrn Class.forName(driver);rn rn catch(ClassNotFoundException e)rn rn throw new ExceptionInInitializerError(e);rn rn rn rn rn public static Connection getConnection() throws SQLExceptionrn rn return DriverManager.getConnection(url,user,psw);rn rn rn rn public static void free(ResultSet rs,Statement st,Connection conn)rn rn if(rs!=null)rn try rn rs.close();rn catch (SQLException e) rn e.printStackTrace();rn rn finallyrn rn if(st!=null)rn try rn st.close();rn catch (SQLException e) rn rn e.printStackTrace();rn rn finallyrn rn if(conn!=null)rn try rn conn.close();rn catch (SQLException e) rn rn e.printStackTrace();rn rn rn rn rn rn rn rn rnrnrnrn[/code]
老问题Could not initialize class
引用一个包(我把包放到JRE/LIB/EXT里面,)rnJAVA编译运行都能通过,用SERVLET或JAVABEAN在JSP页面调用的时候总是找不到类rn
java.lang.NoClassDefFoundError: Could not initialize class SQLite.JDBC2x.Databas
rnjava.lang.NoClassDefFoundError: Could not initialize class SQLite.JDBC2x.DatabaseXrnrn这个异常是怎么回事?该如何解决呢?rnrn在线,急等。。。。。。。。。。。。
请教javax.servlet.ServletException: Could not initialize class
在测试SERVLET的时候出现上面的错误,网上看到说是CLASSPATH的问题,我把那个包放到jre/lib/ext文件中,还在CLASSPATH里添加了这个包,还是出现错误,请教!
java.lang.NoClassDefFoundError: Could not initialize class com.library.hibernate
exceptionrnrnjava.lang.reflect.InvocationTargetExceptionrn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
Linux+Weblogic生成二维码Could not initialize class sun.awt.X11GraphicsEnvironment
linux系统下rnweblogic中间件rn通过Action类生成二维码报错,请问如何解决?求高手指教,扣扣475901214,邮箱alan_ren@126.comrn错误代码如下:rn <[ServletContext@109737226[app:wwba module:wwba path: spec-version:null]] Root cause of ServletException.rnjava.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn Truncated. see log file for complete stacktracernCaused By: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironmentrn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:169)rn at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)rn at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)rn at tax.zkfp.zgsq.action.ZgsqAction.getEwm(ZgsqAction.java:164)rn Truncated. see log file for complete stacktracern>rn
hibernate不能初始化(java.lang.NoClassDefFoundError: Could not initialize class )
最近从书上找了一个android工程,在调试服务端的时候出了点问题,会出现一个500错误,不知道是hibernate没配好呢还是mysql设置的有问题。rn关于操作:工程导入之后在myeclipse安装了tomcat插件点start之后就直接把工程给发布了,然后输入了一个客户端的请求url测试了一下,结果就500了。麻烦大家帮忙看一下吧。rnHTTP Status 500 -rnrntype Exception reportrnrnmessagernrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexceptionrnrnjava.lang.reflect.InvocationTargetExceptionrn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)rn org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rnroot causernrnjava.lang.NoClassDefFoundError: Could not initialize class com.aw.dao.HibernateUtilrn com.aw.dao.GoodsDAO.getGoodsByHql(GoodsDAO.java:25)rn com.aw.biz.GoodsBIZ.getGoodsPopList(GoodsBIZ.java:12)rn com.aw.action.GoodsAction.execute(GoodsAction.java:26)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptorrn
Could not initialize class magick.ImageInfo 哪里出错了
HTTP Status 500 - r r --------------------------------------------------------------------------------r r type Exception reportr r message r r description The server encountered an internal error () that prevented it from fulfilling this request.r r exception r r org.apache.jasper.JasperException: An exception occurred processing JSP page /Untitled-4.jsp at line 11r r 8: r 9: r 10: r 11: <%shsh.resetsize("E:/1.bmp","E:/press.jpg");%>r 12: r 13: r r r Stacktrace:r org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:519)r org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)r org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)r org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)r javax.servlet.http.HttpServlet.service(HttpServlet.java:717)r r r root cause r r javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class magick.ImageInfor org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)r org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)r org.apache.jsp.Untitled_002d4_jsp._jspService(Untitled_002d4_jsp.java:87)r org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)r javax.servlet.http.HttpServlet.service(HttpServlet.java:717)r org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)r org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)r org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)r javax.servlet.http.HttpServlet.service(HttpServlet.java:717)r r r root cause r r java.lang.NoClassDefFoundError: Could not initialize class magick.ImageInfor sasa.Small.resetsize(Small.java:14)r org.apache.jsp.Untitled_002d4_jsp._jspService(Untitled_002d4_jsp.java:78)r org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)r javax.servlet.http.HttpServlet.service(HttpServlet.java:717)r org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)r org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)r org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)r javax.servlet.http.HttpServlet.service(HttpServlet.java:717)r r r note The full stack trace of the root cause is available in the Apache Tomcat/6.0.30 logs.r r r --------------------------------------------------------------------------------r r Apache Tomcat/6.0.30
怎么解决Could not initialize class org.apache.commons.beanutils.BeanUtils啊
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.beanutils.BeanUtilsrn bbs.ahut.servlet.Login.doGet(Login.java:25)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:722
小白求解:Could not initialize class util.DBUtil
[img=https://img-bbs.csdn.net/upload/201606/04/1465053000_346919.png][/img][img=https://img-bbs.csdn.net/upload/201606/04/1465053033_274829.png][/img]rn[img=https://img-bbs.csdn.net/upload/201606/04/1465053304_658801.png][/img]rn[color=#FF0000]这是我的 DBUtil类,数据库是MySQL,链接和查数据测试的时候都可以,但是转发JSP就挂了[/color]rnpackage util;rnrnimport java.io.IOException;rnimport java.sql.Connection;rnimport java.sql.DriverManager;rnimport java.sql.SQLException;rnimport java.util.Properties;rnrnimport org.apache.commons.dbcp.BasicDataSource;rnrn/**rn * 该类用来管理连接rn * 数据库连接信息,保存在属性文件中rn * 使用连接池获取连接rn */rnpublic class DBUtil rn rn private static BasicDataSource ds;rn rn static rn try rn //加载属性文件数据rn Properties prop = new Properties();rn prop.loadrn (DBUtil.class.getClassLoader().rn getResourceAsStreamrn ("db.properties"));rn String driverclass = prop.getProperty("jdbc.driverclass");rn String url = prop.getProperty("jdbc.url");rn String user = prop.getProperty("jdbc.user");rn String password = prop.getProperty("jdbc.password");rn String strMaxActivern = prop.getProperty("dbcp.maxActive");rn String strInitSizern = prop.getProperty("dbcp.initSize");rn //实例化,并初始化连接池rn ds = new BasicDataSource();rn ds.setDriverClassName(driverclass);rn ds.setUrl(url);rn ds.setUsername(user);rn ds.setPassword(password); rn ds.setMaxActivern (Integer.parseInt(strMaxActive)); rn ds.setInitialSizern (Integer.parseInt(strInitSize));rn rn catch (IOException e) rn e.printStackTrace();rn throw new RuntimeExceptionrn ("读取属性文件错误",e);rn rn rn rn //2、创建连接rn public static Connection getConnection() rn throws SQLExceptionrn return ds.getConnection();rn rn rn //3、归还连接rn public static void close(Connection conn)rn if(conn!=null)rn try rn conn.close();rn catch (SQLException e) rn e.printStackTrace();rn throw new RuntimeExceptionrn ("归还连接错误!",e);rn rn rn rn rn //测试rn public static void main(String[] args) rn throws SQLException rn Connection conn = getConnection();rn System.out.printlnrn (conn.getClass().getName());rn close(conn);rn rnrnrn
急问 Could not initialize class的错误
运行客户端,出现如下提示:rnorg.apache.axis2.AxisFault: Could not initialize class com.test.RayDataSourcern at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)rn at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)rn at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)rn at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)rn at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)rn at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)rn at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)rn at com.raymond.axis2.client.SendClient.upload(SendClient.java:89)rn at com.raymond.axis2.client.SendClient.main(SendClient.java:285)rnException in thread "main" java.lang.NullPointerExceptionrn at com.raymond.axis2.client.SendFaxClient.main(SendFaxClient.java:293)rnrn请问,这个应该怎么解决,谢谢。
帮帮忙解决Could not initialize class org.apache.commons.beanutils.BeanUtils
我在做一个小论坛,在运行时就报错,其代码如下:rn2011-4-5 11:54:35 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [Register] in context with path [/bbs] threw exception [Servlet execution threw an exception] with root causernjava.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.beanutils.BeanUtilsrn at bbs.ahut.servlet.Register.doGet(Register.java:24)rn at bbs.ahut.servlet.Register.doPost(Register.java:47)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rn请高手帮帮了,我是刚学菜鸟一个啊。
Could not initialize class org.apache.axis.client.AxisClient type Exception repo
项目lib里面已经有了axis这个jar包了 为什么还报错??rnrnHTTP Status 500 - javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientrntype Exception reportrnrnmessage javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientrnrndescription The server encountered an internal error that prevented it from fulfilling this request.rnrnexceptionrnrnorg.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientrn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)rnroot causernrnjavax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)rn org.apache.jsp.jsp.login_jsp._jspService(login_jsp.java:245)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)rnroot causernrnjava.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientrn org.apache.axis.client.Service.getAxisClient(Service.java:110)rn org.apache.axis.client.Service.(Service.java:119)rn com.css.court.hyqd.sso.SSOServer.getSSOKey(SSOServer.java:24)rn org.apache.jsp.jsp.login_jsp._jspService(login_jsp.java:75)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)rnnote The full stack trace of the root cause is available in the Apache Tomcat/8.0.14 logs.rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/8.0.14
使用jacob报 Could not initialize class com.jacob.com.ComThread
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.jacob.com.ComThreadrn我在tomcat,system32和jdk中都引入jacob的dll文件了,为什么还报错呢?请大侠指点
导入项目报错Could not initialize class com.mchange.v2.c3p0.ComboPooledDataSource
我又来了。。。rn然后导入的还是那个maven项目rn然后测试用例的时候报错:rnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ReadDataSource' defined in class path resource [mysql-datasource-bean-test.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.mchange.v2.c3p0.ComboPooledDataSourcern at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636) ~[spring-beans-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934) ~[spring-context-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:120) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:102) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:246) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:69) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:95) ~[spring-test-3.2.12.RELEASE.jar:3.2.12.RELEASE]rn ... 25 common frames omittedrnrn网上说Could not initialize class com.mchange.v2.c3p0.ComboPooledDataSource这个错误是因为缺少jar包c3p0-0.9.1.2.jarrn但是我找了一下build path里面的maven dependencies是有这个jar包的rn那么问题来了,应该怎么改错呢~
hibernate错误求解Could not initialize class persistence.HibernateUtil
我用的是书上光盘里的代码,用tomcat5和hibernate-3.2整合,只是书里是在 windows操作系统下,我是使用linux,但我觉得也操作系统有关的就是项目主目录下隐藏的.classpath文件 和.project文件与操作系统的文件路径有关,其他代码我大致都看过,并从新编译通过以替换原来的classes文件,要求的包都有啊,rn.classpath文件 和.project文件用到了 eclipse,如果不用eclipse,这两个文件是否多余了??rn.classpath代码:rnrnrnrnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn rnrn //注:这儿我改过,以前是E:\...路径rnrn rnrn rnrnrnrn.project代码:rnrnrnrnrn 10characterrnrn rnrn rnrn rnrn rnrn rnrn org.eclipse.jdt.core.javabuilderrnrn rnrn rnrn rnrn rnrn rnrn org.eclipse.jdt.core.javanaturernrn rnrnrnrn错误信息:rnroot causernrnjava.lang.NoClassDefFoundError: Could not initialize class persistence.HibernateUtilrn dao.StudentDAO.getAllStu(StudentDAO.java:51)rn bm.BM.getAllStu(BM.java:20)rn org.apache.jsp.list_jsp._jspService(list_jsp.java:51)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)rn java.security.AccessController.doPrivileged(Native Method)rn javax.security.auth.Subject.doAsPrivileged(Subject.java:517)rn org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:272)rn org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)rnrn谢谢大xia们给我看看了...
短信的开发测试Could not initialize class com.huawei.api.smsend.db.DBSQL
目前使用华为mas机的V4.1D3API接口(JAVA)进行发短信的开发测试。按照帮助文档导入了SMSendAPI.jar包,并把smsendsql.xml文档放在了当前目录。可是在测试程序中使用初始化时总是出现如下异常:rnrnjava.lang.NoClassDefFoundError: Could not initialize class com.huawei.api.smsend.db.DBSQLrnrn哪位朋友遇到过类似情况,请教!!!
could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Sessionrnrn在网上查了很久,说是inverse 配置问题,但我配了,有时候不报上面的错误,有时又报,不怎么回事?
could not initialize proxy-no session
不知道怎么回事。我的SessionFactory是在这个类中(ServiceForAdminImpl)创建的,大致情况如下rn-----------------------------------------------------------------------------------------rnpublic class ServiceForAdminImpl extends ServiceAdapterrn staticrnsf = new AnnotationConfiguration().configure().buildSessionFactory();rnServletActionContext.getRequest().getSession().setAttribute("sf", sf); //然后我把它放在session中rnrn rn rnrn-----------------------------------------------------------------------------------------rn另外一个类的情况如下rnpublic class SearchPayRecord extends ServiceAdapter rn rn public Object listPayRecord(Object obj)rn SearchPayRecordAction searchAction = (SearchPayRecordAction)obj;rn rn SessionFactory sf = (SessionFactory) ServletActionContext.getRequest().getSession().getAttribute("sf");rnrn Session session = sf.getCurrentSession();rn session.beginTransaction();rnrnrn AdminInfoBean admin =(AdminInfoBean) ServletActionContext.getRequest().getSession().getAttribute("admin");rn rn Query query = session.createQuery("from PayRecordBean p where p.house.id=:houseId and p.house.admin.id=:adminId")rn .setLong("houseId", searchAction.getHouseId())rn .setInteger("adminId", admin.getId());rnrnrn List record = (List)query.list();rn rn session.getTransaction().commit();rn return record;rn rnrnrnrn-----------------------------------------------------------------------------------------------------rn然后服务器就会报could not initialize proxy-no session这个错误rn但是如果我把session.getTransaction().commit();注释掉,它就不会报错,这是怎么回事rnrnrnrnrnrnrn-----------------------------------------------------------------------------------------
Could not initialize Windows Sockets
还有好多服务 比如 dhcp的服务 打开 flash等软件时就出现 着错误
blazeds could not initialize proxy
我在前端用flex做界面,服务端用blazeds+hibernate+spring框架实现,其中一个方法是这样的:rnrn@Autowiredrnprivate DeviceManager deviceManager //spring注册的beanrnrn@RemoteDestinationrnpublic DevState getDevStateById(long id)rnrn DevState devStateRt = deviceManager.get(id);rn return devStateRt;rnrnrn其中devStateRt是数据库的一个实体,get方法实际就是hibernate的get方法,当我执行到get方法的时候,服务器报org.hibernate.LazyInitializationException: could not initialize proxy - no Session,的延迟加载错误,我查过资料,是hibernate延迟加载的问题,但是我这里只是执行了一个get动作没有其他的关于多对一或一对多的连接什么的操作,请问如何解决,有个问题需要注意的是,我希望保留hibernate的延迟加载功能。
为什么项目启动时报java.lang.NoClassDefFoundError: Could not initialize class org.xnio.cha
在idea下报错:rn2017-12-28 15:50:07.014 ERROR 8564 --- [ XNIO-2 task-3] io.undertow.request : UT005023: Exception handling request to /login/getLoginInfoFromRedisrnorg.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.xnio.channels.Channelsrn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:978) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[javax.servlet-api-3.1.0.jar:3.1.0]rn at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]rn at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) ~[spring-boot-actuator-1.4.2.RELEASE.jar:1.4.2.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:107) ~[spring-boot-actuator-1.4.2.RELEASE.jar:1.4.2.RELEASE]rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.4.RELEASE.jar:4.3.4.RELEASE]rn at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.server.Connectors.executeRootHandler(Connectors.java:207) [undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802) [undertow-core-1.3.25.Final.jar:1.3.25.Final]rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31]rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31]rn at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]rnCaused by: java.lang.NoClassDefFoundError: Could not initialize class org.xnio.channels.Channelsrn at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:170) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:146) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:133) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:124) ~[undertow-servlet-1.3.25.Final.jar:1.3.25.Final]rn at java.io.FilterInputStream.read(FilterInputStream.java:83) ~[na:1.8.0_31]rn at java.io.PushbackInputStream.read(PushbackInputStream.java:139) ~[na:1.8.0_31]rn at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver$EmptyBodyCheckingHttpInputMessage.(AbstractMessageConverterMethodArgumentResolver.java:311) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELE
hiernate org.hibernate.LazyInitializationException: could not initialize proxy
// 我进行如下操作 rnthis.getRequest().setAttribute("common",this.sysModuleService.find(this.common.getId()));rnrn(其中 find 方法 通过 session.load(id) 返回实体)rnrn在页面中通过 EL 表达式 取值的时候rnrn会报如下异常:org.hibernate.LazyInitializationException: could not initialize proxy - no Sessionrnrnrnrn// 但是我进行如下操作 却没有异常:rnList ls = this.hibernateDao.query("from SysModule where id = "+this.common.getId());rnif(ls.size() >0)rn this.getRequest().setAttribute("common",ls.get(0));rnrnrn-------------------------------------------------rnrnhibernate 映射文件如下:rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rnrn
org.hibernate.LazyInitializationException: could not initialize proxy - no Sessi
[code=java]org.hibernate.LazyInitializationException: could not initialize proxy - no Sessionrn at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:167)rn at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:215)rn at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)rn at com.bizi.persistence.uniorder.Optlog_$$_javassist_8.getOptid(Optlog_$$_javassist_8.java)rn at com.bizi.logic.opt.manager.OptLogManagerTest.testLoad(OptLogManagerTest.java:44)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)rn at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)rn at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:236)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)[/code]rnrnhibernate3在load时遇到session关闭的情况。rn源代码:rn[code=java]Optlog optlog = new Optlog();rn try rn optlog = optLogManager.find(1);rn System.out.println(optlog.getOptid());rn catch (Exception e) rn e.printStackTrace();rn [/code]rnrnweb.xml中已经配置了openSessionView,如下:[code=java]rn hibernateFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn sessionFactoryBeanNamern sessionFactoryrn rn rn rn hibernateFilterrn /*rn [/code]rnrnapplication.xml中的事务管理也删掉了,还是不行。rnrn如果用get就可以获取,或者在Optlog.hbm.xml中设置lazy=“false”也可以获取。唯独load报这个错误。rn如何是好。
org.hibernate.LazyInitializationException: could not initialize proxy - the owni
org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closedrnrn出现这个异常.rnrnorg.apache.jasper.JasperException: An exception occurred processing JSP page /SelfProjectExpert.jsp at line 26rnrn23: haocai="",shebeiyiqi="",projectname="",content="",yusuan="",email="";rn24: SelfProjectDAO selfDao=DAOFactory.getInstance().createSelfProjectDAO();rn25: Selfproject selfProject=selfDao.getSelfProjectByID(id);rn26: name=selfProject.getName();rn27: sex=selfProject.getSex();rn28: xueyuan=selfProject.getXueyuan();rn29: xuehao=selfProject.getXuehao();rnrn这是一段嵌在jsp页面的代码:rnrn ><%rn int id = Integer.parseInt(request.getParameter("id"));rn System.out.println("id"+id);rn String name="",sex="",xueyuan="",xuehao="",zhuanye="",nianji="",tel="",qq="",daoshi="",canyuzhe="",shiyanshi="",rn haocai="",shebeiyiqi="",projectname="",content="",yusuan="",email="";rn SelfProjectDAO selfDao=DAOFactory.getInstance().createSelfProjectDAO();rn Selfproject selfProject=selfDao.getSelfProjectByID(id);rn name=selfProject.getName();rn sex=selfProject.getSex();rn xueyuan=selfProject.getXueyuan();rn xuehao=selfProject.getXuehao();rn zhuanye=selfProject.getZhuanye();rn nianji=selfProject.getNianji(); %>rnrn Selfproject中 integer型自增id是主键rnrnid从上一个页面传递过来rnrn我搜了搜文章 都说是修改 many-to-one什么的 但是我这个表暂时没有配置这个项 我觉得就是根据id查表啊 为什么不行呢?rnrnrnpublic Selfproject getSelfProjectByID(Integer id)rn trySession s=HibernateUtil.currentSession();rn HibernateUtil.beginTransaction();rn Selfproject selfproject=(Selfproject)s.load(Selfproject.class, id);rn HibernateUtil.commitTransaction();rn HibernateUtil.closeSession();rn return selfproject;rn catch(HibernateException e)rn log.fatal(e);rn rn return null; rnrnrn这不是 selfproject Return回来了吗 为啥不行呢 大哥们 帮帮忙吧..rnrn
org.hibernate.exception.GenericJDBCException: could not initialize a collection
org.hibernate.exception.GenericJDBCException: could not initialize a collection: [com.chinacent.xbauto.bbs.entity.Busscartype.carinfos#3]rn rnrn最后解决了 rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrnrnrn最后 将 lazy="false" 去掉 就好了 。
org.hibernate.lazyinitializationexception:could not initialize proxy - no Session
求高人指点。。。。。。rnrnorg.hibernate.lazyinitializationexception:could not initialize proxy - no Session
could not initialize proxy - no Session 急。。
在我的SSH项目中我遇到了 could not initialize proxy - no Session异常。上网查了一下很多说是与many-to-one的lazy有关,但是我改了还是不行。rnrn 而且我程序执行到那里的时候也没有运用到多对一rn大概是这样的rnrnrnOrg o = (Org)this.getHibernateTemplate().load(Organization.class, orgId);rnrnOrg parent = o.getParent();rnrn这时就报错了。 我debug查看了一下,o里面确实只看见id ,看不见别的属性。rn请问如何处理 。急rn
intelij idea 启动项目就报错:Could not initialize class org.jetbrains.jps.incremental.Bu
如题有哪位碰到一样问题并解决了的,帮忙瞧瞧,
为什么找不到这个类?Could not initialize class java.awt.image.BufferedImage
一个生成验证码的Java代码rnimport java.awt.Color;rnimport java.awt.Font;rnimport java.awt.Graphics2D;rnimport java.awt.image.BufferedImage;rn本地可以生成、访问和在网页上显示,但放到服务器上去了就生成不了,报以下错误rn求大神解决!!rn服务器系统:CentOS 6.5 64位 CPU:x86_64rnrnorg.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class java.awt.image.BufferedImagern at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:972)rn at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)rn at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)rn at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.mg.freeplay.common.filter.LogonFilter.doFilter(LogonFilter.java:71)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:662)rnCaused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.image.BufferedImagern at com.mg.freeplay.common.utils.VerifyCode.createCode(VerifyCode.java:78)rn at com.mg.freeplay.common.utils.VerifyCode.(VerifyCode.java:35)rn at com.mg.freeplay.web.IndexController.verifyCode(IndexController.java:66)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)rn at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)rn at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)rn at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)rn at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)rn ... 28 more
eclipse远程hadoop报错Could not initialize class org.apache.hadoop.hdfs.FSConfigKeys
eclipse日志错误如下rn!ENTRY org.eclipse.core.jobs 4 2 2016-11-21 21:04:06.433rn!MESSAGE An internal error occurred during: "Connecting to DFS hadoop2.7".rn!STACK 0rn[b]java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hdfs.DFSConfigKeys[/b]rn at org.apache.hadoop.hdfs.DFSClient$Conf.(DFSClient.java:509)rn at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:638)rn at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:619)rn at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)rn at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2653)rn at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:92)rn at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2687)rn at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2669)rn at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:371)rn at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:170)rn at org.apache.hadoop.eclipse.server.HadoopServer.getDFS(HadoopServer.java:478)rn at org.apache.hadoop.eclipse.dfs.DFSPath.getDFS(DFSPath.java:146)rn at org.apache.hadoop.eclipse.dfs.DFSFolder.loadDFSFolderChildren(DFSFolder.java:61)rn at org.apache.hadoop.eclipse.dfs.DFSFolder$1.run(DFSFolder.java:178)rn at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)rn不清楚什么原因?求大神解答rn这个插件是我个人编译的rn步骤如下:rn一、资源:rn插件源码hadoop2x-eclipse-plugin-masterrnhadoop-2.7.2rneclipse-luna-4.4rn64位系统rn二、修改插件内容:D:\hadoop2x-eclipse-plugin-master\src\contrib\eclipse-plugin\ivy\libraries.properties将文件中的jar包版本与hadoop-2.7.2对应,直接ant编译,通过!rn三、eclipse安装插件rnIP地址与port对应core-site.xml配置rn最后DFSlocation连接的时候出错rn[img=https://img-bbs.csdn.net/upload/201611/21/1479737049_883621.png][/img]
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件