ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to <path> javax.servlet.ServletExcepti

UI Components for JSF
Post Reply
SeelePifer
Posts: 5
Joined: 06 Oct 2021, 17:15

06 Oct 2021, 23:25

Hello, good afternoon everyone, I commented to you a bit, what happens is, I have a button called "Process", its function is to show a view of the datatable, removing the variables obtained in the datatable.
However I get this error:

Code: Select all

ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /primax/administracion/reporteTransaccionDsctoCorp.jsf: javax.servlet.ServletException
	at javax.faces.api@3.0.0.SP04//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:725)
	at javax.faces.api@3.0.0.SP04//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.undertow.websocket@2.2.8.Final//io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:173)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at deployment.primax.war//org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at deployment.primax.war//com.primax.payservice.servlet.AdminFilter.doFilter(AdminFilter.java:102)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
	at io.undertow.core@2.2.8.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
	at io.undertow.core@2.2.8.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at org.jboss.xnio@3.8.4.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
	at deployment.primax.war//org.primefaces.util.ResourceUtils.getComponentResources(ResourceUtils.java:66)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:280)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:107)
	at deployment.primax.war//org.omnifaces.context.OmniPartialViewContext$OmniPartialResponseWriter.startError(OmniPartialViewContext.java:408)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:180)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:101)
	at javax.faces.api@3.0.0.SP04//javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:93)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:94)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
	at javax.faces.api@3.0.0.SP04//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
	... 61 more
XHTML Page:

Code: Select all

<b:container>
			<b:row>
				<h:outputText
					value="REPORTE DE TRANSACCIONES CON CONVENIO CORPORATIVO"
					styleClass="titulo-vista-reporte" />
			</b:row>
			<b:row>
				<h:form>
					<p:growl id="msjReporte" severity="error" showSummary="true"
						showDetail="true" />
					<div class="ui-fluid">
						<p:panelGrid columns="6"
							columnClasses="ui-grid-col-1,ui-grid-col-2,ui-grid-col-1,ui-grid-col-2,ui-grid-col-3,ui-grid-col-3"
							layout="grid" styleClass="ui-panelgrid-blank">
							<h:outputLabel value="Fecha Inicio" />
							<p:calendar value="#{admReporteTransaccionDsctoCorp.fechaIni}"
								maxdate="#{now}"></p:calendar>
							<h:outputLabel value="Fecha Fin" />
							<p:calendar value="#{admReporteTransaccionDsctoCorp.fechaFin}"
								maxdate="#{now}"></p:calendar>
							<p:selectCheckboxMenu id="menu"
								value="#{admReporteTransaccionDsctoCorp.selectedInstitucion}"
								label="Empresa Convenio " panelStyle="width:250px">
								
								<f:selectItems value="#{admReporteTransaccionDsctoCorp.listadoInstitucion}" />
							</p:selectCheckboxMenu>

							<p:commandButton value="Procesar"
								actionLis="#{admReporteTransaccionDsctoCorp.transaccionesDescuento}"
								update="tblReporte, tblData,msjReporte,tituloReporte"></p:commandButton>
						</p:panelGrid>
					</div>
				</h:form>
			</b:row>

			<b:row>
				<p:outputPanel id="tblData">
					<h:form>
					<p:panelGrid columns="6" columnClasses="ui-grid-col-1,ui-grid-col-2,ui-grid-col-1,ui-grid-col-2,ui-grid-col-3,ui-grid-col-3"
							layout="grid" styleClass="ui-panelgrid-blank">
					
						<h:commandLink value="Exportar  "
							rendered="#{admReporteTransaccionDsctoCorp.showExport}"
							action="#{admReporteTransaccionDsctoCorp.getReportData}"
							style="font-size:1.2em">
							<b:iconAwesome name="file-excel-o"></b:iconAwesome>
						</h:commandLink>
						
						</p:panelGrid>
					</h:form>
					<h:outputText
						value="#{admReporteTransaccionDsctoCorp.templateTable}"
						escape="false" />
				</p:outputPanel>
			</b:row>
			<p:spacer height="10px;" />
		    <p:dataTable id="tblReporte" widgetVar="tblReporteWdg" styleClass="tblPrimax"
				value="#{admReporteTransaccionDsctoCorp.listaTransaccion}" var="o"
				lazy="true" reflow="true" rows="10" paginator="true"
				paginatorAlwaysVisible="false" paginatorPosition="bottom" 
				rowKey="#{per}"
				paginatorTemplate="{PreviousPageLink} {NextPageLink} {RowsPerPageDropdown}"
				emptyMessage=" " rowIndexVar="index">

				<p:column  headerText="Tarjeta">
					<h:outputText value="#{o.tarjeta}" />
				</p:column>

				<p:column  headerText="Placa">
					<h:outputText value="#{o.placa}" />
				</p:column>
  				
				<p:column  headerText="Estación">
					<h:outputText value="#{o.estacion}" />
				</p:column>

				<p:column  headerText="Fecha de Consumo">
					<h:outputText value="#{admReporteTransaccionDsctoCorp.sdfTransaction.format(o.fechaConsumo)}" >
					
<!-- 						<f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" /> -->
					</h:outputText>
				</p:column>

				<p:column  headerText="Nro de Ticket">
					<h:outputText value="#{o.nroTicket}" />
				</p:column>
				
				<p:column  headerText="Usuario">
					<h:outputText value="#{o.usuario}" style="text-transform:uppercase" />
				</p:column>
				<p:column  headerText="Empresa">
					<h:outputText value="#{o.empresa}" />
				</p:column>
			</p:dataTable>
			
			<p:spacer height="10px;" />
			<b:row>
				<h:outputLabel value="#{admReporteTransaccionDsctoCorp.titulo}"	styleClass="titulo-reporte" id="tituloReporte" />
			</b:row>
		</b:container>
AdmReporteTransaccionDsctoCorp(Lazy):

Code: Select all

@Named
@ViewScoped
public class AdmReporteTransaccionDsctoCorp implements Serializable {

	private static final long serialVersionUID = 603656902523649154L;
	private Date fechaIni;
	private Date fechaFin;
	private String titulo;
	private List<TransaccionReporteConvenioDTO> listaTransaccion = new ArrayList<>();
	private List<SelectItem> listadoInstitucion = new ArrayList<>();
	private BigInteger[] selectedInstitucion;	
	
	private String templateTable = "";
	private SimpleDateFormat sdfTransaction = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
	private SimpleDateFormat sdfTransactionFecha = new SimpleDateFormat("dd/MM/yyyy");
	private SimpleDateFormat sdfTransactionHora = new SimpleDateFormat("HH:mm:ss");
	private boolean showExport;
	
	final static Logger logger = Logger.getLogger(AdmReporteTransaccionDsctoCorp.class.getName());
			
	@Inject
	InstitucionRepository pgInstitucionRepo;
	
	@Inject
	TransaccionRepository pgTransaccionRepo;

	public AdmReporteTransaccionDsctoCorp() {
	}

	
	@PostConstruct
	public void init() {
		Calendar c = Calendar.getInstance();
		c.add(Calendar.DATE, -7);
		fechaIni = c.getTime();
		fechaFin = new Date();
		
		setShowExport(false);
		
		List<Institucion> lstInstituciones =  pgInstitucionRepo.getAll();
		selectedInstitucion = new BigInteger[lstInstituciones.size()];

		int cont = 0;
		for (Institucion insitucion: lstInstituciones)
		{
			listadoInstitucion.add(new SelectItem(insitucion.getId(), insitucion.getNombre()));    		
			selectedInstitucion[cont] = insitucion.getId();
			cont++;
		}
	}

	public void transaccionesDescuento() {
		if (fechaFin.before(fechaIni)) {
			UtilWeb.mostrarMensajeError("La fecha final debe ser mayor al inicial ");
			return;
		}
		final long DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
		int diffInDays = (int) ((fechaFin.getTime() - fechaIni.getTime()) / DAY_IN_MILLIS);
		if (diffInDays > 180) {
			UtilWeb.mostrarMensajeError("El intervalo de la consulta no debe ser mayor a 6 meses ");
			return;
		}
		
		obtenerListadoTransaccionDscto();	
	}

	private void obtenerListadoTransaccionDscto() {
		listaTransaccion = pgTransaccionRepo.getTransaccionesDescuentoCorpV2(fechaIni, fechaFin, selectedInstitucion);
		setShowExport(listaTransaccion.size()>0);
	}
	
	public void getReportData() throws IOException {
		
		HSSFWorkbook workbook = new HSSFWorkbook();
		HSSFSheet sheet = workbook.createSheet("Transacciones");
		int startRow = 0;
		int startCol = 0;

		String[] headers = {"TARJETA",			//01
							"PLACA", 			//02
							"FE. CONTRATO" ,	//03
							"FV. CONTRATO" ,	//04
							"EMPRESA",			//05
							"USUARIO",			//06
							"D.N.I.",			//07
							"USUARIO APP",		//08
							"ESTACIÓN", 		//09
							"DEPARTAMENTO", 	//10	
							"CODIGO PRODUCTO",	//11
							"PRODUCTO",			//12
							"VOLÚMEN", 			//13
							"FECHA CONSUMO",	//14 
							"HORA CONSUMO", 	//15
							"NRO TICKET", 		//16
							"PRECIO PIZARRA", 	//17
							"TOTAL DCTO.", 		//18
							"IMPORTE NETO",		//19
							"IMPORTE FINAL",	//20	
							"TARJETA BONUS",	//21
							"PUNTOS GANADOS", 	//22

							"ID TX", 			//23
							"COD EESS",			//24
							"ESTADO TX"			//25 EGH
							};
		HSSFRow rowH = sheet.createRow(startRow++);
		
	
		for (String h : headers) {			
			//rowH.createCell(startCol++).setCellValue(h);			
			CellStyle style = workbook.createCellStyle();
		    style.setFillBackgroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
		    Font font = workbook.createFont();
		    font.setColor(HSSFColor.WHITE.index);
		    font.setBold(true);
	        style.setFont(font);
	        style.setBorderBottom(BorderStyle.THIN);
	        style.setBottomBorderColor(HSSFColor.BLACK.index);
		    style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
		    Cell cell = rowH.createCell(startCol++);
		    cell.setCellValue(h);
		    cell.setCellStyle(style);
		}

		
		CreationHelper createHelper = workbook.getCreationHelper();
	    short dateFormat = createHelper.createDataFormat().getFormat("dd/MM/yyyy");
	    CellStyle cellStyle = workbook.createCellStyle();	
		cellStyle.setDataFormat(dateFormat);
		
		for (TransaccionReporteConvenioDTO t : listaTransaccion) {
			startCol = 0;
			HSSFRow row = sheet.createRow(startRow++);			
			row.createCell(startCol++).setCellValue(t.getTarjeta()); //TARJETA
			row.createCell(startCol++).setCellValue(t.getPlaca()); //PLACA
			
			Cell cellFechaIni = row.createCell(startCol++);
			cellFechaIni.setCellValue(sdfTransactionFecha.format(t.getFechaContrato()));
			cellFechaIni.setCellStyle(cellStyle);
			
			Cell cellFechaFin = row.createCell(startCol++);
			cellFechaFin.setCellValue(sdfTransactionFecha.format(t.getFechaVencimientoContrato()));
			cellFechaFin.setCellStyle(cellStyle);
					
			
			
			row.createCell(startCol++).setCellValue(t.getEmpresa()); //EMPRESA
			row.createCell(startCol++).setCellValue(t.getUsuario()); //USUARIO
			row.createCell(startCol++).setCellValue(t.getDni()); //DNI
			row.createCell(startCol++).setCellValue(t.getUsuarioApp()); //USUARIO
			row.createCell(startCol++).setCellValue(t.getEstacion());	//ESTACIÓN
			row.createCell(startCol++).setCellValue(t.getDepartamento()); //DEPARTAMENTO
			
			/*if (detalle.getProducto() != null)
			{
				row.createCell(startCol++).setCellValue(detalle.getProducto().getCodigo()); //CODIGO PRODUCTO
				row.createCell(startCol++).setCellValue(detalle.getProducto().getNombreCorto()); //PRODUCTO
			}
			else
			{*/
				row.createCell(startCol++).setCellValue(t.getCodigoProducto()); //CODIGO PRODUCTO
				row.createCell(startCol++).setCellValue(t.getProducto()); //PRODUCTO
			//}
			row.createCell(startCol++).setCellValue(t.getVolumen()); //volumen		
			
			Cell cellFecha = row.createCell(startCol++);
			cellFecha.setCellValue(sdfTransactionFecha.format(Util.setDateAddHours(t.getFechaConsumo(),-5)));
			cellFecha.setCellStyle(cellStyle);
				   	    
			row.createCell(startCol++).setCellValue(sdfTransactionHora.format(t.getFechaConsumo())); //HORA CONSUMO
			row.createCell(startCol++).setCellValue(t.getNroTicket()); //NRO TICKET
			row.createCell(startCol++).setCellValue(t.getPrecioPizarra()); //PRECIO PIZARRA
			row.createCell(startCol++).setCellValue(t.getTotalDescuento()); //TOTAL DCTO.
			row.createCell(startCol++).setCellValue(t.getImporteNeto()); //IMPORTE NETO
			row.createCell(startCol++).setCellValue(t.getImporteFinal()); //IMPORTE FINAL
			row.createCell(startCol++).setCellValue(t.getTarjetaBonus()); //TARJETA BONUS
			row.createCell(startCol++).setCellValue(t.getPuntosGanados()); //PUNTOS GANADOS
			

			row.createCell(startCol++).setCellValue(t.getIdTransaccion()); //ID TX
			row.createCell(startCol++).setCellValue(t.getCodigoEstacion()); //COD EESS
			//EGH
			row.createCell(startCol++).setCellValue(t.getEstadoTx()); //ESTADO TRANSACCION
		}
		
		sheet.autoSizeColumn(0);//01
		sheet.autoSizeColumn(1);//02
		sheet.autoSizeColumn(2);//03
		sheet.autoSizeColumn(3);//04
		sheet.autoSizeColumn(4);//05
		sheet.autoSizeColumn(5);//06
		sheet.autoSizeColumn(6);//07
		sheet.autoSizeColumn(7);//08
		sheet.autoSizeColumn(8);//09
		sheet.autoSizeColumn(9);//10
		sheet.autoSizeColumn(10);//11
		sheet.autoSizeColumn(11);//12
		sheet.autoSizeColumn(12);//13
		sheet.autoSizeColumn(13);//14
		sheet.autoSizeColumn(14);//15
		sheet.autoSizeColumn(15);//16
		sheet.autoSizeColumn(16);//17
		sheet.autoSizeColumn(17);//18
		sheet.autoSizeColumn(18);//19
		sheet.autoSizeColumn(19);//20
		sheet.autoSizeColumn(20);//21
		sheet.autoSizeColumn(21);//22
		sheet.autoSizeColumn(22);//23
		sheet.autoSizeColumn(23);//24
		//EGH
		sheet.autoSizeColumn(24);//25
		
		FacesContext facesContext = FacesContext.getCurrentInstance();
		ExternalContext externalContext = facesContext.getExternalContext();
		externalContext.setResponseContentType("application/vnd.ms-excel");
		externalContext.setResponseHeader("Content-Disposition", "attachment; filename=\"transaccionesDsctoCorp.xls\"");

		workbook.write(externalContext.getResponseOutputStream());
		facesContext.responseComplete();
		
	}
	
	
	public Date getFechaIni() {
		return fechaIni;
	}

	public Date getFechaFin() {
		return fechaFin;
	}

	public void setFechaIni(Date fechaIni) {
		this.fechaIni = fechaIni;
	}

	public void setFechaFin(Date fechaFin) {
		this.fechaFin = fechaFin;
	}

	public String getTemplateTable() {
		return templateTable;
	}

	public void setTemplateTable(String templateTable) {
		this.templateTable = templateTable;
	}

	public String getTitulo() {
		return titulo;
	}

	public void setTitulo(String titulo) {
		this.titulo = titulo;
	}

	public List<TransaccionReporteConvenioDTO> getListaTransaccion() {
		return listaTransaccion;
	}

	public void setListaTransaccion(List<TransaccionReporteConvenioDTO> listaTransaccion) {
		this.listaTransaccion = listaTransaccion;
	}

	public List<SelectItem> getListadoInstitucion() {
		return listadoInstitucion;
	}

	public void setListadoInstitucion(List<SelectItem> listadoInstitucion) {
		this.listadoInstitucion = listadoInstitucion;
	}

	public BigInteger[] getSelectedInstitucion() {
		return selectedInstitucion;
	}

	public void setSelectedInstitucion(BigInteger[] selectedInstitucion) {
		this.selectedInstitucion = selectedInstitucion;
	}

	public boolean isShowExport() {
		return showExport;
	}

	public void setShowExport(boolean showExport) {
		this.showExport = showExport;
	}

	public SimpleDateFormat getSdfTransaction() {
		return sdfTransaction;
	}

	public void setSdfTransaction(SimpleDateFormat sdfTransaction) {
		this.sdfTransaction = sdfTransaction;
	}
}
I tried to change standalone.xml(For hibernate maxium attempts)
standalone.xml:

Code: Select all

<subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-parameters="10000"/>
            <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
        </subsystem>
But the problem persists, any ideas to be able to fix it.
Last edited by SeelePifer on 11 Oct 2021, 19:53, edited 1 time in total.

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

08 Oct 2021, 14:05

Interesting what version of PrimeFaces and OmniFaces are you using?

The NullPointer is here:

Code: Select all

at deployment.primax.war//org.primefaces.util.ResourceUtils.getComponentResources(ResourceUtils.java:66)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:280)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:107)
	at deployment.primax.war//org.omnifaces.context.OmniPartialViewContext$OmniPartialResponseWriter.startError(OmniPartialViewContext.java:408)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:180)
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

SeelePifer
Posts: 5
Joined: 06 Oct 2021, 17:15

10 Oct 2021, 11:28

Melloware wrote:
08 Oct 2021, 14:05
Interesting what version of PrimeFaces and OmniFaces are you using?

The NullPointer is here:

Code: Select all

at deployment.primax.war//org.primefaces.util.ResourceUtils.getComponentResources(ResourceUtils.java:66)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startMetadataIfNecessary(PrimePartialResponseWriter.java:280)
	at deployment.primax.war//org.primefaces.context.PrimePartialResponseWriter.startError(PrimePartialResponseWriter.java:107)
	at deployment.primax.war//org.omnifaces.context.OmniPartialViewContext$OmniPartialResponseWriter.startError(OmniPartialViewContext.java:408)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:180)
I am using the 6.0 Primefaces Version and 2.4 of Omnifaces. I was seeing the error, but it does not give me a reference, it only generates the primefaces lib

SeelePifer
Posts: 5
Joined: 06 Oct 2021, 17:15

11 Oct 2021, 18:47

When i updated to PF 6.1, the error is:

Code: Select all

SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (default task-1) java.lang.RuntimeException: io.undertow.util.ParameterLimitException: UT000047: The number of parameters exceeded the maximum of 1000
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.form.FormData.add(FormData.java:100)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.form.FormData.add(FormData.java:86)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.addPair(FormEncodedDataDefinition.java:223)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.doParse(FormEncodedDataDefinition.java:175)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.form.FormEncodedDataDefinition$FormEncodedDataParser.parseBlocking(FormEncodedDataDefinition.java:294)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.spec.HttpServletRequestImpl.parseFormData(HttpServletRequestImpl.java:855)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.spec.HttpServletRequestImpl.getParameterMap(HttpServletRequestImpl.java:807)
	at javax.servlet.api@2.0.0.Final//javax.servlet.ServletRequestWrapper.getParameterMap(ServletRequestWrapper.java:158)
	at deployment.primax.war//org.ocpsoft.rewrite.servlet.impl.HttpRewriteWrappedRequest.getParameterMap(HttpRewriteWrappedRequest.java:63)
	at deployment.primax.war//org.ocpsoft.rewrite.servlet.impl.HttpRewriteWrappedRequest.getParameterNames(HttpRewriteWrappedRequest.java:91)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:56)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.context.RequestParameterMap.get(RequestParameterMap.java:33)
	at java.base/java.util.Collections$UnmodifiableMap.get(Collections.java:1454)
	at deployment.primax.war//org.omnifaces.util.FacesLocal.getRequestParameter(FacesLocal.java:686)
	at deployment.primax.war//org.omnifaces.cdi.viewscope.ViewScopeManager.isUnloadRequest(ViewScopeManager.java:272)
	at deployment.primax.war//org.omnifaces.context.OmniExternalContext.getFlash(OmniExternalContext.java:63)
	at javax.faces.api@3.0.0.SP04//javax.faces.context.ExternalContextWrapper.getFlash(ExternalContextWrapper.java:1010)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:189)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.Phase.doPhase(Phase.java:74)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at com.sun.jsf-impl@2.3.14.SP04//com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
	at javax.faces.api@3.0.0.SP04//javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:707)
	at javax.faces.api@3.0.0.SP04//javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.undertow.websocket@2.2.8.Final//io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:173)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.opentracing.contrib.opentracing-jaxrs2//io.opentracing.contrib.jaxrs2.server.SpanFinishingFilter.doFilter(SpanFinishingFilter.java:52)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at deployment.primax.war//org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:226)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at deployment.primax.war//com.primax.payservice.servlet.AdminFilter.doFilter(AdminFilter.java:102)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.core@2.2.8.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
	at io.undertow.core@2.2.8.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at org.wildfly.extension.undertow@24.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1535)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
	at io.undertow.servlet@2.2.8.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
	at io.undertow.core@2.2.8.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
	at io.undertow.core@2.2.8.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at org.jboss.xnio@3.8.4.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: io.undertow.util.ParameterLimitException: UT000047: The number of parameters exceeded the maximum of 1000
	... 83 more

NOTiFY
Posts: 393
Joined: 25 May 2016, 22:57

14 Oct 2021, 10:29

https://developer.jboss.org/thread/241526

"Try setting max-parameters instead which is mentioned here": https://docs.jboss.org/author/index.html
PF 13.0.0--Jakarta. Jakarta Faces 4.0.1/Kotlin Multiplatform 1.9.10
Mojarra 4.0.2, OmniFaces 4.2
WildFly 29.0.1.Final 'preview' Jakarta EE 10.0.0
JDK 20.0.2, Kotlin 1.9.10, Gradle 8.3 Groovy DSL, MongoDB 7.0.0
IntelliJ IDEA 2023.2.1, macOS Ventura 13.5.1

SeelePifer
Posts: 5
Joined: 06 Oct 2021, 17:15

15 Oct 2021, 18:58

Solved:

It consisted of changing the standalone-XML and making an adjustment on the JPQL, since it received a DTO, it had it as join fetch, the only thing done was to remove the fetch and add the max parameters in https

standalone-xml:

Code: Select all

 <subsystem xmlns="urn:jboss:domain:undertow:12.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other" statistics-enabled="${wildfly.undertow.statistics-enabled:${wildfly.statistics-enabled:false}}">
            <buffer-cache name="default"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http" max-parameters="50000" redirect-socket="https" enable-http2="true"/>
                <https-listener name="https" socket-binding="https" max-parameters="50000" security-realm="ApplicationRealm" enable-http2="true"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <http-invoker security-realm="ApplicationRealm"/>
                </host>
            </server>
            <servlet-container name="default">
                <jsp-config/>
                <websockets/>
            </servlet-container>
            <handlers>
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
            </handlers>
        </subsystem>
If you used liberty, into server.xml:

Code: Select all

<webContainer maxParamPerRequest="-1" />

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests