Return-Path: X-Original-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-isis-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EDAA8D27C for ; Wed, 5 Sep 2012 08:55:34 +0000 (UTC) Received: (qmail 63717 invoked by uid 500); 5 Sep 2012 08:55:34 -0000 Delivered-To: apmail-incubator-isis-dev-archive@incubator.apache.org Received: (qmail 63068 invoked by uid 500); 5 Sep 2012 08:55:29 -0000 Mailing-List: contact isis-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: isis-dev@incubator.apache.org Delivered-To: mailing list isis-dev@incubator.apache.org Received: (qmail 62958 invoked by uid 99); 5 Sep 2012 08:55:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 08:55:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [94.126.66.9] (HELO daffy.10eurohost.nl) (94.126.66.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 08:55:19 +0000 Received: (qmail 1407 invoked by uid 48); 5 Sep 2012 10:54:57 +0200 Received: from static.kpn.net (static.kpn.net [193.172.9.9]) by webmail.xup.nl (Horde Framework) with HTTP; Wed, 05 Sep 2012 10:54:56 +0200 Message-ID: <20120905105456.3062774yn2htlylc@webmail.xup.nl> Date: Wed, 05 Sep 2012 10:54:56 +0200 From: minto@xup.nl To: isis-dev@incubator.apache.org Subject: Re: Oh oh, NullPointerException after switching to isis trunk References: <5040A0B1.8050706@xup.nl> <5041D579.6070200@xup.nl> <20120904162634.498360cc2mehz2ca@webmail.xup.nl> In-Reply-To: <20120904162634.498360cc2mehz2ca@webmail.xup.nl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_75a3sbk27qe8" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.6) X-Virus-Checked: Checked by ClamAV on apache.org --=_75a3sbk27qe8 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Hi folks, The examples in trunk show this exact same behavior. It seems the examples have been neglected a little bit, since I first had to upgrade them from 0.3.0 --> 0.3.1. The attached patch shows the changes I made. Scenario to get to the NPE: 1) apply patch 2) mvn clean install - compiles claims example till html-viewer (json viewer fails) 3) cd html-viewer 4) mvn jetty:run 5) open browser in http://localhost:8080/claims-viewer-html 6) login 7) click Employees 8) click New Employee 9) Enter a name 10) click save ----> NPE Regards, Minto Quoting minto@xup.nl: > Hi Folks, > > After switching from 0.2.0 to isis trunk (0.3.1 snapshot) I run into > an NPE (See stacktrace below). I probably did something wrong or > forgot something, but I have no clue what. HELP! :-( > > Everything seems to work until I hit the "Ok" button when trying to > create a new object. > > BTW. I switched back to in-memory persistor (from sql). What is > required to get the JDO persistor running or to get the sql > persistor back? > > Regards, > > Minto > > java.lang.NullPointerException > at > org.apache.isis.core.metamodel.adapter.version.ConcurrencyException.buildMessage(ConcurrencyException.java:36) > at > org.apache.isis.core.metamodel.adapter.version.ConcurrencyException.(ConcurrencyException.java:50) > at > org.apache.isis.runtimes.dflt.runtime.persistence.adapter.PojoAdapter.checkLock(PojoAdapter.java:337) > at > org.apache.isis.viewer.html.context.PersistentRootAdapterMapping.checkVersion(PersistentRootAdapterMapping.java:56) > at > org.apache.isis.viewer.html.context.Context.getMappedObject(Context.java:284) > at > org.apache.isis.viewer.html.action.view.ObjectViewAbstract.execute(ObjectViewAbstract.java:39) > at > org.apache.isis.viewer.html.servlet.internal.WebController.runAction(WebController.java:383) > at > org.apache.isis.viewer.html.servlet.internal.WebController.generatePage(WebController.java:286) > at > org.apache.isis.viewer.html.servlet.ControllerServlet.processRequest(ControllerServlet.java:129) > at > org.apache.isis.viewer.html.servlet.ControllerServlet.processRequest(ControllerServlet.java:104) > at > org.apache.isis.viewer.html.servlet.ControllerServlet.doPost(ControllerServlet.java:82) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > 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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > 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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) > at > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > --=_75a3sbk27qe8 Content-Type: text/x-patch; charset=UTF-8; name="0003-Updated-Claims-example-project-to-0.3.1-incubating.patch" Content-Disposition: attachment; filename="0003-Updated-Claims-example-project-to-0.3.1-incubating.patch" Content-Transfer-Encoding: 7bit >From 8c825d19d7afd3d9d9ea444bc3a6b65ae705fb9b Mon Sep 17 00:00:00 2001 From: Minto van der Sluis Date: Wed, 5 Sep 2012 10:41:40 +0200 Subject: [PATCH 3/3] Updated Claims example project to 0.3.1-incubating. --- examples/claims/pom.xml | 2 +- .../webapp/WEB-INF/authentication_file.passwords | 20 ++++++++++++++++++++ .../main/webapp/WEB-INF/authorization_file.allow | 16 ++++++++++++++++ .../src/main/webapp/WEB-INF/security_file.allow | 16 ---------------- .../main/webapp/WEB-INF/security_file.passwords | 20 -------------------- 5 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 examples/claims/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords create mode 100644 examples/claims/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow delete mode 100644 examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.allow delete mode 100644 examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.passwords diff --git a/examples/claims/pom.xml b/examples/claims/pom.xml index f4eb1ea..b37e33b 100644 --- a/examples/claims/pom.xml +++ b/examples/claims/pom.xml @@ -23,7 +23,7 @@ pom - 0.3.0-incubating-SNAPSHOT + 0.3.1-incubating-SNAPSHOT diff --git a/examples/claims/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords b/examples/claims/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords new file mode 100644 index 0000000..7f43ce9 --- /dev/null +++ b/examples/claims/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +sven:pass +dick:pass +bob:pass +joe:pass diff --git a/examples/claims/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow b/examples/claims/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow new file mode 100644 index 0000000..928983a --- /dev/null +++ b/examples/claims/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. diff --git a/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.allow b/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.allow deleted file mode 100644 index 928983a..0000000 --- a/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.allow +++ /dev/null @@ -1,16 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. diff --git a/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.passwords b/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.passwords deleted file mode 100644 index 7f43ce9..0000000 --- a/examples/claims/viewer-html/src/main/webapp/WEB-INF/security_file.passwords +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -sven:pass -dick:pass -bob:pass -joe:pass -- 1.7.9.msysgit.0 --=_75a3sbk27qe8--