You are right. It comes from this definition - not sure what is wrong with it
/* * 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. */ package dom.todo; import java.math.BigDecimal; import java.util.List; import javax.jdo.annotations.Extension; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.InheritanceStrategy; import org.joda.time.LocalDate; import org.apache.isis.applib.AbstractViewModel; import org.apache.isis.applib.annotation.Bookmarkable; import org.apache.isis.applib.annotation.DescribedAs; import org.apache.isis.applib.annotation.Hidden; import org.apache.isis.applib.annotation.Immutable; import org.apache.isis.applib.annotation.Optional; import org.apache.isis.applib.annotation.Render; import org.apache.isis.applib.annotation.Render.Type; import org.apache.isis.applib.annotation.Title; /** * View model that provides a summary of the sales made on a given day by each party */ @javax.jdo.annotations.PersistenceCapable( identityType = IdentityType.NONDURABLE, table = "DailySalesTotalForParty", extensions = { @Extension(vendorName = "datanucleus", key = "view-definition", value = "CREATE VIEW \"DailySalesTotalForParty\" " + "( " + " {this.transactionDate}, " + " {this.fromPartyId}, " + " {this.transactiontype}, " + " {this.totalAmount} " + ") AS " + "SELECT " + " \"Tranaction\".\"transactiondate\" , " + " \"Transaction.\".\"fromParty\", " + " \"Transaction.\".\"transactiontype\", " + " SUM(\"Transaction\".\"facevalue\") AS \"totalAmount\", " + " FROM \"Transaction\" " + "GROUP BY " + " \"Transaction\".\"fromParty\", " + " \"Transaction\".\"transactiondate\" , " + " \"Transaction\".\"transactiontype\"" + "ORDER BY " + " \"Transaction\".\"fromParty\", " + " \"Transaction\".\"transactiondate\" , " + " \"Transaction\".\"transactiontype\"" ) }) @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.NEW_TABLE) @javax.jdo.annotations.Queries( { @javax.jdo.annotations.Query( name="DailySalesForParty", language="JDOQL", value="SELECT FROM dom.todo.DailySalesTotalForParty WHERE fromParty == :party ") }) @Bookmarkable @Immutable public class DailySalesTotalForParty { // ////////////////////////////////////// @javax.jdo.annotations.Column(allowsNull = "false") private Party fromParty; /** * Lazily loaded from the {@link #getReference() reference}, provides access * to the underlying {@link Property}. */ @Optional @Title(sequence = "1") public Party getFromParty() { return fromParty; } public void setFromParty(final Party party) { this.fromParty = party; } // ////////////////////////////////////// private LocalDate transactionDate; @Title(sequence = "2", prepend = " - ") public LocalDate getTransactionDate() { return transactionDate; } public void setTransactionDate(final LocalDate dueDate) { this.transactionDate = dueDate; } // ////////////////////////////////////// private BigDecimal totalAmount; public BigDecimal getTotalAmount() { return totalAmount; } public void setTotalAmount(final BigDecimal total) { this.totalAmount = total; } // ////////////////////////////////////// /** @Render(Type.EAGERLY) public List<Transaction> getTransactions() { return transactions.findTransactionForPartyOnDate(getFromParty(), getTransactionDate()); } **/ // ////////////////////////////////////// private Partytypes partytypes; final public void injectPartytypes(final Partytypes partytypes) { this.partytypes = partytypes; } private Transactions transactions; final public void injectTransactions(final Transactions transactions) { this.transactions = transactions; } } On Mon, Feb 24, 2014 at 9:37 PM, Dan Haywood <[email protected]>wrote: > Suspect it's an error in one of your JDO annotations; looks like the > integration tests (which will bootstrap the app) are failing when you do > your build. > > Obvious question: what have you changed since the last time it was building > ok? > > And second obvious question: can we see the source code for the class (put > a break point in ClassView to see which class)? > > Dan > > > > > On 24 February 2014 20:33, james agada <[email protected]> wrote: > > > Trying to build my test application and I see this error > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_StockLedger_ID_OID"" added to internal > > representation of table. > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_StockLedger_ID_OID"" added to internal > > representation of table. > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_StockLedger_ID_OID"" added to internal > > representation of table. > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_INTEGER_IDX"" added to internal representation of > > table. > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_INTEGER_IDX"" added to internal representation of > > table. > > > > 21:38:04,507 [Schema main DEBUG] Column > > ""Transaction"."journal_INTEGER_IDX"" added to internal representation of > > table. > > > > 21:38:04,509 [Schema main ERROR] An exception was > > thrown while adding/validating class(es) : null > > > > java.lang.NullPointerException > > > > at > > > > > org.datanucleus.store.rdbms.table.ClassView.getMemberMapping(ClassView.java:373) > > > > at > > > > > org.datanucleus.store.rdbms.RDBMSStoreManager.resolveIdentifierMacro(RDBMSStoreManager.java:2455) > > > > at > > > > > org.datanucleus.store.rdbms.table.ClassView$1.onIdentifierMacro(ClassView.java:162) > > > > at org.datanucleus.util.MacroString.substituteMacros(MacroString.java:88) > > > > at > > > > > org.datanucleus.store.rdbms.table.ClassView.postInitialize(ClassView.java:158) > > > > at > > > > > org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.initializeClassTables(RDBMSStoreManager.java:3278) > > > > at > > > > > org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:3160) > > > > at > > > > > org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2816) > > > > at > > > > > org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:122) > > > > at > > > > > org.datanucleus.store.rdbms.RDBMSStoreManager.createSchema(RDBMSStoreManager.java:3944) > > > > at > > > > > org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:80) > > > > at > > > > > org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.<init>(DataNucleusApplicationComponents.java:67) > > > > at > > > > > org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createDataNucleusApplicationComponentsIfRequired(DataNucleusPersistenceMechanismInstaller.java:111) > > > > at > > > > > org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createObjectStore(DataNucleusPersistenceMechanismInstaller.java:98) > > > > at > > > > > org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstallerAbstract.createPersistenceSession(PersistenceMechanismInstallerAbstract.java:138) > > > > at > > > > > org.apache.isis.core.runtime.persistence.PersistenceSessionFactoryDelegating.createPersistenceSession(PersistenceSessionFactoryDelegating.java:89) > > > > at > > > > > org.apache.isis.core.runtime.system.session.IsisSessionFactoryAbstract.openSession(IsisSessionFactoryAbstract.java:229) > > > > at > > > > > org.apache.isis.core.runtime.system.context.IsisContextStatic.openSessionInstance(IsisContextStatic.java:70) > > > > at > > > > > org.apache.isis.core.runtime.system.context.IsisContext.openSession(IsisContext.java:279) > > > > at > > > > > org.apache.isis.core.runtime.systemusinginstallers.IsisSystemAbstract.installFixturesIfRequired(IsisSystemAbstract.java:89) > > > > at > > > > > org.apache.isis.core.runtime.system.IsisSystemFixturesHookAbstract.init(IsisSystemFixturesHookAbstract.java:132) > > > > at > > > > > org.apache.isis.core.integtestsupport.IsisSystemForTest.setUpSystem(IsisSystemForTest.java:295) > > > > at > > > > > org.apache.isis.core.integtestsupport.IsisSystemForTest.setUpSystem(IsisSystemForTest.java:278) > > > > at > > integration.ToDoSystemInitializer.initIsft(ToDoSystemInitializer.java:43) > > > > at integration.tests.ToDoIntegTest.initClass(ToDoIntegTest.java:34) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > > at > > > > > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > > > > at > > > > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > > > > at > > > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > > > > at > > > > > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) > > > > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > > > > at > > > > > org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) > > > > at > > > > > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) > > > > at > > > > > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > > at > > > > > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) > > > > at > > > > > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) > > > > at > > > > > org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) > > > > at > > > > > org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) > > > > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) > > >
