You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by is_maximum <mn...@gmail.com> on 2009/02/02 07:33:36 UTC

Re: [URGENT] performance issues

Hi Kevin,
Sorry for replying late, I was facing a rush of work. 

Well we didn't change the OpenJPA version we still use 1.2.0 version and we
still experiencing the same damned OptimisticLockException!!! 

Since I have changed these configuration the system responses weired. 

I have an entity say Entry with a one-to-many relationship with Category.
when a new entry is coming I persist them like this:

dao.save(entry);
for (Category c : entry.getCategories()){
    //do some work on categories here
    c.setEntry(entry);
    dao.save(c);
}


this snippet code were working fine before but after changing the batchLimit
to -1 it won't work at all and a fatal error will be thrown:

JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting class status
FATAL ERROR in native method: JDWP on getting class status,
jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)


I don't know why this batch updating affect this simple insert statements.
However I used OpenJPA 2.0 Snapshot to see if this error has been cleared
but in that version still we have problem. By the way, because we have used
the word 'entry' in our JPQL currently we decided not to use version 2,0
because this is a reserved word in this version! You see there are lots of
problems just right when we are going to close the project!!!

Do you have any idea on removing optimistic locking exception? because this
is a big deal right now and if we couldn't remove it, that will kill us :)

thanks



Kevin Sutter wrote:
> 
> On Thu, Jan 29, 2009 at 2:20 PM, is_maximum <mn...@gmail.com> wrote:
> 
>>
>> I really don't know why after about 6 months working with OpenJPA and
>> inserting near a million records we should face this problem? what have
>> changed that cause optimistic locking to be activated spontaneously!!!
> 
> 
> Hmmm...  Not sure.  What has changed in the last six months?  That is,
> what
> version of OpenJPA did you start with and what version are you currently
> running with?  As you move from release to release, there are bound to be
> changes.  And, in some cases, the changes may actually have closed some
> holes that you were accidentally avoiding.  That is, maybe you were
> "lucky"...  :-)
> 
> We do have quite an extensive test bucket and we do attempt to avoid any
> type of regressions.  But, our test bucket (like any other test bucket) is
> not exhaustive.  You could be exercising an area of code that just hasn't
> been covered to the extent it should be.  There are so many variables with
> databases, configurations, jvms, environmental, openjpa, etc.
> 
> If you can help identify and isolate the changes that caused your
> concerns,
> then maybe we can help out.
> 
> Thanks,
> Kevin
> 
> 
>>
>>
>> Pinaki Poddar wrote:
>> >
>> > Hi,
>> >> but using build-time enhancer. I tried ant-runner for maven but was
>> >> unable to enhance my classes
>> >> if I don't give any class name I get this message:
>> >
>> >    A few minutes of digging with classpath and other beasts to enhance
>> at
>> > build-time will save you a lot of pain and gain performance. Enhancer
>> > fails mostly with classpath issues and availability of
>> > META-INF/persistence.xml etc.
>> >
>> > If you have access to OpenJPA source code, follow the trail at
>> >     ./openjpa-persistence-jdbc/pom.xml  and
>> >     ./openjpa-persistence-jdbc/src/main/ant/enhancer.xml
>> >
>> > It shows one way to enhance 100's of Entity classes used for testing.
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2241065.html
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2256731.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: 'Standalone' Sequence Generator

Posted by is_maximum <mn...@gmail.com>.
Thanks Kevin, again a complete answer

first let me tell you that I was able to solve the problem of build-time
enhancement, both environment are the same but don't know why in my computer
it was able to find persistence.xml and in other computer was not! any way I
define the path to persistence.xml and now it works fine

Regarding batch limit, if I wanted to use this feature what change I have to
made in logic? we can't set it to -1 and setting it to 0 will turn it off.
If I set that to say, 20 sometimes we have problem sometimes have not!! Now
consider I set it to the same value of 20 and most of our business methods
works fine, if one of them encounter such problem, what change do I have to
make so that code work with this feature? I mean removing that
OptimisticLockException? In some cases I know that there is no further
change on a record that causes this exception and I convinced this exception
has raised for something quite different. 

thanks again for your reply


Kevin Sutter wrote:
> 
> Hi,
> Some comments below, but I don't have a complete answer to your
> enhancement
> questions yet...
> 
> On Thu, Feb 12, 2009 at 6:38 AM, is_maximum <mn...@gmail.com> wrote:
> 
>>
>> Hi
>>
>> We were able to improve the performance a bit but still far way to go.
>> Some
>> changes in code and creating index in database help us more.
>>
>> But still we have problem in batch limit. At first, I had set it to -1
>> that
>> ends up in a weird OptimisticLockException in all persist methods and
>> then
>> I
>> set it to a value of 20 then that exception gone but after a while I
>> figured
>> out in some business methods we still catch the optimistic lock exception
>> and eventually I decided to set it to 0 just like it was already.
>>
>> My question is why this value has various effect on various methods? It
>> seems it has something to do with the number of insert/update statement
>> but
>> can't understand why.
> 
> 
> The batch limit setting can affect various areas of the code path. 
> Setting
> the batch limit to 0 will turn it off, so that's the "safest".  This 0
> setting will send each individual SQL statement to the database via the
> JDBC
> invocation.  Any positive number setting will allow OpenJPA to batch up a
> set of statements before sending them across the wire for processing. 
> This
> batching support can help with overall performance depending on your
> application's design.  Less trips to the database is goodness.  Where this
> gets tricky is when the statements that are being batched need to be
> re-ordered for optimal efficiencies.  OpenJPA has a couple of different
> "order managers" that provide policies on how to re-order the statements.
> Depending on the re-ordering mechanism, any errors detected could come
> from
> less-than-obvious processing.  Finally, the -1 setting says that there is
> no
> limit to the number of statements batched.  If you have a long running
> loop
> construct, you could easily blow your memory usage if you leave this set
> to
> -1.  Hope that helps to explain why this value has various effects on your
> processing.
> 
> 
>>
>>
>> Second problem is build-time entity enhancement. the problem is that the
>> ant
>> code (running from maven) in my computer works fine and will enhance all
>> the
>> entities but in other computer with the same maven version doesn't work
>> and
>> the exception is as follow:
>>
> 
> I hate to state the obvious, but there must be something different between
> the two environments.  You mention you are using the same version of
> maven,
> that's good.  Same version of OpenJPA also?  Exact same OpenJPA jar file?
> And, per the suggestions in the error message...  Same persistence
> entities
> format and content (jar file, directory structure, etc)?  Same classpath
> settings?  Same security settings?  This latter item probably doesn't
> apply
> to your environment, but it's worth asking.
> 
> Whenever I hit a situation like this, I can eventually trace this back to
> my
> own environment.  I've hit this exact same error in the past, especially
> when running within Eclipse.  And, every time, I can trace it back to
> something different with this particular project or configuration that was
> just slightly different from the "working" environment.
> 
> 
>> -------------------------------
>> enhance.all.entities:
>>     [echo] running enhancer
>> <openjpa-1.2.0-r422266:683325 fatal user error>
>> org.apache.openjpa.util.MetaData
>> Exception: MetaDataFactory could not be configured
>> (conf.newMetaDataFactoryInsta
>> nce() returned null). This might mean that no configuration properties
>> were
>> foun
>> d. Ensure that you have a META-INF/persistence.xml file, that it is
>> available in
>>  your classpath, or that the properties file you are using for
>> configuration
>> is
>> available. If you are using Ant, please see the <properties> or
>> <propertiesFile>
>>  attributes of the task's nested <config> element. This can also occur if
>> your O
>> penJPA distribution jars are corrupt, or if your security policy is
>> overly
>> stric
>> t.
>>        at
>> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
>> MetaDataRepository.java:1567)
>>        at
>> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataR
>> epository.java:1558)
>>        at
>> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
>> ations.java:505)
>>        at
>> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
>> ations.java:430)
>>        at
>> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:
>> 103)
>>        at
>> org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataR
>> epositoryValue.java:68)
>>        at
>> org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:
>> 83)
>>        at
>> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositor
>> yInstance(OpenJPAConfigurationImpl.java:863)
>>        at
>> org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:8
>> 8)
>>        at
>> org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172
>> )
>>        at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>        at org.apache.tools.ant.Task.perform(Task.java:364)
>>        at org.apache.tools.ant.Target.execute(Target.java:341)
>>        at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>        at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>>        at
>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
>> CheckExecutor.java:37)
>>        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>>        at
>> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>>
>>        at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>        at org.apache.tools.ant.Task.perform(Task.java:364)
>>        at org.apache.tools.ant.Target.execute(Target.java:341)
>>        at org.apache.tools.ant.Target.performTasks(Target.java:369)
>>        at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>>        at
>> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
>> CheckExecutor.java:37)
>>        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>>        at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>>        at org.apache.tools.ant.Task.perform(Task.java:364)
>>        at org.apache.tools.ant.Target.execute(Target.java:341)
>>        at
>> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
>> ntMojo.java:108)
>>        at
>> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
>>
>>        at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
>> nManager.java:451)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
>> ultLifecycleExecutor.java:558)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
>> fecycle(DefaultLifecycleExecutor.java:499)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
>> ltLifecycleExecutor.java:478)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
>> dleFailures(DefaultLifecycleExecutor.java:330)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
>> ts(DefaultLifecycleExecutor.java:291)
>>        at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
>> fecycleExecutor.java:142)
>>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
>> java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
>> sorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>        at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>
>>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error executing ant tasks
>>
>> Embedded error: The following error occurred while executing this line:
>>
>> F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:46:
>> The
>>  following error occurred while executing this line:
>>
>> F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:80:
>> <op
>> enjpa-1.2.0-r422266:683325 fatal user error>
>> org.apache.openjpa.util.MetaDataExc
>> eption: MetaDataFactory could not be configured
>> (conf.newMetaDataFactoryInstance
>> () returned null). This might mean that no configuration properties were
>> found.
>> Ensure that you have a META-INF/persistence.xml file, that it is
>> available
>> in yo
>> ur classpath, or that the properties file you are using for configuration
>> is
>> ava
>> ilable. If you are using Ant, please see the <properties> or
>> <propertiesFile> at
>> tributes of the task's nested <config> element. This can also occur if
>> your
>> Open
>> JPA distribution jars are corrupt, or if your security policy is overly
>> strict.
>> --------------------------
>>
>> I googled but found nothing useful for this error. Can you help me what
>> is
>> this error?
>>
>> Thank you all
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2314598.html
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2317035.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: 'Standalone' Sequence Generator

Posted by Kevin Sutter <kw...@gmail.com>.
Hi,
Some comments below, but I don't have a complete answer to your enhancement
questions yet...

On Thu, Feb 12, 2009 at 6:38 AM, is_maximum <mn...@gmail.com> wrote:

>
> Hi
>
> We were able to improve the performance a bit but still far way to go. Some
> changes in code and creating index in database help us more.
>
> But still we have problem in batch limit. At first, I had set it to -1 that
> ends up in a weird OptimisticLockException in all persist methods and then
> I
> set it to a value of 20 then that exception gone but after a while I
> figured
> out in some business methods we still catch the optimistic lock exception
> and eventually I decided to set it to 0 just like it was already.
>
> My question is why this value has various effect on various methods? It
> seems it has something to do with the number of insert/update statement but
> can't understand why.


The batch limit setting can affect various areas of the code path.  Setting
the batch limit to 0 will turn it off, so that's the "safest".  This 0
setting will send each individual SQL statement to the database via the JDBC
invocation.  Any positive number setting will allow OpenJPA to batch up a
set of statements before sending them across the wire for processing.  This
batching support can help with overall performance depending on your
application's design.  Less trips to the database is goodness.  Where this
gets tricky is when the statements that are being batched need to be
re-ordered for optimal efficiencies.  OpenJPA has a couple of different
"order managers" that provide policies on how to re-order the statements.
Depending on the re-ordering mechanism, any errors detected could come from
less-than-obvious processing.  Finally, the -1 setting says that there is no
limit to the number of statements batched.  If you have a long running loop
construct, you could easily blow your memory usage if you leave this set to
-1.  Hope that helps to explain why this value has various effects on your
processing.


>
>
> Second problem is build-time entity enhancement. the problem is that the
> ant
> code (running from maven) in my computer works fine and will enhance all
> the
> entities but in other computer with the same maven version doesn't work and
> the exception is as follow:
>

I hate to state the obvious, but there must be something different between
the two environments.  You mention you are using the same version of maven,
that's good.  Same version of OpenJPA also?  Exact same OpenJPA jar file?
And, per the suggestions in the error message...  Same persistence entities
format and content (jar file, directory structure, etc)?  Same classpath
settings?  Same security settings?  This latter item probably doesn't apply
to your environment, but it's worth asking.

Whenever I hit a situation like this, I can eventually trace this back to my
own environment.  I've hit this exact same error in the past, especially
when running within Eclipse.  And, every time, I can trace it back to
something different with this particular project or configuration that was
just slightly different from the "working" environment.


> -------------------------------
> enhance.all.entities:
>     [echo] running enhancer
> <openjpa-1.2.0-r422266:683325 fatal user error>
> org.apache.openjpa.util.MetaData
> Exception: MetaDataFactory could not be configured
> (conf.newMetaDataFactoryInsta
> nce() returned null). This might mean that no configuration properties were
> foun
> d. Ensure that you have a META-INF/persistence.xml file, that it is
> available in
>  your classpath, or that the properties file you are using for
> configuration
> is
> available. If you are using Ant, please see the <properties> or
> <propertiesFile>
>  attributes of the task's nested <config> element. This can also occur if
> your O
> penJPA distribution jars are corrupt, or if your security policy is overly
> stric
> t.
>        at
> org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
> MetaDataRepository.java:1567)
>        at
> org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataR
> epository.java:1558)
>        at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
> ations.java:505)
>        at
> org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
> ations.java:430)
>        at
> org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:
> 103)
>        at
> org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataR
> epositoryValue.java:68)
>        at
> org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:
> 83)
>        at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositor
> yInstance(OpenJPAConfigurationImpl.java:863)
>        at
> org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:8
> 8)
>        at
> org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172
> )
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at org.apache.tools.ant.Task.perform(Task.java:364)
>        at org.apache.tools.ant.Target.execute(Target.java:341)
>        at org.apache.tools.ant.Target.performTasks(Target.java:369)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>        at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
> CheckExecutor.java:37)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>        at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at org.apache.tools.ant.Task.perform(Task.java:364)
>        at org.apache.tools.ant.Target.execute(Target.java:341)
>        at org.apache.tools.ant.Target.performTasks(Target.java:369)
>        at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>        at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
> CheckExecutor.java:37)
>        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
>        at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>        at org.apache.tools.ant.Task.perform(Task.java:364)
>        at org.apache.tools.ant.Target.execute(Target.java:341)
>        at
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
> ntMojo.java:108)
>        at
> org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
>
>        at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:451)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:558)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:499)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:478)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:330)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:291)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:142)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>        at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing ant tasks
>
> Embedded error: The following error occurred while executing this line:
>
> F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:46:
> The
>  following error occurred while executing this line:
>
> F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:80:
> <op
> enjpa-1.2.0-r422266:683325 fatal user error>
> org.apache.openjpa.util.MetaDataExc
> eption: MetaDataFactory could not be configured
> (conf.newMetaDataFactoryInstance
> () returned null). This might mean that no configuration properties were
> found.
> Ensure that you have a META-INF/persistence.xml file, that it is available
> in yo
> ur classpath, or that the properties file you are using for configuration
> is
> ava
> ilable. If you are using Ant, please see the <properties> or
> <propertiesFile> at
> tributes of the task's nested <config> element. This can also occur if your
> Open
> JPA distribution jars are corrupt, or if your security policy is overly
> strict.
> --------------------------
>
> I googled but found nothing useful for this error. Can you help me what is
> this error?
>
> Thank you all
>
> --
> View this message in context:
> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2314598.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Re: 'Standalone' Sequence Generator

Posted by is_maximum <mn...@gmail.com>.
Hi 

We were able to improve the performance a bit but still far way to go. Some
changes in code and creating index in database help us more.

But still we have problem in batch limit. At first, I had set it to -1 that
ends up in a weird OptimisticLockException in all persist methods and then I
set it to a value of 20 then that exception gone but after a while I figured
out in some business methods we still catch the optimistic lock exception
and eventually I decided to set it to 0 just like it was already.

My question is why this value has various effect on various methods? It
seems it has something to do with the number of insert/update statement but
can't understand why.

Second problem is build-time entity enhancement. the problem is that the ant
code (running from maven) in my computer works fine and will enhance all the
entities but in other computer with the same maven version doesn't work and
the exception is as follow:

-------------------------------
enhance.all.entities:
     [echo] running enhancer
<openjpa-1.2.0-r422266:683325 fatal user error>
org.apache.openjpa.util.MetaData
Exception: MetaDataFactory could not be configured
(conf.newMetaDataFactoryInsta
nce() returned null). This might mean that no configuration properties were
foun
d. Ensure that you have a META-INF/persistence.xml file, that it is
available in
 your classpath, or that the properties file you are using for configuration
is
available. If you are using Ant, please see the <properties> or
<propertiesFile>
 attributes of the task's nested <config> element. This can also occur if
your O
penJPA distribution jars are corrupt, or if your security policy is overly
stric
t.
        at
org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(
MetaDataRepository.java:1567)
        at
org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataR
epository.java:1558)
        at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
ations.java:505)
        at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configur
ations.java:430)
        at
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:
103)
        at
org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataR
epositoryValue.java:68)
        at
org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:
83)
        at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositor
yInstance(OpenJPAConfigurationImpl.java:863)
        at
org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:8
8)
        at
org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172
)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)

        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at
org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
ntMojo.java:108)
        at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)

        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:451)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: The following error occurred while executing this line:
F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:46:
The
 following error occurred while executing this line:
F:\java-projects\GL\modules\general-ledger-api\src\main\ant\enhancer.xml:80:
<op
enjpa-1.2.0-r422266:683325 fatal user error>
org.apache.openjpa.util.MetaDataExc
eption: MetaDataFactory could not be configured
(conf.newMetaDataFactoryInstance
() returned null). This might mean that no configuration properties were
found.
Ensure that you have a META-INF/persistence.xml file, that it is available
in yo
ur classpath, or that the properties file you are using for configuration is
ava
ilable. If you are using Ant, please see the <properties> or
<propertiesFile> at
tributes of the task's nested <config> element. This can also occur if your
Open
JPA distribution jars are corrupt, or if your security policy is overly
strict.
--------------------------

I googled but found nothing useful for this error. Can you help me what is
this error?

Thank you all

-- 
View this message in context: http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2314598.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: 'Standalone' Sequence Generator

Posted by Kevin Sutter <kw...@gmail.com>.
Personally, I would recommend the use of one of OpenJPA's id generators.
I've worked with our test organizations that wanted to develop their own id
generators and they continue to run into locking and synchronization
problems.  If you can use the OpenJPA generators, then your application
doesn't have to worry about those details.  You can worry about more
important business logic than assignment of identifiers...  :-)  With
OpenJPA, you have several options for id generation [1].

Good luck,
Kevin

[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#jpa_overview_mapping_sequence

http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_sequence

On Mon, Feb 2, 2009 at 9:28 AM, Miłosz Tylenda <mt...@o2.pl> wrote:

> Norbert,
>
> There is no such "standalone" TableGenerator in JPA but some solution to
> this has been recently posted here:
>
>
> http://n2.nabble.com/Access-Oracle-Sequence-using-OpenJPA-tp2227943p2227943.html
>
> Hope this helps.
>
> Greetings,
> Milosz
>
>
> > Hi,
> >
> > for some reason I need a sequence generator, used to create unique keys
> > explicitly.
> >
> > Is there any kind of "standalone" TableGenerator available in JPA ?
> >
> > What I want to do is something like that:
> >
> > "TableGenerator" genId = new "TableGenerator" (em, "XX") ;
> >
> > Long next = genId.getNext () ;
> >
> > myEntity.setYY (next) ; // cannot use implicit generated keys.
> >
> > Thanx a lot for your help.
> >
> > Norbert
> >
> >
> >
> >
> >
>

Re: 'Standalone' Sequence Generator

Posted by Miłosz Tylenda <mt...@o2.pl>.
Norbert,

There is no such "standalone" TableGenerator in JPA but some solution to this has been recently posted here:

http://n2.nabble.com/Access-Oracle-Sequence-using-OpenJPA-tp2227943p2227943.html

Hope this helps.

Greetings,
Milosz


> Hi,
> 
> for some reason I need a sequence generator, used to create unique keys
> explicitly.
> 
> Is there any kind of "standalone" TableGenerator available in JPA ?
> 
> What I want to do is something like that:
> 
> "TableGenerator" genId = new "TableGenerator" (em, "XX") ;
> 
> Long next = genId.getNext () ;
> 
> myEntity.setYY (next) ; // cannot use implicit generated keys.
> 
> Thanx a lot for your help.
> 
> Norbert
> 
> 
> 
> 
> 

Re: [URGENT] performance issues

Posted by Kevin Sutter <kw...@gmail.com>.
Hi,
Setting a batchLimit to -1 indicates there is no limit.  Normally, this
would not be good since you could run into "out of resources" (memory,
connections, locks, etc) type situation.  So, I wouldn't suggest running
with batchLimit set to -1 for any database.  Setting it to 0 turns it off.
By default, we set batchLimit to 100 for DB2 and Oracle.  I can't remember
which database you are using, but maybe you could try running with a
batchLimit of 100.  Depending on your application, running with statement
batching may help with performance.

Kevin

On Mon, Feb 2, 2009 at 3:58 AM, is_maximum <mn...@gmail.com> wrote:

>
> Hi Fay,
> I've just found that all the problems have raised from 'batchLimit=-1'
>
> if I set it to 0 everything work fine. now the weird optimistic exception
> and that jvm error have gone.
>
> So I think we can't think of this feature (batch statements). do you have
> any idea?
>
>
>
> Fay Wang wrote:
> >
> > Hi,
> >
> >   Sometimes the OptimisticLockException is thrown because of the
> > SQLException during insert. Could you turn on the trace and send us the
> > log file?
> >
> > <property name="openjpa.Log"
> > value="File=c:\\trace.log,DefaultLevel=TRACE"/>
> >
> > Regards,
> > Fay
> >
> >
> >
> >
> >
> > --- On Sun, 2/1/09, is_maximum <mn...@gmail.com> wrote:
> >
> >> From: is_maximum <mn...@gmail.com>
> >> Subject: Re: [URGENT] performance issues
> >> To: users@openjpa.apache.org
> >> Date: Sunday, February 1, 2009, 10:33 PM
> >> Hi Kevin,
> >> Sorry for replying late, I was facing a rush of work.
> >>
> >> Well we didn't change the OpenJPA version we still use
> >> 1.2.0 version and we
> >> still experiencing the same damned
> >> OptimisticLockException!!!
> >>
> >> Since I have changed these configuration the system
> >> responses weired.
> >>
> >> I have an entity say Entry with a one-to-many relationship
> >> with Category.
> >> when a new entry is coming I persist them like this:
> >>
> >> dao.save(entry);
> >> for (Category c : entry.getCategories()){
> >>     //do some work on categories here
> >>     c.setEntry(entry);
> >>     dao.save(c);
> >> }
> >>
> >>
> >> this snippet code were working fine before but after
> >> changing the batchLimit
> >> to -1 it won't work at all and a fatal error will be
> >> thrown:
> >>
> >> JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting
> >> class status
> >> FATAL ERROR in native method: JDWP on getting class status,
> >> jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
> >>
> >>
> >> I don't know why this batch updating affect this simple
> >> insert statements.
> >> However I used OpenJPA 2.0 Snapshot to see if this error
> >> has been cleared
> >> but in that version still we have problem. By the way,
> >> because we have used
> >> the word 'entry' in our JPQL currently we decided
> >> not to use version 2,0
> >> because this is a reserved word in this version! You see
> >> there are lots of
> >> problems just right when we are going to close the
> >> project!!!
> >>
> >> Do you have any idea on removing optimistic locking
> >> exception? because this
> >> is a big deal right now and if we couldn't remove it,
> >> that will kill us :)
> >>
> >> thanks
> >>
> >>
> >>
> >> Kevin Sutter wrote:
> >> >
> >> > On Thu, Jan 29, 2009 at 2:20 PM, is_maximum
> >> <mn...@gmail.com> wrote:
> >> >
> >> >>
> >> >> I really don't know why after about 6 months
> >> working with OpenJPA and
> >> >> inserting near a million records we should face
> >> this problem? what have
> >> >> changed that cause optimistic locking to be
> >> activated spontaneously!!!
> >> >
> >> >
> >> > Hmmm...  Not sure.  What has changed in the last six
> >> months?  That is,
> >> > what
> >> > version of OpenJPA did you start with and what version
> >> are you currently
> >> > running with?  As you move from release to release,
> >> there are bound to be
> >> > changes.  And, in some cases, the changes may actually
> >> have closed some
> >> > holes that you were accidentally avoiding.  That is,
> >> maybe you were
> >> > "lucky"...  :-)
> >> >
> >> > We do have quite an extensive test bucket and we do
> >> attempt to avoid any
> >> > type of regressions.  But, our test bucket (like any
> >> other test bucket) is
> >> > not exhaustive.  You could be exercising an area of
> >> code that just hasn't
> >> > been covered to the extent it should be.  There are so
> >> many variables with
> >> > databases, configurations, jvms, environmental,
> >> openjpa, etc.
> >> >
> >> > If you can help identify and isolate the changes that
> >> caused your
> >> > concerns,
> >> > then maybe we can help out.
> >> >
> >> > Thanks,
> >> > Kevin
> >> >
> >> >
> >> >>
> >> >>
> >> >> Pinaki Poddar wrote:
> >> >> >
> >> >> > Hi,
> >> >> >> but using build-time enhancer. I tried
> >> ant-runner for maven but was
> >> >> >> unable to enhance my classes
> >> >> >> if I don't give any class name I get
> >> this message:
> >> >> >
> >> >> >    A few minutes of digging with classpath
> >> and other beasts to enhance
> >> >> at
> >> >> > build-time will save you a lot of pain and
> >> gain performance. Enhancer
> >> >> > fails mostly with classpath issues and
> >> availability of
> >> >> > META-INF/persistence.xml etc.
> >> >> >
> >> >> > If you have access to OpenJPA source code,
> >> follow the trail at
> >> >> >     ./openjpa-persistence-jdbc/pom.xml  and
> >> >> >
> >> ./openjpa-persistence-jdbc/src/main/ant/enhancer.xml
> >> >> >
> >> >> > It shows one way to enhance 100's of
> >> Entity classes used for testing.
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2241065.html
> >> >> Sent from the OpenJPA Users mailing list archive
> >> at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2256731.html
> >> Sent from the OpenJPA Users mailing list archive at
> >> Nabble.com.
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2257195.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

'Standalone' Sequence Generator

Posted by Norbert Rieger <nr...@lplusr.de>.
Hi,

for some reason I need a sequence generator, used to create unique keys
explicitly.

Is there any kind of "standalone" TableGenerator available in JPA ?

What I want to do is something like that:

"TableGenerator" genId = new "TableGenerator" (em, "XX") ;

Long next = genId.getNext () ;

myEntity.setYY (next) ; // cannot use implicit generated keys.

Thanx a lot for your help.

Norbert





Re: [URGENT] performance issues

Posted by is_maximum <mn...@gmail.com>.
Hi Fay,
I've just found that all the problems have raised from 'batchLimit=-1' 

if I set it to 0 everything work fine. now the weird optimistic exception
and that jvm error have gone. 

So I think we can't think of this feature (batch statements). do you have
any idea?



Fay Wang wrote:
> 
> Hi, 
> 
>   Sometimes the OptimisticLockException is thrown because of the
> SQLException during insert. Could you turn on the trace and send us the
> log file?
> 
> <property name="openjpa.Log"
> value="File=c:\\trace.log,DefaultLevel=TRACE"/>
> 
> Regards,
> Fay
> 
> 
> 
> 
> 
> --- On Sun, 2/1/09, is_maximum <mn...@gmail.com> wrote:
> 
>> From: is_maximum <mn...@gmail.com>
>> Subject: Re: [URGENT] performance issues
>> To: users@openjpa.apache.org
>> Date: Sunday, February 1, 2009, 10:33 PM
>> Hi Kevin,
>> Sorry for replying late, I was facing a rush of work. 
>> 
>> Well we didn't change the OpenJPA version we still use
>> 1.2.0 version and we
>> still experiencing the same damned
>> OptimisticLockException!!! 
>> 
>> Since I have changed these configuration the system
>> responses weired. 
>> 
>> I have an entity say Entry with a one-to-many relationship
>> with Category.
>> when a new entry is coming I persist them like this:
>> 
>> dao.save(entry);
>> for (Category c : entry.getCategories()){
>>     //do some work on categories here
>>     c.setEntry(entry);
>>     dao.save(c);
>> }
>> 
>> 
>> this snippet code were working fine before but after
>> changing the batchLimit
>> to -1 it won't work at all and a fatal error will be
>> thrown:
>> 
>> JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting
>> class status
>> FATAL ERROR in native method: JDWP on getting class status,
>> jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
>> 
>> 
>> I don't know why this batch updating affect this simple
>> insert statements.
>> However I used OpenJPA 2.0 Snapshot to see if this error
>> has been cleared
>> but in that version still we have problem. By the way,
>> because we have used
>> the word 'entry' in our JPQL currently we decided
>> not to use version 2,0
>> because this is a reserved word in this version! You see
>> there are lots of
>> problems just right when we are going to close the
>> project!!!
>> 
>> Do you have any idea on removing optimistic locking
>> exception? because this
>> is a big deal right now and if we couldn't remove it,
>> that will kill us :)
>> 
>> thanks
>> 
>> 
>> 
>> Kevin Sutter wrote:
>> > 
>> > On Thu, Jan 29, 2009 at 2:20 PM, is_maximum
>> <mn...@gmail.com> wrote:
>> > 
>> >>
>> >> I really don't know why after about 6 months
>> working with OpenJPA and
>> >> inserting near a million records we should face
>> this problem? what have
>> >> changed that cause optimistic locking to be
>> activated spontaneously!!!
>> > 
>> > 
>> > Hmmm...  Not sure.  What has changed in the last six
>> months?  That is,
>> > what
>> > version of OpenJPA did you start with and what version
>> are you currently
>> > running with?  As you move from release to release,
>> there are bound to be
>> > changes.  And, in some cases, the changes may actually
>> have closed some
>> > holes that you were accidentally avoiding.  That is,
>> maybe you were
>> > "lucky"...  :-)
>> > 
>> > We do have quite an extensive test bucket and we do
>> attempt to avoid any
>> > type of regressions.  But, our test bucket (like any
>> other test bucket) is
>> > not exhaustive.  You could be exercising an area of
>> code that just hasn't
>> > been covered to the extent it should be.  There are so
>> many variables with
>> > databases, configurations, jvms, environmental,
>> openjpa, etc.
>> > 
>> > If you can help identify and isolate the changes that
>> caused your
>> > concerns,
>> > then maybe we can help out.
>> > 
>> > Thanks,
>> > Kevin
>> > 
>> > 
>> >>
>> >>
>> >> Pinaki Poddar wrote:
>> >> >
>> >> > Hi,
>> >> >> but using build-time enhancer. I tried
>> ant-runner for maven but was
>> >> >> unable to enhance my classes
>> >> >> if I don't give any class name I get
>> this message:
>> >> >
>> >> >    A few minutes of digging with classpath
>> and other beasts to enhance
>> >> at
>> >> > build-time will save you a lot of pain and
>> gain performance. Enhancer
>> >> > fails mostly with classpath issues and
>> availability of
>> >> > META-INF/persistence.xml etc.
>> >> >
>> >> > If you have access to OpenJPA source code,
>> follow the trail at
>> >> >     ./openjpa-persistence-jdbc/pom.xml  and
>> >> >    
>> ./openjpa-persistence-jdbc/src/main/ant/enhancer.xml
>> >> >
>> >> > It shows one way to enhance 100's of
>> Entity classes used for testing.
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2241065.html
>> >> Sent from the OpenJPA Users mailing list archive
>> at Nabble.com.
>> >>
>> >>
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2256731.html
>> Sent from the OpenJPA Users mailing list archive at
>> Nabble.com.
> 
> 
>       
> 
> 

-- 
View this message in context: http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2257195.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: [URGENT] performance issues

Posted by Fay Wang <fy...@yahoo.com>.
Hi, 

  Sometimes the OptimisticLockException is thrown because of the SQLException during insert. Could you turn on the trace and send us the log file?

<property name="openjpa.Log" value="File=c:\\trace.log,DefaultLevel=TRACE"/>

Regards,
Fay





--- On Sun, 2/1/09, is_maximum <mn...@gmail.com> wrote:

> From: is_maximum <mn...@gmail.com>
> Subject: Re: [URGENT] performance issues
> To: users@openjpa.apache.org
> Date: Sunday, February 1, 2009, 10:33 PM
> Hi Kevin,
> Sorry for replying late, I was facing a rush of work. 
> 
> Well we didn't change the OpenJPA version we still use
> 1.2.0 version and we
> still experiencing the same damned
> OptimisticLockException!!! 
> 
> Since I have changed these configuration the system
> responses weired. 
> 
> I have an entity say Entry with a one-to-many relationship
> with Category.
> when a new entry is coming I persist them like this:
> 
> dao.save(entry);
> for (Category c : entry.getCategories()){
>     //do some work on categories here
>     c.setEntry(entry);
>     dao.save(c);
> }
> 
> 
> this snippet code were working fine before but after
> changing the batchLimit
> to -1 it won't work at all and a fatal error will be
> thrown:
> 
> JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting
> class status
> FATAL ERROR in native method: JDWP on getting class status,
> jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
> 
> 
> I don't know why this batch updating affect this simple
> insert statements.
> However I used OpenJPA 2.0 Snapshot to see if this error
> has been cleared
> but in that version still we have problem. By the way,
> because we have used
> the word 'entry' in our JPQL currently we decided
> not to use version 2,0
> because this is a reserved word in this version! You see
> there are lots of
> problems just right when we are going to close the
> project!!!
> 
> Do you have any idea on removing optimistic locking
> exception? because this
> is a big deal right now and if we couldn't remove it,
> that will kill us :)
> 
> thanks
> 
> 
> 
> Kevin Sutter wrote:
> > 
> > On Thu, Jan 29, 2009 at 2:20 PM, is_maximum
> <mn...@gmail.com> wrote:
> > 
> >>
> >> I really don't know why after about 6 months
> working with OpenJPA and
> >> inserting near a million records we should face
> this problem? what have
> >> changed that cause optimistic locking to be
> activated spontaneously!!!
> > 
> > 
> > Hmmm...  Not sure.  What has changed in the last six
> months?  That is,
> > what
> > version of OpenJPA did you start with and what version
> are you currently
> > running with?  As you move from release to release,
> there are bound to be
> > changes.  And, in some cases, the changes may actually
> have closed some
> > holes that you were accidentally avoiding.  That is,
> maybe you were
> > "lucky"...  :-)
> > 
> > We do have quite an extensive test bucket and we do
> attempt to avoid any
> > type of regressions.  But, our test bucket (like any
> other test bucket) is
> > not exhaustive.  You could be exercising an area of
> code that just hasn't
> > been covered to the extent it should be.  There are so
> many variables with
> > databases, configurations, jvms, environmental,
> openjpa, etc.
> > 
> > If you can help identify and isolate the changes that
> caused your
> > concerns,
> > then maybe we can help out.
> > 
> > Thanks,
> > Kevin
> > 
> > 
> >>
> >>
> >> Pinaki Poddar wrote:
> >> >
> >> > Hi,
> >> >> but using build-time enhancer. I tried
> ant-runner for maven but was
> >> >> unable to enhance my classes
> >> >> if I don't give any class name I get
> this message:
> >> >
> >> >    A few minutes of digging with classpath
> and other beasts to enhance
> >> at
> >> > build-time will save you a lot of pain and
> gain performance. Enhancer
> >> > fails mostly with classpath issues and
> availability of
> >> > META-INF/persistence.xml etc.
> >> >
> >> > If you have access to OpenJPA source code,
> follow the trail at
> >> >     ./openjpa-persistence-jdbc/pom.xml  and
> >> >    
> ./openjpa-persistence-jdbc/src/main/ant/enhancer.xml
> >> >
> >> > It shows one way to enhance 100's of
> Entity classes used for testing.
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2241065.html
> >> Sent from the OpenJPA Users mailing list archive
> at Nabble.com.
> >>
> >>
> > 
> > 
> 
> -- 
> View this message in context:
> http://n2.nabble.com/-URGENT--performance-issues-tp2232295p2256731.html
> Sent from the OpenJPA Users mailing list archive at
> Nabble.com.