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.

Reply via email to