emsouza / gilead

Gilead permits you to use your Persistent POJO (and especially the partially loaded ones) outside the JVM (GWT) without pain. No lazy initialisation or serialization exception. Just POJO and Domain Driven Design.
14 stars 7 forks source link

How to include this fork in my project? #2

Open xak2000 opened 8 years ago

xak2000 commented 8 years ago

Hi! I really excited about fact that I found this fork of gilead!

Now my project stuck with hibernate 3.5 and gwt 2.4 which doesn't support Super Dev Mode. I tried to download and compile code from your repository and install it into local maven repository. I can even compile my project with it but when any GWT RPC happens, this exception occurs:

java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Enhancer
    at net.sf.beanlib.hibernate.UnEnhancer.unenhanceClass(UnEnhancer.java:65)
    at net.sf.gilead.core.hibernate.HibernateUtil.getUnenhancedClass(HibernateUtil.java:370)
    at net.sf.gilead.core.hibernate.HibernateUtil.isPersistentClass(HibernateUtil.java:341)
    at net.sf.gilead.core.hibernate.HibernateUtil.getId(HibernateUtil.java:239)

I note this fork lists all dependencies as provided. But I think some of them really should be compile to work. But maybe not. I stucked with other errors until manually added some dependencies to my project's pom. Maybe I need to add this cglib dependency but I doesn't found any mention of it in this repo sources.

Maybe I installed this giled in my local repository wrong. Maybe you can upload this to maven central or bintray? Or can suggest me where to search something about this problem. Any help is appreciated!

xak2000 commented 8 years ago

Nevermind Enhancer error. It was my pom.xml version conflicts. But after resolving it, there is new error:

SEVERE: Exception while dispatching incoming RPC call
java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception
    at net.sf.gilead.gwt.PersistentRemoteService.processCall(PersistentRemoteService.java:177)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
    at net.point.manager.server.GileadFilter.doFilter(GileadFilter.java:73)

The line 177 is:

Exception exception = (Exception) GileadRPCHelper.parseReturnValue(e.getCause(), _beanManager);

Because of cast exception I even don't know which class is not found. :)

xak2000 commented 8 years ago

It was com.google.gwt.core.client.GWTBridge. I fixed this adding

package com.google.gwt.core.client;
import com.google.gwt.core.shared.*;

/**
* Date: 1/17/13
* Time: 12:37 PM
* 
* This class is used for fixing {@code java.lang.ClassNotFoundException: com.google.gwt.core.client.GWTBridge}.
*
* This is only needed for GXT 2 to work. Once we remove GXT2, this can be removed also.
*/
public abstract class GWTBridge extends com.google.gwt.core.shared.GWTBridge {
}

but this is unrelated to gilead of course.

Now it works!!! Thanks you!

Still interested if this fork can be published to some maven repo for convinience?

shrek63 commented 5 years ago

I am trying to use this fork also but having issues as we also have been using gwt-sl-1.2.jar which supported Gilead but the newer jars that support newer GWT and Spring no longer support Gilead. Were you using the gwt-sl....jar in your application?

xak2000 commented 5 years ago

No, sorry, I didn't use gwt-sl in my project.