Hybris v.1905 Cannot unwrap the Remote. 'GenericItemEJBImpl' doesn't expose the Remote - sap

After hybris upgrade 6.7 -> 1905, stared getting errors during categories import via hot folder
Caused by: java.lang.UnsupportedOperationException: Cannot unwrap the Remote. 'GenericItemEJBImpl' doesn't expose the Remote.
at de.hybris.platform.core.WrapperFactory.unwrap(WrapperFactory.java:788) ~[coreserver.jar:?]
at de.hybris.platform.core.WrapperFactory.unwrap(WrapperFactory.java:753) ~[coreserver.jar:?]
at de.hybris.platform.core.WrapperFactory.unwrap(WrapperFactory.java:748) ~[coreserver.jar:?]
at de.hybris.platform.persistence.ItemEJBImpl.unwrap(ItemEJBImpl.java:370) ~[coreserver.jar:?]
at de.hybris.platform.persistence.link.LinkEJBImpl.setSource(LinkEJBImpl.java:65) ~[coreserver.jar:?]
at de.hybris.platform.jalo.link.Link$4.compute(Link.java:250) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item$CachedSetter.tryToCompute(Item.java:934) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item$CachedSetter.set(Item.java:927) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item$CachedSetter.set(Item.java:884) ~[coreserver.jar:?]
at de.hybris.platform.jalo.link.Link.setSource(Link.java:253) ~[coreserver.jar:?]
at jdk.internal.reflect.GeneratedMethodAccessor3776.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at de.hybris.platform.jalo.type.ReflectionAttributeAccess$AttributeMethod.invokeSetter(ReflectionAttributeAccess.java:818) ~[coreserver.jar:?]
at de.hybris.platform.jalo.type.ReflectionAttributeAccess.setValue(ReflectionAttributeAccess.java:1005) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item.setAttribute(Item.java:2383) ~[coreserver.jar:?]
at de.hybris.platform.jalo.link.Link.setAttribute(Link.java:146) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item.setAllAttributesInternal(Item.java:2203) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item$18.execute(Item.java:2145) ~[coreserver.jar:?]
at de.hybris.platform.tx.Transaction.execute(Transaction.java:1181) ~[coreserver.jar:?]
at de.hybris.platform.tx.Transaction.execute(Transaction.java:1149) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item.setAllAttributes(Item.java:2140) ~[coreserver.jar:?]
at de.hybris.platform.jalo.Item.setAllAttributes(Item.java:2120) ~[coreserver.jar:?]
Had no luck in debugging since IDE could not decompile de.hybris.platform.core.WrapperFactory
Googling also did not make issue more clear
So any help with understanding what is going on will be appreciated
UPD
Issue is actual for 1905 OOTB B2B Accelerator (https://help.sap.com/viewer/4c33bf189ab9409e84e589295c36d96e/1905/en-US/8acc8a5a86691014a20781b3f738213e.html)
To reproduce it following impex can be used:
$productCatalog=Default
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$supercategories=source(code, $catalogVersion)
$categories=target(code, $catalogVersion)[unique=true]
INSERT_UPDATE CategoryCategoryRelation;$categories;$supercategories;
;brands:electronicsProductCatalog;brand_75:electronicsProductCatalog;
Setting to false the property persistence.legacy.mode solves the issue, but I'm not sure that it's the right way to fix it

Related

Why in camel-rabbitmq component RabbitMq connectionFactory must be specified. I am getting exception if I dont specify the connection factory bean?

I am working on the camel-rabbitmq component. If I dont specify the connectionFactory bean I am getting error
java.net.BindException:Cannot assign requested address: connect
at sun.nio.ch.Net.connect0(Native Method) ~[?:?]
at sun.nio.ch.Net.connect(Net.java:579) ~[?:?]
at sun.nio.ch.Net.connect(Net.java:568) ~[?:?]
at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588) ~[?:?]
But with camel-activemq even if I don't specify the connectionFactory bean it is working because it's creating the default connectionFactory object itself? But why it is not happenning in case of camel-rabbitmq component. I want to know the reason behind it. Thank you in advance.

Getting jmeter error: java.net.UnknownHostException: This is usually a temporary error during hostname resolution

I am a beginner to jmeter. I am trying to perform a simple load test using jmeter 4.0. I created a HTTP sampler and added a view results tree listener.
HTTP Sampler
But getting the below error under Response data in results tree.
"java.net.UnknownHostException: This is usually a temporary error during hostname resolution and means that the local server did not
receive a response from an authoritative server at
java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at
java.net.InetAddress$2.lookupAllHostAddr(Unknown Source) at
java.net.InetAddress.getAddressesFromNameService(Unknown Source) at
java.net.InetAddress.getAllByName0(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
java.net.InetAddress.getAllByName(Unknown Source) at
org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at
org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)
at
org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)
at
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:697)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:455)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
at java.lang.Thread.run(Unknown Source)"
All requests are getting failed. There is no problem in internet connectivity. Please resolve my issue.
I just faced same issue. Found solution using below steps:
1.
Protocol:http/https
server name/IP:google.com
port & path:blank(as no params)
add proxy details if required

Using MobileFirst to authenticate users with LDAP server in mobile app

I followed and used this tutorial:
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/authentication-security/using-ldap-login-module-to-authenticate-users-with-ldap-server-in-hybrid-applications/
I only edit the authenticationConfig.xml and run the application
<loginModule expirationInSeconds="-1" name="LDAPLoginModule">
<className>com.worklight.core.auth.ext.LdapLoginModule</className>
<parameter name="ldapProviderUrl" value="**************"/>
<parameter name="ldapTimeoutMs" value="2000"/>
<parameter name="ldapSecurityAuthentication" value="simple"/>
<parameter name="validationType" value="searchPattern"/>
<parameter name="ldapSecurityPrincipalPattern" value="{username}"/>
<parameter name="ldapSearchFilterPattern" value="(&(objectClass=user)(cn={username})(memberof=CN=******,OU=Clients,O=******))"/>
<parameter name="ldapSearchBase" value="OU=Clients,O=******"/>
</loginModule>
When I press the "Call protected adapter" it goes to LDAP Login Module, and when I entered the user credentials, nothing happens, the password just disappears.
Here's the log:
[WARNING ] FWLSE4014W: LdapLoginModule authentication failed. Reason 'javax.naming.AuthenticationException: [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 2030, v1db1
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:244)
at org.apache.aries.jndi.ContextHelper.getContextProvider(ContextHelper.java:208)
at org.apache.aries.jndi.ContextHelper.getInitialContext(ContextHelper.java:141)
at org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:51)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.ldap.InitialLdapContext.(Unknown Source)
at com.worklight.core.auth.ext.LdapLoginModule.login(LdapLoginModule.java:158)
at com.worklight.core.auth.impl.LoginContext.invokeLoginModule(LoginContext.java:252)
at com.worklight.core.auth.impl.LoginContext.processRequest(LoginContext.java:217)
at com.worklight.core.auth.impl.AuthenticationContext.processRequest(AuthenticationContext.java:510)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:182)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:206)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
at com.worklight.analytics.AnalyticsFilter.doFilter(AnalyticsFilter.java:124)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:206)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:86)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:978)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1100)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4730)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.handleRequest(DynamicVirtualHost.java:297)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:262)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:955)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
' [project LDAPLoginModule]
[LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 2030, v1db1
Any idea what seems to be the problem?
According to the exception provided in the error log: LdapLoginModule authentication failed. Reason 'javax.naming.AuthenticationException: [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903A9
This may be related to the following: https://social.technet.microsoft.com/Forums/windowsserver/en-US/c98f3569-072a-4677-9b89-635ed2b8dffc/ldap-error-code-49-8009030c-ldaperr-dsid0c0903a9-comment-acceptsecuritycontext-error-data?forum=winserverDS
The error code 49 related to LDAP is caused by the invalid credentials. Please refer to the following most possible causes.
1. The DN path or password which you have specified for the administrator is invalid. Any of the below will result in this error:
1). Pointed to non-user DN
2). Pointed to a non-existent user, but in existing DN
3). Pointed to non existent DN
4). Pointed to an existing user, but non existing DN
5). Pointed to an incorrect admin DN, uid instead of cn
6). Pointed to a non administrator user
7). Pointed to a valid admin but password is incorrect
2. Could not authenticate the user trying to login. This can be the result of an incorrect username or password, or an incorrect prefix and/or suffix specified in the Settings tab, depending on the type of LDAP/AD system. Could also mean the authentication type is incorrect.

NTLM Authentication with JMeter is receiving a SocketException

I'm trying to load test a SSO request with JMeter (version 2.13). I followed this tutorial and set up an HTTP Authorization Manager with Username, Password, Domain and Mechanism = BASIC_DIGEST.
When I set the proxy server settings of my HTTP Request to Server Name or IP = 127.0.0.1 and Port Number = 8888, I can see my request go through fiddler where it gets two 401 responses and then succeeds. This shows up in the JMeter View Results Tree as a single successful request. However, when I remove the proxy server settings, the request fails and I get the following response:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:436)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)
The log viewer also says this:
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$6: I/O exception (java.net.SocketException) caught when connecting to the target host: Connection reset
I have been trying all sorts of things to get this working without the proxy settings including using the HttpClient4 implementation, setting the following in user.properties
hc.parameters.file=hc.parameters
and the following in httpclient.parameters
http.protocol.reject-relative-redirect$Boolean=true
I will also note that when I run the test through Fiddler, I get a prompt asking if I want to ignore remote certificate errors
Session #106: The remote server (server name here) presented a certificate that did not validate, due to RemoteCertificateChainErrors.
0 - Unknown error.
I am assuming this won't make any difference in JMeter as I read that JMeter HTTP samplers are configured to accept all certificates.
Any help getting this up and running (without Fiddler) would be much appreciated.
The problem was that the Secure Credential Store I was trying to connect to required TLS version 1.0. I had to tell JMeter to use this by updating the jmeter.properties file with:
https.default.protocol=TLS
https.socket.protocols=TLSv1

Distributed Testing with Jmeter

I am using Jmeter 2.8 and trying to do distributed (master-slave) testing for the first time.
I setup everything fine
set Ip addresses in JMeter.properties
run Jmater-server.bat on all machines
but when I run test(a very simple request) it gets failed:
Request:
http://localhost:8080/web/login?credentials=<credential><userId>WillieWonka
</userId><passwd><![CDATA[WillieWonka]]></passwd></credential>
Error I am getting is
org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8080 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:284)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
While server is up and running (I tested this request running from localMachine only, It is working fine).
What is wrong?
What I am missing?
I have resolved this issue, replaced
localhost:8080
with
computerName:8080
and start application server via start.bat instead run.bat
now it is working fine.