Spartacus Catalog Sync - sap-commerce-cloud

while doing catalog sync from electronics catalog to spa catalog for stage version getting below error this happened OOB ...class incompatibility is there.. any suggestions?
INFO [SyncWorker<000000RT 1 of 1>] [AbstractItemCopyContext] type class change class de.hybris.platform.cms2.jalo.contents.components.CMSFlexComponent -> class de.hybris.platform.acceleratorcms.jalo.components.JspIncludeComponent is not allowed since types are not compatible
This causing job failure. It is trying to sync two not compatible components.

Related

JHipster - entity generation - dynamic filtering for the entities

I have created a new jhipster project v4.13.3.
When creating a entity e.g.:
jhipster entity Employee
And selecting Dynamic filtering for the entities with JPA Static metamodel
An EmployeeQueryService class is subsequently created.
When looking in this class at the createSpecfication method, there are entries like this:
(buildStringSpecification(criteria.getFirstName(), Employee_.firstName));
Employee_ as far as I can tell is not defined anywhere and Intellij reports "cannot resolve symbol".
Running mvn, no errors are reported and the app runs fine.
Am I missing something?
Thanks
As documented, JPA static metamodel is generated by an annotation processor at build time. Maven knows about it, your IDE doesn't.

Deployment failure of helloworld-spring-webapp, Spring 3 and Jersey sample to Glassfish 4

I've pulled helloworld-spring-webapp from https://github.com/marko-asplund/jersey.git and tried to deploy it onto the latest Glassfish 4 application server, using java ee-7 (jdk 1.7.0_45) and jersey 2.3-SNAPSHOT. Deployment fails with this error:
Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Ref] with qualifiers [#Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] #Inject org.glassfish.jersey.server.internal.routing.UriRoutingContext(Ref, ProcessingProviders)]. Please see server.log for more details.
My installed version of Jersey on Glassfish 4 is 2.0-0.1, with an update available to move to 2.0-0.2.
I attempted this because I'm getting similar errors attempting to get CDI working with an application I'm working with, so it's fortunate to find that this example also fails with similar results. Does anyone know how to make this deploy and function correctly with Glassfish 4?
Edit:
I pulled a mirror image of that example and pulled it again from the source (here: https://github.com/jersey/jersey/tree/2.4.1). I can deploy that sample. There is a reference to a jira item JERSEY-2032 in the latest pom of the helloworld-spring-webapp. So now I need to figure out what was done differently between versions that makes this sample deploy correctly so that I can make the same changes to my work-in-progress application.

OpenJPA 2.1.1 enhancement problem on Glassfish 3.1.1

My problem is this exception:
Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "
I'm trying to get an very simple java application with jsf and jpa running, but there seems to be a problem with the enhancement of my entities. As far as I know, tries OpenJPA to enhance my entities at runtime, which are listet in the persistence.xml, however there is no agent to do this. The keyword for this is: Enhancing at Runtime, right?
I thought the enhancement will automatically done by the application server at deployment? How can I configure this?
My exactly environment:
Glassfish 3.1.1
Derby, which is integrated in Glassfish
OpenJPA 2.1.1
Mojarra JSF 2.1.3
Update #1:
After some comments I've added the following lines to my persistence.xml:
<property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
It works now, but OpenJPA throw this warning:
SEVERE: 52 myApp WARN [http-thread-pool-8080(5)] openjpa.Enhance - Creating subclass for "[class myApp.model.entities.AbstractEntity, class myApp.model.entities.Post]".
This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
I think this can't be the solution.
Update #2:
Refer to fvu's answer, I've tried to define the -javaagent jvm parameter in the domain.xml and over the web admin console. After a restart appeared the problem again.
Update #3:
Refer to update #2, I've played a bit around. There must be thrown an error, when the -javaagent parameter is used, but the file is missing, right?. Yes, there it is:
Waiting for domain1 to start .Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /tmp/openjpa.jar
If I copying the agent to this location, this error doesn't appear, but openjpa could still not enhance my entities!
If you're still having issues... I'd highly recommend biting the bullet and setting up build time enhancement. You'll be much happier in the long run if you get that going.
A couple of ideas:
add the Java agent for enhancement to GF's JVM option, see this link for an example of how to install a javaagent and OpenJPA's doc 5.2.3, enhancing at runtime. That emulates enhancer activation in desktop apps as closely as possible IMO.
However, when I read chapter 5.2.4 of the OpenJPA docs it might be capable of picking up the correct enhancer automatically. Try copying openjpa.jar to the domain's library directory, and check what happens after a server restart.

Core Data warning: "Version hash information not available for all models"

I get this warning for my xdatamodeld file: "Version hash information not available for all models". How do I get rid of this? I've also started to get a crash at startup when I install the app as new ... wonder if they're related? This is the crash:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Cannot create an NSPersistentStoreCoordinator with a nil model'
This is a iOS5 beta issue, caused by having a fetch request in your model file. For now, removing the fetch request fixes it.
I am experiencing the same thing once I have installed Xcode 4.2 with iOS 5 beta 5, maybe it's something there?
I did not have is last night while working on my production system, with Xcode 4.1. Unfortunately I am reinstalling it now, and it'd take a while before i know whether that's the cause.
The first error indicates that you have multiple .xcdatamodel files with the same name but different versions. One of more of the multiples lacks an internal version number i.e. the version hash.
The second error is caused by the first because the managed object model cannot create itself by merging model files of the same name but different and unknown versions. A persistent store coordinator in turn cannot intialize without a valid managed object model.
If this is occurring in development and you don't have multiple versions intentionally, then you probably have an old compiled .mom or .momd file on the simulator from a previous build. Delete the app off the simulator entirely, then clean the entire project in Xcode and rebuild and reinstall. That usually resolves the problem.
I ran into this problem on iOS 5 SDK and it wasn't any of the above problems. My problem was because I had a lot of attributes in a single entity, that I inadvertently had a duplicate (i.e. two lastUpdatedDate attributes in the same entity).

java.lang.SecurityException: class "org.apache.log4j.Logger" does not match trust level of other classes in the same package

For an java web application, I got this error when using JRE 1.6.0_22
java.lang.SecurityException: class "org.apache.log4j.Logger" does not match trust level of other classes in the same package
However, it works fine when using JRE 1.6.0_13.
I searched in Google, and find the there is a security enhancement since update 19.
And for this exception, it says,
The following two SecurityExceptions are thrown after mixed components had previously been detected and a decision was made to allow them to coexist. The exceptions indicate that a component name collision (resource name or class package name) was detected between trusted and untrusted components and the request to load the resource or class was denied.
Now the problem is, how could i find which classes (maybe org.apache.log4j.Logger?) have the collision and which packages they are in?
I find there is a similar question in Oracle forums
Interesting link. I didn't have the problem yet - but may it be that you have the jar with "org.apache..." in the JavaEE container classpath somewhere and in the web application.
Look for that and to test remove it from the web app

Resources