ShopServiceTest验证addshop时报错
来源:4-5 店铺注册之Service层的实现
三岁小绵阳
2018-12-25
十二月 25, 2018 3:47:49 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 2, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 10000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1hu9z1rcrjlanjkgqs|47af7f3d, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.cj.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1hu9z1rcrjlanjkgqs|47af7f3d, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/o2o?serverTimezone=GMT%2B8&useSSL=false, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
15:47:49.448 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Creating a new SqlSession
15:47:49.452 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960]
15:47:49.456 [main] DEBUG org.mybatis.spring.transaction.SpringManagedTransaction - JDBC Connection [com.mchange.v2.c3p0.impl.NewProxyConnection@7c3fdb62] will be managed by Spring
15:47:49.458 [main] DEBUG com.imooc.aaa.o2o.dao.ShopDao.insertShop - ==> Preparing: INSERT INTO tb_shop(owner_id, area_id, shop_category_id, shop_name, shop_desc, shop_addr, phone, shop_img, priority, create_time, last_edit_time, enable_status, advice) VALUES (?,?,?,?, ?,?,?,?,?, ?,?, ?,?)
15:47:49.484 [main] DEBUG com.imooc.aaa.o2o.dao.ShopDao.insertShop - ==> Parameters: 1(Long), 2(Integer), 1(Long), 测试的店(String), test(String), test(String), test(String), null, null, 2018-12-25 15:47:49.444(Timestamp), 2018-12-25 15:47:49.444(Timestamp), 0(Integer), 审核中(String)
15:47:49.486 [main] DEBUG com.imooc.aaa.o2o.dao.ShopDao.insertShop - <== Updates: 1
15:47:49.497 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960]
15:47:49.499 [main] DEBUG com.imooc.aaa.o2o.util.ImageUtil - current relativeAddr is :\upload\images\item\shop\24\2018122515474991437.jpg
15:47:49.499 [main] DEBUG com.imooc.aaa.o2o.util.ImageUtil - current complete addr is :D:\projectdev\image\upload\images\item\shop\24\2018122515474991437.jpg
15:47:49.565 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Fetched SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960] from current transaction
15:47:49.581 [main] DEBUG com.imooc.aaa.o2o.dao.ShopDao.updateShop - ==> Preparing: update tb_shop SET shop_name=?, shop_desc=?, shop_addr=?, phone=?, last_edit_time=?, enable_status=?, advice=?, shop_category_id=?, area_id =? where shop_id =?
15:47:49.582 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960]
15:47:49.583 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960]
15:47:49.583 [main] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@34b9f960]
写回答
2回答
-
翔仔
2018-12-26
同学好,这个需要同学设置断点调试一下才能准确定位问题,程序不能光靠猜呢。此外,同学提供的截图里面并没有错误,需要你提供ut那个截面的错误栈
00 -
三岁小绵阳
提问者
2018-12-25
需要的水印图片生成,但是数据库中的数据并没有插入和更新,之前shopdao中的insert 和update方法已经测试过,并没有错误
00
相似问题