Skip to Content

hac/console/impex/import returns 405 with message "Allow: GET"

Hi, community!

I have an automation script that executes tests against Hybris based application. These tests use Impex import operations before executions by using POST method hac/console/impex/import. With Hybris 1905.13 it worked well, but with 2005 I am facing some issues. At some point during suite run, endpoint "hac/console/impex/import" starts returning 405 error. I haven't faced this issue before, so I guess the thing is with the new version.

Here is the logs when I receive this error for the first time during suite execution. Before this case, every import went well and I received 200 status codes, but after - every attempt ends the same: 405 and Allow: GET. That's why I think that something has changed on the server-side.

Impex script:

REMOVE Cart[batchMode = true]; user(Customer.originalUid)[unique = true]
                             ; gi.sun@rustic-hw.com ;

REMOVE Address[batchMode = true]; owner(Customer.originalUid)[unique = true]
                                ; gi.sun@rustic-hw.com ;

REMOVE Order[batchmode = true]; user(Customer.originalUid)[unique = true]
                              ; gi.sun@rustic-hw.com ;

REMOVE Customer[batchmode = true]; originalUid[unique = true];
                                 ; gi.sun@rustic-hw.com                   ;

REMOVE CreditCardPaymentInfo[batchmode = true]; user(uid)[unique = true]
                                              ; gi.sun@rustic-hw.com ;

INSERT_UPDATE B2BCustomer; originalUid[unique = true]; uid[unique = true]; email   ; name                     ; description; sessionLanguage(isocode); sessionCurrency(isocode); groups(uid)                                         ; password   ; title(code)
                         ; gi.sun@rustic-hw.com                   ; gi.sun@rustic-hw.com           ; gi.sun@rustic-hw.com ; Gi Sun ;            ; en                      ; USD                     ; Services West, b2bcustomergroup,standardPermissions ; password ; mr

INSERT_UPDATE Address; &addrID      ; owner(Customer.originalUid)[unique = true]; streetname[unique = true]; postalcode[unique = true]; duplicate[unique = true]; town   ; country(isocode)  ; billingAddress; contactAddress; shippingAddress; unloadingAddress; firstname    ; lastname    ; email   ; gender(code); middlename; phone1  ; cellphone   ; title(code);
                     ; JJAddr1 ; gi.sun@rustic-hw.com                                   ; 1300 ... 1398 Church St                 ; 92374-3553             ; false                   ; Redlands ; US ; true          ; true          ; true           ; true            ; Gi ; Sun ; gi.sun@rustic-hw.com ; MALE        ;           ;  ;  ; mr    ;

UPDATE Customer; originalUid[unique = true]; defaultPaymentAddress(&addrID); defaultShipmentAddress(&addrID)
               ; gi.sun@rustic-hw.com                   ; JJAddr1                  ; JJAddr1

Request parameters:

Request params:	<none>Query params:	<none>Form params:	<none>Path params:	<none>Multiparts:		<none>Headers:		Upgrade-Insecure-Requests=1				Accept=*/*				Content-Type=application/x-www-form-urlencoded; charset=ISO-8859-1Cookies:		JSESSIONID=66D8C3041E58152725AC67CB437B6C04Body:scriptContent=REMOVE+Cart%5BbatchMode+%3D+true%5D%3B+user%28Customer.originalUid%29%5Bunique+%3D+true%5D%0A+++++++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+%3B%0A%0AREMOVE+Address%5BbatchMode+%3D+true%5D%3B+owner%28Customer.originalUid%29%5Bunique+%3D+true%5D%0A++++++++++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+%3B%0A%0AREMOVE+Order%5Bbatchmode+%3D+true%5D%3B+user%28Customer.originalUid%29%5Bunique+%3D+true%5D%0A++++++++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+%3B%0A%0AREMOVE+Customer%5Bbatchmode+%3D+true%5D%3B+originalUid%5Bunique+%3D+true%5D%3B%0A+++++++++++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+++++++++++++++++++%3B%0A%0AREMOVE+CreditCardPaymentInfo%5Bbatchmode+%3D+true%5D%3B+user%28uid%29%5Bunique+%3D+true%5D%0A++++++++++++++++++++++++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+%3B%0A%0AINSERT_UPDATE+B2BCustomer%3B+originalUid%5Bunique+%3D+true%5D%3B+uid%5Bunique+%3D+true%5D%3B+email+++%3B+name+++++++++++++++++++++%3B+description%3B+sessionLanguage%28isocode%29%3B+sessionCurrency%28isocode%29%3B+groups%28uid%29+++++++++++++++++++++++++++++++++++++++++%3B+password+++%3B+title%28code%29%0A+++++++++++++++++++++++++%3B+gi.sun%40rustic-hw.com+++++++++++++++++++%3B+gi.sun%40rustic-hw.com+++++++++++%3B+gi.sun%40rustic-hw.com+%3B+Gi+Sun+%3B++++++++++++%3B+en++++++++++++++++++++++%3B+USD+++++++++++++++++++++%3B+Services+West%2C+b2bcustomergroup%2CstandardPermissions+%3B+password+%3B+mr%0A%0AINSERT_UPDATE+Address%3B+%26addrID++++++%3B+owner%28Customer.originalUid%29%5Bunique+%3D+true%5D%3B+streetname%5Bunique+%3D+true%5D%3B+postalcode%5Bunique+%3D+true%5D%3B+duplicate%5Bunique+%3D+true%5D%3B+town+++%3B+country%28isocode%29++%3B+billingAddress%3B+contactAddress%3B+shippingAddress%3B+unloadingAddress%3B+firstname++++%3B+lastname++++%3B+email+++%3B+gender%28code%29%3B+middlename%3B+phone1++%3B+cellphone+++%3B+title%28code%29%3B%0A+++++++++++++++++++++%3B+JJAddr1+%3B+gi.sun%40rustic-hw.com+++++++++++++++++++++++++++++++++++%3B+1300+...+1398+Church+St+++++++++++++++++%3B+92374-3553+++++++++++++%3B+false+++++++++++++++++++%3B+Redlands+%3B+US+%3B+true++++++++++%3B+true++++++++++%3B+true+++++++++++%3B+true++++++++++++%3B+Gi+%3B+Sun+%3B+gi.sun%40rustic-hw.com+%3B+MALE++++++++%3B+++++++++++%3B++%3B++%3B+mr++++%3B%0A%0AUPDATE+Customer%3B+originalUid%5Bunique+%3D+true%5D%3B+defaultPaymentAddress%28%26addrID%29%3B+defaultShipmentAddress%28%26addrID%29%0A+++++++++++++++%3B+gi.sun%40rustic-hw.com+++++++++++++++++++%3B+JJAddr1++++++++++++++++++%3B+JJAddr1&validationEnum=IMPORT_STRICT&maxThreads=1&encoding=UTF-8&_legacyMode=on&_enableCodeExecution=on&_csrf=fffed367-57d9-44e6-880d-a161b3be269b&_sldEnabled=on&_distributedMode=on

Response:

HTTP/1.1 405 
X-Frame-Options: SAMEORIGIN
Set-Cookie: JSESSIONID=86A5CBCD448DD93383E9543974BD3CD7; Path=/hac; Secure; HttpOnly
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Allow: GET
Content-Length: 0
Date: Mon, 03 Aug 2020 13:21:54 GMT
Keep-Alive: timeout=20

Will appreciate any help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.