Hi,

Why is the clear() being called? The thing is, query return results
are read-only; mutating the results doesn't really make sense. What
would you expect the result of calling clear() to be?

-Patrick

On Nov 11, 2007 12:50 AM, Miroslav Nachev <[EMAIL PROTECTED]> wrote:
> The application is very simple. It is created automatically using NetBeans
> "New Project" and then "Database Desktop Application". By default it use
> TopLink and everything is working fine. When I change the EntityManager to
> OpenJPA in "persistence.xml" it is working in different way (not working
> properly) and this exception is thrown on refresh and when I try to create
> new record in detailTable.
> I forgot to inform you that I am created 2 tables which are related:
> MainTable and DetailTable. In current case MainTable are Persons and
> DetailTable are Person Address Details.
> I can send you the project in WinRAR format or ZIP but you can create it
> your self also getting the last NetBeans from NetBeans 6 Development
> Downloads <http://www.netbeans.info/downloads/dev.php>.
>
> 47  address_bookPU  INFO   [AWT-EventQueue-0] openjpa.Runtime - Starting
> OpenJPA 1.1.0-SNAPSHOT
> 188  address_bookPU  INFO   [AWT-EventQueue-0] openjpa.jdbc.JDBC - Using
> dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary".
> 516  address_bookPU  INFO   [AWT-EventQueue-0] openjpa.Enhance - Creating
> subclass for "[class test.Persons, class test.AddressDetails]". This means
> that your application will be less efficient and will consume more memory
> than it would if you ran the OpenJPA enhancer. Additionally, lazy loading
> will not be available for one-to-one and many-to-one persistent attributes
> in types using field access; they will be loaded eagerly instead.
> data: [EMAIL PROTECTED]
> 2007-11-11 10:41:23 org.jdesktop.application.Task failed
> SEVERE: [EMAIL PROTECTED] failed:
> java.lang.UnsupportedOperationException: Result lists are read-only.
> java.lang.UnsupportedOperationException: Result lists are read-only.
>         at org.apache.openjpa.lib.rop.AbstractResultList.readOnly(
> AbstractResultList.java:43)
>         at org.apache.openjpa.lib.rop.AbstractResultList.clear(
> AbstractResultList.java:80)
>         at org.apache.openjpa.kernel.DelegatingResultList.clear(
> DelegatingResultList.java:236)
>         at
> org.jdesktop.observablecollections.ObservableCollections$ObservableListImpl.clear
> (ObservableCollections.java:324)
>         at test.DesktopApplication1View$RefreshTask.doInBackground(
> DesktopApplication1View.java:272)
>         at test.DesktopApplication1View$RefreshTask.doInBackground(
> DesktopApplication1View.java:247)
>         at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java
> :303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:885)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)
>
>
> Miro.
>
>
>
>
> On 11/10/07, Patrick Linskey <[EMAIL PROTECTED]> wrote:
> >
> > Can you post the full stack trace?
> >
> > -Patrick
> >
> > On Nov 10, 2007 12:38 PM, Miroslav Nachev <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I try to use OpenJPA together with NetBeans 6 and I have the following
> > > exception:
> > > "java.lang.UnsupportedOperationException: Result lists are read-only."
> > >
> > > This exception is not thrown when I am using TopLink.
> > >
> > > Can you suggest me how to set permanently all result lists to be
> > writable by
> > > default?
> > >
> > >
> > > Miro.
> > >
> >
> >
> >
> > --
> > Patrick Linskey
> > 202 669 5907
> >
>



-- 
Patrick Linskey
202 669 5907

Reply via email to