Great. I am a stage further on now, and am able to get to a page to
edit our 'Policy Document' type and am asked for the two values I
require.
However, when I try to submit some values for the new document, the
exception:
11:17:12,190 ERROR [JCRDocument] Error setting value: My name on
property: RULE-POOL:name
11:17:12,191 ERROR [ClientException] ClientException created...
org.nuxeo.ecm.core.api.ClientException: Failed to create document stuff
at org.nuxeo.ecm.core.api.AbstractSession.createDocument
(AbstractSession.java:525)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
...occurs, indicating that our use of:
<widget jsfcomponent="h:inputText"
schemaname="policy" fieldname="RULE-POOL:name" required="true"/>
...in 'ecm-types-contrib.xml' is incorrect to populate the value of
the attribute defined for the element in our schema:
<xsd:element name="RULE-POOL">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
Question 1: What is the correct way to reference the 'name' attribute
on the 'RULE-POOL' element in 'ecm-types-contrib.xml'?
Question 2: Is there any documentation on the the '<widget>'s that
are available to use in 'ecm-types-contrib.xml'? Specifically, I
would like to know how to change the display name of this field, so
it doesn't appear to the user as 'RULE-POOL:name', but something more
human-readable, and would also know what types of widgets are
available to display the data.
Thanks
Craig Pugsley
Technical Consultant - PolicyMatter Ltd
On 23 May 2007, at 10:18, Bogdan Stefanescu wrote:
The error happens because the type RULE-POOL has no content (only
attributes)
I fixed this in nuxeo-core-schema so now your type should work.
Note that there is another pb with your project.
In the file core-types-contrib.xml you have:
<extension target="org.nuxeo.ecm.core.schema.TypeService"
point="schema">
<schema name="Policy" src="schemas/policy.xsd"/>
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService"
point="doctype">
<doctype name="Policy" extends="Document">
<schema name="common"/>
<schema name="dublincore"/>
<schema name="policy"/>
</doctype>
</extension>
So you define a schema "Policy" and then you use it as "policy"
This is wrong because schema names are case sensitive so you should
replace "Policy" with "policy":
<schema name="policy" src="schemas/policy.xsd"/>
Bogdan
Craig Pugsley wrote:
After a bit more digging, I can see this exception:
10:03:38,902 INFO [ComponentManager] Registering component:
service:org.nuxeo.project.sample.coreTypes
10:03:38,924 ERROR [STDERR]
org.nuxeo.ecm.core.schema.types.TypeBindingException: Type colud
not be resolved: unsupported complex type
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.XSDLoader.createComplexType
(XSDLoader.java:349)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.XSDLoader.loadComplexType(XSDLoader.java:
284)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.XSDLoader.loadType(XSDLoader.java:244)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.XSDLoader.loadSchema(XSDLoader.java:203)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.XSDLoader.loadSchema(XSDLoader.java:153)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.TypeService.registerSchema
(TypeService.java:142)
10:03:38,925 ERROR [STDERR] at
org.nuxeo.ecm.core.schema.TypeService.registerExtension
(TypeService.java:97)
We have quite a sophisticated schema that employs many complex
types and type declarations. Would this not be supported in Nuxeo?
Is there any documentation on what schema types are supported?
(We have checked that our schema is valid)
Thanks
Craig
On 21 May 2007, at 12:41, Craig Pugsley wrote:
Hello list,
We're trying to create a new document type in Nuxeo that
incorporates
our schema. However, no matter what we try, we seem to either
stumble
at the first hurdle - with Nuxeo presenting us with a 'JBoss Seam
Debug page' post-login - or, when we can get past this, with a
'Policy is not a registered core type' error when trying to actually
create the document type.
We are using the sample project (which straight out of the SVN
deploys fine and creates the 'sample document' type), and
customising
it by replacing the sample core type with our own.
Currently, when we deploy the project (by doing an 'ant' on the
command line in the project directory), we can log in, create a new
workspace, and add a new document to it. Our new 'policy document'
type appears in the list. However, when you click it to create the
document type, the 'Policy is not a registered core type' exception
occurs, and is shown in the page.
At first, we thought it might be something to do with our schema
being too complex, so we chopped it down to simply:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://policy.policymatter.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="RULE-POOL">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string"
use="required" />
<xsd:attribute name="version" type="xsd:string"
use="required" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
...and still get the same error.
Attached is an archive of the project, and the trimmed JBoss server
logs (the full ones were too big to attach zipped).
We would really appreciate any help anyone can give us. This seems
like such a trivial thing to get right, so we must be missing
something fundamental here!
Thanks for any help.
Craig Pugsley
Technical Consultant - PolicyMatter Ltd
<PolicyMatterSampleProject.zip>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm