I am creating a pdf by using the following jar files:
avalon-framework-4.2.0.jar
batik-all-1.7.jar
commons-io-2.4.jar
commons-logging-1.2.jar
fop-0.9.5.jar
xml-apis-ext-1.3.04.jar
xmlgraphics-commons-1.3.1.jar
These are loaded via:
THIS.javaSettings = { LoadPaths = [ "jar/lib/" ]
, loadColdFusionClassPath=false
, reloadOnChange=true
, watchInterval=300
}
.. inside my Application cfc. When I run the code from Chrome or IE it creates the pdf just fine, but when the page is refreshed I get the below error. What's funny is it works completely fine when run from Firefox. Can anyone help with this error or explain why it is happening?
Error occurred while copying the file from source
C:/Inetpub/wwwroot/TestSite/MenuMaker/jar/lib/batik-all-1.7.jar to
C:/ColdFusion11/cfusion/tmpCache/appClasses/1512258339
Resources: Check the ColdFusion documentation to verify that you are
using the correct syntax. Search the Knowledge Base to find a solution
to your problem.
Browser: Mozilla/5.0 (Windows NT 6.0; WOW64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135
Safari/537.36
...
java.nio.file.FileSystemException: C:\ColdFusion11\cfusion\tmpCache\appClasses\1512258339\batik-all-1.7.jar:
The process cannot access the file because it is being used by another
process.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileCopy.copy(WindowsFileCopy.java:165)
at sun.nio.fs.WindowsFileSystemProvider.copy(WindowsFileSystemProvider.java:278)
at java.nio.file.Files.copy(Files.java:1274)
at coldfusion.tagext.io.FileUtils.nioCopy(FileUtils.java:1368)
at coldfusion.tagext.io.FileUtils.copyFile(FileUtils.java:1361)
at coldfusion.tagext.io.FileUtils.copyFile(FileUtils.java:1326)
at coldfusion.tagext.io.FileUtils.copy(FileUtils.java:492)
at coldfusion.runtime.AppClassLoaderHelper.handleDynamicLoading(AppClassLoaderHelper.java:380)
at coldfusion.runtime.AppClassLoaderHelper.init(AppClassLoaderHelper.java:189)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:325)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
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:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
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)
It seems that Coldfusion is thinking that some or all of the jar files are being updated, why I am not sure. Changing the LoadPaths:reloadOnchange=true attribute to false fixed the issue.
Related
I'm working on implementing Amazon Pay, and instead of converting one of the SDKs to CF, figured I would just use the java sdk - but, I haven't ever worked with anything that is not part of the java core install. Any ideas why this
createObject('java', 'com.amazon.pay.api.WebstoreClient')
is not working ( Object instantiation exception. Error: org/json/JSONException.) when I drop the jar in cfusion\wwwroot\web_inf\lib.
the jar file came from here: https://github.com/amzn/amazon-pay-api-sdk-java/releases
I suspect that the issue is with the import statements for the "core" libraries, but don't know why CF wouldn't be able to find them (seems pretty basic) so I must be doing something wrong.
Windows 10 dev box running CF2016, dev install with a single instance, both restarted and rebooted.
ANSWERED BY #SOS IN THE COMMENTS - reposted here.
Downloaded the sdk to c:/path/to/lib/amazon-pay-api-2.5.1.jar.
Added
this.javaSettings = {
LoadPaths = [ "c:/path/to/lib/amazon-pay-api-2.5.1.jar"],
loadColdFusionClassPath=true };
Restarted Application.cfc
Edited to add code and complete error
This is the complete contents of the file that errors. I have tried both ways and get the same error -
<!--- <cfobject action="create" type="java" class="com.amazon.pay.api.WebstoreClient" name="WebstoreClient"> --->
<cfset wsClient=createObject('java', 'com.amazon.pay.api.WebstoreClient')>
<cfdump var="#wsClient#">
The error
Object instantiation exception.
An exception occurred while instantiating a Java object.
Error: org/json/JSONException.
The error occurred in E:/webroot/striking/d.cfm: line 2
1 : <!--- <cfobject action="create" type="java" class="com.amazon.pay.api.WebstoreClient" name="WebstoreClient"> --->
2 : <cfset wsClient=createObject('java', 'com.amazon.pay.api.WebstoreClient')>
3 :
4 : <cfdump var="#wsClient#">
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Remote Address 127.0.0.1
Referrer
Date/Time 27-May-22 10:20 AM
Stack Trace
at cfd2ecfm486526222.runPage(E:/webroot/striking/d.cfm:2) at cfd2ecfm486526222.runPage(E:/webroot/striking/d.cfm:2)
java.lang.NoClassDefFoundError: org/json/JSONException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.privateGetPublicFields(Class.java:2614)
at java.lang.Class.getFields(Class.java:1557)
at coldfusion.runtime.java.ObjectHandler.Initialize(ObjectHandler.java:35)
at coldfusion.runtime.java.ObjectHandler.<init>(ObjectHandler.java:30)
at coldfusion.runtime.java.ReflectionCache.get(ReflectionCache.java:47)
at coldfusion.runtime.java.JavaProxy.<init>(JavaProxy.java:35)
at coldfusion.runtime.java.JavaProxyFactory.getProxy(JavaProxyFactory.java:121)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:68)
at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:6608)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6571)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6505)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6431)
at coldfusion.runtime.CFPage.CreateObject(CFPage.java:6372)
at cfd2ecfm486526222.runPage(E:\webroot\striking\d.cfm:2)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:251)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:505)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:153)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.seefusion.Filter.doFilter(Filter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
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:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at com.seefusion.SeeFusionValve.invoke(SeeFusionValve.java:52)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:536)
at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:898)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
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.ClassNotFoundException: org.json.JSONException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
... 68 more
Regards,
M
I have a WSO2IS setup on one server and simplesamlphp setup on another server. There is an application on the simplesamlphp server that I want WSO2IS to provide authentication for. At this point, I have followed the directions on this:
https://docs.wso2.com/display/IS540/Logging+in+to+SimpleSAMLphp+using+Identity+Server
The only change I have made is the entity ID is samls.
When I go to Test authentication sources in simplesamlphp and click wso2-sp, the request is sent off to WSO2IS and I receive "Error 500 - Internal Server Error".
In the log below you will see that everything seems to be going well up until Request Validation is successful. After that something goes wrong. Can anyone point me in the right direction here? I have been searching and I'm not coming up with anything. I feel like I've stopped making progress and I'm not sure where to turn now.
I have DEBUG on for samlsso and I have this in the log for the request:
TID: [-1234] [] [2018-02-21 10:44:26,339] DEBUG {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} - Query string : SAMLRequest=fZJRT8IwFIX%2FytL3bWzOAQ2QoMRIgkoAffDFlLs716RrZ28H%2Bu%2FtNk30haempz3fvfe0MxK1aviydZXe4UeL5ILPWmni%2FcGctVZzI0gS16JG4g74fvmw4Wk04o01zoBR7I%2FlskMQoXXSaBasV3P2VpRYlCMsxzApk2Tid3CEMpvmeYGIWQ7THECMUwQWvKAl75wzD%2FJ2ohbXmpzQzkujZBKO0jBNDknOs2t%2Bnb2yYOWnkVq43lU51xCP4zOZNCzwFFVXGl0EpubTLLuKu%2BaJDAuWvz3eGk1tjXaP9iQBn3ebgeIh3q8MCBWR0RKi6qtBC%2B0RQ6WgQ8Yk60Zhx4xrU7QKo6Zq%2BhoxDWsaCqBe7TuihgXbnzxvpC6kfr8c5XG4RPz%2BcNiG26f9gS1mHZj30dhFP9As%2FivNhtd%2B9LD1amuUhK%2FgzthauMu1OkUWYdlf5c4KTRK181kpZc63FoXDOXO2RRYvhpL%2F%2F9TiGw%3D%3D&RelayState=http%3A%2F%2Fdevlocal.sonic.hypercube-llc.com%2Fsimplesaml%2Fmodule.php%2Fcore%2Fauthenticate.php%3Fas%3Dwso2-sp
TID: [-1234] [] [2018-02-21 10:44:26,342] DEBUG {org.wso2.carbon.identity.sso.saml.util.SAMLSSOUtil} - Request message <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_dfedf0ef7c8f118fedcbcf4966deee46c96cca72ec" Version="2.0" IssueInstant="2018-02-21T16:45:54Z" Destination="https://wso2-dev.h3net.com:9443/samlsso" AssertionConsumerServiceURL="http://devlocal.sonic.hypercube-llc.com/simplesaml/module.php/saml/sp/saml2-acs.php/wso2-sp" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"><saml:Issuer>samls</saml:Issuer><samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" AllowCreate="true"/></samlp:AuthnRequest>
TID: [-1234] [] [2018-02-21 10:44:26,352] DEBUG {org.wso2.carbon.identity.sso.saml.validators.SPInitSSOAuthnRequestValidator} - Authentication Request Validation is successful..
TID: [-1234] [] [2018-02-21 10:44:26,399] ERROR {org.wso2.carbon.identity.application.authentication.framework.handler.step.impl.DefaultStepHandler} - Authenticator is null
TID: [-1234] [] [2018-02-21 10:44:26,433] DEBUG {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} - Query string : SAMLRequest=fZJRT8IwFIX%2FytL3bWzOAQ2QoMRIgkoAffDFlLs716RrZ28H%2Bu%2FtNk30haempz3fvfe0MxK1aviydZXe4UeL5ILPWmni%2FcGctVZzI0gS16JG4g74fvmw4Wk04o01zoBR7I%2FlskMQoXXSaBasV3P2VpRYlCMsxzApk2Tid3CEMpvmeYGIWQ7THECMUwQWvKAl75wzD%2FJ2ohbXmpzQzkujZBKO0jBNDknOs2t%2Bnb2yYOWnkVq43lU51xCP4zOZNCzwFFVXGl0EpubTLLuKu%2BaJDAuWvz3eGk1tjXaP9iQBn3ebgeIh3q8MCBWR0RKi6qtBC%2B0RQ6WgQ8Yk60Zhx4xrU7QKo6Zq%2BhoxDWsaCqBe7TuihgXbnzxvpC6kfr8c5XG4RPz%2BcNiG26f9gS1mHZj30dhFP9As%2FivNhtd%2B9LD1amuUhK%2FgzthauMu1OkUWYdlf5c4KTRK181kpZc63FoXDOXO2RRYvhpL%2F%2F9TiGw%3D%3D&RelayState=http%3A%2F%2Fdevlocal.sonic.hypercube-llc.com%2Fsimplesaml%2Fmodule.php%2Fcore%2Fauthenticate.php%3Fas%3Dwso2-sp
TID: [-1234] [] [2018-02-21 10:44:26,434] ERROR {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} - Cannot find AuthenticationResult from the cache
TID: [-1234] [] [2018-02-21 10:44:26,434] DEBUG {org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet} - Session data is not found for key : b50b8360-3309-4dab-9c24-4d00da8b945b
TID: [-1234] [] [2018-02-21 10:44:26,435] ERROR {org.apache.catalina.core.StandardWrapperValve} - Servlet.service() for servlet [bridgeservlet] in context with path [/] threw exception
java.lang.NullPointerException
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleAuthenticationReponseFromFramework(SAMLSSOProviderServlet.java:678)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleRequest(SAMLSSOProviderServlet.java:179)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.doGet(SAMLSSOProviderServlet.java:96)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.sendRequestToFramework(SAMLSSOProviderServlet.java:1067)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.sendToFrameworkForAuthentication(SAMLSSOProviderServlet.java:457)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleSPInitSSO(SAMLSSOProviderServlet.java:361)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.handleRequest(SAMLSSOProviderServlet.java:196)
at org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet.doGet(SAMLSSOProviderServlet.java:96)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
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 org.wso2.carbon.identity.captcha.filter.CaptchaFilter.doFilter(CaptchaFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:120)
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:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:72)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:60)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:958)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1087)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1756)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1715)
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:748)
I appreciate any and all help.
We are facing the below exception when I click on View button to see the user details :
2017-06-30 19:23:52,831 ERROR [com.myapp.jsp] - <Unable to compile class for JSP:
An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp
apache cannot be resolved or is not a field
50: </myapphtml:myappRow>
51:
52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs">
53: <logic:iterate name="userDetails" property="Orgs" id="org">
54: <bean:write name="org" property="name" /><br>
55: </logic:iterate>
56: </myapphtml:myappRow>
Stacktrace:>
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 53 in the jsp file: /WEB-INF/jsps/ViewUserDetails.jsp
apache cannot be resolved or is not a field
50: </myapphtml:myappRow>
51:
52: <myapphtml:myappRow align="left" label="userdetails.field.label.orgs">
53: <logic:iterate name="userDetails" property="mappedOrgs" id="org">
54: <bean:write name="org" property="name" /><br>
55: </logic:iterate>
56: </myapphtml:myappRow>
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
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 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
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:624)
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 at com.myapp.tools.auth.client.AuthFilter.doFilter(AuthFilter.java:512)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.myapp.tools.auth.client.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:90)
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:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
This happens only in the combination of RHEL 7.x and Tomcat combination.
I am not able to reproduce this issue in combination other then this.
Attaching the ViewUserDetails.jsp
<%# page import="org.apache.struts.Globals" %>
<%# page import="com.myapp.tools.api.impl.User" %>
<%# include file="include/commonDef.jspf" %>
<tiles:insert definition="myapp.csd.office.layout.default">
<tiles:put name="header" type="String">
<myapphtml:myappPageHeaderTab headerImage="images/default/icn_user.gif" headerText="form.page.title.user_details"/>
</tiles:put>
<tiles:put name="content" type="String">
<myapphtml:myappBlock>
<myapphtml:myappMessage
genErrorKey="<%= myappGlobals.GENERAL_ERROR %>"
valErrorKey="<%= Globals.ERROR_KEY %>"
genErrorHeading="MC.General.genError"
valErrorHeading="MC.General.genError"
headingBundle="myappBASETAG"/>
</myapphtml:myappBlock>
<strutshtml:form action="/processUserList.do" method="POST">
<input type="hidden" name="action" value="" />
<myapphtml:myappRow align="left" label="userdetails.field.label.orgs">
<logic:iterate name="userDetails" property="Orgs" id="org">
<bean:write name="org" property="name" /><br>
</logic:iterate>
</myapphtml:myappRow>
<myapphtml:myappButtonRow formname="UserDetailsForm">
<myapphtml:myappButton action="cancel" name="form.button.label.cancel" buttonStyle="button_gt" />
</myapphtml:myappButtonRow>
</strutshtml:form>
</tiles:put>
</tiles:insert>
Try to see if you have a String called org change it to other name as org1.
See answer.
String org = ""; something like this in jsp somewhere on the top of
that package statement. Change that variable name to org1 or some
other meaningful one and your problem will be solved.
There's a known issue in Tomcat which its Compiler is interpreting this as a reference to the field apache of object org
The code works in TC4 because the generated code is much simpler - it
ignores a number of possible error conditions. The fix for these
issues in TC5 and TC6 includes a fully qualified reference to
org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode()
The complier is interpreting this as a reference to the field apache
of object org.
When you have generated code, there is always going to be the
possibility of a naming clash. I can't see an easy way around this.
I am going to mark this as WONTFIX. More generally, avoiding the use
of widely used package prefixes (org, com, etc) as variable names will
reduce your risk of hitting this issue.
As an aside, a quick Google suggests you might also want to avoid 2
letter variable names that clash with top level domains.
Notice that RHEL uses a specific tomcat version which not as community version.
Any community releases of Tomcat are not supported
The supported releases of Tomcat are included in our products:
Tomcat rpm package included in RHEL 7.1, which is based on Tomcat
7.0.54.
Please note that we backport critical bug and security fixes on the
above versions when issues are raised or CVEs are reported. Therefore,
the versions we provide are not exactly the same as community versions
of Tomcat.
As title introduced, the .War file I'm trying to deploy by using Tomcat 7 is not working on a machine running Linux. It does work on Windows and is of course deployed with Tomcat 7.
I've tried to track down the issue alone & searched for related problems on the web including this forum with no success so far. That is why i created this thread asking for help / hints.
The error message I tracked down are the following:
Sep 14, 2015 4:46:05 PM org.apache.catalina.deploy.NamingResources cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SmartHomeReasoner]] so no cleanup was performed for that container
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp].
at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:986)
at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:968)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5676)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:141)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1256)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:692)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
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:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:610)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
It were 2 problems actually causing this issue.
To solve the issue I had to:
*Check the web.xml VERY carefully after any misstakes like e.g. servlets that do not exist our already defined things e.g. driver being defined twice, meaning it's defined somewhere already AND also in the web.xml.
*Remove servlet in the ..\WEB-INF\lib folder of the project. E.g. javax.servlet-api-3.0.1.jar + javax.servlet-api-3.1.0.jar were removed in this case.
NOTE I even had jars that can conflict with each other on project-level but still I was able to deployed successfully on Windows but not on Linux.
Trust me both of the things I mentioned can be a issue, most likely if you take over work from other devs that have done this miss.
Just had the same issue and synchronizing the Java version for the Maven build (from 1.8 to 1.10) and the running environment (1.10) solved it.
I have tried to run my first web application using Hibernate, (I started to learn how to use Hibernate only for a week, so be clement :( ) but I've a ClassNotFoundException and I don't understand the stack trace.
Can you help me?
GRAVE: Servlet.service() for servlet [it.tgi.cd.servlet2.CDOperationServlet2] in context with path [/CDStoreHibernateSpring] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at it.tgi.cd.connection2.DBConnection2.openConnection(DBConnection2.java:15)
at it.tgi.cd.dao2.CDDAO2.searchCD(CDDAO2.java:17)
at it.tgi.cd.servlet2.CDOperationServlet2.doGet(CDOperationServlet2.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
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)
Try copying the hibernate jar files into WEB-INF\lib folder,
just clean build to be sure and try again
Looks like you miss the hibernate-<version>.jar in your classpath. Download and add it to the classpath.
The missing class is in the hibernate-tools package. You can find the jar here:
http://mvnrepository.com/artifact/org.hibernate/hibernate-tools
Just make sure you use the proper version
I agree with Jens and I would approach it like this:
Adopt a build system like Gradle or Maven)
Put the Hibernate dependency in your build file with your project
Build it
If you do these things, the build system will pull down Hibernate for you.
This error can happen when your hibernate jar files has not been exported with your web archive.
You can follow below steps if you are using Eclipse.
Right click the project -> Build Path -> Configure Build Path
In the list at left side click on Deployment Assembly. Click "Add" button. Select "Java Build Path Entries" and click next.
Now select your hibernate jar files or library. Click finish. Then click Ok.
Restart the server if necessary.