NutzCN Logo
问答 这是maven问题吗,jar包问题吗?怎么解决呢
发布于 1504天前 作者 qq_554ea0dc 826 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

[DEBUG] 2017-12-11 11:05:08,969 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) - Opening resource from class path [shiro.ini] [DEBUG] 2017-12-11 11:05:09,002 org.apache.shiro.config.Ini.load(Ini.java:342) - Parsing [main] [DEBUG] 2017-12-11 11:05:09,021 org.apache.shiro.config.Ini.load(Ini.java:342) - Parsing [urls] [DEBUG] 2017-12-11 11:05:09,044 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) - Creating instance from Ini [sections=main,urls] [ERROR] 2017-12-11 11:05:16,568 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:150) - Shiro environment initialization failed
java.lang.NoClassDefFoundError: org/nutz/dao/Condition
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:177)
at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:164)
at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:144)
at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:119)
at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:161)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:124)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:102)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:88)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
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: org.nutz.dao.Condition
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
... 32 more

5 回复

pom.xml没加nutz?

好像是maven jar包更新不了

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>wk-app</artifactId>
        <groupId>cn.wizzer.app</groupId>
        <version>4.0.1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <packaging>war</packaging>
    <artifactId>wk-web</artifactId>
    <dependencies>
        <dependency>
            <groupId>cn.wizzer</groupId>
            <artifactId>wk-framework</artifactId>
            <version>4.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>cn.wizzer</groupId>
            <artifactId>wk-code-generator</artifactId>
            <version>4.0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <finalName>nutzwk</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <phase>prepare-package</phase>
                        <configuration>
                            <excludes>
                                <exclude>src/main/resources/**</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archiveClasses>true</archiveClasses>
                    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
                    <warSourceExcludes>WEB-INF/classes/cn/**</warSourceExcludes>
                    <webResources>
                        <resource>
                            <directory>src/main/resources</directory>
                            <targetPath>WEB-INF/classes</targetPath>
                            <includes>
                                <include>**</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty-version}</version>
                <configuration>
                    <httpConnector>
                        <port>8080</port>
                    </httpConnector>
                    <stopKey>shutdown</stopKey>
                    <stopPort>9966</stopPort>
                    <scanIntervalSeconds>5</scanIntervalSeconds>
                    <dumpOnStart>true</dumpOnStart>
                    <webApp>
                        <contextPath>/</contextPath>
                        <!--
                        <resourceBases>
                          <resourceBase>${project.basedir}/src/main/webapp</resourceBase>
                          <resourceBase>${project.basedir}/commons</resourceBase>
                        </resourceBases>
                        -->
                    </webApp>
                    <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
                        <filename>target/access-yyyy_mm_dd.log</filename>
                        <filenameDateFormat>yyyy_MM_dd</filenameDateFormat>
                        <logDateFormat>yyyy-MM-dd HH:mm:ss</logDateFormat>
                        <logTimeZone>GMT+8:00</logTimeZone>
                        <append>true</append>
                        <logServer>true</logServer>
                        <retainDays>120</retainDays>
                        <logCookies>true</logCookies>
                    </requestLog>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

以前能跑的?

是呀,换了台机子就不能跑了

呵呵,换了机器... 那maven的依赖都得重新下载了

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