You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Sheldon <wa...@web.de> on 2012/03/13 10:29:27 UTC

run no_xml_example

Hello,

I want to run the no_xml_example of A.Rothe:
https://cwiki.apache.org/CAY/no-xml-example.html. 

But I get the following Exceptions:

org.apache.cayenne.CayenneRuntimeException: [v.3.1M3 Sep 13 2011 19:17:16]
Commit Exception
	at
org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:846)
	at
org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:757)
	at info.phosco.test.cayenne.dynamic.App.createProjects(App.java:121)
	at info.phosco.test.cayenne.dynamic.App.main(App.java:144)
Caused by: java.lang.NullPointerException
	at
org.apache.cayenne.access.DataDomainInsertBucket.appendQueriesInternal(DataDomainInsertBucket.java:57)
	at
org.apache.cayenne.access.DataDomainSyncBucket.appendQueries(DataDomainSyncBucket.java:78)
	at
org.apache.cayenne.access.DataDomainFlushAction.preprocess(DataDomainFlushAction.java:192)
	at
org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:144)
	at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:803)
	at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:767)
	at
org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:828)
	at
org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:764)
	at
org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:980)
	at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:735)
	at
org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:818)
	... 3 more


--
View this message in context: http://cayenne.195.n3.nabble.com/run-no-xml-example-tp3821753p3821753.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

Re: run no_xml_example

Posted by Sheldon <wa...@web.de>.
Yes, I think I should do it on my own.

Now I configure Cayenne like in the post:
http://cayenne.195.n3.nabble.com/How-to-configure-Cayenne-and-map-generic-object-programmatically-from-scratch-without-using-of-XML-td3506305.html.

I don't understand where and how to implement DataSourceFactory and
Provider<DataDomain>.

best regards

--
View this message in context: http://cayenne.195.n3.nabble.com/run-no-xml-example-tp3821753p3824720.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

Re: run no_xml_example

Posted by Andrus Adamchik <an...@objectstyle.org>.
Not sure about no-xml-example. Haven't looked at this code. But maybe you can do it the other way around - decide what you need to do in your app, and then figure out how to do that in Cayenne. And use this list to get advice if you get stuck.

Andrus

On Mar 13, 2012, at 5:29 AM, Sheldon wrote:

> Hello,
> 
> I want to run the no_xml_example of A.Rothe:
> https://cwiki.apache.org/CAY/no-xml-example.html. 
> 
> But I get the following Exceptions:
> 
> org.apache.cayenne.CayenneRuntimeException: [v.3.1M3 Sep 13 2011 19:17:16]
> Commit Exception
> 	at
> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:846)
> 	at
> org.apache.cayenne.access.DataContext.commitChanges(DataContext.java:757)
> 	at info.phosco.test.cayenne.dynamic.App.createProjects(App.java:121)
> 	at info.phosco.test.cayenne.dynamic.App.main(App.java:144)
> Caused by: java.lang.NullPointerException
> 	at
> org.apache.cayenne.access.DataDomainInsertBucket.appendQueriesInternal(DataDomainInsertBucket.java:57)
> 	at
> org.apache.cayenne.access.DataDomainSyncBucket.appendQueries(DataDomainSyncBucket.java:78)
> 	at
> org.apache.cayenne.access.DataDomainFlushAction.preprocess(DataDomainFlushAction.java:192)
> 	at
> org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:144)
> 	at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:803)
> 	at org.apache.cayenne.access.DataDomain$2.transform(DataDomain.java:767)
> 	at
> org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:828)
> 	at
> org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:764)
> 	at
> org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:980)
> 	at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:735)
> 	at
> org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:818)
> 	... 3 more
> 
> 
> --
> View this message in context: http://cayenne.195.n3.nabble.com/run-no-xml-example-tp3821753p3821753.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
>