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 mi...@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)


>From 8c825d19d7afd3d9d9ea444bc3a6b65ae705fb9b Mon Sep 17 00:00:00 2001
From: Minto van der Sluis <mi...@xup.nl>
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 @@
 	<packaging>pom</packaging>
 
     <properties>
-        <isis.version>0.3.0-incubating-SNAPSHOT</isis.version>
+        <isis.version>0.3.1-incubating-SNAPSHOT</isis.version>
     </properties>
 
 	<build>
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

Reply via email to