Valmir Cinquini

Greenhorn
+ Follow
since Nov 11, 2009
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Valmir Cinquini

Sorry, I don't know if this is the right forum to ask.

I'm working on a web service client application and at every build netbeans parses the wdsl files (it seems to me that it validates something or perform some refresh).

since I have 4 bindings with web service, it takes a lot os time every time I build the application.

Anyone knows a way of disable this feature so that I could tell to netbeans when I want the bindings be refreshed?

thanks a lot.
12 years ago
I'm stuck on this problem. I've googled a lot and I cant find why this is not working. could anyone help me? Any help would be apreciated.

The consulta.jsp is invoked this way: http://localhost:8080/admsite/consulta.jsp?sigla=ECE

my faces-config.xml:


My jsp page:



And I'm getting this error:

org.apache.jasper.JasperException: javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: #{param.sigla} is shorter than the referring object
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.faces.FacesException: javax.faces.FacesException: The scope of the referenced object: #{param.sigla} is shorter than the referring object
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:537)
com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
org.apache.el.parser.AstValue.getValue(AstValue.java:86)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_c_005fforEach_005f1(consulta_jsp.java:925)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_h_005fform_005f0(consulta_jsp.java:357)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_a4j_005foutputPanel_005f0(consulta_jsp.java:224)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_f_005fview_005f0(consulta_jsp.java:156)
org.apache.jsp.gestao.consulta_jsp._jspService(consulta_jsp.java:114)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.faces.FacesException: The scope of the referenced object: #{param.sigla} is shorter than the referring object
com.sun.faces.config.ManagedBeanFactoryImpl.evaluateValueExpressionGet(ManagedBeanFactoryImpl.java:995)
com.sun.faces.config.ManagedBeanFactoryImpl.setPropertiesIntoBean(ManagedBeanFactoryImpl.java:636)
com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:317)
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:527)
com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
org.apache.el.parser.AstValue.getValue(AstValue.java:86)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_c_005fforEach_005f1(consulta_jsp.java:925)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_h_005fform_005f0(consulta_jsp.java:357)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_a4j_005foutputPanel_005f0(consulta_jsp.java:224)
org.apache.jsp.gestao.consulta_jsp._jspx_meth_f_005fview_005f0(consulta_jsp.java:156)
org.apache.jsp.gestao.consulta_jsp._jspService(consulta_jsp.java:114)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408)
com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


12 years ago
JSF
Tim

Yes, my book don't cover facelets. I'm looking for some tutorials on the net.

But both web.xml and faces-config.xml start with

here they are:

web.xml

faces-config.xml:


12 years ago
JSF
Thanks for help me.

I'm following a sample code from a book about jsf. Different from the book, I'm using jboss 4.2.3.GA and netbeans 6.8 (the book sample uses tomcat and eclipse).

Everything works fine but there's one clause on the faces-config.xml that I have to comment, otherwise the code doesn't run:



When I uncomment the code above, I got the following error:

javax.servlet.ServletException: Error Parsing /form.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:270)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


I had to remove jsf-api.jar and jsf-impl.jar from the netbeans project becouse they are already present in C:\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\jsf-libs directory. If I don't, I got this error:

exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.jbossjsfconfigurelistener

Could someone explain me why these error occurs? And what is the purpose of the <view-handler> tag? The book doesn't explain that.
12 years ago
JSF
Its possible make an a4j:support tag re-render a html tableuma built with c:forEach?

For example, I have a menu which calls a bean method each time the user changed itso it alters the table below:The bean works fine, I can see throught debugger, but the forEach is not rendered again.

If it's not possible, which alternative do I have? I tried to use data table, but the layout that the webdesigner guy created ended up a little messed, and the guy became kinda angry...
12 years ago
JSF
Hi all.

I'm newbee in JSF. I want to set a session var in a backing bean and read its value in a JSF page using EL. I can't figure out how to do that and I didnt find out a sample

I've tried:
and and at JSF page I've tried:and All atempts I've got the same http 500 error:
Could somebody help me? Thanks in advance.
12 years ago
JSF

Henry Wong wrote:

Valmir Cinquini wrote:
but I found nothing... What I'm doing wrong?




You got it backwards. The regex is passed to the compile() method. And the string to be matched is passed to the matcher method.

Henry



I'm so sorry.. I just saw it..

thanks anyway
I'm reading Kathy Sierra book and I'm doing the samples. On chap 6, page 494 I read about ^ regex operator and build this code:
The book says that the output should be
but I found nothing... What I'm doing wrong?
I forgot to mention that the class that has the problem is in another package in another project

I've solved the problem adding ejb3-persistence.jar on the project and the errorhas disappear...
1) I have a project in Eclipse Galileo which uses xml mapping Hibernate

2) Then I've used Eclipse tool to change it to JPA annotations

Up 'til here, everything worked fine

3) Then I migrated to Netbeans 6.8 (because some parts of the hole solution were made using Netbeans 6.7.1 and now 6.8)

Everything compiles fine but I've got some strange warnings


Ok, I know that TIMESTAMP is a sql-99 reserved word, but it works anyway

Another class file

This other class has a var of type StatusDocuments, in the first line of the file, NetBeans shows me the following error:
in class file StatusDocuments.sig: unknows enum constant javax.persistence.temporalType.DATE


Everything is compiling file, but this red icon is bothering me... Could it be some Netbeans bug, since I dont face this error in Eclipse?

Nathan Warner wrote: I just ran the same code and the output that I got was 242 instead of 212. This is what the output should be because widening the int to a long, which is done implicitly, has a higher priority to boxing it to and Integer and then widening it to its Object superclass.



Hi Nathan,

thanks for your reply. I also ran the code and I got 242. I think the book was mistyped.

Thanks anyway
Given the following code:



Why the answer is 212 ??? Why it is not 232???

Why the second call (doStuff( x );) falls in doStuff(Object o) and not doStuff(long L) ? Both x and L are primitives. An int doesn't fit in a long?

Can anyone help me with boxing and args? This subject isn't clear for me.

Thanks in advance

Mark Spritzler wrote:The code or jsp/jstl tags is after a call to that method, not that method. If you can step through the code and find it loading the collection before the commit/close call then let us know, but it won't fetch it in that call, unless you have it set as eager fetch with I think you said it didn't

Mark




Mark I'll post the entire code tomorrow, it's on my machine at my job. But for now, the thing works like this:

Web service calls a method at BO class which call a method at DAO class which calls Hibernate. None of them tries to fetch the collection.

When debbuging, I can see the session.close() been executed and right after Hibernate is fetching the collection.This doesn't happen when I execute a simple local test program. This happens only on web environment.

David Newton wrote:Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.



Excuse me.
That's my code. Do you suspect which point it says Hibernate should load the collection too?

public List<Lote> list() throws MDIException {

Session session = HibernateUtil.getSessionFactory().openSession();
List<Lote> lista = null;
Transaction tr = null;

try {

tr = session.beginTransaction();

lista = (List<Lote>) session.createQuery("from Lotes").list();

tr.commit();

} catch (HibernateException ex) {
tr.rollback();
throw new MDIException("Can't get list of Lotes", ex);

} finally {
session.close();

}
return lista;
}