一个挺常见的myeclipse问题,求大神指点:

Dept类如下:
public class Dept implements Serializable {
private String id;
private Set users = new HashSet(0);
private String deptName;//部门名称
private Dept parent; //父部门 自关联 子部门与父部门 多对一
private Integer state;//状态 1代表启用 0代表停用
}
每个属性我都已经添加了getters和setters方法

数据库链接和sessionFactory代码如下:
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
    <property name="driverClass" value="oracle.jdbc.driver.OracleDriver" />
    <property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1521:xe" />
    <property name="user" value="test" />
    <property name="password" value="wwwa6102792" />
</bean>
<!-- 2.sessionFactory-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
    <property name="dataSource" ref="dataSource"></property>
    <property name="configLocation" value="classpath:hibernate.cfg.xml"></property>
</bean>

Dept.hbm.xml如下:






  <!-- 自关联  子部门与父部门     多对一 -->
  <many-to-one name="parent" class="Dept" column="PARENT_ID"></many-to-one> 
  <!-- private Set<User> user = new HashSet<User>(0); -->
  <set name="users">
    <key column="DEPT_ID"></key>
    <one-to-many class="User"/>
  </set>


问题代码如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.boot.MappingException: Association [cn.itcast.jk.domain.Dept.users] references an unmapped entity [cn.itcast.jk.domain.Dept.users] : origin(cn/itcast/jk/domain/Dept.hbm.xml)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:753)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.hibernate.boot.MappingException: Association [cn.itcast.jk.domain.Dept.users] references an unmapped entity [cn.itcast.jk.domain.Dept.users] : origin(cn/itcast/jk/domain/Dept.hbm.xml)
at org.hibernate.boot.model.source.internal.hbm.ModelBinder$AbstractPluralAttributeSecondPass.bindCollectionTable(ModelBinder.java:3138)
at org.hibernate.boot.model.source.internal.hbm.ModelBinder$AbstractPluralAttributeSecondPass.doSecondPass(ModelBinder.java:3076)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1655)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1623)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:278)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:692)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:416)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:401)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 21 more
下面还有几个警告:
警告: The web application [jk28_parent] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
警告: The web application [jk28_parent] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)
警告: The web application [jk28_parent] appears to have started a thread named [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)

2个回答

references an unmapped entity,意思是引用一个未匹配的实体加入sessionFactory的配置内。
问题原因:没有加载新增的一对多中的CstLinkman的对应的xml文件。

Caused by: org.hibernate.boot.MappingException: Association [cn.itcast.jk.domain.Dept.users] references an unmapped entity [cn.itcast.jk.domain.Dept.users] : origin(cn/itcast/jk/domain/Dept.hbm.xml)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
一个myeclipse问题,速度求解啊,求大神啊
![图片说明](https://img-ask.csdn.net/upload/201507/09/1436442067_310968.png) ![图片说明](https://img-ask.csdn.net/upload/201507/09/1436442087_187380.png) 破解不成功啊!!!求大神指点
MyEclipse 配置 JVM内存 小白提问,求大神指点!
一、eclipse 启动的时候是同时启动虚拟机么? 配置虚拟机内存的三个地方分别有什么作用? 分别是什么时候控制虚拟机内存的?       1.eclipse 安装目录下的.ini 文件       2.eclipse工具 Installed JREs功能下配置的参数       3. 配置tomcat 时候同时配置虚拟机参数 二、JDK  JRE    JVM 区别?项目的编译时用的是什么?工具构建项目的时候发生了什么?
win10安装myeclipse-pro-2014,进度条到90%提示error,求大神指点
![图片说明](https://img-ask.csdn.net/upload/201701/04/1483479515_273973.png) 之前是安装了myeclipse 2014 blue版本,然后卸载了,再装pro就这样了
eclipse中的注释处理器在哪里设置?求大神指点
![详细报错截图如下](https://img-ask.csdn.net/upload/201908/28/1566980256_351524.png) 图片内的报错文字如下: Description Resource Path Location Type Unable to load annotation processor factory 'MYECLIPSE_WS_TOOLS_HOME/webservices-tools.jar' for project FY_TP_SERVICE_4_SQL FY_TP_SERVICE_4_SQL Annotation processor factory path APT Build Problem 百度上的eclipse设置 ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566977058_864034.png) 我的eclipse设置 ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566977098_999034.png)
在JSP中的<c:forEach items="${list}" var="publish" varStatus="status">想更换数据表publish为book,更换后无法显示,请问各位大神怎么解决该问题?
一开始在我的JSP项目中,正常运行显示,后来发现页面显示时,数据库中的数据表显示错误,我在页面当中显示的是数据库library中publish表中的数据信息,但实际上我需要的是数据库library中book表中的信息,替换数据表后,用<c:forEach>标签遍历查询,却显示空白,连表格框架都消失了,请问我该如何修改,才能将表publish成功替换成表book?恳求各位大佬指点,感激不尽! 如下,为publish表成功显示的图片 ![图片说明](https://img-ask.csdn.net/upload/202003/12/1583977874_80197.png) 如下,为book表显示失败的图片 ![图片说明](https://img-ask.csdn.net/upload/202003/12/1583978028_493291.png) ``` <!--以下为publish表显示成功的代码--> <c:forEach items="${list}" var="publish" varStatus="status"> <c:choose> <c:when test="${status.index%2 == '0'}"> <tr class="odd"> <td>${status.index+ 1}</td> <td>${publish.name}</td> <td>${publish.addr}</td> <td>${publish.tel}</td> <td>${book.price}</td> <td> <a href="<%=basePath%>publish/form?id=${book.id}">修改</a> <a href="<%=basePath%>publish/del?id=${book.id}" onclick="return confirm('你确认要删除吗?');"">删除</a> </td> </tr> </c:when> <c:otherwise> <tr class="even"> <td>${status.index+ 1}</td> <td>${publish.name}</td> <td>${publish.addr}</td> <td>${publish.tel}</td> <td>${book.price}</td> <td> <a href="<%=basePath%>publish/form?id=${book.id}">修改</a> <a href="<%=basePath%>publish/del?id=${book.id}" onclick="return confirm('你确认要删除吗?');"">删除</a> </td> </tr> </c:otherwise> </c:choose> </c:forEach> <!--以下为更改后book表显示失败的代码--> <!--以下为更改后book表显示失败的代码--> <!--以下为更改后book表显示失败的代码--> <!--以下为更改后book表显示失败的代码--> <c:forEach items="${list}" var="book" varStatus="status"> <c:choose> <c:when test="${status.index%2 == '0'}"> <tr class="odd"> <td>${status.index+ 1}</td> <td>${book.name}</td> <td>${book.code}</td> <td>${book.auther}</td> <td>${book.price}</td> <td> <a href="<%=basePath%>book/form?id=${book.id}">修改</a> <a href="<%=basePath%>book/del?id=${book.id}" onclick="return confirm('你确认要删除吗?');"">删除</a> </td> </tr> </c:when> <c:otherwise> <tr class="even"> <td>${status.index+ 1}</td> <td>${book.name}</td> <td>${book.code}</td> <td>${book.author}</td> <td>${book.price}</td> <td> <a href="<%=basePath%>book/form?id=${book.id}">修改</a> <a href="<%=basePath%>book/del?id=${book.id}" onclick="return confirm('你确认要删除吗?');"">删除</a> </td> </tr> </c:otherwise> </c:choose> </c:forEach> ``` 当运行publish表那张图显示的项目时,无报错 2020-3-12 10:12:16 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8. 2020-3-12 10:12:16 org.apache.catalina.core.AprLifecycleListener init 信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2020-3-12 10:12:17 org.apache.catalina.core.AprLifecycleListener initializeSSL 信息: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013) 2020-3-12 10:12:17 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-apr-8080"] 2020-3-12 10:12:17 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-apr-8009"] 2020-3-12 10:12:17 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 849 ms 2020-3-12 10:12:17 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 2020-3-12 10:12:17 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.52 2020-3-12 10:12:17 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\Code 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 2020-3-12 10:12:28 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 2020-3-12 10:12:28 org.apache.tomcat.websocket.server.WsSci onStartup 信息: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 2020-3-12 10:12:28 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 2020-3-12 10:12:29 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2020-3-12 10:12:41 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'springServlet' ========= Enabled refresh mybatis mapper ========= 2020-3-12 10:13:00 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\docs 2020-3-12 10:13:00 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\examples 2020-3-12 10:13:00 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2020-3-12 10:13:00 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2020-3-12 10:13:00 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@fa4b23') 2020-3-12 10:13:00 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\host-manager 2020-3-12 10:13:00 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\igeek 2020-3-12 10:13:00 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(D:\MyEclipse\Tomcat7.0\webapps\igeek\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class 2020-3-12 10:13:01 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\library 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags/form is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 2020-3-12 10:13:04 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 2020-3-12 10:13:04 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 2020-3-12 10:13:04 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 2020-3-12 10:13:14 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\manager 2020-3-12 10:13:14 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\ROOT 2020-3-12 10:13:14 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\springmvc03fAjax 2020-3-12 10:13:14 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\springmvc03LYF 2020-3-12 10:13:16 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags/form is already defined 2020-3-12 10:13:16 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://www.springframework.org/tags is already defined 2020-3-12 10:13:16 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 2020-3-12 10:13:16 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\MyEclipse\Tomcat7.0\webapps\SSH 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 2020-3-12 10:13:27 org.apache.catalina.startup.TaglibUriRule body 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 2020-3-12 10:13:27 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath ====================================================================== 欢迎使用 JeeSite 快速开发平台 - Powered By http://jeesite.com ====================================================================== 2020-3-12 10:13:28 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2020-03-12 10:13:32,591 WARN [net.sf.ehcache.DiskStorePathManager] - diskStorePath '..\temp\jeesite\ehcache' is already used by an existing CacheManager either in the same VM or in a different process. The diskStore path for this CacheManager will be set to ..\temp\jeesite\ehcache\ehcache_auto_created4673197487363253977diskstore. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. 2020-03-12 10:13:32,657 WARN [sf.ehcache.store.disk.DiskStorageFactory] - Data in persistent disk stores is ignored for stores from automatically created directories. Remove diskPersistent or resolve the conflicting disk paths in cache configuration. Deleting data file D:\MyEclipse\Tomcat7.0\bin\..\temp\jeesite\ehcache\ehcache_auto_created4673197487363253977diskstore\active%0053essions%0043ache.data 2020-3-12 10:13:41 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'springServlet' ========= Enabled refresh mybatis mapper ========= 2020-3-12 10:13:50 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-apr-8080"] 2020-3-12 10:13:50 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-apr-8009"] 2020-3-12 10:13:50 org.apache.catalina.startup.Catalina start 信息: Server startup in 92843 ms 当运行book表那张图显示的项目时,出现报错 报错信息: 2020-3-12 10:14:33 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'springmvc' 2020-3-12 10:14:36 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 2020-3-12 10:14:38 org.apache.catalina.core.ApplicationDispatcher invoke 严重: Servlet.service() for servlet jsp threw exception javax.el.PropertyNotFoundException: Property 'code' not found on type com.library.entity.Publish at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:229) at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:206) at javax.el.BeanELResolver.property(BeanELResolver.java:317) at javax.el.BeanELResolver.getValue(BeanELResolver.java:85) at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104) at org.apache.el.parser.AstValue.getValue(AstValue.java:182) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:967) at org.apache.jsp.WEB_002dINF.jsp.publishList_jsp._jspService(publishList_jsp.java:708) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 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.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.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) 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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) 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:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) 2020-3-12 10:14:38 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [springmvc] in context with path [/library] threw exception [An exception occurred processing JSP page /WEB-INF/jsp/publishList.jsp at line 123 120: <tr class="odd"> 121: <td>${status.index+ 1}</td> 122: <td>${book.name}</td> 123: <td>${book.code}</td> 124: <td>${book.auther}</td> 125: <td>${book.price}</td> 126: <td> Stacktrace:] with root cause javax.el.PropertyNotFoundException: Property 'code' not found on type com.library.entity.Publish at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:229) at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:206) at javax.el.BeanELResolver.property(BeanELResolver.java:317) at javax.el.BeanELResolver.getValue(BeanELResolver.java:85) at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104) at org.apache.el.parser.AstValue.getValue(AstValue.java:182) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:967) at org.apache.jsp.WEB_002dINF.jsp.publishList_jsp._jspService(publishList_jsp.java:708) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) 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.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.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) 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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:119) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) 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:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
求大神指点,SSM项目 dao层测试出错,不知道问题在哪里
# 基于ssm框架开发的项目,dao层测试时发生错误,求大神帮忙指引解决,说不清楚的可以加我q远程协助. ```五月 10, 2018 12:11:50 下午 org.springframework.context.support.GenericApplicationContext refresh 警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\MyEclipse\MyClass\o2o Maven Webapp\target\classes\mapper\AreaDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 47; 文档根元素 "mapper" 必须匹配 DOCTYPE 根 "null"。 五月 10, 2018 12:11:50 下午 org.springframework.test.context.TestContextManager prepareTestInstance 严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@77b52d12] to prepare test instance [com.imooc.o2o.dao.AreaDaoTest@4de4b452] java.lang.IllegalStateException: Failed to load ApplicationContext # spring-dao.xml配置如下 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!-- 配置整合mybatis过程 --> <!-- 1.配置数据库相关参数properties的属性:${url} --> <context:property-placeholder location="classpath:jdbc.properties"/> <!-- 2.数据库连接池 --> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <!-- 配置连接池属性 --> <property name="driverClass" value="${jdbc.driver}" /> <property name="jdbcUrl" value="${jdbc.url}" /> <property name="user" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <!-- c3p0连接池的私有属性 --> <property name="maxPoolSize" value="30" /> <property name="minPoolSize" value="10" /> <!-- 关闭连接后不自动commit --> <property name="autoCommitOnClose" value="false" /> <!-- 获取连接超时时间 --> <property name="checkoutTimeout" value="10000" /> <!-- 当获取连接失败重试次数 --> <property name="acquireRetryAttempts" value="2" /> </bean> <!-- 3.配置SqlSessionFactory对象 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <!-- 注入数据库连接池 --> <property name="dataSource" ref="dataSource" /> <!-- 配置MyBaties全局配置文件:mybatis-config.xml --> <property name="configLocation" value="classpath:mybatis-config.xml" /> <!-- 扫描entity包 使用别名 --> <property name="typeAliasesPackage" value="com.imooc.o2o.entity" /> <!-- 扫描sql配置文件:mapper需要的xml文件 --> <property name="mapperLocations" value="classpath:mapper/*.xml" /> </bean> <!-- 4.配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- 注入sqlSessionFactory --> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" /> <!-- 给出需要扫描Dao接口包 --> <property name="basePackage" value="com.imooc.o2o.dao" /> </bean> </beans> ```
myeclipse的project deployment配置问题
在myeclipse的Project Deployment中的下方的Deployment Status中出项“Deployment is out of date due to changes in the underlying project contents. You'll need to 'Redeploy' the project to update the deployed archive.”的错误该怎么办, 求大神指点
myeclipse10.7破解问题
myeclipse10.7过期6天了,请问还能破解吗,怎么破解,求大神指点,急急急!!
找不到原因,求大神指点
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userinfoImp' defined in file [D:\Users\lenovo\MyEclipse 2015\MyEclipse 2015\day0614_a\WebRoot\WEB-INF\classes\com\project\dao\imp\UserinfoImp.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.project.dao.imp.UserinfoImp]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at com.project.test.Test.test(Test.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.project.dao.imp.UserinfoImp]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088) ... 36 more Caused by: java.lang.NullPointerException at com.project.dao.imp.UserinfoImp.<init>(UserinfoImp.java:18) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) ... 38 more
ajax异步请求数据问题。。。看不出哪里错了。。。跪求大神指点。。。
我做ajax读取Excel表格里的数据。。。 **这是JAVA代码** java: ``` public static List<HashMap<Object,Object>> readExcel(String excelPath){ //声明一个集合用于存储解析出来的数据 List<HashMap<Object,Object>> maps = new ArrayList<HashMap<Object,Object>>(); //导入模板文件 String execelFile="D:\\MyEclipse 10\\Workspaces\\import\\WebRoot\\course.xls"; Workbook book =null; try { // 创建文件输入流 InputStream is = new FileInputStream(execelFile); // 获取Excel文件对象 book = Workbook.getWorkbook(is); // 获取制定的工作表,默认第一个 Sheet sheet = book.getSheet(0); // 获取行 int rows = sheet.getRows(); // 获取列 int cols = sheet.getColumns(); // 循环迭代内容 for(int i=0; i<rows; i++){ // 从第二行读取 i+=1; Cell[] cells= sheet.getRow(i); /*String title = cells[0].getContents(); String desc = cells[1].getContents(); System.out.println("行:"+(i+1)); System.out.println("tetle:"+title); System.out.println("desc:"+desc);*/ HashMap<Object,Object> map = new HashMap<Object,Object>(); map.put("tetle", cells[0].getContents()); map.put("desc", cells[1].getContents()); maps.add(map); } System.out.println(maps); } catch (Exception e) { e.printStackTrace(); System.out.println("文件导入异常!"); }finally{ if(book !=null){ book.close(); } } return maps; ``` 这是数据显示的页面: import.jsp ``` <%@page import="org.apache.struts2.json.JSONUtil"%> <%@ page language="java" import="java.util.*, com.yiyun.util.*" pageEncoding="utf-8"%> <% List<HashMap<Object,Object>> lists =importUtil.readExcel(null); out.print(JSONUtil.serialize(lists)); %> ``` 这是ajax异步请求数据显示页面: ajax.jsp ``` <html> <head> <meta http-equiv="Contrnt-Type" content="text/html"; charset="utf-8"> <title>大数据批量导入</title> <meta name="Keywords" content="关键词,关键词"> <meta name="description" content=""> <style type="text/css"> *{ margin:0;padding:0;} body{font-size:12px;font-family:"微软雅黑";color:#666;} .qq{width:800px;height:500px; margin: 70px auto; } .qq h1{font-size:24px;text-align:center;} .qq .upload{width:120px;height:36px;background:#0099cc;display:block;line-height:36px; text-align:center;color:#fff;text-decoration:none;margin:30px 0;border-radius:12px; font-size:16px;} .qq .upload:hover{background:#0094f7;} .qq .con{width:800px;height:500px;border-top:1px solid #a5a5a5; border-bottom:1px solid #6c6c6c;} .qq .con .list p{font-size:14px;line-height: 46px;} .qq .con .list{margin: 20px 0;} .qq .con .list:hover{background:#d8d8d8} </style> </head> <body> <div class="qq"> <h1>大数据批量导入</h1> <a href="#" class="upload">上传批量数据</a> <div class="con"> </div> </div> <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script> <script type="text/javascript"> $(function(){ alert(1); $(".upload").click(function(){ alert(2); $.ajax({ type:"post", url:"index.jsp", seccess:function(data){ var jdata = eval("("+data+")"); var html = ""; for(var i=0; i<jdata.length; i++){ html+="<div class='list'>"+ "<p>第"+(i+1)+"课名称"+jdata[i].title+"</p>"+ "<p>描述"+jdata[i].desc+"</p>"+ "</div>"; } $(".con").html(html); }, error:function(e){ alert("错误:"+e); } }); }); }); </script> </body> </html> ``` 点击上传批量数据时。。。数据没从Excel表中读取出来。。。这是为什么??请大神赐教
MyEclipse连接数据库数据不更新
手动在MySQL表中添加了一列,还更新了那列的数据,可是在MyEclipse中不显示更新后的数据,只显示更新前的数据,求大神指点~
从webservice的服务地址获取的数据不全,有没有办法能把数据读全,求大神指点
读取方法是用的myeclipse的插件生成Java代码; 调用方法如下: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "getShipInfo") public class GetShipInfo { public static void main(String[] agrs){ ShipInfoService service = new ShipInfoService(); ShipInfoServiceSoap soap = service.getShipInfoServiceSoap(); System.out.println(soap.getShipInfo()); } } 打印出来的数据如下: ![图片说明](https://img-ask.csdn.net/upload/201804/09/1523244123_148648.png) 感觉像是前面的数据被后面的数据覆盖了,每次都只能读出最后几十条船的数据,总共应该有上万条船,想请教一下有没有什么办法能把数据读全。 或者说webservice有没有可能进行分段读取数据(我已经把MyEclipse打印行数设置到一百万了,能比以前读到更多的数据,但还是不全,这已经是打印上限了)
MyEclispse无法连接登陆SQL Server 服务器,求大神指点
![图片说明](https://img-ask.csdn.net/upload/201612/27/1482833410_61213.jpg) 在网页注册页面填完信息后点击注册按钮就这样了,MyEclipse控制台报错 ![图片说明](https://img-ask.csdn.net/upload/201612/27/1482833423_549733.jpg)
Myeclipse与数据库连接问题
![图片说明](https://img-ask.csdn.net/upload/201605/03/1462246285_340574.png) 先是出现URL出错的提示,修改后出现这个问题,求大神指点怎么修改
myeclipse安装aptana插件问题
我的mycelipse版本是10.7安装3.2的aptana插件按照网上的各种引入方法都试过了,没有反应;线上安装一直失败,求大神指点!
哪位大神帮忙指点一下这个错误,谢谢!
将工程导入到MyEclipse中we.xml文件出现了如下错误 Referenced file contains errors (file:/E:/MyEclipse/MyEclipse 10/configuration/org.eclipse.osgi/bundles/979/1/.cp/ dtds/loose.dtd). For more information, right click on the message in the Problems View and select "Show Details..." 工程的源码是 ![图片说明](https://img-ask.csdn.net/upload/201605/08/1462696880_914292.png) 请大神帮忙指点,谢谢!
Myeclipse 本地调试问题
小弟一直做.NET开发。现在因项目组要求咱是研究JAVA程序。今天本地调试JAVA程序时 出现一个怪异的问题,就是路径多了一个“/”。如图:![图片说明](https://img-ask.csdn.net/upload/201510/13/1444706649_677667.png)。有遇到过类似问题的大神吗,求指点
myeclipse8.5如何安装spket插件
从网上下载的spket-1.6.23放到myEclipse安装目录下的myeclipse8.5\InstallDirectory\dropins下,重启myeclipse后在windows->preference下没有spket,搜索也没有,不知道如何安装这个插件,网上搜的说法基本都一样。求大神指点
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
【资源】一个C/C++开发工程师的学习路线(已经无路可退,唯有逆风飞翔)【内附资源页】
声明: 1)该文章整理自网上的大牛和专家无私奉献的资料,具体引用的资料请看参考文献。 2)本文仅供学术交流,非商用。所以每一部分具体的参考资料并没有详细对应。如果某部分不小心侵犯了大家的利益,还望海涵,并联系博主删除。 3)博主才疏学浅,文中如有不当之处,请各位指出,共同进步,谢谢。 4)此属于第一版本,若有错误,还需继续修正与增删。还望大家多多指点。大家都共享一点点,一起为祖国科研的推进...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
神级宝库!GitHub 标星 1.2w+,Chrome 最天秀的插件都在这里啦!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个沉迷 Chrome 不能自拔的蒟蒻… 作为一个在远古时代用过什么 IE、360、猎豹等浏览器的资深器哥,当我第一次了解 Chrome 的时候,就被它的美貌给吸引住了… 就在我用了一段时间之后,我坚决的卸载了电脑上其它碍眼的浏览器,并觉得在之前的搬砖生涯中,我不配当哥,我只配是个沙雕… ...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
张朝阳回应迟到 1 分钟罚 500:资本家就得剥削员工
loonggg读完需要2分钟速读仅需 1 分钟大家我,我是你们的校长。前几天,搜狐的董事局主席兼 CEO 张朝阳和搜狐都上热搜了。原因很简单,就是搜狐出了“考勤新规”。一封搜狐对员工发布...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
立即提问