zhaoyong1314 / paoding-rose

Automatically exported from code.google.com/p/paoding-rose
0 stars 0 forks source link

paoding-rose在portal的例子在jetty上运行会报错 #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 使用paoding-rose-portal,开发portal应用
2. 启动jetty7.5服务器
3. 请求portal页面

What is the expected output? What do you see instead?

输出portal页面,但却出现异常:
2012-07-03 11:39:38,328 ERROR [net.paoding.rose.web.portal.impl.WindowTask] - 
java.lang.NullPointerException
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:214)
    at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:115)
    at net.paoding.rose.web.portal.impl.WindowTask.run(WindowTask.java:81)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
2012-07-03 11:39:38,328 DEBUG [net.paoding.rose.web.portal.Wind

Original issue reported on code.google.com by byd9...@gmail.com on 3 Jul 2012 at 3:36

GoogleCodeExporter commented 9 years ago
另外:因为我这边使用的maven工程中portal-rose的jar包来自于http
s://github.com/XiaoMi/rose上陈臻放在中央仓库的jar,不过我这边测
试了一下最新代码编译出来的jar,也不成,请帮忙测试一下je
tty服务器容器为什么会出现这样的错误,谢谢

Original comment by byd9...@gmail.com on 3 Jul 2012 at 3:45

GoogleCodeExporter commented 9 years ago
hi,我是陈臻(54chen),这是由于jetty默认使用了nio的connector的原�
��,请更换启动时使用bio的connector。
给你一个maven-jetty-plugin的例子,测试通过。
<configuration>
                    <connector implementation="org.mortbay.jetty.bio.SocketConnector">
                    </connector>
                    <scanIntervalSeconds>10</scanIntervalSeconds> 
                    <stopKey>foo</stopKey>
                    <stopPort>9999</stopPort>
                </configuration>

Original comment by czh...@gmail.com on 3 Jul 2012 at 5:15

GoogleCodeExporter commented 9 years ago
感谢陈臻的回复,按照上面回复我这边做了一下配置,配置��
�下:
<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.54chen</groupId>
    <artifactId>gb</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <dependencies>
        <dependency>
            <groupId>com.54chen</groupId>
            <artifactId>paoding-rose-scanning</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.54chen</groupId>
            <artifactId>paoding-rose</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.54chen</groupId>
            <artifactId>paoding-rose-portal</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.54chen</groupId>
            <artifactId>paoding-rose-jade</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>  
          <version>1.2.16</version>
        </dependency>

        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>

        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>5.1.6</version>
        </dependency>

        <dependency>
          <groupId>commons-fileupload</groupId>
          <artifactId>commons-fileupload</artifactId>
          <version>1.2.2</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <webResources>
                        <resource>
                            <targetPath>WEB-INF</targetPath>
                            <filtering>true</filtering>
                            <directory>src/main/resources</directory>
                            <includes>
                                <include>**/*.xml</include>
                                <include>**/*.properties</include>
                            </includes>
                            <targetPath>WEB-INF</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <fork>true</fork>
                    <verbose>true</verbose>
                    <encoding>UTF-8</encoding>
                    <compilerArguments>
                        <sourcepath>
                            ${project.basedir}/src/main/java
                        </sourcepath>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- 忽略测试 -->
                    <skip>true</skip>
                </configuration>
            </plugin>
            <!-- 修改jetty connector 配置 -->
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <configuration>
                    <connector implementation="org.mortbay.jetty.bio.SocketConnector">
                    </connector>
                    <scanIntervalSeconds>10</scanIntervalSeconds> 
                    <stopKey>foo</stopKey>
                    <stopPort>9999</stopPort>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

但是其访问依然报错,不知道是不是配置不正确呢?谢谢

Original comment by byd9...@gmail.com on 3 Jul 2012 at 8:47