CMIS 1.1 creating new type by using Workbench - cmis

I've tried to create new cmis type from the xml file that I had created by using export cmis:document.
Now when try to create new type, comes the error that the "parentTypeId" is not defined. I have added the "parentTypeId", but the same error message still comes :-(
here is my XML
<cmis:type ...
<cmis:id>cmis:testDocumentId</cmis:id>
<cmis:parentTypeId>cmis:item</cmis:parentTypeId>
<cmis:localName>TestLocalDocName</cmis:localName>
<cmis:localNamespace>http://test.local/jcr</cmis:localNamespace>
<cmis:displayName>TestDocument</cmis:displayName>
<cmis:queryName>cmis:document</cmis:queryName>
<cmis:description>This is TEST Document</cmis:description>
<cmis:baseId>cmis:document</cmis:baseId>
<cmis:creatable>true</cmis:creatable>
<cmis:fileable>true</cmis:fileable>
<cmis:queryable>true</cmis:queryable>
<cmis:fulltextIndexed>false</cmis:fulltextIndexed>
<cmis:includedInSupertypeQuery>true</cmis:includedInSupertypeQuery>
<cmis:controllablePolicy>false</cmis:controllablePolicy>
<cmis:controllableACL>false</cmis:controllableACL>
<cmis:propertyIdDefinition>

The error message is misleading (and has already been fixed).
The missing tag is <cmis:parentId>.
The cmis:document type does not have this tag because cmis:document is a base type and has no parent.

Related

Promotion Not Opening from HMC: de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo instance for item

When I try to open promotions on HMC it throw this error,
first Couldn't understand problem and cause of problem?
Try to clear cookies, login/logout, restart browser as well -looks nothing works. (check this link for more detail, can't find anything
https://answers.sap.com/questions/12761785/promotion-not-opening-from-hmc.html )
Try to check this: ( https://answers.sap.com/questions/12750795/cannot-create-jalo-instance-for-item-due-to-null-d.html?childToView=12798465#answer-12798465 ) clearing orphan type helps sometime.
If any one can guide how to solve this issue and explain cause of this issue.
Promotion Not Opening from HMC: Unhandled Exception:
de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo
instance for item 000000 due to null
JaloSystemException is the mother of all Runtime exceptions in Hybris. So, the exception alone is not very informative.
The following comment i.e.
Cannot create Jalo instance for item
suggests that Hybris is trying to create an instance of a custom type, the definition of which (in items.xml) does not exist anymore. Either the definitions were removed manually or they were lost during system migration.
Ideally, deleting orphans should resolve this.
If you are still getting the error after removing the orphan types then -
Either there is some legacy code that is trying to create an instance of the custom types, most probably through a factory, otherwise, it would have given a compilation error during build itself.
The deleted custom type had a relation with the existing types, probably with the Promotion.
The ultimate solution is to run initialize on your local.
**Be very careful while running initialize as it will remove all the data from your system.

Hybris: Error on initiating the workflow on removing print extension - unexpected validator error: cannot find spring bean

Not sure where to check it. No dependencies are found in xml files. I don't find constraints related to this.
INFO | jvm 1 | main | 2017/03/14 11:10:30.867 | ESC[mESC[0;33m2017-03-14 11:10:30 WARN [Thread-17] [10.0.12.6] [EditorArea] Cound not update item, reason: [com.sbs.ecomm.hybris.sbproductcockpit.workflow.SBProductWor‌​kflowCreationInterce‌​ptor#5d47afd3]: unexpected validator error: cannot find spring bean [workflowAssignedJobAttributeHandler] configured for dynamic attribute [Workflow.assignedJob] from extension [print]
The dynamic attribute handler was initially defined in the print extension.
When the system was initialized the type system therefore got the attribute assignedJob stored in the database.
Now you removed the extension and the code for this dynamic attribute. That's why you get the error at runtime, because the type system in the database still has this attribute registered and tries to load the value using the dynamic attribute handler (for which the code is no longer present).
You can manually remove the assignedJob attribute through the hmc/backoffice in the type management section as far as I know (for sure thats possible in the hmc).
If an extension has been removed (that has previously been present) the typesystem in the database is not automatically removed.
You might also take a look at the orphaned types in the hac. All types of the print extension should show up there now as they are in the database but no longer present in the code/platform.
(Just remembered that I answered a similar problem for missing attributes here: https://stackoverflow.com/a/32824789/932201 .. that contains the steps how to remove an attribute)
Hope this helps!
In your class SBProductWor‌​kflowCreationInterce‌​ptor you probably save a Workflow model. This model has an handler and both are defined in the print extension.
You can't remove the print extension without removing the dependancies in your custom classes.

Why does JHipster page not accept String for ZonedDateTime

I recently changed my domain objects from LocalDate to ZonedDateTime. I also created a brand new play JHipster application and one play entity choosing ZonedDateTime for two class members. The test application (new) works while my existing application does not, even after going through all the code twice. I loaded CSV data using Liquibase and my listing code shows the dates properly. Here's what the data looks like in my Maven output, e.g. entrydate='2017-02-23T19:53:18-05:00[America/New_York]', transaction='Initial Balance',
When I choose to update the date-time value with the "datetime-picker" in the dialog.html, a string date time is shown in the text box but when I push "Save" I get an "Internal Server Error" and the Maven output shows:
.HttpMessageNotReadableException: Could not read document: Text '2017-02- 26T00:53:18.000Z' could not be parsed at index 23 (through reference chain: org.ciwise.blackhole.domain.GenLedger["entrydate"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Text '2017-02-26T00:53:18.000Z' could not be parsed at index 23 (through reference chain: org.ciwise.blackhole.domain.GenLedger["entrydate"])]
Does anyone have an idea why the picker would produce String text in the text box that isn't acceptable when the HTTP PUT occurs (edit)?
My application does use Service classes but they handle the same Java domain objects as the JPA Repository classes do.
One more thing, the schema for the API shows e.g. "entrydate": "2017-02-23T21:44:04.859Z", but the actual JSON return is "entrydate": "2017-02-23T19:53:18.000-0500",
I'm hoping someone else has encountered this before.
Thanks
David
The answer here was to re-introduce application.yml. Inside this file it defines some Spring profiles but of most importance, it provides an option for Jackson serialization into JSON e.g.
jackson:
serialization.write_dates_as_timestamps: false
This resolved my issue.

Cannot generate classes from SAML2.0 XSD schemas

I try to generate classes from the following SAML2.0 XSD schemas:
http://docs.oasis-open.org/wsfed/authorization/v1.2/authorization.xsd - fail
http://docs.oasis-open.org/wsfed/federation/v1.2/federation.xsd - fail
http://docs.oasis-open.org/wsfed/privacy/v1.2/privacy.xsd - success
I tried to use xsd.exe and xsd2code tools, but each time I try to generate #1 and #2 I get following errors for the respective schemas:
Both tools throw this error: Schema validation warning: The 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' element is not declared.
Error: Error generating classes for schema '%MYPATH%\authorization'. The element 'http://www.w3.org/2001/04/xmlenc#:EncryptedData' is missing.
Two different errors:
xsd.exe:
Error: Error generating classes for schema '%MYPATH%\federation'. The element 'http://docs.oasis-open.org/wsfed/authorization/200706:ClaimType' is missing.
xsd2code: Error Type 'http://www.w3.org/2001/04/xmlenc#:EncryptionMethodType' is not declared.
To solve problems related to xmlenc namespace I saved remote xenc-schema.xsd to my local path, but I still get the same error, so it's not timeout problem.
I don't understand what could be the problem with the provided schemas. How to solve all of the mentioned problems?
There seems to be an issue with DOCTYPE being declared in the XSD for xmlenc (http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/xenc-schema.xsd). See; You'll need to download and edit the included XSD file(s), or perhaps apply a fix as described in https://xsd2code.codeplex.com/workitem/6972 (XmlReaderSettings.ProhibitDtd = false) would work. See here as well: Xsd2Code and xmldsig
I just had a same error when I tried to validate the XML schema of a SAML response. I managed to solve it by saving all .xsd files locally, then manually removing the DTD and the import elements from them, and loading all of them manually.

Subsonic 3.0 and SqlHierachyID

I am having trouble with Subsonic 3.0 generating an object for a table which contains the new HeirachyID datatype. From what I have found, there is no corrosponding .Net type, and subsonic doesn't seem to know how to handle the hierachyid data.
Error that is thrown:
Object of type 'Microsoft.SqlServer.Types.SqlHierarchyId' cannot be converted to type 'System.String'.
Code:
foreach (MyDB.DataAccess.ThingCategory tc in DataAccess.ThingCategory.Find(x => x.fk_Thing.Equals(thingId)))
{
sb.AppendFormat("<{0}>{1}</{0}>", wrapTag, tc.Categories.ToList<DataAccess.Category>()[0].Name);
}
tc.Categories.ToList() generates the error
Alternatively, I tried to get around this by writing a sproc to return the hierachyid column as a string, and noticed SubSonic 3.0 sprocs are not strongly-typed. or am I doing something wrong?
Sprocs can be strongly-typed by calling ExecuteTypedList()
I would create an issue on the Github tracker to either add support for the type (someone will have to contribute this since I don't think it's a high priority) or to gracefully handle it when they exist.

Resources