NutzCN Logo
问答 新手报到,看到nutz的标题就已经爱“上”她了
发布于 2979天前 作者 JGeek 1565 次浏览 复制 上一个帖子 下一个帖子
标签:

请根据标题进行各种“污”

6 回复

居然敢上nutz 拖出去弹JJ

@wendal 按照你《Nutz-book Nutz烹调向导》(http://nutzbook.wendal.net/index.html)还有点摸不到头脑哎,代码按照你写的,但是有好多错,研究了几个小时,主要是阿里的那个Druid总是报错,另外有没有简单的工程让发我一下,让我看看,能快速入门的那种。多谢,我的邮箱wohyd@sina.cn
这是用maven引入的jar

<dependencies>
		<!-- <dependency>
			<groupId>io.druid</groupId>
			<artifactId>druid-server</artifactId>
			<version>0.9.1.1</version>
		</dependency>
		<dependency>
			<groupId>io.druid</groupId>
			<artifactId>druid-api</artifactId>
			<version>0.9.1.1</version>
		</dependency>
 -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>1.0.18</version>
		</dependency>
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutz</artifactId>
			<version>1.r.57</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>6.0.2</version>
		</dependency>
	</dependencies>

@tonyyule 来呀来呀,你弹他他把你顶飞!!!

@wendal 不通过maven的话,直接手动添加jar,那就只报一个,数据库也插入成功

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
九月 19, 2016 4:10:48 下午 com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker warn
警告: Cannot resolve com.mysq.jdbc.Connection.ping method.  Will use 'SELECT 1' instead.
java.lang.NullPointerException
	at com.alibaba.druid.pool.vendor.MySqlValidConnectionChecker.<init>(MySqlValidConnectionChecker.java:50)
	at com.alibaba.druid.pool.DruidDataSource.initValidConnectionChecker(DruidDataSource.java:944)
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:659)
	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.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:265)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:150)
	at com.nutz.module.MainSetup.init(MainSetup.java:18)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4939)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
	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:745)

九月 19, 2016 4:10:48 下午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
添加回复
请先登陆
回到顶部