Al intentar generar un WAR desde GX17 u2 java para Tomcat 7 No está incluyendo referencias a un módulo de encriptación que uso en el proyecto. Me doy cuenta porque cuando utilizo una funcionalidad que usa el módulo crashea como muestro aquí:
javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.genexus.webpanels.GXWebPanel$DynAjaxEvent.doInvoke(GXWebPanel.java:1089)
at com.genexus.webpanels.GXWebPanel$DynAjaxEvent.invoke(GXWebPanel.java:1119)
at com.genexus.webpanels.GXWebPanel.webAjaxEvent(GXWebPanel.java:469)
at com.genexus.webpanels.GXWebPanel.webExecuteEx(GXWebPanel.java:420)
at com.genexus.webpanels.GXWebPanel.doExecute(GXWebPanel.java:443)
at com.chlccestudios.testenc.doExecute(testenc.java:24)
at com.genexus.webpanels.GXWebObjectStub.callDoExecute(GXWebObjectStub.java:242)
at com.genexus.webpanels.GXWebObjectStub.callExecute(GXWebObjectStub.java:189)
at com.genexus.webpanels.GXWebObjectStub.doPost(GXWebObjectStub.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.genexus.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1241)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: com/genexus/cryptography/symmetric/SymmetricBlockCipher
at com.securityapi.genexuscryptography.SdtSymmetricBlockCipher.dodecrypt(SdtSymmetricBlockCipher.java:78)
at com.chlccestudios.testenc_impl.e132S2(testenc_impl.java:754)
... 38 more
com.genexus.webpanels.GXWebObjectStub.callExecute(GXWebObjectStub.java:215)
com.genexus.webpanels.GXWebObjectStub.doPost(GXWebObjectStub.java:40)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.genexus.filters.ExpiresFilter.doFilter(ExpiresFilter.java:1241)
Si subo la carpeta sin armar el war funciona correctamente. La pregunta es: ¿Cómo debo armar el war para que funcione correctamente?
Actualización 12/08/21 9:40 hs
Acá muestro el armado del war desde Genexus
Acá muestro como incluí en el ClassPath los archivos:
GeneXusCryptography-17.2.0.jar SecurityAPICommons-17.2.0.jar
De todas formar debería ser automática esta inclusión: por ser inferido desde el árbol de referencias a partir los objetos main que estoy incluyendo en el armado del war.