hongs77
98
2019-01-08 13:03:06
8
1676

MariaDB 스프링 연동 에러 문의좀 하겠습니다 ㅜ


2019. 1. 8 오후 12:59:33 org.apache.tomcat.util.digester.SetPropertiesRule begin

경고: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MariaDB' did not find a matching property.

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Server version:        Apache Tomcat/7.0.77

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Server built:          Mar 28 2017 16:01:48 UTC

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Server number:         7.0.77.0

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: OS Name:               Windows 7

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: OS Version:            6.1

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Architecture:          amd64

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Java Home:             C:\Program Files\Java\jdk1.6.0_45\jre

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: JVM Version:           1.6.0_45-b06

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: JVM Vendor:            Sun Microsystems Inc.

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: CATALINA_BASE:         C:\Users\UCSSYSTEM\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: CATALINA_HOME:         C:\Program Files\Java\apache-tomcat-7.0.77

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: -Dcatalina.base=C:\Users\UCSSYSTEM\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: -Dcatalina.home=C:\Program

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: Files\Java\apache-tomcat-7.0.77

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: -Dwtp.deploy=C:\Users\UCSSYSTEM\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: -Djava.endorsed.dirs=C:\Program

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: Files\Java\apache-tomcat-7.0.77\endorsed

2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log

정보: Command line argument: -Dfile.encoding=UTF-8

2019. 1. 8 오후 12:59:33 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

정보: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_45\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jdk1.6.0_35/bin/../jre/bin/server;C:/Program Files/Java/jdk1.6.0_35/bin/../jre/bin;C:/Program Files/Java/jdk1.6.0_35/bin/../jre/lib/amd64;\;C:\Program Files\Java\jdk1.6.0_35\bin;C:\app\UCSSYSTEM\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Bandizip\;C:\Users\UCSSYSTEM\Desktop\UCSSystem\developer\eclipse;;.

2019. 1. 8 오후 12:59:33 org.apache.coyote.AbstractProtocol init

정보: Initializing ProtocolHandler ["http-bio-80"]

2019. 1. 8 오후 12:59:34 org.apache.coyote.AbstractProtocol init

정보: Initializing ProtocolHandler ["ajp-bio-8009"]

2019. 1. 8 오후 12:59:34 org.apache.catalina.startup.Catalina load

정보: Initialization processed in 711 ms

2019. 1. 8 오후 12:59:34 org.apache.catalina.core.StandardService startInternal

정보: Starting service Catalina

2019. 1. 8 오후 12:59:34 org.apache.catalina.core.StandardEngine startInternal

정보: Starting Servlet Engine: Apache Tomcat/7.0.77

2019. 1. 8 오후 12:59:34 org.apache.tomcat.websocket.server.WsSci onStartup

정보: JSR 356 WebSocket (Java WebSocket 1.1) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 

2019. 1. 8 오후 12:59:35 org.apache.catalina.core.ApplicationContext log

정보: No Spring WebApplicationInitializer types detected on classpath

2019. 1. 8 오후 12:59:35 org.apache.catalina.core.ApplicationContext log

정보: Initializing Spring root WebApplicationContext

INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started

INFO : org.springframework.web.context.support.XmlWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Tue Jan 08 12:59:35 KST 2019]; root of context hierarchy

INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]

WARN : org.springframework.web.context.support.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.UnsupportedClassVersionError: org/mariadb/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class org.mariadb.jdbc.Driver)

ERROR: org.springframework.web.context.ContextLoader - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.UnsupportedClassVersionError: org/mariadb/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class org.mariadb.jdbc.Driver)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1568)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

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

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

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

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

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

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

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

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

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

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$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:662)

Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.UnsupportedClassVersionError: org/mariadb/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class org.mariadb.jdbc.Driver)

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1564)

... 23 more

2019. 1. 8 오후 12:59:36 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.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.UnsupportedClassVersionError: org/mariadb/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class org.mariadb.jdbc.Driver)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1568)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

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

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

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

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

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

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

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

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

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

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$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:662)

Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:

PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is java.lang.UnsupportedClassVersionError: org/mariadb/jdbc/Driver : Unsupported major.minor version 52.0 (unable to load class org.mariadb.jdbc.Driver)

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)

at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1564)

... 23 more

2019. 1. 8 오후 12:59:36 org.apache.catalina.core.StandardContext startInternal

심각: One or more listeners failed to start. Full details will be found in the appropriate container log file

2019. 1. 8 오후 12:59:36 org.apache.catalina.core.StandardContext startInternal

심각: Context [/ucs] startup failed due to previous errors

2019. 1. 8 오후 12:59:36 org.apache.catalina.core.ApplicationContext log

정보: Closing Spring root WebApplicationContext

2019. 1. 8 오후 12:59:36 org.apache.coyote.AbstractProtocol start

정보: Starting ProtocolHandler ["http-bio-80"]

2019. 1. 8 오후 12:59:36 org.apache.coyote.AbstractProtocol start

정보: Starting ProtocolHandler ["ajp-bio-8009"]

2019. 1. 8 오후 12:59:36 org.apache.catalina.startup.Catalina start

정보: Server startup in 2239 ms



=====================================================================
root-context.xml 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                        http://www.springframework.org/schema/jdbc  http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
    <!-- 마리아DB 데이터베이스 연결 부분 시작 -->
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClass" value="org.mariadb.jdbc.Driver"></property>
        <property name="url" value="jdbc:mariadb://localhost:3306/caelumhouse"></property>
        <property name="username" value="root"></property>
        <property name="password" value="root"></property>
    </bean>
<!-- 마리아DB 데이터베이스 연결 부분 끝 -->
    
    
<!-- 마이바티스 지원을 위한 빈 등록 -->    
     <!--  1]SqlSessionFactory -->
     <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
      <!-- 데이타소스:데이타베이스 연결정보 -->
      <property name="dataSource" ref="dataSource"/>
      <!-- 환경설정 파일 위치 설정 -->
      <property name="configLocation" value="classpath:mybatis/configuration.xml"/>
     </bean>
<!-- 2]SqlSessionTemplate -->
<bean id="template" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg ref="sqlSessionFactory"/>
</bean>
</beans>


============================================================================
pop.xml

<!--  스프링 JDBC 라이브러리 추가 -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>4.3.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>commons-dbcp</groupId>
    <artifactId>commons-dbcp</artifactId>
    <version>1.4</version>
</dependency>
<!-- 마이바티스 사용을 위한 디펜던시 추가 -->
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis</artifactId>
    <version>3.2.7</version>
</dependency>
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>1.2.2</version>
</dependency>
<!-- 마이바티스 사용을 위한 디펜던시 추가끝 -->
<!-- JSON라이브러리 -->
<dependency>
    <groupId>com.googlecode.json-simple</groupId>
    <artifactId>json-simple</artifactId>
    <version>1.1.1</version>
</dependency>

<!--  maria DB -->
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>2.3.0</version>
</dependency>
<dependency>
   <groupId>org.apache.httpcomponents</groupId>
   <artifactId>httpclient</artifactId>
   <version>4.5.2</version>
   <scope>runtime</scope>
</dependency>



0
  • 답변 8

  • hongs77
    98
    2019-01-08 13:04:00

    root-context와 pop.xml을

    마리아디비가 아닌 오라클 설정으로 바꾸면 정상적으로 되는데

    마리아디비로 설정하니 에러가 나네요 ㅜ

  • 아이러니y
    1k
    2019-01-08 13:26:09

    자바버전이 몇인가요? 자바8이상이아니면 pom.xml에서 마리아디비 버전은 1점대로 낮춰보세요

  • hongs77
    98
    2019-01-08 13:38:43 작성 2019-01-08 13:40:38 수정됨

    자바는 1.8 버전입니다 

     마리아디비 버전은 1점대로 낮춰봤는데도 안되네요 ㅜㅜ

  • yeori
    1k
    2019-01-08 13:51:58

    Java 1.6 쓰고 있네요

    2019. 1. 8 오후 12:59:33 org.apache.catalina.startup.VersionLoggerListener log
    정보: Java Home:             C:\Program Files\Java\jdk1.6.0_45\jre

    마리아Db 드라이버 2.x 이면 1.8 이상 필요한데 설치된 jdk는 1.6 이라서 돌릴 수가 없습니다.

    https://mariadb.com/kb/en/library/about-mariadb-connector-j/

    Jdk 1.6 에서 사용하시려면 1.7.x 버전 써야 해요... 위 문서에 잘 나와있음

  • 아이러니y
    1k
    2019-01-08 13:54:00

    이클립스 프로젝트 자바 버전도 맞춰져있나요? 아무리봐도 에러내용이 버전문제인거같아서요

  • hongs77
    98
    2019-01-08 14:20:15

    와... 버전 문제 맞네요

    자바버전 낮추니 되었습니다.

    감사합니다 ㅜㅜ

  • 아이러니y
    1k
    2019-01-08 15:53:21

    잘 해결되었다니 다행입니다.~

  • hongs77
    98
    2019-01-12 13:35:29

    감사합니다 :)

  • 로그인을 하시면 답변 을 등록할 수 있습니다.