Hi again,

 

Found out that for solving my problem I must include the jboss cglib.jar in
my ear file for a correct redeploying.

This is related because installing OCM in this deployment model is somehow
ambiguous! 

Again, as may have said, there is no documentation! L

 

In development I will use this configuration, all OCM jars and dependencies
at my ear, but in production, I will put everything on jboss default lib!

For now this is the solution that I will take! But, I don’t think it is nice
solution either! 

 

Zukka ? Christophe? Anyone else got a better solution for this deployment
model? 

Any advices!

 

Many thanks

 

 

From: Luís Tiago Rico [mailto:[email protected]] 
Sent: quinta-feira, 7 de Maio de 2009 13:21
To: '[email protected]'
Subject: re: OCMProxy problem

 

Forgot to say if I remove the ‘proxy = true’ attribute, all goes right!

The object is loaded even in redeployment!

 

The error happens when I try to iterate over the collection inside a
session:

 

        ObjectContentManager ocm = null;

        try {

            ocm = getObjectManager(connect());

            PEI pei = (PEI) ocm.getObject(path);

            pathNames = new LinkedHashMap<String, String>();

            for (Folder f : pei.getOffline()) {

                pathNames.put(f.getPath(), f.getName());

            }

        } catch (RepositoryException e) {

            throw new JackrabbitException("Error connecting to the content
repository", e);

        } finally {

            if (ocm != null) {

                ocm.logout();

            }

        }

 

Thanks again for any advice!

 

 

From: Luís Tiago Rico [mailto:[email protected]] 
Sent: quinta-feira, 7 de Maio de 2009 12:46
To: '[email protected]'
Subject: OCMProxy problem

 

Hi to all

 

I’m using Jackrabbit 1.5.5 with deployment model 2 on Jboss.

I’m using OCM and I’m having this proxy problem!

 

I have the 2 ocm jars on my app plus commons-beanutils depency and cglib is
on jboss lib!

 

I have the following error when redeploying my app on the server! This only
happens on redeployment! First time all goes right! Think is a classloader
problem or something is missing me!

 

12:22:10,578 ERROR [DefaultExceptionHandler] proxy should implement OcmProxy

java.lang.IllegalArgumentException: proxy should implement OcmProxy

        at
org.apache.jackrabbit.ocm.manager.objectconverter.impl.AbstractLazyLoader.in
voke(AbstractLazyLoader.java:91)

        at $java.util.List$$EnhancerByCGLIB$$819dd90b.iterator(<generated>)

 

My Pojo

 

@Node(extend = HierarchyNode.class)

public class PEI extends HierarchyNode {

 

    @Field

    private String peiName;

 

    @Collection(proxy = true)

    private List<Folder> online;

}

 

Any help? 

Thanks in advance!

Reply via email to