退会済みユーザー
2019/06/21 00:12
つ 解凍
投稿2019/06/20 13:49
SpringBoot(STS)のプロジェクトを、eclipse>実行>spring boot アプリケーション経由で実行すると、正常起動しアプリケーションも問題なく動くのですが、JARで固めてコマンドプロンプト上から実行すると下記のmybatis関係でエラーが出ます。
アーカイブが正しくできていないのでしょうか・・
エラーを見るにMCustomerHistorySelectConditionが見つけられていないようなのですが、
jarを解凍しても下記のパスに存在しているようです。
当該クラスのパッケージは下記の通りです。
com.ycm.domain.model.condition.MCustomerHistorySelectCondition.java
mybatis-config.xml
<typeAliases> <package name="com.ycm.domain.model.bean" /> <package name="com.ycm.domain.model.condition" /> <package name="com.ycm.domain.model.entity" /> <package name="com.ycm.domain.model.form" /> </typeAliases>
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'MCustomerHistoryService': Unsatisfied dependency expressed through field 'mCusHisRep'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'MCustomerHistoryRepository' defined in URL [jar:file:/C:/Users/xxxx/Desktop/YCM.jar!/BOOT-INF/classes!/com/ycm/domain/repository/MCustomerHistoryRepository.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactoryBean' defined in class path resource [com/ycm/config/MyBatisConfig.class]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'class path resource [com/ycm/domain/repository/MCustomerHistoryRepository.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'MCustomerHistorySelectCondition'. Cause: java.lang.ClassNotFoundException: Cannot find class: MCustomerHistorySelectCondition
SpringBoot1.5.3
spring-jdbc:4.0.6
mybatis:3.4.5
mybatis-spring:1.3.1
あなたの回答
tips
プレビュー