Issue 3 in alfresco-opencmis-extension: "CmisInvalidArgumentException: Bad Request" when trying to create a document with an aspect

267 views
Skip to first unread message

alfresco-opencmis-exte...@codespot.com

unread,
May 2, 2011, 7:42:09 PM5/2/11
to alfresco-open...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3 by pmo...@gmail.com: "CmisInvalidArgumentException: Bad
Request" when trying to create a document with an aspect
http://code.google.com/a/apache-extras.org/p/alfresco-opencmis-extension/issues/detail?id=3

What steps will reproduce the problem?
---------------------------------
1. Run the attached JUnit test, using OpenCMIS client library v0.3.0 and
the alfresco-opencmis-extension library v0.2

What is the expected output?
------------------------
The document is created and has the Dublin Core aspect attached and its
properties populated with sample values.

What do you see instead?
---------------------
The following stack trace:
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException:
Bad
Request
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:406)
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:488)
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:756)
at
org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:79)
at
org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:137)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:486)
at
org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:104)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:623)
at
org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:87)
at
org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:401)
at
CMISCreateDocTest.testCreateDocumentWithAspect(CMISCreateDocTest.java:94)
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:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

What version of the product are you using?
------------------------------------
OpenCMIS client libraries v0.3.0, downloaded from Maven central repository.
alfresco-opencmis-extension v0.2, downloaded from maven.alfresco.com
repository.

On what operating system?
----------------------
Mac OSX 10.6 with JDK 1.6.0_24 64bit
Alfresco Enterprise 3.4SP1

Please provide any additional information below.
-----------------------------------------
JUnit test has been attached to this issue.

Attachments:
CMISCreateDocTest.java 4.3 KB

alfresco-opencmis-exte...@codespot.com

unread,
May 2, 2011, 11:22:27 PM5/2/11
to alfresco-open...@googlegroups.com

Comment #1 on issue 3 by pmo...@gmail.com: "CmisInvalidArgumentException:

Note: this is a PEBCAK error - aspect names need to be prefixed with "P:"
when referenced via the Alfresco CMIS extension mechanism.

Functioning unit test attached.

alfresco-opencmis-exte...@codespot.com

unread,
May 2, 2011, 11:26:42 PM5/2/11
to alfresco-open...@googlegroups.com

Comment #2 on issue 3 by pmo...@gmail.com: "CmisInvalidArgumentException:

(No comment was entered for this change.)

Attachments:
CMISCreateDocTest.java 4.3 KB

alfresco-opencmis-exte...@codespot.com

unread,
May 3, 2011, 2:20:19 PM5/3/11
to alfresco-open...@googlegroups.com
Updates:
Status: Invalid
Owner: floria...@gmail.com

Comment #3 on issue 3 by
floria...@gmail.com: "CmisInvalidArgumentException: Bad Request" when

Reply all
Reply to author
Forward
0 new messages