isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: quickstart jdo exception
Date Sat, 20 Oct 2012 09:13:40 GMT
Hi Alain,

JDO requires that the pojos are "enhanced", that is, they go through a
post-compile process which injects additional bytecode into them.  There's
some good detail about this for JDO in general [1] and for DataNucleus (the
JDO implementation that we are using) in particular [2].

If you just build the code using Maven, then the code should be enhanced
using the maven plugin we have configured.  But if you are running from
Eclipse (or any other IDE), then you need to add in the appropriate JDO
enhancer plugin to your IDE... see  [3], [4], [5]

HTH
Dan

[1] http://db.apache.org/jdo/enhancement.html
[2] http://www.datanucleus.org/products/datanucleus/enhancer.html
[3]
http://www.datanucleus.org/products/datanucleus/guides/eclipse/index.html
[4] http://www.datanucleus.org/products/datanucleus/guides/idea/index.html
[5]
http://www.datanucleus.org/products/datanucleus/guides/netbeans/index.html

On 20 October 2012 10:07, 张峰昌 <alain.zhang@gmail.com> wrote:

> Hi
>
> I have exported the quickstart project yestoday. And I want to find how the
> jdo works. There is exception when I run the quickstart-viewer-wicket
> project to add a new ToDoItem. The exception is:
>
>
>
> 17:00:20,595  [DataNucleusSimplePersistAlgorithm
> 1432094680@qtp-1076825585-0
> INFO ]  persist
> PojoAdapter@188edd79
> [T~~:!TODO:bdf1c0fe-8ddf-44d1-9dc4-50347ecf05f2,specific
> ation=ToDoItem,version=null,pojo-toString=dom.todo.ToDoItem@1cf15b84
> ,pojo-ha
> sh=#1cf15b84]
>
> 17:00:20,626  [DataNucleusObjectStore 1432094680@qtp-1076825585-0 WARN ]
> Failure during execution
>
> org.datanucleus.api.jdo.exceptions.ClassNotPersistenceCapableException: The
> class "dom.todo.ToDoItem" is not persistable. This means that it either
> hasnt been enhanced, or that the enhanced version of the file is not in the
> CLASSPATH (or is hidden by an unenhanced version), or the
> Meta-Data/annotations for the class are not found.
>
>     at
>
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(
> NucleusJDOHelper.java:350)
>
>     at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersisten
> ceManager.java:736)
>
>     at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceM
> anager.java:756)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.persistence.comma
>
> nds.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectCommand.ja
> va:35)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.DataNucleusObject
> Store.executeCommands(DataNucleusObjectStore.java:333)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.DataNucleusObject
> Store.execute(DataNucleusObjectStore.java:327)
>
>     at
>
> org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction.doF
> lush(IsisTransaction.java:346)
>
>     at
>
> org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransaction.flu
> sh(IsisTransaction.java:310)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel$ResultType$1
> .addResultsAccordingToSingleResultsMode(ActionPanel.java:193)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel$ResultType$1
> .addResults(ActionPanel.java:164)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.executeActio
> nAndProcessResults(ActionPanel.java:132)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.actions.params.ActionParametersFormPanel$Ac
> tionParameterForm$1.onSubmit(ActionParametersFormPanel.java:117)
>
>     at
> org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1237)
>
>     at org.apache.wicket.markup.html.form.Form.process(Form.java:923)
>
>     at
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:769)
>
>     at
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:702)
>
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
>     at java.lang.reflect.Method.invoke(Unknown Source)
>
>     at
>
> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInt
> erface.java:258)
>
>     at
>
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.j
> ava:216)
>
>     at
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invok
> eListener(ListenerInterfaceRequestHandler.java:240)
>
>     at
>
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respo
> nd(ListenerInterfaceRequestHandler.java:226)
>
>     at
>
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(Request
> Cycle.java:814)
>
>     at
>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.ja
> va:64)
>
>     at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)
>
>     at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.jav
> a:210)
>
>     at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(Request
> Cycle.java:281)
>
>     at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.jav
> a:188)
>
>     at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
>
>     at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
> .java:1212)
>
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
>
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>
>     at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>
>     at org.mortbay.jetty.Server.handle(Server.java:326)
>
>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>
>     at
>
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:
> 945)
>
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
>
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>
>     at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.
> java:228)
>
>     at
>
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582
> )
>
> NestedThrowablesStackTrace:
>
>
>
> 张峰昌
>
> 电话:18930623939
>
> 欲知诸法实相,当习般若波罗蜜
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message