메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


프로그램에서 servlet이 필요하여 provided (group: 'javax.servlet', name: 'servlet-api', version:'2.5')와 같은 방법등으로 servlet api를 사용하는데 이렇게 되면 필요한 jar가 만들어지고 다른곳에서 만들어진jar를 쓸때 servlet관련 경고가 발생하면서 만들어진jar 전체를 사용하지 못하는 문제가 발생한다.

이때는 tomcat설치 위치 밑에 lib로 가서 servlet-api.jar를 복사하여 java가 설치된 위치의 jre/lib/ext에 복사해준다. 이렇게 하면 client에서 별도로 가지고 있지 않아도 전체적으로 servlet-api.jar에 있는 클래스를 사용할 수 있게된다.


*참고

정보: validateJarFile(C:devworkspace.metadata.pluginsorg.eclipse.wst.server.coretmp4wtpwebappssda2WEB-INFlibsda-common-2.0.0-SNAPSHOT.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class:javax/servlet/Servlet.class라는 부분을 보면 servlet.class만 등록되지 않는다고 했으나 "com.gooper.comm.logger.LoggerAspect"를 포함하는 test-common-2.0.0-SNAPSHOT.jar 전체가 등록되지 않아서 class를 찾지 못하는 오류가 발생하고 있다.


----오류내용

8월 10, 2016 2:29:58 오후 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom

정보: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [225] milliseconds.

8월 10, 2016 2:29:59 오후 org.apache.catalina.loader.WebappClassLoader validateJarFile

정보: validateJarFile(C:devworkspace.metadata.pluginsorg.eclipse.wst.server.coretmp4wtpwebappssda2WEB-INFlibtest-common-2.0.0-SNAPSHOT.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class:javax/servlet/Servlet.class

8월 10, 2016 2:30:07 오후 org.apache.catalina.startup.TaglibUriRule body

정보: TLD skipped. URI: http://www.springframework.org/tags/form is already defined

8월 10, 2016 2:30:07 오후 org.apache.catalina.startup.TaglibUriRule body

정보: TLD skipped. URI: http://www.springframework.org/tags is already defined

8월 10, 2016 2:30:08 오후 org.apache.catalina.startup.TldConfig execute

정보: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

8월 10, 2016 2:30:08 오후 org.apache.catalina.core.ApplicationContext log

정보: No Spring WebApplicationInitializer types detected on classpath

8월 10, 2016 2:30:08 오후 org.apache.catalina.core.ApplicationContext log

정보: Initializing Spring root WebApplicationContext

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

8월 10, 2016 2:30:08 오후 org.apache.catalina.core.StandardContext listenerStart

심각: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.gooper.comm.logger.LoggerAspect] for bean with name 'loggerAspect' defined in file [C:devworkspace.metadata.pluginsorg.eclipse.wst.server.coretmp4wtpwebappssda2WEB-INFclassesconfigspringcontext-aspect.xml]; nested exception is java.lang.ClassNotFoundException: com.gooper.comm.logger.LoggerAspect

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1327)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594)

at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1396)

at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:959)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:683)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)

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)

Caused by: java.lang.ClassNotFoundException: com.gooper.comm.logger.LoggerAspect

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)

at org.springframework.util.ClassUtils.forName(ClassUtils.java:247)

at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395)

at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1348)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1319)

... 18 more


8월 10, 2016 2:30:08 오후 org.apache.catalina.core.ApplicationContext log

위로