我正在使用带有 MySQL 的 openxava 4.7.1。例如,我已经进行了所有正确的配置并定义了我的 pojos
包 com.iserve.ticketmanager;
import java.util.*;
import javax.persistence.*;
import org.openxava.annotations.*;
@Entity
public class Party {
@Id
@Required
@Column(name = "id", nullable = true)
private Integer id;
@Column(name = "name", length = 45, nullable = true)
private String name;
@Column(name = "manager", nullable = true)
private Integer manager;
@Stereotype("IMAGE")
@Column(name = "logo", nullable = true)
private String logo;
@Column(name = "active", length = 0, nullable = true)
private Boolean active;
@OneToMany
private Set<Payment> payment;
@OneToMany
private Set<User> user;
@OneToMany
private Set<Ticketsale> ticketsale;
@OneToMany
private Set<Vendorcontract> vendorcontract;
@OneToMany
private Set<Inventory> inventory;
@OneToMany
private Set<Ticketredeem> ticketredeem;
@OneToMany
private Set<Ticket> ticket;
@OneToMany
private Set<Shipment> shipment;
@OneToMany
private Set<Ticketbatch> ticketbatch;
@OneToMany
private Set<Route> route;
@OneToMany
private Set<Vehicle> vehicle;
@OneToMany
private Set<Ticketdenomination> ticketdenomination;
@OneToMany
private Set<Vendororder> vendororder;
public void setId(Integer aValue) {
id = aValue;
}
public Integer getId() {
return id;
}
public void setName(String aValue) {
name = aValue;
}
public String getName() {
return name;
}
public void setManager(Integer aValue) {
manager = aValue;
}
public Integer getManager() {
return manager;
}
public void setLogo(String aValue) {
logo = aValue;
}
public String getLogo() {
return logo;
}
public void setActive(Boolean aValue) {
active = aValue;
}
public Boolean getActive() {
return active;
}
public void setPayment(Set<Payment> aValue) {
payment = aValue;
}
public Set<Payment> getPayment() {
return payment;
}
public void setUser(Set<User> aValue) {
user = aValue;
}
public Set<User> getUser() {
return user;
}
public void setTicketsale(Set<Ticketsale> aValue) {
ticketsale = aValue;
}
public Set<Ticketsale> getTicketsale() {
return ticketsale;
}
public void setVendorcontract(Set<Vendorcontract> aValue) {
vendorcontract = aValue;
}
public Set<Vendorcontract> getVendorcontract() {
return vendorcontract;
}
public void setInventory(Set<Inventory> aValue) {
inventory = aValue;
}
public Set<Inventory> getInventory() {
return inventory;
}
public void setTicketredeem(Set<Ticketredeem> aValue) {
ticketredeem = aValue;
}
public Set<Ticketredeem> getTicketredeem() {
return ticketredeem;
}
public void setTicket(Set<Ticket> aValue) {
ticket = aValue;
}
public Set<Ticket> getTicket() {
return ticket;
}
public void setShipment(Set<Shipment> aValue) {
shipment = aValue;
}
public Set<Shipment> getShipment() {
return shipment;
}
public void setTicketbatch(Set<Ticketbatch> aValue) {
ticketbatch = aValue;
}
public Set<Ticketbatch> getTicketbatch() {
return ticketbatch;
}
public void setRoute(Set<Route> aValue) {
route = aValue;
}
public Set<Route> getRoute() {
return route;
}
public void setVehicle(Set<Vehicle> aValue) {
vehicle = aValue;
}
public Set<Vehicle> getVehicle() {
return vehicle;
}
public void setTicketdenomination(Set<Ticketdenomination> aValue) {
ticketdenomination = aValue;
}
public Set<Ticketdenomination> getTicketdenomination() {
return ticketdenomination;
}
public void setVendororder(Set<Vendororder> aValue) {
vendororder = aValue;
}
public Set<Vendororder> getVendororder() {
return vendororder;
}
}
我通过在 openxava 发行版中启动 tomcat 来启动应用程序。当我尝试访问任何模块时,在所有情况下都会出现类似的错误 -
un 04, 2013 7:40:36 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet module threw exception
org.openxava.util.XavaException: Seems that party is not an EJB3 Entity nor transient model class
at org.openxava.annotations.parse.AnnotatedClassParser.getClassNameFor(AnnotatedClassParser.java:2415)
at org.openxava.annotations.parse.AnnotatedClassParser.parse(AnnotatedClassParser.java:66)
at org.openxava.component.ComponentParser.parseAnnotatedClass(ComponentParser.java:47)
at org.openxava.component.ComponentParser.parse(ComponentParser.java:36)
at org.openxava.component.MetaComponent.get(MetaComponent.java:60)
at org.openxava.component.MetaComponent.exists(MetaComponent.java:75)
at org.openxava.application.meta.MetaApplication.existsModel(MetaApplication.java:151)
at org.openxava.application.meta.MetaApplication.getMetaModule(MetaApplication.java:140)
at org.openxava.controller.ModuleManager.getMetaModule(ModuleManager.java:1058)
at org.openxava.controller.ModuleManager.setupModuleControllers(ModuleManager.java:244)
at org.openxava.controller.ModuleManager.setModuleName(ModuleManager.java:1031)
at org.apache.jsp.xava.module_jsp._jspService(module_jsp.java:166)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.openxava.web.servlets.ModuleServlet.doGet(ModuleServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:722)
会发生什么?