在Bluemix服务器上部署后,Url不会映射

时间:2016-01-24 10:25:00

标签: mongodb spring-mvc spring-security cloud ibm-cloud

我正在尝试使用sts-3.6.4中的IBM Bluemix工具在云上推送我的应用程序。我的应用程序在云上成功推送但没有映射。     如果我正在点击网址(http://cpeee.eu-gb.mybluemix.net/si-server/login)     然后它会在控制台上显示以下错误...

[INFO    ] FFDC1015I: An FFDC Incident has been created: "java.lang.NullPointerException com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters 1105" at ffdc_16.01.24_09.23.56.0.log
at [internal classes]
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4900)
    ... 1 more
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
Caused by: java.lang.NullPointerException
[INFO    ] FFDC1015I: An FFDC Incident has been created: "java.lang.NullPointerException com.ibm.ws.webcontainer.webapp.WebApp.handleError 912" at ffdc_16.01.24_09.23.57.0.log
                                                                                                               myapp
[ERROR   ] Error Page Exception: 
                                                                                                               com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.lang.NullPointerException
                                                                                                               Error Page Exception
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
    at [internal classes]
Caused by: java.lang.NullPointerException
                                                                                                               /si-server
    ... 3 more
cpeee.eu-gb.mybluemix.net - [24/01/2016:09:23:44 +0000] "GET /si-server/login HTTP/1.1" 500 0 7419 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36" 159.122.215.7:59001 x_forwarded_for:"210.212.81.17" x_forwarded_proto:"http" vcap_request_id:aedab719-40ea-4612-4f45-65474e40fa16 response_time:13.444847109 app_id:1ef857bc-de81-424d-8f46-0abd1fb59b66 x_global_transaction_id:"315194447"
[WARNING ] SRVE0190E: File not found: /login.jsp
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4900)
[ERROR   ] SRVE0315E: An exception occurred: java.lang.Throwable: java.lang.NullPointerException
    ... 1 more
Caused by: java.lang.NullPointerException
    at [internal classes]
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChainContents(WebAppFilterManager.java:829)
Caused by: java.lang.NullPointerException
                                                                                                               com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.lang.NullPointerException
[ERROR   ] Error Page Exception: 
                                                                                                               Error Page Exception
                                                                                                               /si-server
    ... 3 more
    at [internal classes]
cpeee.eu-gb.mybluemix.net - [24/01/2016:09:24:12 +0000] "GET /si-server/login.jsp HTTP/1.1" 500 0 7415 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36" 159.122.215.7:60521 x_forwarded_for:"210.212.81.17" x_forwarded_proto:"http" vcap_request_id:649de3b2-8a39-4a28-40b5-09074555baf4 response_time:0.018131444 app_id:1ef857bc-de81-424d-8f46-0abd1fb59b66 x_global_transaction_id:"173522513"


Here is my web.xml....

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">

        <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>
                         /WEB-INF/spring/security-config.xml
                         /WEB-INF/spring/appServlet/servlet-context.xml
                         /WEB-INF/spring/mongo-config.xml
             </param-value>
        </context-param>


        <!-- Creates the Spring Container shared by all Servlets and Filters -->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

            <!-- Creates the Spring Container shared by all Servlets and Filters -->
        <listener>
            <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
        </listener>

    <!-- Log4j configuration -->
        <context-param>
            <param-name>log4jConfigLocation</param-name>
            <param-value>/WEB-INF/classes/log4j.properties</param-value>
        </context-param>    
        <listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
        </listener>

            <!-- Spring MVC base configuration to manage all the application urls-->
        <servlet>
            <servlet-name>SpringServletDispatcher</servlet-name>
            <servlet-class>
                org.springframework.web.servlet.DispatcherServlet
            </servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>SpringServletDispatcher</servlet-name>
            <url-pattern>/</url-pattern>
        </servlet-mapping>


     <filter>
        <filter-name>MultipartFilter</filter-name>
        <filter-class>org.springframework.web.multipart.support.MultipartFilter</filter-class>
    </filter>
    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>MultipartFilter</filter-name>
        <servlet-name>/*</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

     <error-page>
            <error-code>404</error-code>
            <location>/WEB-INF/views/error-page/404.jsp</location>
        </error-page>

        <error-page>
            <exception-type>java.lang.Throwable</exception-type>
            <location>/WEB-INF/views/error-page/404.jsp</location>
        </error-page>

             <welcome-file-list>  
       <welcome-file>/WEB-INF/views/jsp/login.jsp</welcome-file>   
      </welcome-file-list>

    </web-app>  
Is there any thing i have to modify in web.xml

==&GT;我在mongo-config.xml中使用了以下代码来连接IBM云上的mongodb。

    <mongo:db-factory
        id="mongoDbFactory"
        dbname="${mongo.name}"
        host="${mongo.host}"
        port="${mongo.port}"
        username="${mongo.username}"
        password="${mongo.password}" />
        <mongo:mapping-converter id="converter" />    

这是我的云依赖。

cloudfoundry-runtime-0.8.1


Is there any more configuration I have to do?
Please help me to find my solution.

0 个答案:

没有答案