Open nicolas-rempulski opened 10 years ago
Which bundle is providing javassist ? Be sure your entity bundle does not include it.
Sent from my iPhone
On 8 sept. 2014, at 15:25, Nicolas Rempulski notifications@github.com wrote:
When Wisdom hot-reload a bundle containing models, an error arise :
java.lang.ClassCastException: io.gruul.server.mainframe.model.Message_$$_jvstc0c_3 cannot be cast to javassist.util.proxy.Proxy
I've to cut wisdom:run and relaunch it.
On hot-reload, the OrientDBCrudProvider detect new models :
[INFO] o.w.o.r.OrientDbCrudProvider {monitor-application} - OrientDB Database configuration found for /io/gruul/server/mainframe/model : {user=admin, url=remote:localhost/gruul, package=io.gruul.server.mainframe.model, name=dev}
Imo it leads to a double declaration of the model class in the proxy, thus the class cast exception.
— Reply to this email directly or view it on GitHub https://github.com/wisdom-framework/wisdom-orientdb/issues/9.
My osgi.bnd is exporting javassist.* indeed.
But if I don't do this :
java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
[...]
java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
[...]
java.lang.ClassNotFoundException: javassist.util.proxy.ProxyObject not found
It needs to be imported, but neither exported, nor included
On 8 septembre 2014 at 16:07:19, Nicolas Rempulski (notifications@github.com) wrote:
My osgi.bnd is exporting javassist.* indeed.
But if I don't do this :
java.lang.RuntimeException: by java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
[...]
java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject
[...]
java.lang.ClassNotFoundException: javassist.util.proxy.ProxyObject not found
—
Reply to this email directly or view it on GitHub.
Ok I removed my osgi.bnd, and forced a use of javassist in my code
Proxy.class.toString();
and it works OK (launch & hot-reload)
Yes, this is a hack. We should probably provide a way to ‘add this import’ automatically.
On 8 septembre 2014 at 16:30:56, Nicolas Rempulski (notifications@github.com) wrote:
Ok I removed my osgi.bnd, and forced a use of javassist in my code
Proxy.class.toString(); and it works OK (launch & hot-reload)
— Reply to this email directly or view it on GitHub.
Yes, it's a bit dirty. It's what I use in the sample too. It's a bit tricky to add it automatically to the project that use the orientdbCrud.
It could be added using a plugin made for orientdb.
Sent from my iPhone
On 8 sept. 2014, at 17:19, Jonathan Bardin notifications@github.com wrote:
Yes, it's a bit dirty. It's what I use in the sample too. It's a bit tricky to add it automatically to the project that use the orientdbCrud.
— Reply to this email directly or view it on GitHub https://github.com/wisdom-framework/wisdom-orientdb/issues/9#issuecomment-54836019 .
It would definitively be the best way, but it does sound a bit overkill :-? The good part is that we could have more use for a plugin down the road. (such has evolution management :wink: )
When Wisdom hot-reload a bundle containing models, an error arise :
I've to cut wisdom:run and relaunch it.
On hot-reload, the OrientDBCrudProvider detect new models :
Imo it leads to a double declaration of the model class in the proxy, thus the class cast exception.