Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with hibernate for mapping a view in oracle 10G

 
Mauricio Barquet
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am actually new at this and created a view with some formulas to calculate debts form some companies

I work on myEclipse 6.0.1 and Hibernate Mapping DTD 3.0 with Spring

This is my view:


This is my class for the view:


and this is the mapping file hbm.xml:

I use jsp as interface so this is the code:
The action for doing this is called on the menu by database
The action file name is ComunAction.java alias comun.do
and the event is getDeudasCostera located in this action file:


[edited to add code tags]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've edited your post to add code tags to make it easier to read. I can't find the question in it though? What error do you get? What isn't working as expected.

Also, that is a lot of code. You may want to create a smaller example that shows the problem. Sometimes this helps solve the problem because you see which pieces of the code are necessary to reproduce it. Sometimes it helps others answer your question by giving them something shorter to read.
 
Mauricio Barquet
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry if this is too long but is also the first time that i map a view so this is my only example, If you can see in my view i use more than one table everything is fine until i start my tomcat and i get error on sqlexception, but even the tomcat get started, but cannot execute the jsp when i call it from the menu, dont know if the method on comunaction.java is wrong or there are any step i am missing configuring the jsp. Maybe attaching the files instead of inserting on the post might help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the exact exception you get. Can yo share the stack trace around the sql exception?

It's not an inline vs attachment thing. Just a lot to read.
 
Mauricio Barquet
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.servlet.jsp.JspException: Exception: [.LookupUtil] Error looking up property "ECUAESTIBAS S.A. GUAYAQUIL" in object type "com.digmer.maritimo.model.sm.DeudasCostera". Cause: Unknown property 'ECUAESTIBAS S'
at org.displaytag.render.TableWriterTemplate.writeTable(TableWriterTemplate.java:161)
at org.displaytag.render.HtmlTableWriter.writeTable(HtmlTableWriter.java:643)
at org.displaytag.tags.TableTag.writeHTMLData(TableTag.java:1549)
at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1218)
at org.apache.jsp.web.jsp.radiocomunicacion.getDeudasCostera_jsp._jspService(getDeudasCostera_jsp.java:514)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
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:654)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.digmer.comun.web.security.SecurityFilter.doFilterInternal(SecurityFilter.java:620)
at com.digmer.comun.web.security.AbstractSecurityFilter.doFilter(AbstractSecurityFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception: [.LookupUtil] Error looking up property "ECUAESTIBAS S.A. GUAYAQUIL" in object type "com.digmer.maritimo.model.sm.DeudasCostera". Cause: Unknown property 'ECUAESTIBAS S'
at org.displaytag.util.LookupUtil.getBeanProperty(LookupUtil.java:141)
at org.displaytag.model.Column.getValue(Column.java:124)
at org.displaytag.model.Column.createChoppedAndLinkedValue(Column.java:201)
at org.displaytag.model.Column.initialize(Column.java:178)
at org.displaytag.render.TableWriterTemplate.writeTableBody(TableWriterTemplate.java:308)
at org.displaytag.render.TableWriterTemplate.writeTable(TableWriterTemplate.java:133)
... 39 more
Caused by: java.lang.NoSuchMethodException: Unknown property 'ECUAESTIBAS S'
at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122)
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:408)
at org.displaytag.util.LookupUtil.getProperty(LookupUtil.java:237)
at org.displaytag.util.LookupUtil.getBeanProperty(LookupUtil.java:129)
... 44 more

Somehow it look for the query like if the search is a property maybe i shoul rename the field nombre with estacionCostera nombre instead of String nombre
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic