cancel
Showing results for 
Search instead for 
Did you mean: 

SDK JCRSamples (WIKIExample)

aznk
Champ in-the-making
Champ in-the-making
Hi,
I've been trying to launch the WIKIExample.java in the SDK JCRSamples by configuring files as told here :
http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API#Access_to_JCR_WIK... I started the server, tried to execute WikiExample.java, but I always get this error :

15:37:51,563 INFO  [admin.patch.PatchExecuter] Checking for patches to apply ...
15:37:51,683 INFO  [...




















































































































































































































































































Has anyone got an idea of what's getting wrong ?
Thanks for your help.
7 REPLIES 7

aznk
Champ in-the-making
Champ in-the-making
To add some more information, SimpleExample.java and MixedExample.java are working well, but I still have the above error after doing the following things :
1) copy wikiModel.xml to /alfresco/extension
2) rename /alfresco/extension/custom-model-context.xml.sample to custom-model-context.xml and edit this file, here's the code :
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/customModel.xml</value>
                <!–wiki jcr–>
                <value>alfresco/extension/wikiModel.xml</value>
            </list>
        </property>
    </bean>
         
</beans>
3) add the following lines to /alfresco/extension/web-client-config-custom.xml :
 <config evaluator="node-type" condition="wiki:page">
  <property-sheet>
    <show-property name="wiki:restrict"/>
    <show-property name="wiki:category"/>
  </property-sheet>
</config>

<config evaluator="string-compare" condition="Custom Content Types">
  <content-types>
    <type name="wiki:page"/>
  </content-types>
</config>

<config evaluator="string-compare" condition="Advanced Search">
  <advanced-search>
     <content-types>
        <type name="wiki:page" />
     </content-types>
     <custom-properties>
        <meta-data type="wiki:page" property="wiki:restrict" />
        <meta-data type="wiki:page" property="wiki:category" />
     </custom-properties>
  </advanced-search>
</config>

4) execute WIKIExample.java

aznk
Champ in-the-making
Champ in-the-making
I finally managed to launch WIKIExample.java and could view the "   
WIKI Encyclopedia" space, but when I try to browse it, this error appears :

A system error happened during the operation: null

Any idea ?

aznk
Champ in-the-making
Champ in-the-making
Here is the error displayed in the tomcat console :

14:57:09,529 ERROR [ui.common.Utils] A system error happened during the operatio
n: null
java.lang.NullPointerException
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
ExposedPermissionsImpl(PermissionModel.java:430)
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
AllPermissions(PermissionModel.java:410)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:408)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:616)
        at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvoca
tionProvider.decide(ACLEntryAfterInvocationProvider.java:530)

aznk
Champ in-the-making
Champ in-the-making
I finally managed to make this sample work.
But I don't see what "wiki-like" things it brings. I could see in the created nodes that there were the properties restrict and categories.
Btw if we add content in the WikiEncyclopedia workspace, is it considered like a wiki node or do we have to create it via a java client (ie WIKIExample.java) ?

rcortesr
Star Contributor
Star Contributor
Here is the error displayed in the tomcat console :

14:57:09,529 ERROR [ui.common.Utils] A system error happened during the operatio
n: null
java.lang.NullPointerException
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
ExposedPermissionsImpl(PermissionModel.java:430)
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
AllPermissions(PermissionModel.java:410)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:408)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:616)
        at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvoca
tionProvider.decide(ACLEntryAfterInvocationProvider.java:530)

Hi aznk,

I have the same problem. When I add nodes to the repository appears this error.
How do you have solved this error??

Thanks.

aznk
Champ in-the-making
Champ in-the-making
I don't know, when I reinstalled everything it worked. I guess there was some mess in the models or repository or kind of stuff…

rcortesr
Star Contributor
Star Contributor
Here is the error displayed in the tomcat console :

14:57:09,529 ERROR [ui.common.Utils] A system error happened during the operatio
n: null
java.lang.NullPointerException
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
ExposedPermissionsImpl(PermissionModel.java:430)
        at org.alfresco.repo.security.permissions.impl.model.PermissionModel.get
AllPermissions(PermissionModel.java:410)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:408)
        at org.alfresco.repo.security.permissions.impl.PermissionServiceImpl.has
Permission(PermissionServiceImpl.java:616)
        at org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvoca
tionProvider.decide(ACLEntryAfterInvocationProvider.java:530)

Hi aznk,

I have the same problem. When I add nodes to the repository appears this error.
How do you have solved this error??

Thanks.

I have solved the problem.
I wanted to add fac:Factura nodes and this type of content it wasn't defined.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.