Issue with Manual unpacking of wars in tomcat - java

I am unpacking the application war manually in tomcat as I am specifying the context for the application in $CATALINA/conf/Catalina/host/ROOT.xml. The docBase is specified in here,
<?xml version="1.0"?>
<Context
path=""
docBase="/opt/tomcat/tc3/webapps/TC3"
reloadable="true"
/>
When the same war is unpacked by tomcat, i don't see any issues but when I unpack it manually using unzip command, i run into below jasper issue,
org.apache.jasper.JasperException: Unable to find taglib "html" for URI: /WEB-INF/struts-html.tld
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:176)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:434)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
at org.apache.jasper.compiler.Parser.parse(Parser.java:145)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:201)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:522)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
So clearly the issue is because of manual unpacking of war VS the way tomcat unpacks the war. How are WARs unpacked manually or is there a way to make tomcat unpack while specifying the docBase and the context path ?

I have externalized the manually exploded application. I had kept it in a location /opt/test/TC3 and made the changes in CONFIG_BASE to point the docBase to this location.
But that seems to not solve the issue. Is there a way to autoDeploy while specifying the context ?

I had this working by having different paths for appBase & docBase. docBase contained the path of the directory where my application is manually exploded.
Hopefully it helps someone.

Related

500 Servlet error when running Spring-Boot Web App on Apache Tomcat - Unable to delete class file

I have been working on developing a web app using spring-boot, but suddenly ran into a possible permissions issue when deploying with apache tomcat (9.0.36). None of the code has changed, but suddenly Jasper cannot compile my JSP class files. It looks like it is trying to delete class files in the tomcat deployment directory, but fails.
I am not sure what could be causing this, but it happens both when running it through MyEclipse Tomcat, and using the embedded Tomcat server with Maven's spring-boot:run command. Here is an example of the error:
Fri Sep 04 11:04:00 EDT 2020
There was an unexpected error (type=Internal Server Error, status=500).
Unable to delete class file
Stack Trace:
2020-09-08 16:37:26.192 ERROR 21236 --- [nio-8080-exec-1] o.a.c.c.C.[.[localhost].[/].[jsp] : Servlet.service() for servlet [jsp] in context with path [] threw exception [org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause
java.io.IOException: Unable to delete class file [C:\Users\ek040e\Documents\Work\apache-tomcat-9.0.36\work\Catalina\localhost\ROOT\org\apache\jsp\index_jsp.class]
at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:180) ~[jasper.jar:9.0.36]
at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:142) ~[jasper.jar:9.0.36]
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:543) ~[jasper.jar:9.0.36]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:392) ~[jasper.jar:9.0.36]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) ~[jasper.jar:9.0.36]
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:346) ~[jasper.jar:9.0.36]
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:605) ~[jasper.jar:9.0.36]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:400) ~[jasper.jar:9.0.36]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) ~[jasper.jar:9.0.36]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) ~[jasper.jar:9.0.36]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.36]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.36]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.36]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.36]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.36]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [catalina.jar:9.0.36]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.36]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.36]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) [catalina.jar:9.0.36]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.36]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.36]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) [tomcat-coyote.jar:9.0.36]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.36]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote.jar:9.0.36]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) [tomcat-coyote.jar:9.0.36]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.36]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_112]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.36]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_112]
Stuff like this happens on local boxes. It could be your antivirus or some other process on your computer or parallel threads in your IDE. I wouldn't worry about it until it starts happening on a prod box. Sometimes you just need to nuke the whole thing and start over, especially when using eclipse. I wouldnt worry too much about it so long as everything works properly via maven and the command line.

Failed to start war in tomcat caused by IllegalArgumentException

Environment info
Tomcat: 8.5.9
JDK: 1.8.0_112-b16
The war file can be deployed using Tomcat Web Application Manager successfully, but failed to be started. The war file can be decompress just fine so I think it's a valid zip file.
The detailed exception is
16-Mar-2017 14:34:11.792 SEVERE [http-nio-8080-exec-4] org.apache.catalina.core.ApplicationContext.log FAIL - Application at context path /propertyMS-1.0 could not be started
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/propertyMS-1.0]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1307)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:669)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:591)
at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:319)
at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:88)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: The archive [jar:file:/Users/bruce/apache-tomcat-8.5.9/webapps/propertyMS-1.0.war!/] is malformed and will be ignored: an entry contains an illegal path [./] which was not expanded to [/Users/bruce/apache-tomcat-8.5.9/webapps/propertyMS-1.0] since that is outside of the defined docBase [/Users/bruce/apache-tomcat-8.5.9/webapps/propertyMS-1.0/]
at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:141)
at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:615)
at org.apache.catalina.startup.ContextConfig.beforeStart(ContextConfig.java:748)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:301)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:149)
... 35 more
Thanks.
Update:
As suggested I expanded the war into a folder then deployed the folder to same tomcat server and it works. I'm not sure what's wrong with the war file. It can be decompressed so it should be a valid zip file, at least.
all i can say is, make sure it includes only files from the project path.
when you add file to the the war i think there is some option to include original path structure (don't use that), because when tomcat try to extract the archive into that path (out of webapps/project dir) it will fail...
try to use a command to list archive entries and see if any of the entries have a path out of project dir

Apache OfBiz Execution issues

Working with OfBiz on a 64-bit Win 7 machine and after I perform a fresh build, when the build is completed and I try to open any of the pages, my browser (both IE and Chrome) are blank. Any ideas?
OfBiz version 16.11.01
Snippet from the current log:
|W| Communication error with the client while processing the request: /webtools/control/main
org.apache.ofbiz.webapp.control.RequestHandlerException: Error in the response writer/output stream: freemarker.template.TemplateNotFoundException: Template not found for name "component://widget/templates/HtmlScreenMacroLibrary.ftl".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader#6e5ece55, loader2 = StringTemplateLoader(Map { })). (Template not found for name "component://widget/templates/HtmlScreenMacroLibrary.ftl".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader#6e5ece55, loader2 = StringTemplateLoader(Map { })).)
at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:989) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:649) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.36.jar:8.0.36]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) [tomcat-catalina-8.0.37.jar:8.0.37]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100) [tomcat-coyote-8.0.37.jar:8.0.37]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687) [tomcat-coyote-8.0.37.jar:8.0.37]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) [tomcat-coyote-8.0.37.jar:8.0.37]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) [tomcat-coyote-8.0.37.jar:8.0.37]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.37.jar:8.0.37]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: freemarker.template.TemplateNotFoundException: Template not found for name "component://widget/templates/HtmlScreenMacroLibrary.ftl".
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader#6e5ece55, loader2 = StringTemplateLoader(Map { })).
at freemarker.template.Configuration.getTemplate(Configuration.java:2430) ~[freemarker-2.3.24-incubating.jar:2.3.24]
at freemarker.template.Configuration.getTemplate(Configuration.java:2232) ~[freemarker-2.3.24-incubating.jar:2.3.24]
at org.apache.ofbiz.base.util.template.FreeMarkerWorker.getTemplate(FreeMarkerWorker.java:259) ~[ofbiz.jar:?]
at org.apache.ofbiz.base.util.template.FreeMarkerWorker.getTemplate(FreeMarkerWorker.java:253) ~[ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenRenderer.<init>(MacroScreenRenderer.java:84) ~[ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.loadRenderers(MacroScreenViewHandler.java:113) ~[ofbiz.jar:?]
at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:152) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:985) ~[ofbiz.jar:?]
... 31 more
So, I figured out the issue. I had moved the entire directory into my C:\Program Files directory which due to corporate admin restrictions was likely blocking permissions somewhere. That being said, I moved the directory to a 'normal' location, re-ran gradlew and I can navigate to the pages. Thanks for the ideas!
Check via the DevTools in Chrome what's the HTTP status code of the response and the page content if there is any. You can see it in the network panel in the column "status".
Check the OfBiz log files for any errors or stacktraces.
In fact the problem could be somewhere else.
When you store your ofbiz application under a folder with space inside, the common visual theme don't work. So the solution is to either change the current top-parent folder by erasing spaces within its name, or changing the folder (you did it without knowing exactly what was going exactly).
Regards.
i also face the same issue with OfBiz version 16.11.04 because of some admin side permission for the solution you need to put your project in c drive and start it. for me its working fine.

Oracle Driver Error oracle.jdbc.driver.T4CConnection.isValid(I)Z

I'm using the ojdbc7.jar that is distributed from the Oracle site, and so far it has worked perfectly. Recently, however, we've decided to switch to using a maven structure for our webapp development so I've been converting our Java Web App to maven. Now I'm seeing this oracle.jdbc.driver.T4CConnection.isValid(I)Z error when making an Oracle DB connection even though I'm using the exact same driver file as I was in my non-maven build. I have the dependency declared like this:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>7</version>
</dependency>
I have manually installed the driver using Netbeans, as the maven depository does not contain the ojdbc7 driver.
Why am I seeing this error and what can I do about it? It's clearly a maven related problem seeing as this builds perfectly without maven managing it.
Stack Trace:
org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:226)
org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:302)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2208)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2191)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1945)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.networkfleet.sre.common.db.Resource.getDBConnectionDEV(Resource.java:75)
com.networkfleet.sre.app.checkreport.CheckReportSrv.doGet(CheckReportSrv.java:63)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)
You need run maven install-file since maven can't download it.
https://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository/1074971#1074971e

Webapp won't run uder Tomcat 8.0.23

I have a web App running in tomcat 7 and tomcat 6. But when I try to migrate to tomcat 8 it won't let me, there are some exceptions like this one:
javax.servlet.ServletException: La ejecución del Servlet lanzó una excepción
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:314)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at mx.com.vw.servlet.filters.StylizerFilter.doFilter(StylizerFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2463)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2452)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AbstractMethodError
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
at org.apache.tomcat.dbcp.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:913)
at org.apache.tomcat.dbcp.dbcp2.PoolableConnection.validate(PoolableConnection.java:226)
at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:302)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2208)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2191)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1945)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
at mx.com.vw.db.PoolDataAccessor.openConnection(PoolDataAccessor.java:50)
at mx.com.vw.kp.servlet.SemaphoreServlet.retrieve(SemaphoreServlet.java:130)
at mx.com.vw.kp.servlet.SemaphoreServlet.processRequest(SemaphoreServlet.java:57)
at mx.com.vw.kp.servlet.SemaphoreServlet.doGet(SemaphoreServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
... 23 more`
Here's my context file from my App:
<Resource auth="Container"
connectionProperties="autoReconnect=true;
secondsBeforeRetryMaster=20;
autoReconnectForPools=true;
cachePrepStmts=true;"
driverClassName="com.mysql.jdbc.Driver"
factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory"
logAbandoned="false"
maxTotal="10"
maxIdle="3"
maxOpenPreparedStatements="-1"
maxWaitMillis="-1"
name="jdbc/KPPool"
password="infOmaP78257"
poolPreparedStatements="true"
removeAbandonedOnBorrow="true"
removeAbandonedOnMaintenance="true"
removeAbandonedTimeout="30"
type="javax.sql.DataSource"
url="jdbc:mysql://myhost:3306/mybd?noAccessToProcedureBodies=true"
username="myuser"/>
<Realm className="org.apache.catalina.realm.JDBCRealm"
connectionName="java_apps"
connectionPassword="mypass"
connectionURL="jdbc:mysql://myhost:3306/mybd"
driverName="com.mysql.jdbc.Driver"
roleNameCol="role"
userCredCol="password"
userNameCol="username"
userRoleTable="roles"
userTable="users"
localDataSource="true"
debug="99"/>
I think is something about my database connection, because once I tried to do something that requires a db connection, it would send me the exception.
I'm using netbeans 8.2, working in Windows 7. I'm new working with jsp and stuff so I don't what I'm missing here. Does anyone have a solution? or do you have configuration files of tomcat 8 that I can check? I would appreciate your help.
Thank You?
The error seems to happen when the connection pool tries to delegate the validation of the connection to the underlying jdbc driver. To confirm, try adding this config parameter under the Resource element of your context file:
validationQuery="select 1"
This will tell DBCP to use that validation query instead of delegating the validation. Iirc, validation was disabled by default in Tomcat 7 (DBCP 1.x) so that could explain the change in behavior.
I had the same problem when I upgrade tomcat7 to tomcat8.5. I answered this problem check the below link may be that one can solve your problem.
Tomcat 8, axis2 webservices aar, spring jndi not bound in context

Categories