Unable to initialize Hybris 2205 - sap-commerce-cloud

I'm trying to initialize local Hybris 2205.3 version and getting following error -
ERROR [hybrisHTTP27] [HacInitUpdateFacade] Failed to initialize
java.lang.IllegalArgumentException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' is not recognized.
Using Oracle JDK 17.0.4.1. Initialization triggered from HAC.
I've tried adding following property to tomcat.generaloptions also which didn't help -
"-Djavax.xml.accessExternalSchema=all"
Any pointers to fix this? Or need more information?

It could be that one of the custom jar is older version and conflicting with oob. In one of our project we faced a similar issue and found that xerces.jar version in custom code was of lower version.
Both the jars I.e in oob and custom there was xmlconstant class but lower version jar used in custom code didn't have accessExternalSchema as class variable and was being picked up by system on startup because of conflict.

Oracle JDK not supported anymore, you need to try with SapMachine 17.0.
Whole system requirements by version is here.

We resolved the issue with Oracle JDK 17 only. We faced the same issue while upgrade from 2105 to 2211. This is due to jar dependency. We tried with the above given solution but it didn't work for us. We researched more and found the issue with dependency with xerces which caused conflict. We also found there is "xerces-2.12-orbeon' xerces-2.12-orbeon in OOTB. We did two things to resolve the issue
we updated classpath with xerces-2.12-orbeon( OOTB jar) in out custom code
We need to modify few code base as we were using xerces for Base64 encrytion and decryption for SSO
Please let me know if you have any questions, I will try my best to respond in time.
Regards,
Abhijit Das
Please find the link here:
https://answers.sap.com/questions/13781195/hybris-2211-upgradation-error.html?childToView=13818282

Related

Why CTL doesn't work in ExecuteGroovyScript processor with Apache NiFi 1.10.0?

I've used CTL in ExecuteGroovyScript processor to connect to database which is selected by database.name due to this problem DBCPConnectionPoolLookup problem in ExecuteGroovyScript. after upgrading NiFi to new version (1.10.0), the processors show this error:
and this is my processor configuration:
Please let me know the problem.
I started testing version 1.10.0 myself recently and that was one of the things I ran in to as well. Try using SQL.* (ex: SQL.db) for your property name as that is used specifically for DBCP services. If you need to access other services that still can be done by looking up the service by name in your Groovy script as a workaround but based on Jira activity, I see this bug is already being worked on and hopefully will be fixed in next release. I hope this helps.

Error loading solr config from solrconfig.xml

I'm using solr 5.2.1 with jetty.In my logs(solr.log) there's an error with
"org.apache.solr.core.CoreContainer; Error creating core [dosweb]: Could not load conf for core project : Error loading solr config from solrconfig.xml" title
,and I understand it's because of misconfigured in solr version,and it is showing me this exception:Caused by: java.lang.IllegalArgumentException: Illegal parameter 'termIndexInterval'
,what I should do to fix it.
thanks alot.
Not enough data.
It seems like your core is misconfigured for 5.2.1
I'd suggest that you try first with a reference configuration core, or a reference empty core, make sure that works, and then merge the config from the dosWeb core to the newly created core in steps.
This way you will find the part of the configuration that causes the issue.
EDIT -
After you added information (still not enough - a snippet of the offending configuration would have been good) I've been able to track down the bug that refers to the issue you get.
https://issues.apache.org/jira/browse/SOLR-6560
Essentially - the configuration for termIndexInterval is now not only deprecated, but can't be done in a standard way at all. From what I understand from the bug, It's also not needed anymore.

Struts2 + Classloader Vulnerability + How to reproduce

How to reproduce the security issue CVE-2014-0094. I googled but couldn't able to find any reference to the same.
Got it working.
I have to enable logging (for ognl package) to see the error.
Pass in parameter like class.classLoader.resource.dircontext.docBase=someText to the struts2 application.
localhost:8080/sampleApp/showlogin.do?class.classLoader.resource.diretext.docBase=someText
Then in the log I would see something like this.
java.lang.IllegalArgumentException: Document base base does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
After applying the workaround then I don't see above error in the log.
Reference:
http://www.brentron.com/safe/web/9248.html
http://isayan.cocolog-nifty.com/diary/2014/04/s2-020.html
To get a better help, I suggest you to follow the guidelines in the official Struts2 Security Bulletins.
The bug you are refering to has been reported in S2-020, and has both a workaround without upgrading, and a patch in Struts 2.3.16.1.
WARNING: the above patch is not enough, as reported in S2-021, so there are both a new workaround (for users that can't immediately upgrade) and a definitive patch in Struts 2.3.16.2.
To reproduce the issue just send
http://host/struts2-blank/example/X.action?class.classLoader
The issue is documented under S2-020.

How can I use an updated version of JavaMail in XPages?

I have a XPage application where I use JavaMail in one of my managed beans. Currently I have added the jar-file C:\Programme\IBM\Notes\framework\shared\eclipse\plugins\com.ibm.designer.lib.javamail_9.0.0.20130301-1431\lib\mail.jarto the build-path of the manged bean. This works well. But now I want to use a newer version of JavaMail as the Domino server uses version 1.3 but I need version 1.4.x.
I have downloaded the new JavaMail jar-files from Oracle. In Domino Designer (version 9) I add this jar-file to the new design element "Code / Jars" and remove the old jar-files from the build path.
My managed bean is still compiling and running as desired, but if I check the version the bean is using it reports still version 1.3. To check the version number I use the debug property of JavaMail and it's reporting version 1.3 to the domino server console.
Is there a way to tell the domino server to use the jar-files in the application (i.e. the nsf) and not his own? Is there another approach to update the JavaMail version?
The reason I want to use a newer version of JavaMail is as follows: I want to read mails from an imap server with ssl. To avoid the problem of importing ssl-certificates I simply want to trust all hosts. This can be be done via MailSSLSocketFactory, but this is only available since version 1.4.2. Therefore I want to use a newer version of JavaMail.
Another reason I want to use a newer version is as follows: the method "getSortedMessages" of "IMAPFolder" is only available since version 1.4.4. (and so are some other features of JavaMail).
This may be a little too late for you... I think the right approach may be to include the jar file as an OSGi plugin.
I have spent some time to figure out how to do that - and recently succeeded :-) I have described the steps to perform to make this work in two articles. The first is about wrapping a JAR into a plug-in: http://www.dalsgaard-data.eu/blog/wrap-an-existing-jar-file-into-a-plug-in/ - the second is about deployment (and there is a link in the first one).
/John
You can solve the problem by creating an OSGi plug-in that supersedes the one that sports the JavaMail library: com.ibm.designer.lib.javamail.
In order to do that do the following:
Create an OSGi plugin whose id is com.ibm.designer.lib.javamail (Dalsgaard's tutorial on how to do it)
Set its version to a higher number than the one the Domino server is shipped with (to know the version type tell http osgi ss com.ibm.designer.lib.javamail). As of now using 9.0.1.qualifier should be fine
Deploy the plugin either through an update site or by directly copying it under the domino\workspace\applications\eclipse\plugins folder.
Restart the HTTP service. The higher version - the one you created - will now be used
I've got the same problem here, but found a solution. Be warned, this is not the best answer but it will work. Simply download the latest javamail jar here and rename the jar file to 'mail.jar'. Just replace the current file in IBM\Notes\framework\shared\eclipse\plugins\com.ibm.designer.lib.javamail_9.0.0.20130301-1431\lib\mail.jar with this file. Quit the http task and restart it. The code will now work with the latest version.

Richfaces 3.x under weblogic 8.1

I have been developing a small project meant to run under weblogic 8.1.
Richfaces according to documentation states that it supports weblogic 8.1.
Weblogic 8.1 uses servlet specification 2.3 with jsp 1.2
This has been working on my locally installed version of weblogic 8.1 but when deploying to the sparc server, I start running into trouble. I have worked through some of the initial headaches, but then I got an error 500 and couldnt get the details. But after some effort I have come out with this...
javax.servlet.ServletException: javax/servlet/jsp/JspContext
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:344)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
JspContext is not part of jsp 1.2 it's newer. I am thinking this exception is originally a ClassNotFoundException or something similar considering the message. There is no 'cause' attached to the exception.
Following are the jar files contained in my web-application.
antlr-2.7.6.jar
asm-1.5.3.jar
asm-attrs-1.5.3.jar
cglib-2.1_3.jar
commons-beanutils-1.6.jar
commons-collections-3.2.jar
commons-digester-1.5.jar
commons-lang-2.4.jar
commons-logging-1.0.3.jar
dom4j-1.6.1.jar
ehcache-1.2.3.jar
hibernate-3.2.4.sp1.jar
jsf-api-1.1_02.jar
jsf-impl-1.1_02.jar
jstl-1.0.jar
jta-1.1.jar
log4j-1.2.15.jar
richfaces-api-3.1.6.SR1.jar
richfaces-impl-3.1.6.SR1.jar
richfaces-ui-3.1.6.SR1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
I'm running out of options, I'll be trying to figure out who has the dependency on the JspContext class... but if someone could give me some insight it would be greatly appreciated. Oh, I cannot make many changes to the production web-logic server. I'd prefer not to make any at all, chances are those changes will be denied
Oh this error occurs when attempting to view the page, so deployment is successful.
Ok, I have solved my problem. Not the way I wanted to but it's working (atleast to what I know right now).
After using google (again) I found a comment with someone mentioning using richfaces 3.0.1.
Now I have seen many people say use version xxx even 3.3.x. After all I did get it working with 3.1.6 but on the windows version of weblogic (which could have possibly been tainted by some other weblogic version I have installed).
So I have modified my pom for maven to depend on:
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
<version>3.0.1</version>
This is not optimal, but I geuss it works.
Some taglibrary references needed changing, and packages changed to some extent.
I could post my project configuration for this if anyone ever needs it. Getting this all to work on weblogic 8.1 was not straight forward. But the reference documentation for 3.1.6 is to my knowledge incorrect by saying it support weblogic 8.1
jsp-api-2.1.jar contains the missing class, so you could try using it (either replace it in weblogic, or try in your /lib), but I can't predict what would happen.

Resources