HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
配置:
可是
項(xiàng)目是有的 tomcat部署的項(xiàng)目 lib下面也是有的 有點(diǎn)不能理解 求教 來源:開源中國
發(fā)布時(shí)間:2016-09-19 20:02:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 一般在運(yùn)行壓力較大的時(shí)候,會(huì)有鏈接被耗盡的現(xiàn)象,網(wǎng)上一查發(fā)現(xiàn)它的實(shí)現(xiàn)機(jī)制引起的,不知道哪個(gè)版本是否修復(fù)了
來源:開源中國
發(fā)布時(shí)間:2016-07-20 09:17:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> Spring中 通過 在applicationContext.xml文件中 引入db.properties.xml外部屬性文件來鏈接數(shù)據(jù)庫 < context :property-placeholder location ="classpath:db.properties" />
db.properties.xml文件內(nèi)容如下: user = root password = 123456 driverClass = com.mysql.cj.jdbc.Driver jdbcUrl = jdbc:mysql://shop?autoReconnect=true&useSSL=false
配置bean時(shí),用"${user}", "${password}" ,"${driverClass}"來獲取屬性值,
但是在運(yùn)行時(shí),發(fā)現(xiàn)c3p0不能鏈接數(shù)據(jù)庫,debug發(fā)現(xiàn)在獲取user屬性值時(shí)出錯(cuò),而其他的屬性值是正確的
< property name ="user" value ="${user}" /> 只有這里獲取的值是錯(cuò)誤的 < property name ="password" value ="${password}" /> < property name ="driverClass" value ="${driverClass}" /> < property name ="jdbcUrl" value ="${jdbcUrl}" />
如果不使用外部屬性文件配置,直接寫成
< property name ="user" value ="root" /> 時(shí),c3p0是可以鏈接到mysql上的
有人遇到過同樣的問題嗎?
來源:開源中國
發(fā)布時(shí)間:2016-07-15 23:58:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
C3P0中ComboPooledDataSource的getConnection是線程安全的嗎
以下這段代碼的synchronized是不是沒有必要?
// 獲取連接,里面的dataSource是ComboPooledDataSource的實(shí)例 public synchronized Connection getConnection(){ try { return dataSource.getConnection(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
來源:開源中國
發(fā)布時(shí)間:2016-06-28 10:34:05
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 2011-5-11 16:28:15 com.mchange.v2.resourcepool.BasicResourcePool removeResource INFO: A checked-out resource is overdue, and will be destroyed: com.mchange.v2.c3p0.impl.NewPooledConnection@153f5e2 2011-5-11 16:28:15 com.mchange.v2.resourcepool.BasicResourcePool removeResource INFO: Logging the stack trace by which the overdue resource was checked-out. java.lang.Exception: DEBUG ONLY: Overdue resource check-out stack trace. at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:543) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:681) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:608) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) ------------------------------------- 以下配置文件 c3p0.minPoolSize=3 c3p0.maxPoolSize=50 c3p0.testConnectionOnCheckout=true #c3p0.testConnectionOnCheckin=true #c3p0.checkoutTimeout=2000 #c3p0.idleConnectionTestPeriod=5 c3p0.maxConnectionAge=10 #c3p0.maxIdleTime=2 #c3p0.maxIdleTimeExcessConnections=1 #c3p0.propertyCycle=1 #c3p0.numHelperThreads=10 c3p0.unreturnedConnectionTimeout=15 c3p0.debugUnreturnedConnectionStackTraces=true c3p0.maxStatements=50 c3p0.maxStatementsPerConnection=5
我檢查過,好像沒有連接沒被關(guān)掉...
來源:開源中國
發(fā)布時(shí)間:2011-05-11 16:35:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xx?serverTimezone=utc&characterEncoding=utf8&useUnicode=true&useSSL=false
spring.datasource.username=xxx
spring.datasource.password=xxx
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.initialSize=5
spring.datasource.minIdle=5
spring.datasource.maxActive=20
spring.datasource.maxWait=60000
spring.datasource.filters=stat,wall
spring.datasource.timeBetweenEvictionRunsMillis=60000
spring.datasource.minEvictableIdleTimeMillis=300000
spring.datasource.validationQuery=select 'x'
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
spring.datasource.poolPreparedStatements=true
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.druidLoginName=admin
spring.druidPassword=admin
@Bean
public SqlSessionFactoryBean sqlSessionFactory(DruidDataSource datasource){
SqlSessionFactoryBean bean=new SqlSessionFactoryBean();
datasource.setInitialSize(initialSize);
datasource.setMinIdle(minIdle);
datasource.setMaxActive(maxActive);
datasource.setMaxWait(maxWait);
datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
datasource.setValidationQuery(validationQuery);
datasource.setTestWhileIdle(testWhileIdle);
datasource.setTestOnBorrow(testOnBorrow);
datasource.setTestOnReturn(testOnReturn);
datasource.setPoolPreparedStatements(poolPreparedStatements);
datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
try {
datasource.setFilters(filters);
} catch (SQLException e) {
e.printStackTrace();
}
datasource.setConnectionProperties(connectionProperties);
bean.setDataSource(datasource);
return bean;
}
@Bean
public SqlSessionTemplate sqlSession(SqlSessionFactoryBean sqlSessionFactory){
SqlSessionTemplate bean=null;
try {
bean = new SqlSessionTemplate(sqlSessionFactory.getObject());
} catch (Exception e) {
e.printStackTrace();
}
return bean;
}
報(bào)錯(cuò)如下:
[2019-03-16 17:14:38] ERROR org.springframework.boot.SpringApplication - Application run failed
java.util.ConcurrentModificationException: null
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:742)
at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:810)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at net.hb.xuelebaoapp.config.MainApplication.main(MainApplication.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
[2019-03-16 17:14:38] INFO org.apache.catalina.loader.WebappClassLoaderBase - Illegal access: this web application instance has been stopped already. Could not load [com.mysql.jdbc.MySQLConnection]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.mysql.jdbc.MySQLConnection]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1363)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1351)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:820)
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.findClassIgnoringNotFound(TomcatEmbeddedWebappClassLoader.java:121)
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.doLoadClass(TomcatEmbeddedWebappClassLoader.java:86)
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:68)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1173)
at com.alibaba.druid.util.Utils.loadClass(Utils.java:220)
at com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker.(MySqlValidConnectionChecker.java:50)
at com.alibaba.druid.pool.DruidDataSource.initValidConnectionChecker(DruidDataSource.java:1231)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:885)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1300)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1296)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:109)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:157)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:338)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:326)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:108)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
at com.sun.proxy.$Proxy96.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
at com.sun.proxy.$Proxy93.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:222)
at net.hb.xuelebaoapp.system.dao.impl.FredaDaoImpl.queryForList(FredaDaoImpl.java:105)
at net.hb.xuelebaoapp.manager.sys.service.impl.ParamServiceImpl.list(ParamServiceImpl.java:41)
at net.hb.xuelebaoapp.system.listener.SystemInitListener$launchSPMonitor.run(SystemInitListener.java:82)
at java.lang.Thread.run(Thread.java:748)
[2019-03-16 17:14:39] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
[2019-03-16 17:14:39] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
通過換mysql驅(qū)動(dòng)包和druid驅(qū)動(dòng)包版本,試了都不行
來源:開源中國
發(fā)布時(shí)間:2019-03-16 17:18:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.dao.mapper.user.UserInfoMapper.checkEmail
來源:開源中國
發(fā)布時(shí)間:2018-11-28 17:28:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
maven包含spring boot子模塊的一個(gè)項(xiàng)目, 項(xiàng)目本身是可以運(yùn)行, 并且功能都可以實(shí)現(xiàn) , 現(xiàn)在要對(duì)項(xiàng)目進(jìn)行打包處理, 在install到dao模塊的時(shí)候,
Running com.xiao.DaoAeriesTest的時(shí)候卻拋出了
com.ibatis.sqlmap.client.SqlMapException: There is no statement named MemberRightsMapper.select in this SqlMap.
如果直接跑test的話是可以跑得通的,使用的是spring-orm-3.0.5,下面是sqlMapClient的配置
conf/SqlMapConfig.xml classpath*:com/xiao/**/*SQL.xml
另外我的SQL.xml文件是在pojo模塊中的,因?yàn)榉湃雂ao模塊中的話,本地啟動(dòng)就會(huì)拋出
There is no statement named XXX in this SqlMap.這個(gè)異常,install也是一樣的.
現(xiàn)在把test模塊去掉之后可以打包成功,
但是在使用java -jar XXX.jar啟動(dòng)spring boot打成的包后 ,調(diào)用的dao層的方法,控制臺(tái)又會(huì)直接拋出這個(gè)異常
org.springframework.data.redis.RedisSystemException: Unknown jedis exception; nested exception is com.ibatis.sqlmap.client.SqlMapException: There is no statement named ACTIVITY.selectAvailableActivities in this SqlMap.
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:58)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:37)
at org.springframework.data.redis.connection.jedis.JedisConverters.toDataAccessException(JedisConverters.java:117)
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.translateExceptionIfPossible(JedisConnectionFactory.java:156)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at com.miyun.biz.activity.dao.ibatis.ActivityDAOImpl$$EnhancerBySpringCGLIB$$5b37250d.selectAvailableActivities(
)
at com.miyun.biz.activity.manager.impl.ActivityManagerImpl.selectAvailableJoinActivities(ActivityManagerImpl.java:168)
at com.miyun.biz.activity.manager.impl.ActivityManagerImpl.join(ActivityManagerImpl.java:331)
at com.jinju.demojms.Receive.joinActivity(Receive.java:194)
at com.jinju.demojms.Receive.joinInvsetActivity(Receive.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:181)
at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:114)
at org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:51)
at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:182)
at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:120)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:1414)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.actualInvokeListener(AbstractMessageListenerContainer.java:1337)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:1324)
at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:1303)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:817)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:801)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$700(SimpleMessageListenerContainer.java:77)
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1042)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no statement named ACTIVITY.selectAvailableActivities in this SqlMap.
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatement(SqlMapExecutorDelegate.java:231)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:558)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:295)
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:1)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:293)
at com.miyun.biz.activity.dao.ibatis.ActivityDAOImpl.selectAvailableActivities(ActivityDAOImpl.java:67)
at com.miyun.biz.activity.dao.ibatis.ActivityDAOImpl$$FastClassBySpringCGLIB$$f4e9b4c6.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
... 25 more
懷疑和install dao模塊時(shí)拋出的異常是一個(gè)原理, 兩天了 都沒解決 來源:開源中國
發(fā)布時(shí)間:2018-08-01 11:09:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
這個(gè)sql有個(gè)語法錯(cuò)誤 ,大佬幫忙看看 看了一下午沒看出來
來源:開源中國
發(fā)布時(shí)間:2018-06-29 19:08:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
我們知道,通過如下配置可以啟用下劃線與駝峰式命名規(guī)則的映射(如first_name => firstName)
這個(gè)配置在執(zhí)行查詢的操作的時(shí)候很好用,可以將數(shù)據(jù)庫中下劃線命名的字段直接對(duì)應(yīng)到JavaBean中的駝峰命名的參數(shù)里。
但是執(zhí)行insert操作的時(shí)候問題來了,我傳入的是JavaBean對(duì)象,這個(gè)時(shí)候無法將駝峰命名的參數(shù)自動(dòng)轉(zhuǎn)成帶下劃線的( 大概是因?yàn)椴恢劳膬杭酉聞澗€ )。
比如,我預(yù)期是寫成這樣: INSERT INTO user_info ( user_id, user_name ) VALUES ( #{user_id}, #{user_name}, )
但是,這樣會(huì)報(bào)錯(cuò)There is no getter for property named 'user_id' in 'class com.dx.User',因?yàn)槲襃avaBean中的參數(shù)名分別是userId和userName,所以我必須寫成下面這樣: INSERT INTO user_info ( user_id, user_name ) VALUES ( #{userId}, #{userName}, )
但是下面這種字段名不一致寫法會(huì)讓我很難受,這里該怎么操作才能實(shí)現(xiàn)我的預(yù)期寫法呢?
來源:開源中國
發(fā)布時(shí)間:2018-04-17 16:06:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
就是在UserBasicInfo這個(gè)實(shí)體類里面加了個(gè)擴(kuò)展屬性,跟表不想關(guān)的,結(jié)果ibatis就報(bào)這個(gè)操蛋的問題,咋整都沒用。然后又試了下,換了個(gè)另外的實(shí)體類加一個(gè)屬性,還是報(bào)這樣的錯(cuò)誤,不過ClassNotFoundException報(bào)的又是另外那個(gè)實(shí)體類,我就納悶了個(gè)去了。ibatis配置文件和別的什么的都沒改動(dòng),就是改個(gè)實(shí)體類多加個(gè)屬性,跟ibatis也不想關(guān)吧,為啥會(huì)報(bào)這樣的問題,哪位哥哥姐姐知道?
來源:開源中國
發(fā)布時(shí)間:2017-04-14 18:24:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 公司著手搭建一套有關(guān)金融業(yè)務(wù)的產(chǎn)品框架,現(xiàn)在流行的 S pring, struts2 , webwork 、 jsf 、 Tapestry 、 easyjweb、 H ibernate, ibatis , jpa、 J sp, jsp tag , jquery , extjs , yui , prototype等等技術(shù)框架用哪些比較好?并給點(diǎn)理由,在此先謝謝各位了。
來源:開源中國
發(fā)布時(shí)間:2011-12-08 18:58:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
Junit測(cè)試成功,注入成功。
但是啟動(dòng)應(yīng)用后,注入的實(shí)體報(bào)空指針異常。
請(qǐng)問這種問題是什么原因呢,謝謝。
三個(gè)配置類分別如下
一、WebInit 類 import com.lotus.api.RootConfig; import com.lotus.api.WebConfig; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import org.springframework.web.util.Log4jConfigListener; import javax.servlet.Filter; import javax.servlet.ServletContext; import javax.servlet.ServletRegistration; public class WebInit extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Class>[] getRootConfigClasses() { return new Class[]{RootConfig.class}; } @Override protected Class>[] getServletConfigClasses() { return new Class[]{WebConfig.class}; } @Override protected String[] getServletMappings() { return new String[]{"/"}; } @Override protected Filter[] getServletFilters() { //字符集攔截器 CharacterEncodingFilter characterEncodingFilter = new CharacterEncodingFilter(); characterEncodingFilter.setEncoding("UTF-8"); characterEncodingFilter.setForceEncoding(true); return new Filter[]{characterEncodingFilter}; } @Override protected void registerContextLoaderListener(ServletContext servletContext) { servletContext.setInitParameter("log4jConfigLocation" , "classpath:log4j.properties"); servletContext.addListener(Log4jConfigListener.class); } @Override protected void customizeRegistration(ServletRegistration.Dynamic registration) { registration.setInitParameter("throwExceptionIfNoHandlerFound", "true"); } }
二、WebConfig package com.lotus.api; import com.lotus.api.interceptor.SecretInterceptor; import com.lotus.service.ServiceNativeConfig; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration @EnableWebMvc @ComponentScan("com.lotus.api.web") public class WebConfig extends WebMvcConfigurerAdapter { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new SecretInterceptor()).addPathPatterns("/**"); } }
三、RootConfig package com.lotus.api; import com.lotus.service.ServiceNativeConfig; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.Import; import org.springframework.web.servlet.config.annotation.EnableWebMvc; @Configuration @ComponentScan(basePackages = {"com.lotus.api"}, excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = EnableWebMvc.class)}) @Import(ServiceNativeConfig.class) public class RootConfig { }
使用Junit測(cè)試的代碼如下: import com.lotus.api.RootConfig; import com.lotus.service.attachment.AttachmentService; import com.lotus.service.content.ContentService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {RootConfig.class}) public class WebTest { @Autowired private AttachmentService attachmentService; @Autowired private ContentService contentService; @Test public void test(){ attachmentService.add(); System.out.println("SECCESS"); System.out.println(contentService); }
來源:開源中國
發(fā)布時(shí)間:2017-10-14 21:57:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
用junit4進(jìn)行單元測(cè)試一直報(bào)錯(cuò),我快瘋啦,跪求指導(dǎo)~~~~
2017-06-07-16-37-29 [INFO] [main] [XmlBeanDefinitionReader_316] - Loading XML bean definitions from class path resource [applicationContext.xml]
2017-06-07-16-37-29 [INFO] [main] [XmlBeanDefinitionReader_316] - Loading XML bean definitions from class path resource [spring-mvc.xml]
2017-06-07-16-37-29 [INFO] [main] [XmlBeanDefinitionReader_316] - Loading XML bean definitions from class path resource [spring-database.xml]
2017-06-07-16-37-29 [INFO] [main] [XmlBeanDefinitionReader_316] - Loading XML bean definitions from class path resource [spring-aop.xml]
2017-06-07-16-37-29 [INFO] [main] [XmlBeanDefinitionReader_316] - Loading XML bean definitions from class path resource [spring-redis.xml]
2017-06-07-16-37-29 [INFO] [main] [GenericApplicationContext_524] - Refreshing org.springframework.context.support.GenericApplicationContext@1bd0dd4: startup date [Wed Jun 07 16:37:29 CST 2017]; root of context hierarchy
2017-06-07-16-37-30 [INFO] [main] [PropertyPlaceholderConfigurer_172] - Loading properties file from class path resource [config.properties]
2017-06-07-16-37-30 [INFO] [main] [DruidDataSource_652] - {dataSource-1} inited
2017-06-07-16-37-35 [INFO] [main] [DefaultListableBeanFactory_452] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e61a35: defining beans [org.springframework.context.annotation.internalAsyncAnnotationProcessor,org.springframework.context.annotation.internalScheduledAnnotationProcessor,mewTaskAPI,cashJob,timedTaskJob,FCashLogServiceImpl,FUserServiceImpl,FUserTaskServiceImpl,FUserTaskStepsServiceImpl,JZCatService,taskServiceImpl,timedTaskServiceImpl,apiController,frontController,kindEditorController,timedTaskController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,propertyConfigurer,org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,multipartResolver,freemarkerConfig,fmXmlEscape,freemakerViewResolver,dataSource,druid-stat-interceptor,druid-stat-pointcut,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,sqlSessionFactory,sqlSession,org.mybatis.spring.mapper.MapperScannerConfigurer#0,transactionManager,serviceOperation,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#1,txAdvice,poolConfig,connectionFactory,redisTemplate,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor,BShopMapper,FAccountMapper,FCashLogMapper,FUserImgsMapper,FUserMapper,FUserTaskMapper,FUserTaskStepsMapper,taskMapper,taskStepsMapper,timedTaskMapper]; root of factory hierarchy
2017-06-07-16-37-35 [INFO] [main] [DruidDataSource_1316] - {dataSource-1} closed
2017-06-07-16-37-35 [ERROR] [main] [TestContextManager_314] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener@ad483] to prepare test instance [cn.com.l9e.zwk.zwkInterface.TestTimed@10613aa]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:99)
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:122)
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:108)
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:75)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:312)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:209)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:286)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:288)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:229)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:86)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:172)
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:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskJob': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: cn.com.l9e.zwk.service.TimedTaskService cn.com.l9e.zwk.job.TimedTaskJob.timedTaskService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.l9e.zwk.dao.TimedTaskMapper cn.com.l9e.zwk.service.impl.TimedTaskServiceImpl.timedTaskMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.l9e.zwk.dao.TimedTaskMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BShopMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\BShopMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FAccountMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FAccountMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FCashLogMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FCashLogMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserImgsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserImgsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserTaskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserTaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserTaskStepsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserTaskStepsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskStepsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TaskStepsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TimedTaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BShopMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\BShopMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FAccountMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FAccountMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FCashLogMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FCashLogMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserImgsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserImgsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserTaskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserTaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'FUserTaskStepsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\FUserTaskStepsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskStepsMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TaskStepsMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskMapper' defined in file [E:\java_workspace\zwk\target\classes\cn\com\l9e\zwk\dao\TimedTaskMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring-database.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.lang.RuntimeException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'java.util.String'. Cause: java.lang.ClassNotFoundException: Cannot find class: java.util.String
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:291)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1139)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:644)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:493)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:121)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:100)
at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:250)
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContextInternal(CacheAwareContextLoaderDelegate.java:64)
at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(CacheAwareContextLoaderDelegate.java:91)
... 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: cn.com.l9e.zwk.service.TimedTaskService cn.com.l9e.zwk.job.TimedTaskJob.timedTaskService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.l9e.zwk.dao.TimedTaskMapper cn.com.l9e.zwk.service.impl.TimedTaskServiceImpl.timedTaskMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.l9e.zwk.dao.TimedTaskMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:517)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)
... 41 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'timedTaskServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.l9e.zwk.dao.TimedTaskMapper cn.com.l9e.zwk.service.impl.TimedTaskServiceImpl.timedTaskMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.l9e.zwk.dao.TimedTaskMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:291)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1139)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:931)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:874)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:789)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:489)
... 43 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.com.l9e.zwk.dao.TimedTaskMapper cn.com.l9e.zwk.service.impl.TimedTaskServiceImpl.timedTaskMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.l9e.zwk.dao.TimedTaskMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:517)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)
... 54 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.com.l9e.zwk.dao.TimedTaskMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1009)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:877)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:789)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:489)
... 56 more
來源:開源中國
發(fā)布時(shí)間:2017-06-07 16:42:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
這兩天因?yàn)樾枨笞鲆粋€(gè)數(shù)據(jù)采集的工具,之前也針對(duì)一些網(wǎng)站做過一些類似的東西,雖然過程上嗑嗑絆絆,但最后都達(dá)到了效果。
因?yàn)樗悴簧辖?jīng)驗(yàn)豐富,這回遇到的麻煩讓我比較困惑。
大概需要抓取二十多萬數(shù)據(jù),數(shù)據(jù)源網(wǎng)站服務(wù)器用的是IIS7,.net平臺(tái),請(qǐng)求大概一千到兩千次左右,IP會(huì)被禁止,服務(wù)器直接返回503,采集中斷,封禁時(shí)間大概為12個(gè)小時(shí)。
我采集的速度并不快,嘗試過多種暫緩方式。每抓取10條停頓3s/5s/10s,或100條停頓30s/60s,或200條停頓300s/600s,后來發(fā)現(xiàn)無論如何去設(shè)置間隔時(shí)間都是徒勞,我每一次重啟路由器開始抓取數(shù)量不會(huì)超過2000條,就會(huì)被服務(wù)器拒絕,直接返回503,然后封禁12個(gè)小時(shí)左右。
為此,我嘗試使用代理來完成我的工作,做一個(gè)代理控制器,然后google百度的可用代理服務(wù)器ip地址列表,這些地址質(zhì)量慘不忍睹,少有可以正常工作的服務(wù)器,以非常緩慢的速度響應(yīng),這顯然不能為我所用,只好棄之,再尋它法。
由于我是使用遠(yuǎn)程服務(wù)器24小時(shí)開機(jī)來做數(shù)據(jù)抓取,所以并不能像adsl重啟路由來獲得新的ip地址,目前服務(wù)器IP剛被解封。即使使用adsl線路依靠重啟路由的方式來完成數(shù)據(jù)抓取,20萬的量也足夠讓我困擾了,除非再寫一個(gè)定時(shí)重啟路由的程序,這意味著我隨時(shí)準(zhǔn)備斷網(wǎng),想著都痛苦。
有哪位朋友研究過iis/asp.net/iis插件來限制客戶端ip請(qǐng)求次數(shù)的原理的?希望能繞過去。
或者,能否偽造http請(qǐng)求的IP?這都比較靠近底層的協(xié)議了,小弟對(duì)這些目前白紙一張,懇請(qǐng)指教。
每個(gè)ip在一天內(nèi)限制不到2000次,20余萬的數(shù)據(jù),買代理服務(wù)器可否現(xiàn)實(shí)?有賣的不?
來源:開源中國
發(fā)布時(shí)間:2013-01-03 01:30:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
需求:C#實(shí)現(xiàn)在本地IIS上搭建一個(gè)FTP站點(diǎn),并啟動(dòng)該站點(diǎn)
問題:網(wǎng)上很多關(guān)于C#操作IIS創(chuàng)建web站點(diǎn)的例子,其中提到可用該方法創(chuàng)建FTP,嘗試后發(fā)現(xiàn)網(wǎng)上說的路徑找不到,代碼如下:
DirectoryEntry Services = new DirectoryEntry("IIS://localhost/MSFTPSVC");
foreach (DirectoryEntry server in Services.Children)
{
//MessageBox.Show(server.SchemaClassName);
}
異常:第二行就提示異常信息:系統(tǒng)找不到指定的路徑。
參考的鏈接如下: https://www.cnblogs.com/chenkai/archive/2010/07/26/1785074.html
來源:開源中國
發(fā)布時(shí)間:2020-02-22 14:36:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 應(yīng)用程序池“###”將被自動(dòng)禁用,原因是為此應(yīng)用程序池提供服務(wù)的進(jìn)程中出現(xiàn)一系列錯(cuò)誤,來源是WAS,事件是5002
來源:開源中國
發(fā)布時(shí)間:2016-08-27 11:35:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
我單位內(nèi)部系統(tǒng),用戶5000多人,平時(shí)在線600+
經(jīng)查需要上班期間臨時(shí)更新補(bǔ)丁,每次重啟IIS都要10分鐘左右,期間要提前發(fā)通知。
能否設(shè)置訪問網(wǎng)站超過2-3秒無法打開系統(tǒng)時(shí),自動(dòng)跳轉(zhuǎn)到提示系統(tǒng)正在自動(dòng)更新的網(wǎng)頁,其他時(shí)間正常訪問
IIS上有沒有相關(guān)功能或者其他的變通方法
謝謝,大俠們
來源:開源中國
發(fā)布時(shí)間:2019-05-16 15:40:09
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
IIS 8.0 上配置對(duì) Analysis Services 的 HTTP 訪問 出錯(cuò),出現(xiàn)以下錯(cuò)誤,百度谷歌沒有找到任何的解決辦法。
求問各路大神,有沒有碰到過,或者是知道哪里出現(xiàn)問題的。 紅包感謝?。。。?
來源:開源中國
發(fā)布時(shí)間:2019-05-11 16:13:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
公司有一個(gè)幾百兆的外網(wǎng)ip,然后原有項(xiàng)目都是用iis發(fā)布的,只有一個(gè)80端口對(duì)外,我不得不用iis做反向代理,轉(zhuǎn)發(fā)到我自己的tomcat服務(wù)上面去,現(xiàn)在是轉(zhuǎn)發(fā)成功了,但是配置https 我有點(diǎn)迷茫了。我是在哪配https了?是轉(zhuǎn)發(fā)的iis上面配置,還是在內(nèi)網(wǎng)的tomcat上面配置了?頭好痛....沒辦法公司不想在買外網(wǎng)ip了。
來源:開源中國
發(fā)布時(shí)間:2018-12-25 15:02:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> Hangfire可以實(shí)現(xiàn)按秒級(jí)來執(zhí)行任務(wù)嗎?如果不可以,在web項(xiàng)目中怎么實(shí)現(xiàn)定時(shí)按秒來執(zhí)行?
來源:開源中國
發(fā)布時(shí)間:2017-01-13 09:32:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
我沒在線上實(shí)際部署過nginx反向代理,看到網(wǎng)上的文章也是云云霧里!有的部署前段,有的部署后端,寫來寫去都沒突出個(gè)重點(diǎn)。
有實(shí)際在線上部署過的大佬幫忙解答下這個(gè)小白問題!還有就是能否普及下nginx安全之類的知識(shí)?,畢竟暴露在公網(wǎng)提供服務(wù)的。
來源:開源中國
發(fā)布時(shí)間:2017-06-18 09:56:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
我最近沒事想用git弄一個(gè)自己的網(wǎng)站,做到一半發(fā)現(xiàn)打不開本機(jī)地址http://localhost4000。我百度看到好像是電腦沒有安裝lls,但是在我安裝lls時(shí)又出現(xiàn)0x80070057錯(cuò)誤代碼,查了好多回答,都不管用,有的說要重裝系統(tǒng)才行,我的是家庭版的的,有的說是家庭版功能不全,求大神解決一下!不用重裝系統(tǒng)最好,或者怎樣解決打開localhost4000,謝謝了~
來源:開源中國
發(fā)布時(shí)間:2017-05-28 22:30:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
想通過命令行修改IIS某個(gè)站點(diǎn)的物理路徑,使用如下命令修改不了,請(qǐng)問是哪里出了問題呢?謝謝!
.\appcmd.exe set APP "Default Web Site/A4" /physicalPath:"E:\Arc"
來源:開源中國
發(fā)布時(shí)間:2016-11-03 09:31:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
之前一直在用lnmp,最近嘗試了一下win2008+iis7.5+php+mysql,配置https成功,可以訪問,但是在網(wǎng)上并沒有找到在iis下如何優(yōu)化https,以下是用nginx時(shí)的設(shè)置:
ssl_session_timeout 20m;
ssl_session_cache shared:SSL:20m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-RC4-SHA:!ECDHE-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:!RC4-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!CBC:!EDH:!kEDH:!PSK:!SRP:!kECDH;
ssl_ecdh_curve secp384r1;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
ssl_stapling_file /www/ssl/stapling_ocsp;
ssl_trusted_certificate /www/ssl/chain.pem;
resolver 172.16.0.111 172.16.0.110 valid=300s;
resolver_timeout 5s;
請(qǐng)問在iis7.5下是否需要這些設(shè)置?要如何去設(shè)置?謝謝。
來源:開源中國
發(fā)布時(shí)間:2017-03-20 11:48:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
IIS怎么整合JAVA,可以上傳JAVA進(jìn)行編譯,可以上傳打包好的war包進(jìn)行整合編譯
來源:開源中國
發(fā)布時(shí)間:2017-02-24 14:00:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
在一臺(tái)服務(wù)器上用安裝了nginx和iis,用nginx做反向代理,監(jiān)聽80端口,iis的站點(diǎn)只好使用8000端口。域名解析www.a.com,因?yàn)閕is站點(diǎn)是別人開發(fā)的,不知道為什么在提交一個(gè)表單之后,跳轉(zhuǎn)到一個(gè)新頁面后,URL自帶了端口,變成了www.a.com:8000,這樣就繞過了nginx的監(jiān)聽,直接訪問的iis了,有沒有什么辦法把8000端口改成80端口
來源:開源中國
發(fā)布時(shí)間:2017-02-16 23:35:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
80端口沒對(duì)外開放,在配置Let’s Encrypt出現(xiàn)下面提示,該怎么處理?
The ACME server was probably unable to reach http://XXXXX.XXXXX.XXX/.well-known/acme-challenge/eue_UrCJxw9Xpu3F7QxxIoXPq77GwaEuXSzj4RTj6so
Check in a browser to see if the answer file is being served correctly.
This could be caused by IIS not being setup to handle extensionless static files. Here's how to fix that:
1. In IIS manager goto Site/Server->Handler Mappings->View Ordered List
2. Move the StaticFile mapping above the ExtensionlessUrlHandler mappings. (like this http://i.stack.imgur.com/nkvrL.png )
3. if you need to make changes to your web,config file, update the one at D:\letsencrypt-win-simple.V1.9.1\web_config.xml
來源:開源中國
發(fā)布時(shí)間:2017-01-05 08:53:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
在Nginx中配置了2個(gè)WEB應(yīng)用地址。現(xiàn)在其中一個(gè)應(yīng)用地址IIS停止了。結(jié)果客戶訪問的時(shí)候到關(guān)閉的那地址時(shí)候會(huì)超時(shí)1分鐘。這個(gè)如何解決。
upstream a.com{ #ip_hash; server 192.168.1.10:80; server 192.168.1.11:80; }
詳細(xì)的Nginx配置
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; upstream a.com{ #ip_hash; server 192.168.1.10:80; server 192.168.1.11:80; } server { listen 80; #server_name localhost; server_name a.com; #charset koi8-r; #access_log logs/host.access.log main; location / { # root html; # index index.html index.htm; proxy_pass http://a.com; proxy_redirect default; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }
來源:開源中國
發(fā)布時(shí)間:2016-09-20 15:48:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
測(cè)試環(huán)境是在WINDOWS2003,IIS6,NGINX 1.0下. location ~/ { proxy_set_header Accept-Encoding "none"; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real_IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 120s; proxy_read_timeout 120s; proxy_send_timeout 120s; proxy_buffering off; proxy_pass http://127.0.0.1:8080; }
在測(cè)試的時(shí)候,如果直接訪問,127.0.0.1:80,即訪問nginx,就很容易出現(xiàn)錯(cuò)誤:
upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream
上面這是NGINX的錯(cuò)誤日志.在瀏覽器上反應(yīng)就是502,504錯(cuò)誤.
但如果在測(cè)試的時(shí)候,把測(cè)試地址改成http://127.0.0.1:8080,即訪問IIS,根本不會(huì)出現(xiàn)超時(shí)什么的.
有人說是IIS腳本執(zhí)行時(shí)間太長(zhǎng),但問題時(shí),使用靜態(tài)頁面也出現(xiàn)同樣的問題.就不應(yīng)該是IIS的問題了.
后來又把同樣的程序,放到另外一臺(tái)2003上運(yùn)行,把NGINX的代理地址也改了,情況就好多.
為什么直接代理本機(jī)卻出現(xiàn)一大堆超時(shí)錯(cuò)誤.不要說把timeout的值改大,那個(gè)改大了,瀏覽器上的反應(yīng)就是一直在等待.還不如直接輸出錯(cuò)誤呢.
請(qǐng)問這種問題應(yīng)該怎么解決呢?
來源:開源中國
發(fā)布時(shí)間:2011-07-28 13:17:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
因?yàn)闅v史遺留問題 以及現(xiàn)狀
背景:目前遇到一個(gè)很囧的情況 有一臺(tái)服務(wù)器是server2003的,裝的是IIS6。目前已經(jīng)跑了三個(gè)用.net寫的項(xiàng)目在iis上,都是用的80端口的,我需要跑一個(gè)java的項(xiàng)目在tomcat上,因?yàn)橐臀⑿沤换?,所以必須要也?0端口。目前三個(gè)網(wǎng)站所使用的二級(jí)域名是a.test.com,b.test.com,c.test.com。
問題:我不能動(dòng)原來的項(xiàng)目也不能升級(jí)iis或者系統(tǒng),而且暫時(shí)不能給我指配另一個(gè)二級(jí)域名,而且要求我和c.test.com共用一個(gè)二級(jí)域名。。。我該怎么讓一個(gè).net寫的和一個(gè)java寫的項(xiàng)目跑在c.test.com這個(gè)域名上?或者讓java的跑在c.test.com/mine 這種子項(xiàng)目上?
謝謝各位大神
來源:開源中國
發(fā)布時(shí)間:2016-10-17 21:52:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
iis php怎樣取得取得偽靜態(tài)后的Url
如:index.php?id=12&n=34 偽靜態(tài)后 i-12-34.html
apache可以直接取得 i-12-34.html,但iis好像取得這樣的結(jié)果只能取得動(dòng)態(tài)的Url
來源:開源中國
發(fā)布時(shí)間:2011-12-27 11:40:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 早上好 http://www.test.com/test.txt 可以下載 http://www.test.com/test.ini 下載顯示404 怎么回事?。?
來源:開源中國
發(fā)布時(shí)間:2016-09-22 08:13:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
目前已知的
1.項(xiàng)目放到服務(wù)器上(centos7)發(fā)現(xiàn)mina客戶端無法收到服務(wù)端的信息,但是把mina客戶端放在本機(jī)運(yùn)行連接遠(yuǎn)程的mina服務(wù)端是可以的,客戶端和服務(wù)端通信是8080/UDP端口,centos端口已打開.
2.通過抓包確定,服務(wù)端確實(shí)成功發(fā)出了信息,但是部署在centos上的mina客戶端確實(shí)沒有收到
3.客戶端發(fā)送的數(shù)據(jù),服務(wù)端可以正常收到
4.mina客戶端集成在springboot上邊
5.最后在說一句....本機(jī)調(diào)試mina客戶端是沒有問題的
來源:開源中國
發(fā)布時(shí)間:2019-09-15 19:45:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
mina接收消息:開始符號(hào),和結(jié)束符號(hào)問題,TextLineCodecFactory默認(rèn)是/r/n
客戶機(jī)消息是 STX是開頭 ETX是結(jié)尾,對(duì)應(yīng)16進(jìn)制02 03,這時(shí)候TextLineCodecFactory需要怎么設(shè)置呢?
核心代碼:
TextLineCodecFactory tlcf = new TextLineCodecFactory(Charset.forName("gb2312"),new LineDelimiter("STXETX"),new LineDelimiter("STXETX"));
目前收到消息如下:沒有正常調(diào)用接收消息的messageReceived方法
完整代碼:
package com.yice.cloud.websocket;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
import org.apache.mina.core.service.IoAcceptor;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.codec.textline.LineDelimiter;
import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
import org.apache.mina.filter.logging.LoggingFilter;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MinaTimeTest {
private static final int PORT = 9123;
public static void main(String[] args) throws IOException {
//首先,我們?yōu)榉?wù)端創(chuàng)建IoAcceptor,NioSocketAcceptor是基于NIO的服務(wù)端監(jiān)聽器
IoAcceptor acceptor = new NioSocketAcceptor();
//接著,如結(jié)構(gòu)圖示,在Acceptor和IoHandler之間將設(shè)置一系列的Fliter"\r\n", "\r\n"
//包括記錄過濾器和編解碼過濾器。其中TextLineCodecFactory是mina自帶的文本解編碼器
acceptor.getFilterChain().addLast("logger", new LoggingFilter());
TextLineCodecFactory tlcf = new TextLineCodecFactory(Charset.forName("gb2312"),new LineDelimiter("STXETX"),new LineDelimiter("STXETX"));
//CustomProtocolCodecFactory tlcf = new CustomProtocolCodecFactory(Charset.forName("gb2312"));
acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(tlcf));
/*acceptor.getFilterChain().addLast("codec",
new ProtocolCodecFilter(new ObjectSerializationCodecFactory()));*/
//配置事務(wù)處理Handler,將請(qǐng)求轉(zhuǎn)由TimeServerHandler處理。
acceptor.setHandler(new TimeServerHandler());
//配置Buffer的緩沖區(qū)大小
acceptor.getSessionConfig().setReadBufferSize(2048);
//設(shè)置等待時(shí)間,每隔IdleTime將調(diào)用一次handler.sessionIdle()方法
acceptor.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, 10);
//綁定端口
acceptor.bind(new InetSocketAddress(PORT));
}
static class TimeServerHandler extends IoHandlerAdapter {
private Logger logger = LoggerFactory.getLogger(this.getClass());
public void exceptionCaught(IoSession session, Throwable cause)
throws Exception {
cause.printStackTrace();
}
public void messageReceived(IoSession session, Object message)
throws Exception {
logger.info("接受消息成功..." + message.toString());
super.messageReceived(session, message);
}
public void sessionIdle(IoSession session, IdleStatus status)
throws Exception {
System.out.println("IDLE ==============" + session.getIdleCount(status));
}
}
}
來源:開源中國
發(fā)布時(shí)間:2019-07-30 21:19:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
想跑一下TLD目標(biāo)跟蹤的程序,下了一個(gè)C++實(shí)現(xiàn)的代碼
https://github.com/jmfs/OpenTLD
程序是在vs2010下寫的,我電腦上裝的是vs2012,配置的opencv2.4.10.
打開run_tld時(shí)按照提示更新了,平臺(tái)工具集如果用Visual Studio 2012 (v110)
就會(huì)報(bào)錯(cuò),如下
1>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: ZERO_CHECK (Visual Studio 2010), 配置: Debug Win32 ------
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
2>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: LKTracker (Visual Studio 2010), 配置: Debug Win32 ------
3>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: ferNN (Visual Studio 2010), 配置: Debug Win32 ------
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
2>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
3>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
4>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: tld (Visual Studio 2010), 配置: Debug Win32 ------
5>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: tld_utils (Visual Studio 2010), 配置: Debug Win32 ------
4>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
4>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
5>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
5>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
6>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: run_tld, 配置: Debug Win32 ------
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/LKTracker.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ferNN.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/tld.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/tld_utils.vcxproj' does not exist.
6> Building Custom Rule C:/Users/Dev/OpenTLD C++/src/CMakeLists.txt
6> 系統(tǒng)找不到指定的路徑。
6>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: “cmd.exe”已退出,代碼為 3。
7>------ 已跳過全部重新生成: 項(xiàng)目: ALL_BUILD (Visual Studio 2010), 配置: Debug Win32 ------
7>沒有為此解決方案配置選中要生成的項(xiàng)目
========== 全部重新生成: 成功 0 個(gè),失敗 6 個(gè),跳過 1 個(gè) ==========
改成v100也還是報(bào)錯(cuò)
1>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: ZERO_CHECK (Visual Studio 2010), 配置: Debug Win32 ------
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
2>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: LKTracker (Visual Studio 2010), 配置: Debug Win32 ------
3>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: ferNN (Visual Studio 2010), 配置: Debug Win32 ------
3>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
4>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: tld (Visual Studio 2010), 配置: Debug Win32 ------
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
2>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
4>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
4>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
5>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: tld_utils (Visual Studio 2010), 配置: Debug Win32 ------
5>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
5>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
6>------ 已啟動(dòng)全部重新生成: 項(xiàng)目: run_tld (Visual Studio 2010), 配置: Debug Win32 ------
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/LKTracker.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ZERO_CHECK.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/ferNN.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/tld.vcxproj' does not exist.
6>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1395,5): warning : The referenced project 'C:/Users/Dev/OpenTLD C++/src/tld_utils.vcxproj' does not exist.
6>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(42,5): error MSB8020: The builds tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to build using the Visual Studio 2010 build tools.
7>------ 已跳過全部重新生成: 項(xiàng)目: ALL_BUILD (Visual Studio 2010), 配置: Debug Win32 ------
7>沒有為此解決方案配置選中要生成的項(xiàng)目
========== 全部重新生成: 成功 0 個(gè),失敗 6 個(gè),跳過 1 個(gè) ==========
應(yīng)該怎么解決呢?
來源:開源中國
發(fā)布時(shí)間:2017-01-24 22:43:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> opencv中的train函數(shù),訓(xùn)練的是一個(gè)人臉的多張圖片(比如不用表情的圖片),還是不同人臉的照片啊
來源:開源中國
發(fā)布時(shí)間:2016-04-16 19:36:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
小弟最近想要學(xué)習(xí)openCV,使用的開發(fā)環(huán)境是PyCharm,通過PyCharm下的 "Project Interpreter"安裝的opencv-python。安裝后下圖所示:
當(dāng)我 import cv2 后,沒有錯(cuò)誤提示,但是對(duì)于cv2模塊里面的函數(shù)沒有提示,如下圖所示:
如果我輸入“ cv2.cv2. ”之后就會(huì)出現(xiàn)正常的提示,如下圖所示:
而當(dāng)我使用 “ cv2.cv2.imread() “ 函數(shù)并運(yùn)行,就會(huì)出現(xiàn)錯(cuò)誤,提示 cv2沒有cv2屬性:
如果我不管軟件的自動(dòng)補(bǔ)全,直接使用 “cv2.imread()”函數(shù)則能運(yùn)行,而且可以通過“cv2.imshow”函數(shù)把圖片顯示出來。
請(qǐng)問各位大俠,是我的PyCharm軟件有些配置沒有設(shè)置好嗎???
來源:開源中國
發(fā)布時(shí)間:2017-02-10 17:29:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 用ffmpeg怎么無縫切換視頻源呢?我試過先把進(jìn)程關(guān)閉然后重新推流,但是這樣會(huì)導(dǎo)致中間卡頓20秒左右,也試過用javacv循環(huán)推流,但是幀數(shù)一直上不去,請(qǐng)問一下還有什么方法解決。
來源:開源中國
發(fā)布時(shí)間:2016-12-29 13:45:00
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 情況是這樣的, 從攝像頭獲取到的視頻, 經(jīng)過opencv的處理后, 通過使用 opencv的 videoWriter 創(chuàng)建一個(gè)視頻流, 將獲取到的mat數(shù)據(jù)保存在android開發(fā)板上, 但是發(fā)現(xiàn)在android開發(fā)板上 videoWriter 都無法創(chuàng)建視頻文件, 更別說保存視頻了。在電腦上是可以保存的, 而且使用c++ 的系統(tǒng)函數(shù)ofstream 是可以在android的開發(fā)板上同一個(gè)目錄下讀寫文件的, 不是目錄文件權(quán)限問題。 這種問題應(yīng)該怎么解決, 或者有其他的替代方案, 將獲取的mat數(shù)據(jù)保存為一個(gè)視頻文件, 方便以后讀取回放。 還望大神們不吝賜教
來源:開源中國
發(fā)布時(shí)間:2016-12-28 10:52:00