簡體   English   中英

Springframework:BeanResult既不是BindingResult也不是普通目標對象

[英]Springframework : Neither BindingResult nor plain target object for bean name

我正在嘗試運行下面的項目,事實上我寫的是錯誤的東西。 在我看來,問題出在successView.jsp和CarController.java之間。 預先感謝您的幫助。


代碼已更新

successView.jsp

<%--
    Document   : successView
    Created on : May 2, 2010, 2:06:51 PM
    Author     : nbuser
--%>

<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Enter Your Name</title>
    </head>
    <body>
        <h1>Enter Your Name!</h1>  
        <form:form commandName="car" method="POST">
                Brand:<br>
                <form:input path="brand.name"/><br>
                    <form:input path="brand.country"/><br>
                Price:<br>
                    <form:input path="price"/><br>
                <input type="submit" value="OK">
            </form:form>

    </body>
</html>

carView.jsp

    <%--
    Document   : carView
    Created on : May 2, 2010, 2:06:25 PM
    Author     : nbuser
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hello</title>
    </head>
    <body>
        <h2>${name}</h2>
        <h2>${country}</h2>
        <h2>${price}</h2>
    </body>
</html>

applicationContext.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"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
    <bean name="carService" class="Service.CarService" />
    <!--bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
          p:location="/WEB-INF/jdbc.properties" />

<bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource"
    p:driverClassName="${jdbc.driverClassName}"
    p:url="${jdbc.url}"
    p:username="${jdbc.username}"
    p:password="${jdbc.password}" /-->

    <!-- ADD PERSISTENCE SUPPORT HERE (jpa, hibernate, etc) -->

</beans>

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">
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <servlet>
        <servlet-name>dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcher</servlet-name>
        <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
        <welcome-file>redirect.jsp</welcome-file>
    </welcome-file-list>
</web-app>

CarService.java

package service;

import controller.Car;

/**
 *
 * @author nbuser
 */
public class CarService {

    public String sayName(Car car) {
        return String.format("Name: %s /n", car.getBrand().getName());
    }

    public String sayCountry(Car car) {
        return String.format("Country: %s /n", car.getBrand().getCountry());
    }

    public String sayPrice(Car car) {
        return String.format("Price: %d", car.getPrice());
    }
}

Brand.java

package controller;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author PTOSH
 */
public class Brand {
    private String name;
    private String country;

    public String getCountry() {
        return country;
    }
    public void setCountry(String country) {
        this.country = country;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}

Car.java

package controller;

import java.math.BigDecimal;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author PTOSH
 */
public class Car {
    private Brand brand;
    private BigDecimal price;

    public Brand getBrand() {
        return brand;
    }
    public void setBrand(Brand brand) {
        this.brand = brand;
    }
    public BigDecimal getPrice() {
        return price;
    }
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
}

CarController.java

    /*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import service.CarService;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

/**
 *
 * @author PTOSH
 */

//@Controller
//@RequestMapping("car")
public class CarController extends SimpleFormController {
//    @Valid
    private CarService carService;

    public CarController() {
        //Initialize controller properties here or
        //in the Web Application Context
        setCommandClass(Car.class);
        setCommandName("car");
        setSuccessView("successView");
        setFormView("carView");
    }
//    @RequestMapping(method = RequestMethod.GET)
//      public String initForm(ModelMap model){
//      //return form view
//      return "car";
//  }
    public void setCarService(CarService carService) {
        this.carService = carService;
    }

    //Use onSubmit instead of doSubmitAction
    //when you need access to the Request, Response, or BindException objects
    @Override
//    @RequestMapping(method = RequestMethod.POST)
    protected ModelAndView onSubmit(Object command) throws Exception {
        Car car = (Car) command;
        ModelAndView mv = new ModelAndView(getSuccessView());
        mv.addObject("name", carService.sayName(car));
        mv.addObject("country", carService.sayCountry(car));
        mv.addObject("price", carService.sayPrice(car));
        return mv;
    }
}

錯誤

嚴重:ContainerBase.addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java.lang.ClassNotFoundException:org.apache.catalina.core.StandardContext.start(org.springframework.web.context.ContextLoaderListener org.apache.catalina.com上com.sun.enterprise.web.WebModule.start(WebModule.java:691)上的StandardContext.java:5864)org.apache.catalina上的org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041) org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)的com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278的.core.ContainerBase.addChild(ContainerBase.java:1024) )上com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)上com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)上的org.glassfish.internal.data.EngineRef。在org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)處開始(EngineRef.java:122)在org.glassfish.internal.data.ApplicationInfo.start(Application com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)上的com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)上的Info.java:352) .glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)位於com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:527)位於com.sun.enterprise.v3.admin .CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:523)在java.security.AccessController.doPrivileged(本機方法)在javax.security.auth.Subject.doAs(Subject.java:356)在com.sun.enterprise.v3 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)上的com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:522) com.sun.enterprise.v3.admin上的CommandRunnerImpl.java:1423).com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunne)上的CommandRunnerImpl.access $ 1500(CommandRunnerImpl.java:108) rImpl.java:1762)位於com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1674)位於com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)在com.sun.enterprise.v3上的admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)在org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)在com.sun.enterprise.v3 org.glassfish.grizzly.http.server.HttpHandler.run上的.services.impl.ContainerMapper.service(ContainerMapper.java:246)在org.glassfish.grizzly.http.server.HttpHandler.doHandle上的.services.impl.ContainerMapper.service(ContainerMapper.java:246) (HttpHandler.java:168)在org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)在org .glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.ja va:206)在org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)在org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)在org.glassfish.grizzly.ProcessorExecutor org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)的org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)的.execute(ProcessorExecutor.java:77) org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:55)上的org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.java.run0(WorkerThreadIOStrategy.java:115)在org.glassfish.grizzly.strategiesyable.WorkerThreadIOStrategy。 org.glassfish.grizzly.threadpool.Abstractrun.ool(WorkerThreadIOStrategy.java:135)在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544) )在java.lang.Thread.run(Thread .java:744)由以下原因引起:java.lang.IllegalArgumentException:java.lang.ClassNotFoundException:org.apache.catalina.core.StandardContext.addListener(StandardContext.java:3270)處的org.springframework.web.context.ContextLoaderListener com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:251)位於com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig)的.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:2476) .java:110)位於com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:266)(位於org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:486)位於org.apache.catalina。 org.apache.catalina.core.StandardContext.start(StandardContext.java:5861)處的util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:163)... 44更多原因:java.lang.ClassNotFoundException:org.springframework.web org.glassfi的.context.ContextLoaderListener 位於org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1611)的sh.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1761)位於org.apache.catalina.core.StandardContext.loadListener(StandardContext。 com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1788)上的org.apache.catalina.core.StandardContext.addListener(StandardContext.java:3268)上的java:5414 ... 51更多

Avertissement:java.lang.IllegalStateException:ContainerBase.addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener java.lang.IllegalStateException:ContainerBase .addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener位於org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java :1044),位於org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747),位於org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024),位於com.sun.enterprise.web。 org.com的com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)的com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)的WebContainer.loadWebModule(WebContainer.java:2278) .glassfish.internal.data.EngineRef.start(EngineRef.java:122)位於 位於com.sun.enterprise.v3.server.ApplicationLifecycle的org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)的org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)。在com.org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)部署(ApplicationLifecycle.java:497) .com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:523)上的.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:527)在java.security.AccessController com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:522)處java.security.auth.Subject.doAs(Subject.java:356)處的.doPrivileged(本機方法)。 com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)上的enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)位於com.sun.enterprise.v3.admin.CommandRunnerI com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1762)處的mpl.access $ 1500(CommandRunnerImpl.java:108)at com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute (CommandRunnerImpl.java:1674)位於com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)位於com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) org.glassfish.grizzly上的org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)位於com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)。 org.glassfish.grizzly的http.server.HttpHandler.runService(HttpHandler.java:191).org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(http.server.HttpHandler.doHandle(HttpHandler.java:168)在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)在org.glassfish.grizzly.filterchain.DefaultFilterChain.execute處的HttpServerFilter.java:189) org.glassfish.grizzly.filterchain的Filter(DefaultFilterChain.java:288)org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)的.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java) :838)在org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)在org.glassfish.grizzly.strategies。 org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)上的WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:55)在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool。 : 564)在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544)在java.lang.Thread.run(Thread.java:744)

Grave:調用類com.sun.enterprise.web.WebApplication啟動方法時發生異常java.lang.Exception:java.lang.IllegalStateException:ContainerBase.addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java .lang.ClassNotFoundException:com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)上的org.springframework.web.context.ContextLoaderListener在org.glassfish.internal.data.EngineRef.start(EngineRef.java: 122)在org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)在org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)在com.sun.enterprise.v3.server com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)上的.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)在org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) ),網址為com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:527),網址為com.sun.enterprise.v3.adm 在com.sun.enterprise的javax.security.auth.Subject.doAs(Subject.java:356)處的java.security.AccessController.doPrivileged(本機方法)中的CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:523)。 v3.admin.CommandRunnerImpl $ 2.execute(CommandRunnerImpl.java:522)位於com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)位於com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand (CommandRunnerImpl.java:1423)在com.sun.enterprise.v3.admin.CommandRunnerImpl.access $ 1500(CommandRunnerImpl.java:108)在com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java: 1762)在com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)在com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)在com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1674) org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)上的.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)在com.sun.enterp 在org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)處的rise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)在org.glassfish.grizzly.http.server處。 org.glassfish.grizzly中的HttpHandler.doHandle(HttpHandler.java:168).org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)上的HttpHandler.HttpServerFilter.handleRead(HttpServerFilter.java:189) )在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)在org.glassfish.grizzly.filterchain.DefaultFilterChain。在org.glassfish.grizzly.filterchain上執行(DefaultFilterChain.java:136)在org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)在org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)在org.glassfish.grizzly org.glassfish.grizzly的.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)。 org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:access.org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)上的strategy.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) ),位於org.glassfish.grizzly的org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:564)的org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)處。 java.lang.Thread.run(Thread.java:744)上的threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544)

嚴重:生命周期處理期間的異常java.lang.Exception:java.lang.IllegalStateException:ContainerBase.addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java.lang.ClassNotFoundException:org.springframework.web。位於org.glassfish.internal.data的com.sun.enterprise.web.WebApplication.start(WebApplication.java:168)的context.ContextLoaderListener,位於org.glassfish.internal.data的org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)。 org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)的com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)的ModuleInfo.start(ModuleInfo.java:291)在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)在org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)在com.sun.enterprise.v3.admin .CommandRunnerImpl $ 2 $ 1.run(CommandRunnerImpl.java:527)位於com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2 $ 1.run(CommandRunnerIm pl.java:523)在java.security.AccessController.doPrivileged(本機方法)在javax.security.auth.Subject.doAs(Subject.java:356)在com.sun.enterprise.v3.admin.CommandRunnerImpl $ 2.execute (CommandRunnerImpl.java:522)在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)在com.sun.enterprise.v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1762)處的com.sun.enterprise.v3.admin.CommandRunnerImpl.access $ 1500(CommandRunnerImpl.java:108) .v3.admin.CommandRunnerImpl $ ExecutionContext.execute(CommandRunnerImpl.java:1674)位於com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)位於com.sun.enterprise.v3.admin.AdminAdapter org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)上的.onMissingResource(AdminAdapter.java:224)在com.sun.enterprise.v3.services.impl.ContainerMapper.servic org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)的e(ContainerMapper.java:246)org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)的e(ContainerMapper.java:246)在org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)在org.glassfish.grizzly.filterchain。 org上org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)的org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)的DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)的.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport .java:838)在org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(Ab stractIOStrategy.java:113),位於org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115),位於org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:55),位於org.glassfish。位於org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:564)的grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker。在java.lang.Thread.run(Thread.java:744)上運行(AbstractThreadPool.java:544)

Grave:加載應用程序時發生異常Grave:上下文/ myCar取消部署失敗Grave:加載應用程序時發生異常:java.lang.IllegalStateException:ContainerBase.addChild:開始:org.apache.catalina.LifecycleException:java.lang.IllegalArgumentException:java .lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener

1查看Spring參考文檔,您正在使用舊的Spring樣式(詳細)來通過JSP文件訪問對象。

  1. 您具有以下內容:

<spring:bind path="Brand">

<spring:bind path="brand">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM