exceptions - struts
Hola què tal, cuando corro una aplicaciòn (con el tomcat) que se basa en struts, me aparece lo siguiente:
type Informe de Excepción
mensaje
descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.
excepción
javax.servlet.ServletException: La ejecución del Servlet lanzó una excepción
causa raíz
java.lang.NoClassDefFoundError: org/dom4j/DocumentException
PersonsManager2.init(PersonsManager2.java:56)
PersonsManager2.<init>(PersonsManager2.java:19)
SearchPersonAction3.execute(SearchPersonAction3.java:25)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Los contenidos pertinentes, de los archivos son:
\"PersonsManager2.java\"
public class PersonsManager2 implements IManejadorPersonas
{
SessionFactory sessionFactory = null;
/*inicializo el marco de persistencia*/
public PersonsManager2()throws DatastoreException
{
super();
init();
}
private void init()throws DatastoreException
{
try
{
sessionFactory=new Configuration().configure().buildSessionFactory();
}catch(Exception ex){
throw DatastoreException.datastoreError(ex);
}
}
\"SearchPersonAction3.java\"
public class SearchPersonAction3 extends Action
{
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws Exception
{
ActionForward forward = null;
IManejadorPersonas service = null;
try
{
String dni =((SearchPersonForm)form).getDniAccess();
service = new PersonsManager2();
.......................sigue.......................
}catch(Exception ex)
{
ServletContext context = getServlet().getServletContext();
context.log(\"Problema de crear el servicio\");
ex.printStackTrace();
throw DatastoreException.datastoreError(ex);
//forward = mapping.findForward(\"failure\");
}
return forward;
\"DatastoreExeption.java\"
public class DatastoreException extends BaseException {
/**
* Return a DatastoreException for datastoreError condition.
*
* @return The new DatastoreException object.
*/
public static DatastoreException retrieveConstraint() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(RETRIEVE_CONSTRAINT, args);
return (datastoreException);
}
public static DatastoreException objectNotFound() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(OBJECTNOTFOUND_ERROR, args);
return (datastoreException);
}
public static DatastoreException datastoreError( Throwable rootCause) {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(DATASTORE_ERROR, args);
datastoreException.setRootCause( rootCause );
return (datastoreException);
}
/**
* For use by subclasses of DatastoreException.
*/
protected DatastoreException(String newErrorCode,
Object[] args) {
super(newErrorCode, args);
}
public static final String RETRIEVE_CONSTRAINT = \"RetrieveConstraint\";
public static final String DATASTORE_ERROR = \"DatastoreError\";
public static final String OBJECTNOTFOUND_ERROR = \"ObjectNotFound\";
Bueno, no sè còmo resolver este error.
Desde ya muchas gracias
Saludos
type Informe de Excepción
mensaje
descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.
excepción
javax.servlet.ServletException: La ejecución del Servlet lanzó una excepción
causa raíz
java.lang.NoClassDefFoundError: org/dom4j/DocumentException
PersonsManager2.init(PersonsManager2.java:56)
PersonsManager2.<init>(PersonsManager2.java:19)
SearchPersonAction3.execute(SearchPersonAction3.java:25)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Los contenidos pertinentes, de los archivos son:
\"PersonsManager2.java\"
public class PersonsManager2 implements IManejadorPersonas
{
SessionFactory sessionFactory = null;
/*inicializo el marco de persistencia*/
public PersonsManager2()throws DatastoreException
{
super();
init();
}
private void init()throws DatastoreException
{
try
{
sessionFactory=new Configuration().configure().buildSessionFactory();
}catch(Exception ex){
throw DatastoreException.datastoreError(ex);
}
}
\"SearchPersonAction3.java\"
public class SearchPersonAction3 extends Action
{
public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws Exception
{
ActionForward forward = null;
IManejadorPersonas service = null;
try
{
String dni =((SearchPersonForm)form).getDniAccess();
service = new PersonsManager2();
.......................sigue.......................
}catch(Exception ex)
{
ServletContext context = getServlet().getServletContext();
context.log(\"Problema de crear el servicio\");
ex.printStackTrace();
throw DatastoreException.datastoreError(ex);
//forward = mapping.findForward(\"failure\");
}
return forward;
\"DatastoreExeption.java\"
public class DatastoreException extends BaseException {
/**
* Return a DatastoreException for datastoreError condition.
*
* @return The new DatastoreException object.
*/
public static DatastoreException retrieveConstraint() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(RETRIEVE_CONSTRAINT, args);
return (datastoreException);
}
public static DatastoreException objectNotFound() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(OBJECTNOTFOUND_ERROR, args);
return (datastoreException);
}
public static DatastoreException datastoreError( Throwable rootCause) {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(DATASTORE_ERROR, args);
datastoreException.setRootCause( rootCause );
return (datastoreException);
}
/**
* For use by subclasses of DatastoreException.
*/
protected DatastoreException(String newErrorCode,
Object[] args) {
super(newErrorCode, args);
}
public static final String RETRIEVE_CONSTRAINT = \"RetrieveConstraint\";
public static final String DATASTORE_ERROR = \"DatastoreError\";
public static final String OBJECTNOTFOUND_ERROR = \"ObjectNotFound\";
Bueno, no sè còmo resolver este error.
Desde ya muchas gracias
Saludos
