yes, you are right ... Isis is treating these as entities, not values.

The easiest way to handle this is to annotate using the @Value annotation.
 This will require you to implement a number of "Provider" interfaces, that
basically convert the value into a serializable type.

Our applib guide [1] has some more detail, hopefully enough to see you
working.

But come back to us here if you get stuck.

Dan

[1]
http://incubator.apache.org/isis/applib/docbkx/html/guide/ch10.html


On 21 August 2012 10:45, <[email protected]> wrote:

> Hi folks,
>
> For a project I am working on we intend to use Apache Isis. Our first
> encounter is looking good, but we have some issues with custom value types
> (java classes UUID and URI).
>
> Looking at Isis support for BigDecimal I created sets for both UUID and
> URI (based on ValueSemanticsProviderAndFacet**Abstract). These sets
> contain:
>         <Type>ValueFacet
>         <Type>ValueSemanticsProvider
>         <Type>ValuetypeFacetFactory
>
> Just including these classes in my deployment package results in the
> following error (see below for the stack trace):
>
>         Cannot subclass final class class java.util.UUID
>
> Somehow I think my classes are not being used by Isis. Since on the object
> details page a UUID is shown as a link instead of the string representation.
>
> Now I wonder how I make sure Isis uses the classes I described above.
>
> Regards,
>
> Minto van der Sluis
>
>
> Stack trace:
> ===========
>
> Problem accessing /object.htmlviewer. Reason:
>
>     Cannot subclass final class class java.util.UUID
> Caused by:
>
> java.lang.**IllegalArgumentException: Cannot subclass final class class
> java.util.UUID
>         at net.sf.cglib.proxy.Enhancer.**generateClass(Enhancer.java:**
> 446)
>         at net.sf.cglib.core.**DefaultGeneratorStrategy.**generate(**
> DefaultGeneratorStrategy.java:**25)
>         at net.sf.cglib.core.**AbstractClassGenerator.create(**
> AbstractClassGenerator.java:**216)
>         at net.sf.cglib.proxy.Enhancer.**createHelper(Enhancer.java:**377)
>         at net.sf.cglib.proxy.Enhancer.**create(Enhancer.java:285)
>         at org.apache.isis.runtimes.dflt.**bytecode.dflt.objectfactory.**
> internal.**ObjectResolveAndObjectChangedE**nhancer.newInstance(**
> ObjectResolveAndObjectChangedE**nhancer.java:93)
>         at org.apache.isis.runtimes.dflt.**bytecode.dflt.objectfactory.**
> CglibObjectFactory.**doInstantiate(**CglibObjectFactory.java:66)
>         at org.apache.isis.runtimes.dflt.**runtime.persistence.**
> objectfactory.**ObjectFactoryAbstract.**instantiate(**
> ObjectFactoryAbstract.java:83)
>         at org.apache.isis.runtimes.dflt.**runtime.persistence.internal.**
> RuntimeContextFromSession$3.**instantiate(**RuntimeContextFromSession.**
> java:119)
>         at org.apache.isis.core.**metamodel.specloader.specimpl.**dflt.**
> ObjectSpecificationDefault.**createObject(**ObjectSpecificationDefault.**
> java:446)
>         at org.apache.isis.core.**metamodel.specloader.specimpl.**dflt.**
> ObjectSpecificationDefault.**createObject(**ObjectSpecificationDefault.**
> java:432)
>         at org.apache.isis.runtimes.dflt.**runtime.persistence.**
> PersistenceSessionAbstract.**recreateAdapter(**PersistenceSessionAbstract.
> **java:343)
>         at org.apache.isis.runtimes.dflt.**runtime.memento.Memento.**
> recreateObject(Memento.java:**176)
>         at org.apache.isis.viewer.html.**context.**TransientObjectMapping.
> **restoreToLoader(**TransientObjectMapping.java:**87)
>         at org.apache.isis.viewer.html.**context.Context.**
> restoreAllObjectsToLoader(**Context.java:453)
>         at org.apache.isis.viewer.html.**servlet.internal.**
> WebController.generatePage(**WebController.java:253)
>         at org.apache.isis.viewer.html.**servlet.ControllerServlet.**
> processRequest(**ControllerServlet.java:126)
>         at org.apache.isis.viewer.html.**servlet.ControllerServlet.**
> processRequest(**ControllerServlet.java:94)
>         at org.apache.isis.viewer.html.**servlet.ControllerServlet.**
> doGet(ControllerServlet.java:**79)
>         at javax.servlet.http.**HttpServlet.service(**
> HttpServlet.java:707)
>         at javax.servlet.http.**HttpServlet.service(**
> HttpServlet.java:820)
>         at org.eclipse.jetty.servlet.**ServletHolder.handle(**
> ServletHolder.java:547)
>         at org.eclipse.jetty.servlet.**ServletHandler$CachedChain.**
> doFilter(ServletHandler.java:**1355)
>         at org.apache.isis.runtimes.dflt.**webapp.IsisSessionFilter$**
> SessionState.handle(**IsisSessionFilter.java:383)
>         at org.apache.isis.runtimes.dflt.**webapp.IsisSessionFilter.**
> doFilter(IsisSessionFilter.**java:404)
>         at org.eclipse.jetty.servlet.**ServletHandler$CachedChain.**
> doFilter(ServletHandler.java:**1326)
>         at org.apache.isis.runtimes.dflt.**webapp.IsisSessionFilter$**
> SessionState$1.handle(**IsisSessionFilter.java:315)
>         at org.apache.isis.runtimes.dflt.**webapp.IsisSessionFilter.**
> doFilter(IsisSessionFilter.**java:404)
>         at org.eclipse.jetty.servlet.**ServletHandler$CachedChain.**
> doFilter(ServletHandler.java:**1326)
>         at org.eclipse.jetty.servlet.**ServletHandler.doHandle(**
> ServletHandler.java:479)
>         at org.eclipse.jetty.server.**handler.ScopedHandler.handle(**
> ScopedHandler.java:119)
>         at org.eclipse.jetty.security.**SecurityHandler.handle(**
> SecurityHandler.java:520)
>         at org.eclipse.jetty.server.**session.SessionHandler.**
> doHandle(SessionHandler.java:**227)
>         at org.eclipse.jetty.server.**handler.ContextHandler.**
> doHandle(ContextHandler.java:**940)
>         at org.eclipse.jetty.servlet.**ServletHandler.doScope(**
> ServletHandler.java:409)
>         at org.eclipse.jetty.server.**session.SessionHandler.**
> doScope(SessionHandler.java:**186)
>         at org.eclipse.jetty.server.**handler.ContextHandler.**
> doScope(ContextHandler.java:**874)
>         at org.eclipse.jetty.server.**handler.ScopedHandler.handle(**
> ScopedHandler.java:117)
>         at org.eclipse.jetty.server.**handler.**ContextHandlerCollection.*
> *handle(**ContextHandlerCollection.java:**250)
>         at org.eclipse.jetty.server.**handler.HandlerCollection.**
> handle(HandlerCollection.java:**149)
>         at org.eclipse.jetty.server.**handler.HandlerWrapper.handle(**
> HandlerWrapper.java:110)
>         at org.eclipse.jetty.server.**Server.handle(Server.java:349)
>         at org.eclipse.jetty.server.**HttpConnection.handleRequest(**
> HttpConnection.java:441)
>         at org.eclipse.jetty.server.**HttpConnection$RequestHandler.**
> headerComplete(HttpConnection.**java:904)
>         at org.eclipse.jetty.http.**HttpParser.parseNext(**
> HttpParser.java:565)
>         at org.eclipse.jetty.http.**HttpParser.parseAvailable(**
> HttpParser.java:217)
>         at org.eclipse.jetty.server.**AsyncHttpConnection.handle(**
> AsyncHttpConnection.java:46)
>         at org.eclipse.jetty.io.nio.**SelectChannelEndPoint.handle(**
> SelectChannelEndPoint.java:**545)
>         at org.eclipse.jetty.io.nio.**SelectChannelEndPoint$1.run(**
> SelectChannelEndPoint.java:43)
>         at org.eclipse.jetty.util.thread.**QueuedThreadPool.runJob(**
> QueuedThreadPool.java:598)
>         at org.eclipse.jetty.util.thread.**QueuedThreadPool$3.run(**
> QueuedThreadPool.java:533)
>         at java.lang.Thread.run(Thread.**java:722)
>
>

Reply via email to