Cannot locate Servlet.class in CQ5 for the action "/bin/submitApplication" - aem

I want to make some changes in a Project built on CQ5 ver 5.4.
There is a form submitting to a location "/bin/submitApplication" and I am unable to find the Servlet class for that. I have searched in CRX-DE Lite and there is no result.
Also if I go to URL http://vic.netpace.com/bin/submitApplication It give me the following exception that prints the class name but I cannot locate the class anywhere in CRX-DE
The requested URL /bin/submitApplication resulted in an error in com.netpace.vic.servlet.ApplicationServlet.
Request Progress:
0 (2016-08-09 14:24:08) TIMER_START{Request Processing}
0 (2016-08-09 14:24:08) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
0 (2016-08-09 14:24:08) LOG Method=GET, PathInfo=/bin/submitApplication
0 (2016-08-09 14:24:08) TIMER_START{ResourceResolution}
0 (2016-08-09 14:24:08) TIMER_END{0,ResourceResolution} URI=/bin/submitApplication resolves to Resource=ServletResource, servlet=com.netpace.vic.servlet.ApplicationServlet, path=/bin/submitApplication
0 (2016-08-09 14:24:08) LOG Resource Path Info: SlingRequestPathInfo: path='/bin/submitApplication', selectorString='null', extension='null', suffix='null'
0 (2016-08-09 14:24:08) TIMER_START{ServletResolution}
0 (2016-08-09 14:24:08) TIMER_START{resolveServlet(ServletResource, servlet=com.netpace.vic.servlet.ApplicationServlet, path=/bin/submitApplication)}
0 (2016-08-09 14:24:08) TIMER_END{0,resolveServlet(ServletResource, servlet=com.netpace.vic.servlet.ApplicationServlet, path=/bin/submitApplication)} Using servlet com.netpace.vic.servlet.ApplicationServlet
0 (2016-08-09 14:24:08) TIMER_END{0,ServletResolution} URI=/bin/submitApplication handled by Servlet=com.netpace.vic.servlet.ApplicationServlet
0 (2016-08-09 14:24:08) LOG Applying Requestfilters
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.security.impl.ReferrerFilter
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.portal.container.internal.request.PortalFilter
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.rewriter.impl.RewriterFilter
0 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.wcm.core.impl.WCMRequestFilter
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter
0 (2016-08-09 14:24:08) LOG Calling filter: com.netpace.vic.impl.filters.LoggingFilter
0 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.theme.impl.ThemeResolverFilter
0 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet
0 (2016-08-09 14:24:08) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
0 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter
1 (2016-08-09 14:24:08) LOG RedirectFilter did not redirect (MobileUtil.isMobileResource() returns false)
1 (2016-08-09 14:24:08) LOG Applying Componentfilters
1 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.wcm.core.impl.WCMComponentFilter
1 (2016-08-09 14:24:08) LOG Calling filter: com.day.cq.wcm.core.impl.WCMDebugFilter
1 (2016-08-09 14:24:08) TIMER_START{com.netpace.vic.servlet.ApplicationServlet#0}
1 (2016-08-09 14:24:08) TIMER_START{handleError:status=405}
4 (2016-08-09 14:24:08) TIMER_END{3,handleError:status=405} Using handler org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
4 (2016-08-09 14:24:08) TIMER_END{4,Request Processing} Dumping SlingRequestProgressTracker Entries

Goto http://<your server>:<port>/system/console/components and search for your class com.netpace.vic.servlet.ApplicationServlet, every servlet is registered as an OSGI component so you will find your servlet in components console.
Expand the component listing to see the details, from there you will get the bundle name in which that servlet is located. Copy that bundle name or note the bundle id.
Now goto /system/console/bundles and look for the bundle either using the name or id you copied from components console. You will be able to find the bundle, expand the bundle listing to see its details. In those details it will also specify location where bundle is installed/located.
You can goto that location in CRXDE, now there are two possibilities -
You will find a src folder there in CRXDE which should have code you are looking for.
Or you will know the name of JAR that is carrying your servlet. You can go and check your code repository/project for the java code of the servlet
Also note that your servlet appears to be a form POST servlet so when
you are trying to access it via URL -
http://vic.netpace.com/bin/submitApplication you trying to hit a GET
request on it which probably is not supported by the servlet.

Related

Problem with accessing JBoss EAP 7.3 admin console on a Windows 10 machine

Attempting to open the JBoss EAP 7.3 admin console ends with blank white page with no errors in cmd terminal window.
Steps I did:
unzip jboss-eap-7.3.0.zip
run c:\AppServers\jboss-eap-7.3\bin\add-user.bat
update admin user and enter valid password
start local server c:\AppServers\jboss-eap-7.3\bin\standalone.bat
open http://127.0.0.1:9990/console/index.html
result blank page
DevTools Console output
hal-0.js:10804 GET http://127.0.0.1:9990/management 401 (Unauthorized)
hal-0.js:10803 GET http://127.0.0.1:9990/keycloak/adapter/wildfly-console 404 (Not Found)
hal-0.js:10811 11:30:43.262 ERROR o.j.h.c.b.endpoint.EndpointManager Keycloak adapter 'http://127.0.0.1:9990/keycloak/adapter/wildfly-console' doesn't exist - status: 404
hal-0.js:5706 POST http://127.0.0.1:9990/management 401 (Unauthorized)
hal-0.js:10811 11:30:43.281 ERROR o.j.h.c.bootstrap.HalBootstrapper Bootstrap error: Authentication required.
DevTools Network panel output
index.html 304 document Other 95 B 8 ms
polyfill.min.js 200 script index.html (memory cache) 0 ms
external.min.js 200 script index.html (memory cache) 0 ms
hal.nocache.js 200 script index.html (memory cache) 0 ms
hal.min.css 200 stylesheet index.html (disk cache) 5 ms
BD3BC5E1B9793E31D587DA5F8EC8FBDE.cache.js 200 script hal.nocache.js:10 (disk cache) 36 ms
OpenSans-Regular-webfont.woff2 200 font hal.min.css (memory cache) 0 ms
management 401 xhr hal-0.js:10804 429 B 4 ms
worker.js 200 javascript Other (disk cache) 2 ms
favicon.ico 200 x-icon Other (disk cache) 2 ms
wildfly-console 404 xhr hal-0.js:10803 206 B 3 ms
pouchdb.min.js 200 javascript worker.js:16 (disk cache) 3 ms
management 401 xhr hal-0.js:5706 773 B 4 ms
Same steps in home environment don't cause any issues.
I don't have any GET requests to keycloak/adapter/wildfly-console
I can open jboss console and login as admin.
The difference highly likely is in corporate security setup.
And I have to know exactly what to ask security department. Could you give me any idea what to look for?

Does 'option accept-invalid-http-response' work in HAProxy 1.7.12?

The server I am connecting to is returning what looks like an invalid Date header and I want HAProxy to ignore the error.
Unfortunately I have no control over the server, I am using a third party tool.
I have tried 'option accept-invalid-http-response' in both the backend and defaults sections, with the same result.
The invalid header isn't being ignored,
my client always gets a '502 Bad Gateway' response.
From 'shows errors'
[21/Dec/2020:14:40:59.197] backend <BACKEND> (#3): invalid response
frontend <FRONTEND> (#2), server <SERVER> (#1), event #5
src <IP>:46508, session #6, session flags 0x0000008e
HTTP msg state MSG_RQBEFORE(0), msg flags 0x00000000, tx flags 0x08600000
HTTP chunk len 0 bytes, HTTP body len 0 bytes
buffer flags 0x80008021, out 0 bytes, total 50 bytes
pending 50 bytes, wrapping at 16384, error at position 50:
00000 HTTP/1.1 204 OK\r\n
00017 Date: Mon Dec 2020 14:40:58 GMT\r\n
Or maybe there is something else wrong with the response header.
Any help would be appreciated.

How to make a SOAP call to WSUS Server

How can I create an SOAP envelope to get update details from WSUS Server?
I found complete WSDL file and documentation, when I tried hitting
10.66.195.242/ApiRemoting30/WebService.asmx
I'm getting Server error
Server Error in '/ApiRemoting30' Application.
Error: 2018-10-08 05:10:20 10.66.195.242 GET /ApiRemoting30/WebService.asmx - 80 NH-2K8-R2-3\administrator 10.44.141.162 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:62.0)+Gecko/20100101+Firefox/62.0 500 0 0 5003

Tracing sling jsp resolution & use of selectors vs variables

In adobe AEM (aka cq), for a given url is it possible to see what jsp's are being invoked?
We've got example code, not written by us where 2 sets of 'base' jsp are being matched if a specific selector is present or not - 'm' for mobile.
In the base jsp a variable is then set to flag if a mobile or desktop device is requesting.
From then on no further selectors are used - just checks on the variable to specifically include mobile specific jsp or not.
A different approach from solely using selectors to invoke specific jsp or not.
By having the script resolution traced it helps visualise and debuts, but is this a common pattern for sling based code?
You can see details about the most recent requests in the Web Console, the Recent Requests tab ( http://localhost:4502/system/console/requests for a local author instance ).
The output is similar to the one below, and it should give you enough information
0 (2013-09-14 21:36:20) TIMER_START{Request Processing}
0 (2013-09-14 21:36:20) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
0 (2013-09-14 21:36:20) LOG Method=GET, PathInfo=/.edit.html
0 (2013-09-14 21:36:20) TIMER_START{ResourceResolution}
1 (2013-09-14 21:36:20) TIMER_END{1,ResourceResolution} URI=/.edit.html resolves to Resource=JcrNodeResource, type=sling:redirect, superType=null, path=/
1 (2013-09-14 21:36:20) LOG Resource Path Info: SlingRequestPathInfo: path='/', selectorString='edit', extension='html', suffix='null'
1 (2013-09-14 21:36:20) TIMER_START{ServletResolution}
1 (2013-09-14 21:36:20) TIMER_START{resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)}
1 (2013-09-14 21:36:20) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)} Using servlet /libs/sling/servlet/default/edit.jsp
1 (2013-09-14 21:36:20) TIMER_END{0,ServletResolution} URI=/.edit.html handled by Servlet=/libs/sling/servlet/default/edit.jsp
1 (2013-09-14 21:36:20) LOG Applying Requestfilters
1 (2013-09-14 21:36:20) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
1 (2013-09-14 21:36:20) LOG Calling filter: org.apache.sling.explorer.post.POSTServletFilter
1 (2013-09-14 21:36:20) TIMER_START{/libs/sling/servlet/default/edit.jsp#0}
3 (2013-09-14 21:36:20) LOG Including resource JcrNodeResource, type=sling:redirect, superType=null, path=/ (SlingRequestPathInfo: path='/', selectorString='head', extension='html', suffix='null')
3 (2013-09-14 21:36:20) TIMER_START{resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)}
3 (2013-09-14 21:36:20) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)} Using servlet /libs/sling/servlet/default/head.jsp
You can also find out which script or servlet will process a request using the ServletResolver service:
Servlet servlet = servletResolver.resolveServlet(slingRequest);
RequestUtil.getServletName(servlet);
As #robert_munteanu showed, the requests tab on the system console is the best place to track the processing of your requests.
This is common idiom in Sling applications. Different JSPs are used for GET/POST requests, requests containing selectors or requests with different extensions.
Take a look at the Sling Cheatsheet to understand how this works at high level, or at the Sling ScriptSelectionTest unit test, which explores a broader range of use cases.

PayPal Sandbox Internal Service Error

I am trying to use the PayPal Sandbox for testing automated credit card processing, but running into an issue. Last week my tests were "successful" in the sense that when a validation error occurred the API would choke, but at least I knew something happened. After cleaning up my code that was being passed to the API, I no longer get validation errors, just internal service errors and this has been occurring for four days.
Here is what the log file shows (access token removed here, but it was generated from the API successfully prior to use):
2013-07-01 16:47:00,845 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] grant_type=client_credentials
2013-07-01 16:47:03,296 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] Service response
2013-07-01 16:47:03,296 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] {"scope":"https://api.paypal.com/v1/payments/.* https://api.paypal.com/v1/vault/credit-card https://api.paypal.com/v1/vault/credit-card/.* openid","access_token":"[access token that was generated]","token_type":"Bearer","app_id":"[app ID]","expires_in":28800}
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] Content-Type:application/json
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] Authorization:Bearer [access code]
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] User-Agent:PayPalSDK/rest-sdk-dotnet 0.7.1 ;lang=DOTNET;v=4.0.30319.18046;bit=64;os=Windows 8 6.2.9200.0;
2013-07-01 16:47:05,069 [32944] DEBUG PayPal.PayPalResource [(null)] PayPal-Request-Id:303be909-4268-4909-b1cb-b51b6dc7ea54
2013-07-01 16:47:05,365 [32944] DEBUG PayPal.Manager.ConnectionManager [(null)] {"intent":"sale","payer":{"payment_method":"credit_card","funding_instruments":[{"credit_card":{"number":"4111111111111111","type":"visa","expire_month":4,"expire_year":2017,"cvv2":"123","first_name":"First","last_name":"Last","billing_address":{"line1":"123 Any St.","city":"City","country_code":"US","postal_code":"12345","state":"OH"}}}]},"transactions":[{"amount":{"currency":"USD","total":"4.93","details":{"shipping":"3.55","subtotal":"1.30","tax":"0.08"}},"description":"Description"}]}
2013-07-01 16:47:35,657 [32944] ERROR PayPal.Manager.ConnectionManager [(null)] Error Response: {"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"ce04de98d51f2"}
2013-07-01 16:47:35,657 [32944] INFO PayPal.Manager.ConnectionManager [(null)] Got InternalServerError status code from server
2013-07-01 16:47:35,708 [32944] ERROR PayPal.Exception.PayPalException [(null)] Exception in HttpConnection Execute: Stream was not readable.
PayPal.Exception.PayPalException: Exception in HttpConnection Execute: Stream was not readable. ---> System.ArgumentException: Stream was not readable.
at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
at System.IO.StreamReader..ctor(Stream stream)
at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest)
--- End of inner exception stack trace ---
Any suggestions on this? I'm not really sure where to go from here.
Just ran our unit test cases, confirmed that Payment with CC seems to work. Please try with an alternate test credit card number "4417119669820331" and confirm if that works. We have seen some intermittent issues when using the test credit card number "4111111111111111".
If it works modify your test credit card for automated test cases to this number to prevent future failures till a fix is available.