no entiendo esta traza

2010-11-27
2013-05-21
  • Leonardo Perez

    Leonardo Perez - 2010-11-27

    Despues de un tiempo ocupado, volví al proyecto de OpenXava, bajé la ultima versión y cree un nuevo proyecto, de momento solo tengo unas pocas entidades y estoy probando con groovy. Creo tenerlo todo bien configurado, a que una de las entidades más simples (id+nombre) no da problemas, pero estoy recibiendo la siguiente traza al hacer un listado, y al grabar o abrir una entidad (previamente guardada directamente en la base de datos) da error, lo raro es que no es un problema de persistencia ya que la base de datos la crea correctamente y los elementos guardados directamente en la tabla se ven bien en el modo lista, pero no en el modo detalle. Esta es la traza al hacer un listado (no da error al usuario)

    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id Dimension
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id Dimension
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id Dimension
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id abrev
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id longName
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id valor
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id abrev
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id longName
    27/11/2010 16:51:35 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id valor
    27/11/2010 16:51:35 org.openxava.tab.impl.EntityTab getDataProvider
    GRAVE: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(Unknown Source)
        at org.openxava.component.MetaComponent.getPackageNameWithSlashWithoutModel(MetaComponent.java:411)
        at org.openxava.tab.impl.EntityTab.getDataProvider(EntityTab.java:516)
        at org.openxava.tab.impl.EntityTab.nextChunk(EntityTab.java:298)
        at org.openxava.tab.impl.TableModelBean.getRow(TableModelBean.java:120)
        at org.openxava.tab.impl.TableModelBean.getValueAt(TableModelBean.java:171)
        at org.openxava.tab.impl.XTableModelDecoratorBase.getValueAt(XTableModelDecoratorBase.java:63)
        at org.openxava.tab.impl.HiddenXTableModel.getValueAt(HiddenXTableModel.java:70)
        at org.openxava.tab.Tab.createTableModel(Tab.java:346)
        at org.openxava.tab.Tab.getTableModel(Tab.java:319)
        at org.apache.jsp.xava.list_jsp._jspService(list_jsp.java:766)
        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.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
        at org.apache.jsp.xava.core_jsp._jspService(core_jsp.java:279)
        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.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
        at org.apache.jsp.xava.module_jsp._jspService(module_jsp.java:434)
        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(Unknown Source)
    27/11/2010 16:51:35 org.openxava.tab.impl.JDBCTabProvider nextBlock
    FINA: [JDBCTabProvider.nextBlock] Ejecutando SELECT DIMENSION.ID, DIMENSION.ABREV, DIMENSION.longName, DIMENSION.valor from DIMENSION con argumentos
    

    Esta es La clase:

    package modulos
    import javax.persistence.*
    import org.openxava.annotations.*
    import org.openxava.calculators.*
    import org.openxava.jpa.*
    /**
     *
     * @author Leonardo
     */
    @Entity
    @Table(name="DIMENSION")
    class Dimension {
        @Id @Column(name="ID",length=5) @Hidden
        @GeneratedValue(strategy=GenerationType.AUTO)
        Long id;
        @Column(name="ABREV")
        String abrev;
        String longName;
        float valor;
        public Dimension (float value,String nombre){
            setAbrev(nombre);
            setLongName(nombre);
            setValor(value);
        }
    }
    

    si quiero abrir un registro previamente guardado directo en la tabla en la traza dice:
    GRAVE: ¡ADVERTENCIA! Imposible convertir la clave (id: 1) de Dimension al tipo adecuado. Usamos el objeto con el tipo original

    y al crear uno nuev y guardar:

    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id abrev
    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id abrev
    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id longName
    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id longName
    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id valor
    27/11/2010 17:00:07 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id valor
    27/11/2010 17:00:12 org.directwebremoting.util.CommonsLoggingOutput info
    INFO: Exec: Module.request()
    27/11/2010 17:00:12 org.openxava.model.impl.POJOPersistenceProviderBase create
    GRAVE: modulos.Dimension
    java.lang.InstantiationException: modulos.Dimension
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at org.openxava.model.impl.POJOPersistenceProviderBase.create(POJOPersistenceProviderBase.java:144)
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:707)
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:43)
        at org.openxava.model.MapFacade.create(MapFacade.java:111)
        at org.openxava.actions.SaveAction.execute(SaveAction.java:27)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:376)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:293)
        at org.openxava.controller.ModuleManager.execute(ModuleManager.java:253)
        at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177)
        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.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66)
        at org.openxava.web.dwr.Module.getURIAsStream(Module.java:182)
        at org.openxava.web.dwr.Module.request(Module.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
        at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
        at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
        at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
        at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        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(Unknown Source)
    27/11/2010 17:00:12 org.openxava.model.impl.MapFacadeBean create
    GRAVE: Imposible crear objeto persistente Dimension por: modulos.Dimension
    javax.ejb.CreateException: Imposible crear objeto persistente Dimension por: modulos.Dimension
        at org.openxava.model.impl.POJOPersistenceProviderBase.create(POJOPersistenceProviderBase.java:159)
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:707)
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:43)
        at org.openxava.model.MapFacade.create(MapFacade.java:111)
        at org.openxava.actions.SaveAction.execute(SaveAction.java:27)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:376)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:293)
        at org.openxava.controller.ModuleManager.execute(ModuleManager.java:253)
        at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177)
        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.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66)
        at org.openxava.web.dwr.Module.getURIAsStream(Module.java:182)
        at org.openxava.web.dwr.Module.request(Module.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
        at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
        at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
        at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
        at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        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(Unknown Source)
    27/11/2010 17:00:12 org.openxava.controller.ModuleManager manageRegularException
    GRAVE: Imposible crear Dimension
    javax.ejb.CreateException: Imposible crear Dimension
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:726)
        at org.openxava.model.impl.MapFacadeBean.create(MapFacadeBean.java:43)
        at org.openxava.model.MapFacade.create(MapFacade.java:111)
        at org.openxava.actions.SaveAction.execute(SaveAction.java:27)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:376)
        at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:293)
        at org.openxava.controller.ModuleManager.execute(ModuleManager.java:253)
        at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177)
        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.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66)
        at org.openxava.web.dwr.Module.getURIAsStream(Module.java:182)
        at org.openxava.web.dwr.Module.request(Module.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
        at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
        at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
        at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
        at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
        at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        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(Unknown Source)
    27/11/2010 17:00:12 org.openxava.controller.ModuleManager execute
    FINA: Execute CRUD.save=16 ms
    27/11/2010 17:00:12 org.openxava.util.Labels get
    ADVERTENCIA: Imposible internacionalizar elemento con id valor
    

    alguna idea de que puede estar sucediendo?

     
    • astray2001

      astray2001 - 2013-05-14

      como lo has resulto me pasa lo mismo:
      may 14, 2013 1:29:29 PM org.openxava.model.impl.POJOPersistenceProviderBase convertSingleKeyType
      SEVERE: ¡ADVERTENCIA! Imposible convertir la clave (id: 3) de RepuestoAbstracto al tipo adecuado. Usamos el objeto con el tipo original
      java.lang.InstantiationException
      at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at java.lang.Class.newInstance0(Class.java:374)
      at java.lang.Class.newInstance(Class.java:327)
      at org.openxava.model.impl.POJOPersistenceProviderBase.convertSingleKeyType(POJOPersistenceProviderBase.java:207)
      at org.openxava.model.impl.POJOPersistenceProviderBase.find(POJOPersistenceProviderBase.java:74)
      at org.openxava.model.impl.POJOPersistenceProviderBase.find(POJOPersistenceProviderBase.java:60)
      at org.openxava.model.impl.MapFacadeBean.findEntity(MapFacadeBean.java:1475)
      at org.openxava.model.impl.MapFacadeBean.findEntity(MapFacadeBean.java:1608)
      at org.openxava.model.impl.MapFacadeBean.getValuesImpl(MapFacadeBean.java:625)
      at org.openxava.model.impl.MapFacadeBean.getValues(MapFacadeBean.java:100)
      at org.openxava.model.MapFacade.getValues(MapFacade.java:396)
      at org.openxava.actions.SearchByViewKeyAction.execute(SearchByViewKeyAction.java:56)
      at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:401)
      at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:318)
      at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:512)
      at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:318)
      at org.openxava.controller.ModuleManager.execute(ModuleManager.java:278)
      at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:180)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
      at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66)
      at org.openxava.web.dwr.Module.getURIAsStream(Module.java:204)
      at org.openxava.web.dwr.Module.request(Module.java:62)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34)
      at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428)
      at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431)
      at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283)
      at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52)
      at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101)
      at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)

       
      • Javier Paniza

        Javier Paniza - 2013-05-16

        Hola Astray,

        deberías poner tu código fuente y decir que en que momento falla, si no es muy difícil saber porque falla.
        Por cierto, ¿tu clase tiene un constructor por defecto público?


        Ayuda a otros en este foro como yo te ayudo a ti.
        ¿Necesitas más ayuda? Usa el soporte profesional de OpenXava

         
        • astray2001

          astray2001 - 2013-05-17

          Hola Javier,
          He añadido mi codigo de la superclase abstracta.


          package org.openxava.gestion.modelo;

          import java.io.*;

          import javax.persistence.*;

          import org.hibernate.validator.;
          import org.openxava.annotations.
          ;

          @Entity
          @Inheritance(strategy=InheritanceType.JOINED)
          @Table(name = "repuestoAbstracto")
          public abstract class RepuestoAbstracto implements Serializable{
          private static final long serialVersionUID = 1L;
          @Id @Hidden
          @GeneratedValue(strategy = GenerationType.IDENTITY)
          @Basic(optional = false)
          @Column(name = "id")
          protected Long id;

              @Required @Column(length=7) 
              private Integer codaemet;
          
              //-- Denominacion
              @Required @Column(length=60)
              private String denominacion;
          
              //-- Observacion
              @Column(length=40) 
              private String observacion;
          
              //-- STOCK
              @Column(length=5) @Max(99999) @Required
              private Integer stock;
          
              //-- Tipo de Repuesto
              @ManyToOne(fetch=FetchType.LAZY, optional=false)
              @JoinColumn(name="codTipoRepuesto")
              @DescriptionsList
              private TipoRepuesto tipoRepuesto;
          
              public Long getId() {
                  return id;
              }
          
              public void setId(Long id) {
                  this.id = id;
              }
          
              public static long getSerialversionuid() {
                  return serialVersionUID;
              }
          
              public Integer getCodaemet() {
                  return codaemet;
              }
          
              public void setCodaemet(Integer codaemet) {
                  this.codaemet = codaemet;
              }
          
              public String getDenominacion() {
                  return denominacion;
              }
          
              public void setDenominacion(String denominacion) {
                  this.denominacion = denominacion;
              }
          
              public String getObservacion() {
                  return observacion;
              }
          
              public void setObservacion(String observacion) {
                  this.observacion = observacion;
              }
          
              public Integer getStock() {
                  return stock;
              }
          
              public void setStock(Integer stock) {
                  this.stock = stock;
              }
          
              public TipoRepuesto getTipoRepuesto() {
                  return tipoRepuesto;
              }
          
              public void setTipoRepuesto(TipoRepuesto tipoRepuesto) {
                  this.tipoRepuesto = tipoRepuesto;
              }
          

          }

          subclase 1: InstrumentoMeteorologico
          .........
          @Entity
          @Table(name = "instrumentoMeteorologico")
          public class InstrumentoMeteorologico extends RepuestoAbstracto {
          private static final long serialVersionUID = 1L;
          @ManyToOne(fetch=FetchType.LAZY, optional=true)
          @JoinColumn(name="codTipoInstrumento")
          @DescriptionsList
          private TipoInstrumento tipoInstrumento;

          public TipoInstrumento getTipoInstrumento() {
              return tipoInstrumento;
          }
          
          public void setTipoInstrumento(TipoInstrumento tipoInstrumento) {
              this.tipoInstrumento = tipoInstrumento;
          }
          
          public static long getSerialversionuid() {
              return serialVersionUID;
          }
          

          }

          subclase 2: parecido al anterior
          ....
          @Entity
          @Table(name = "repuestoEstacion")
          public class RepuestoEstacion extends RepuestoAbstracto{
          private static final long serialVersionUID = 1L;
          @Column(length=60)
          private String codfabriacante;
          ....

          y no tengo contructor, se usa el de por defecto
          entidad pedido
          .................
          public class Pedido {
          @Id @GeneratedValue(generator="system-uuid") @Hidden
          @GenericGenerator(name="system-uuid", strategy="uuid")
          @Column(length=32)
          private String oid;

          //-- Buscador de Detalle de Pedido
          @OneToMany( mappedBy="padre", cascade=CascadeType.ALL)
          @ListProperties("repuesto.codaemet,repuesto.denominacion,repuesto.tipoRepuesto.codTipoRepuesto,repuesto.tipoRepuesto.descripcion,cantidad")
          private Collection<DetallePedido> detalle = new ArrayList<DetallePedido>();
          
          @Column(length=4)
          @DefaultValueCalculator(CurrentYearCalculator.class)
          private int year;
          
          @Required
           @Column(name = "descripcion", length=60)  
           private String descripcion;
          

          el error se produce cuando en un Pedido estoy añadiendo detalles(lineas) que son repuestosabstracto. Y al elegirle con un buscador se produce el error:

          SEVERE: ¡ADVERTENCIA! Imposible convertir la clave (id: 2) de RepuestoAbstracto al tipo adecuado. Usamos el objeto con el tipo original
          java.lang.InstantiationException

          id:2 es el id del pruducto elegido, aparece "Escoger" subrayado, y al pulsar falla pero la ejecucion del codigo continua.

          [Pedido]1-----n[detallePeticion]n-----1[repuestoAbstracto]

          [repuestoAbstracto]=[InstrumentoMeteorologico] o [repuestoEstacion]

           
          • Javier Paniza

            Javier Paniza - 2013-05-21

            Hola Astray,

            si quitas el abstract de RepuestoAbstracto, ¿funciona?


            Ayuda a otros en este foro como yo te ayudo a ti.
            ¿Necesitas más ayuda? Usa el soporte profesional de OpenXava

             
  • Leonardo Perez

    Leonardo Perez - 2010-11-27

    por favor, descarten este mensaje, el problema estaba asociado a los constructres y las propiedades usadas como ID. Ya está resuelto

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks