NutzCN Logo
问答 maven 项目启动失败
发布于 2670天前 作者 Discen 1385 次浏览 复制 上一个帖子 下一个帖子
标签:
2017-7-25 14:26:16 org.apache.catalina.core.AprLifecycleListener init
��Ϣ: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin;D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin
2017-7-25 14:26:16 org.apache.coyote.http11.Http11Protocol init
��Ϣ: Initializing Coyote HTTP/1.1 on http-8080
2017-7-25 14:26:16 org.apache.catalina.startup.Catalina load
��Ϣ: Initialization processed in 483 ms
2017-7-25 14:26:16 org.apache.catalina.core.StandardService start
��Ϣ: Starting service Catalina
2017-7-25 14:26:16 org.apache.catalina.core.StandardEngine start
��Ϣ: Starting Servlet Engine: Apache Tomcat/6.0.13
17-7-25 14:26:17.266 WARN [main] !!You are using default SystemLog! Don't use it in Production environment!!
17-7-25 14:26:17.281 INFO [main] NutFilter[nutz] starting ...
17-7-25 14:26:17.599 DEBUG [main] Locations for Scans:
[Dir[path=D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin], Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\nutz-1.r.59.jar], Jar[path=D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin\bootstrap.jar], Jar[path=D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\lib\tools.jar]]
17-7-25 14:26:17.600 INFO [main] [loc=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\classes]not exist
17-7-25 14:26:17.861 DEBUG [main] Locations for Scans:
{D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin=Dir[path=D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\nutz-1.r.59.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\nutz-1.r.59.jar], D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin\bootstrap.jar=Jar[path=D:\MyEclipse\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin\bootstrap.jar], D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\lib\tools.jar=Jar[path=D:\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\lib\tools.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\classes=ErrorResourceLocation [loc=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\classes], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\tools.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\tools.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-api-2.7.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-api-2.7.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\jconsole.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\jconsole.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\druid-1.0.25.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\druid-1.0.25.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\mysql-connector-java-5.1.40.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\mysql-connector-java-5.1.40.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\jedis-2.9.0.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\jedis-2.9.0.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-core-2.7.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-core-2.7.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-slf4j-impl-2.7.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-slf4j-impl-2.7.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\fastjson-1.2.17.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\fastjson-1.2.17.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-1.2-api-2.7.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\log4j-1.2-api-2.7.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\commons-pool2-2.4.2.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\commons-pool2-2.4.2.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\slf4j-api-1.7.21.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\slf4j-api-1.7.21.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\junit.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\junit.jar], D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\org.hamcrest.core_1.1.0.v20090501071000.jar=Jar[path=D:\MyEclispe10\.metadata\.me_tcat\webapps\p2\WEB-INF\lib\org.hamcrest.core_1.1.0.v20090501071000.jar]}
17-7-25 14:26:18.101 DEBUG [main] Using 94 castor for Castors
2017-7-25 14:26:18 org.apache.catalina.core.StandardContext filterStart
����: Exception starting filter nutz
org.nutz.mvc.NutConfigException: java.lang.ClassNotFoundException: com.sctele.Main
	at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:134)
	at org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:51)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:18)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: com.sctele.Main
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at org.nutz.lang.Lang.loadClass(Lang.java:2021)
	at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
	... 31 more
2017-7-25 14:26:18 org.apache.catalina.core.StandardContext start
����: Error filterStart
2017-7-25 14:26:18 org.apache.catalina.core.StandardContext start
����: Context [/p2] startup failed due to previous errors
2017-7-25 14:26:18 org.apache.coyote.http11.Http11Protocol start
��Ϣ: Starting Coyote HTTP/1.1 on http-8080
2017-7-25 14:26:18 org.apache.jk.common.ChannelSocket init
��Ϣ: JK: ajp13 listening on /0.0.0.0:8009
2017-7-25 14:26:18 org.apache.jk.server.JkMain start
��Ϣ: Jk running ID=0 time=0/22  config=null
2017-7-25 14:26:18 org.apache.catalina.startup.Catalina start
��Ϣ: Server startup in 1641 ms

15 回复

写得很清楚,类找不到

少类

来自美丽的 NutzCN

你自己的类

com.sctele.Main

来自美丽的 NutzCN

有类啊

package com.sctele;


import org.nutz.mvc.adaptor.JsonAdaptor;
import org.nutz.mvc.annotation.AdaptBy;
import org.nutz.mvc.annotation.By;
import org.nutz.mvc.annotation.Encoding;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Filters;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.SetupBy;
import org.nutz.mvc.annotation.Views;
import org.nutz.mvc.ioc.provider.ComboIocProvider;

import com.sctele.core.filter.TokenFilter;
import com.sctele.core.view.DataViewMarker;
import com.sctele.web.SetupModule;
import com.sctele.web.bean.DataTransfer;
import com.sctele.web.module.DataTransferModule;

@Ok("json")
@Fail("json:500")
@Encoding(input = "UTF-8", output = "UTF-8")
//@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
//    "*anno", "com.sctele.web.service.datatransfer",
//    "*tx", // 事务拦截 aop
//    "*async"}) // 异步执行aop
@IocBy(type = ComboIocProvider.class, args = {	"*org.nutz.ioc.loader.json.JsonLoader",
												"ioc",
												"*org.nutz.ioc.loader.annotation.AnnotationIocLoader",
												"com.sctele.web.service",
												"com.sctele.web.module"})
@Modules(scanPackage = true, packages = {"com.sctele"})
@AdaptBy(type=JsonAdaptor.class)
@Filters(@By(type = TokenFilter.class))
@Views({DataViewMarker.class})
@SetupBy(SetupModule.class)
public class Main {
	 public static void main(String args[]) { 

	    } 
}

忘记编译咯

web项目也要编译么,我本来都运行起来的,不知道怎么回事就开始爆这个错

clean一下,eclipse抽风了吧

clean 了 还是一样啊

@wendal 依然启动不了 ,还有可能是哪里的问题啊?

SetupModule.java

package com.sctele.web;

import org.nutz.dao.Dao;
import org.nutz.dao.util.Daos;
import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;

public class SetupModule implements Setup {

	public void init(NutConfig nc) {
		Ioc ioc = nc.getIoc();
        Dao dao = ioc.get(Dao.class);
        // 如果没有createTablesInPackage,请检查nutz版本
        Daos.createTablesInPackage(dao, "com.sctele", false);
	}

	@Override
	public void destroy(NutConfig nc) {

	}

}

datatransfer.java:插入数据

package com.sctele.web.module;


import java.util.List;



import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Param;

import com.sctele.web.bean.DataTransfer;
import com.sctele.web.service.DaoService;

@IocBean
@At("/dt")
public class DataTransferModule  {
	@Inject
	protected Dao dao;
//	@Inject
//	DataTransfer dataTransfer;
	
	@At("/add")
	//插入获取到的数据
	public DataTransfer insertInfo(String info){
		DataTransfer dataTransfer = new DataTransfer();	
		
		//info->data[41]
		String[] data= new String[41];
		//example
		int i =0;
		String str="5";
		for(i=0;i<41;i++){
			data[i] = str;
		}

		dataTransfer.setType(data[0]);dataTransfer.setSupplier(data[1]);dataTransfer.setVision(data[2]);dataTransfer.setMac(data[3]);
		dataTransfer.setUploadTime(Integer.parseInt(data[4]));dataTransfer.setIptvAccount(data[5]);dataTransfer.setSTBId(data[6]);dataTransfer.setOUI(data[7]);
		dataTransfer.setProductClass(data[8]);dataTransfer.setSoftwareVersion(data[9]);dataTransfer.setHardwareVersion(data[10]);dataTransfer.setIpAddress(data[11]);
		dataTransfer.setTeleOUI(data[12]);dataTransfer.setTeleProductClass(data[13]);dataTransfer.setTeleResolution(data[14]);dataTransfer.setLogUploadInterval(data[15]);
		dataTransfer.setReportSerialNumber(data[16]);dataTransfer.setWorkingTime(data[17]);dataTransfer.setCPURate(data[18]);dataTransfer.setMEMRate(data[19]);
		dataTransfer.setFrameLR(data[20]);dataTransfer.setFrameDelay(data[21]);dataTransfer.setFrameJitter(data[22]);dataTransfer.setVideoStreamingRate(data[23]);
		dataTransfer.setRTPLossRate(data[24]);dataTransfer.setRTPThroughPut(data[25]);dataTransfer.setMdiMLR(data[26]);dataTransfer.setMdiType(data[27]);
		dataTransfer.setMdiDF(data[28]);dataTransfer.setMaxMdiDF(data[29]);dataTransfer.setJitter(data[30]);dataTransfer.setMaxJitter(data[31]);
		dataTransfer.setResponseDelay(data[32]);dataTransfer.setChannelSwitchDelay(data[33]);dataTransfer.setStreamBreak(data[34]);dataTransfer.setEPGDelay(data[35]);
		dataTransfer.setResourceURL(data[36]);dataTransfer.setEPGVisitNum(data[37]);dataTransfer.setEPGSuccessNum(data[38]);dataTransfer.setKaNum(data[39]);
		dataTransfer.setKaDelay(data[40]);
		
		
		dao.insert(dataTransfer);
		return dataTransfer;
	}

是找不到类,编译的问题

@wendal 我是myeclipse,直接run on tomcat的

@wendal maven项目需要配置mainmodule 在pom.xml中么?

跟pom.xml没关系

可能是 tomcat 插件缓存的问题,我以前的做法是找到缓存目录,直接干掉

添加回复
请先登陆
回到顶部