isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张峰昌 <alain.zh...@gmail.com>
Subject 答复: quickstart jdo exception
Date Sat, 20 Oct 2012 11:25:35 GMT
Hi Dan
Thanks a lot. Now the jdo project works.

The newest JDO enhancer plugin in Eclipse requires asm 4.0,while isis
provides 3.3.1. To fix the problem I have remove asm exclusion in pom.xml of
project quickstart-objstore-dom.

            <exclusions>
				<exclusion>
					<groupId>org.ow2.asm</groupId>
					<artifactId>asm</artifactId>
				</exclusion>
            </exclusions>
i


张峰昌
电话:18930623939
欲知诸法实相,当习般若波罗蜜

-----邮件原件-----
发件人: Dan Haywood [mailto:dan@haywood-associates.co.uk] 
发送时间: 2012年10月20日 17:14
收件人: isis-users@incubator.apache.org
主题: Re: quickstart jdo exception

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.getJDOExceptionForNucleusExce
> ption(
> NucleusJDOHelper.java:350)
>
>     at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPer
> sisten
> ceManager.java:736)
>
>     at
>
> org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersis
> tenceM
> anager.java:756)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.persistence
> .comma
>
> nds.DataNucleusCreateObjectCommand.execute(DataNucleusCreateObjectComm
> and.ja
> va:35)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.DataNucleus
> Object
> Store.executeCommands(DataNucleusObjectStore.java:333)
>
>     at
>
> org.apache.isis.runtimes.dflt.objectstores.jdo.datanucleus.DataNucleus
> Object
> Store.execute(DataNucleusObjectStore.java:327)
>
>     at
>
> org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransacti
> on.doF
> lush(IsisTransaction.java:346)
>
>     at
>
> org.apache.isis.runtimes.dflt.runtime.system.transaction.IsisTransacti
> on.flu
> sh(IsisTransaction.java:310)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel$Result
> Type$1
> .addResultsAccordingToSingleResultsMode(ActionPanel.java:193)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel$Result
> Type$1
> .addResults(ActionPanel.java:164)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.components.actions.ActionPanel.execut
> eActio
> nAndProcessResults(ActionPanel.java:132)
>
>     at
>
> org.apache.isis.viewer.wicket.ui.actions.params.ActionParametersFormPa
> nel$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(RequestListe
> nerInt
> erface.java:258)
>
>     at
>
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInter
> face.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(R
> equest
> Cycle.java:814)
>
>     at
>
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerSt
> ack.ja
> va:64)
>
>     at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java
> :253)
>
>     at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCyc
> le.jav
> a:210)
>
>     at
>
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(R
> equest
> Cycle.java:281)
>
>     at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilt
> er.jav
> a:188)
>
>     at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.jav
> a:245)
>
>     at
>
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletH
> andler
> .java:1212)
>
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:39
> 9)
>
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java
> :216)
>
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:18
> 2)
>
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:76
> 6)
>
>     at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:15
> 2)
>
>     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.ja
> va:582
> )
>
> NestedThrowablesStackTrace:
>
>
>
> 张峰昌
>
> 电话:18930623939
>
> 欲知诸法实相,当习般若波罗蜜
>
>
>
>


Mime
View raw message