You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "seenu.atluri" <se...@gmail.com> on 2017/02/23 06:33:51 UTC

CMP2 enitity get is making update query in Linux environment

Hi,

We have legacy application with bunch of CMP2 beans migrated to TomEE from
Weblogic. We have a getEntity business methods in SSB which are running in
transaction. During transaction commit, OpenJPA is making update query with
no values changed for all child entities (one-to-many relationship) although
there is no change to the entity. This making the process too slow and
leading transaction time-out sometimes. Obviously, Session cache is expected
to hold these entities and make db hit only if the child entities are
changed, not always.

We see this behavior only in Unix, not in Windows environment. Does anybody
experience this problem?
Would appreciate your help.

Thanks & Regards,
Srinivas Atluri.

 



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Deployed ear is absolutely same!!



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681299.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2017-03-07 8:41 GMT+01:00 seenu.atluri <se...@gmail.com>:

> I understand it Romain. But, is there any alternate way to avoid adding
> class
> transformer based on this condition (info.webappName != null)?
>
>
Real question is: why this value is not the same in both cases? Is the
deployment the exact same (and not one using webapps/ vs apps/ for
instance). Still trying to understand the cause more than fixing the
consequence.


> Thanks & Regards,
> Srinivas Atluri
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681226.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
I understand it Romain. But, is there any alternate way to avoid adding class
transformer based on this condition (info.webappName != null)?

Thanks & Regards,
Srinivas Atluri



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681226.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Srinivas,

no, not sure how to reproduce it to be honest.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-03-06 17:58 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Hi Romain,
>
> Did you get a chance to look into it?
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681224.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Hi Romain,

Did you get a chance to look into it? 

Thanks & Regards,
Srinivas Atluri.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681224.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
can you check why it is true on one side and false on the other? is one
having the lazy persistence unit flag somehow and not the other?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-28 12:44 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Hi Romain,
>
> I have fixed it, looks like an issue with openejb. addTransformer() in
> PersistenceUnitInfoImpl class is being called only in my windows
> environment, not in linux environment. Here is the call trace in  my
> windows
> environment.
>
> at
> org.apache.openejb.persistence.PersistenceUnitInfoImpl.addTransformer(
> PersistenceUnitInfoImpl.java:337)
>         at
> org.apache.openjpa.persistence.PersistenceProviderImpl.
> createContainerEntityManagerFactory(PersistenceProviderImpl.java:170)
>         at
> org.apache.openjpa.persistence.PersistenceProviderImpl.
> createContainerEntityManagerFactory(PersistenceProviderImpl.java:63)
>         at
> org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(
> EntityManagerFactoryCallable.java:64)
>         at
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory
> .createDelegate(ReloadableEntityManagerFactory.java:122)
>         at
> org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory
> .<init>(ReloadableEntityManagerFactory.java:108)
>         at
> org.apache.openejb.assembler.classic.PersistenceBuilder.
> createEntityManagerFactory(PersistenceBuilder.java:157)
>         at
> org.apache.openejb.assembler.classic.Assembler.
> createApplication(Assembler.java:864)
>         at
> org.apache.openejb.assembler.classic.Assembler.
> createApplication(Assembler.java:717)
>         at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(
> Assembler.java:595)
>         at org.apache.openejb.assembler.classic.Assembler.build(
> Assembler.java:483)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(
> TomcatLoader.java:247)
>
> When I see why it is not being called in linux, here is the piece of code
> causing issue in ReloadableEntityManagerFactory constructor.
>
> if (!callable.getUnitInfo().isLazilyInitialized()) {
>             createDelegate();
> }
>
>
> isLazilyinitialized() is false in Windows, true in Linux. It is being
> determined using "info.webappName != null" in PersistenceBuilder. As of
> now,
> I removed if condition, it is working fine in Linux now. Is this bug, or
> can
> you suggest some workaround for this?
>
> Thanks & Regards,
> Srinivas Atluri
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681186.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Hi Romain,

I have fixed it, looks like an issue with openejb. addTransformer() in
PersistenceUnitInfoImpl class is being called only in my windows
environment, not in linux environment. Here is the call trace in  my windows
environment.

at
org.apache.openejb.persistence.PersistenceUnitInfoImpl.addTransformer(PersistenceUnitInfoImpl.java:337)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:170)
	at
org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:63)
	at
org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:64)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:122)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:108)
	at
org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:157)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:864)
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:717)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:595)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:483)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:247)

When I see why it is not being called in linux, here is the piece of code
causing issue in ReloadableEntityManagerFactory constructor. 

if (!callable.getUnitInfo().isLazilyInitialized()) {
            createDelegate();
}


isLazilyinitialized() is false in Windows, true in Linux. It is being
determined using "info.webappName != null" in PersistenceBuilder. As of now,
I removed if condition, it is working fine in Linux now. Is this bug, or can
you suggest some workaround for this?

Thanks & Regards,
Srinivas Atluri



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681186.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Thank you Romain, that makes sense. But, we can't avoid customization fully
as we remove cxf-* jars and replace with metro jars as we have bunch of SOAP
APIs exposed using Metra. Hope that won't cause any issue.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681183.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I assume something is fishy with your java setup on linux, maybe try to use:

1. a new JVM (no hack in the JVM, can happen and is generally silent :s)
2. remove all custom environment variables (new user can help)
3. use a new plain tomee with base=home and without any customization at
server level (no endorsed, no custom libs but the database driver)

then iteratively add what you need but really looks like an environment
issue



Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-27 14:39 GMT+01:00 seenu.atluri <se...@gmail.com>:

> In order to check whether java-agent is kicked off or not, I took source of
> java agent added few system.out() and built jar. I tested in windows it is
> working fine, so there is no issue with the jar I built.
>
> In Linux, you are right, java-agent is not kicked off when there is
> endorsed
> folder. When I removed endorsed folder, java-agent got kicked, but still
> getting the same issue.
>
> We desperately need help here Romain. Don't know what causing issue, it is
> working once in a while, but failing most of the times.
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681179.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
In order to check whether java-agent is kicked off or not, I took source of
java agent added few system.out() and built jar. I tested in windows it is
working fine, so there is no issue with the jar I built.

In Linux, you are right, java-agent is not kicked off when there is endorsed
folder. When I removed endorsed folder, java-agent got kicked, but still
getting the same issue. 

We desperately need help here Romain. Don't know what causing issue, it is
working once in a while, but failing most of the times.

Thanks & Regards,
Srinivas Atluri.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681179.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Root user is clearly not needed but custom endorsed folder is always dirty
and often triggers other issues.

Le 26 févr. 2017 21:01, "seenu.atluri" <se...@gmail.com> a écrit :

> you mean running using root user could be the wrong fix.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681172.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
you mean running using root user could be the wrong fix.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681172.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
This is likely another issue and fix looks weong. Where is it coming from?
(Not tomee, that is why i ask)

Le 26 févr. 2017 13:53, "seenu.atluri" <se...@gmail.com> a écrit :

> When I removed endorsed folder, it is giving the exception
> "org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast
> to org.apache.xerces.xni.parser.XMLParserConfiguration"
>
> We added xerces to endorsed to fix this issue, i could get away with it now
> by specifying DocumentBuilderFactory and SAXParserFactory in
> system.properites files. So, endorsed is not required now. Still, we were
> getting the issue.
>
> Finally, I could find that this is issue with the permission of the user
> running tomcat. openenjb-javaagent does not seem to be working with the app
> user we have. When I run it with root, it is working fine. Looks like
> openejb-javaagent needs higher permission than my app user to work
> properly.
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681168.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
When I removed endorsed folder, it is giving the exception
"org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast
to org.apache.xerces.xni.parser.XMLParserConfiguration"

We added xerces to endorsed to fix this issue, i could get away with it now
by specifying DocumentBuilderFactory and SAXParserFactory in
system.properites files. So, endorsed is not required now. Still, we were
getting the issue.

Finally, I could find that this is issue with the permission of the user
running tomcat. openenjb-javaagent does not seem to be working with the app
user we have. When I run it with root, it is working fine. Looks like
openejb-javaagent needs higher permission than my app user to work properly.





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681168.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
What happens if you remove endorsed folder?

Le 25 févr. 2017 15:41, "seenu.atluri" <se...@gmail.com> a écrit :

> I renamed openejb-javaagent.jar in tomee/lib. Now, no javaagent added to
> JAVA_OPTS during server start. Still, I am getting Enhance subclass
> message.
> It means javaagent is not in effect in my Linux environment and openjpa is
> trying to enhance entities generated by openejb since those are not
> enhanced
> by javaagent and causing issues.
>
> What could be the reason, any guesses?
>
> Here is my process when it has javaagent added.
>
>  0 S ctsapp   21520 21519 99  85   0 - 690117 184466 06:15 ?       00:00:28
> /opt/cts/jdk8/bin/java -javaagent:/opt/cts/tomee/lib/openejb-javaagent.jar
> -Djdk.tls.ephemeralDHKeySize=2048
> -Djava.util.logging.config.file=/opt/cts/user_projects/
> tomee/nbms_domain/conf/logging.properties
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -agentlib:jdwp=transport=dt_socket,address=localhost:8000,
> server=y,suspend=n
> -Xms512m -Xmx1024m -XX:MaxPermSize=128M -Dsun.net.http.retryPost=false
> -Djava.endorsed.dirs=/opt/cts/tomee/endorsed -classpath
> /opt/cts/tomee/bin/bootstrap.jar:/opt/cts/tomee/bin/tomcat-juli.jar
> -Dcatalina.base=/opt/cts/user_projects/tomee/nbms_domain
> -Dcatalina.home=/opt/cts/tomee
> -Djava.io.tmpdir=/opt/cts/user_projects/tomee/nbms_domain/temp
> org.apache.catalina.startup.Bootstrap start
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681166.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
I renamed openejb-javaagent.jar in tomee/lib. Now, no javaagent added to
JAVA_OPTS during server start. Still, I am getting Enhance subclass message.
It means javaagent is not in effect in my Linux environment and openjpa is
trying to enhance entities generated by openejb since those are not enhanced
by javaagent and causing issues.

What could be the reason, any guesses? 

Here is my process when it has javaagent added.

 0 S ctsapp   21520 21519 99  85   0 - 690117 184466 06:15 ?       00:00:28
/opt/cts/jdk8/bin/java -javaagent:/opt/cts/tomee/lib/openejb-javaagent.jar
-Djdk.tls.ephemeralDHKeySize=2048
-Djava.util.logging.config.file=/opt/cts/user_projects/tomee/nbms_domain/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-agentlib:jdwp=transport=dt_socket,address=localhost:8000,server=y,suspend=n
-Xms512m -Xmx1024m -XX:MaxPermSize=128M -Dsun.net.http.retryPost=false
-Djava.endorsed.dirs=/opt/cts/tomee/endorsed -classpath
/opt/cts/tomee/bin/bootstrap.jar:/opt/cts/tomee/bin/tomcat-juli.jar
-Dcatalina.base=/opt/cts/user_projects/tomee/nbms_domain
-Dcatalina.home=/opt/cts/tomee
-Djava.io.tmpdir=/opt/cts/user_projects/tomee/nbms_domain/temp
org.apache.catalina.startup.Bootstrap start




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681166.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Catalina.sh is adding it to javaagent



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681165.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
can you check if you have it set as a javaagent (being at the classpath
doesnt guarantee it is used)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-24 18:13 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Yes, I have it in classpath. I did check it.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681163.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Yes, I have it in classpath. I did check it.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681163.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you check if you have openejb-javaagent? "Creating subclass" doesn't
confirm it is the case


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-24 17:09 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Sorry to keep you bugging Romain
>
> When we deploy it in another Linux environment similarly, we again got the
> same issue. Here is the exception.
>
> java.lang.IllegalStateException: No tx on thread
> Root analysis: java.lang.IllegalStateException: No tx on thread
>
> at
> com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.
> cloneFareTable(ManageFaretableVersionsAction.java:195)
> at
> com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.process(
> ManageFaretableVersionsAction.java:91)
> at
> com.cubic.cts.struts.faretable.BaseFareTableAction.
> process(BaseFareTableAction.java:30)
> at com.cubic.cts.struts.BaseAction.execute(BaseAction.java:162)
> at
> com.cubic.cts.struts.NCSActionServlet.access$101(NCSActionServlet.java:32)
> at com.cubic.cts.struts.NCSActionServlet$1.run(NCSActionServlet.java:101)
> StackTrace: java.lang.IllegalStateException: No tx on thread
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.
> getActiveTransactionImpl(TransactionManagerImpl.java:201)
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.
> getResource(TransactionManagerImpl.java:194)
> at
> org.apache.openejb.core.transaction.JtaTransactionPolicy.getResource(
> JtaTransactionPolicy.java:112)
> at
> org.apache.openejb.core.transaction.EjbTransactionUtil.afterInvoke(
> EjbTransactionUtil.java:80)
> at
> org.apache.openejb.core.stateless.StatelessContainer._
> invoke(StatelessContainer.java:255)
> at
> org.apache.openejb.core.stateless.StatelessContainer.
> invoke(StatelessContainer.java:203)
> at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.
> synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
> at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(
> EjbObjectProxyHandler.java:260)
> at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(
> EjbObjectProxyHandler.java:89)
> at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(
> BaseEjbProxyHandler.java:347)
> at com.sun.proxy.$Proxy348.getExtendedFareTable(Unknown Source)
> at
> com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.
> cloneFareTable(ManageFaretableVersionsAction.java:195)
> at
> com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.process(
> ManageFaretableVersionsAction.java:91)
> at
> com.cubic.cts.struts.faretable.BaseFareTableAction.
> process(BaseFareTableAction.java:30)
> at com.cubic.cts.struts.BaseAction.execute(BaseAction.java:162)
>
> We did exactly the same. But, one difference that we see during startup is,
> when we get the issue we are getting below message repeated number of
> times.
> In windows, we don't see " Enhance - Creating subclass for" message, but we
> see " Otherwise annotate them with @Transient." only once. I know it is
> very
> difficult to guess what is going on, but any suggestion from you will help
> us a lot. This is really frustrating us.
>
> 270 [WARN ] localhost-startStop-1 Enhance - Creating subclass for "[class
> openejb.com.cubic.cts.faretable.entity.FareLevelModeCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferChargeCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferRuleCMP, class
> openejb.com.cubic.cts.faretable.entity.ProcessingControlCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferControlsCMP, class
> openejb.com.cubic.cts.faretable.entity.UseChargeCMP, class
> openejb.com.cubic.cts.prepaidbenefits.entity.CustomerBenefitDefinitionCMP,
> class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.TransitFacility,
> class openejb.com.cubic.cts.faretable.entity.ValidOperatorCMP, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.Device, class
> openejb.com.cubic.cts.operationparams.entity.OpPublishConfigSet, class
> openejb.com.cubic.cts.faretable.entity.TravelSegmentCMP, class
> openejb.com.cubic.cts.faretable.entity.FareTableCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferChargeP2pCMP, class
> openejb.com.cubic.cts.faretable.entity.UseChargeP2pCMP, class
> openejb.com.cubic.cts.faretable.entity.PurchaseChargeCMP, class
> openejb.com.cubic.cts.env.settings.entity.NextfareSetting, class
> openejb.com.cubic.cts.transitappmgmt.entity.PhoneCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferFromStopPointCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpUpdateIndicator, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.ZonesCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpFacilityManifest, class
> openejb.com.cubic.cts.faretable.entity.TransactionControlCMP, class
> openejb.com.cubic.cts.faretable.entity.FareInstrumentCMP, class
> openejb.com.cubic.cts.faretable.entity.FareLevelCMP, class
> openejb.com.cubic.cts.faretable.entity.FareInstrumentGroupCMP, class
> openejb.com.cubic.cts.faretable.entity.PurchaseChargeZoneDistanceCMP,
> class
> openejb.com.cubic.cts.faretable.entity.FareInstrumentCategoryCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpCsSubset, class
> openejb.com.cubic.cts.faretable.entity.TransferToLineRouteCMP, class
> openejb.com.cubic.cts.faretable.entity.LampLitCMP, class
> openejb.com.cubic.cts.operationparams.entity.OperationalParamsType, class
> openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage, class
> openejb.com.cubic.cts.faretable.entity.MonetaryInstTypeCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpAssignment, class
> openejb.com.cubic.cts.faretable.entity.PurchaseControlsCMP, class
> openejb.com.cubic.cts.faretable.entity.BypassFareActionCMP, class
> openejb.com.cubic.cts.transitappmgmt.entity.FareMediaInventoryNotesCMP,
> class openejb.com.cubic.cts.faretable.entity.TransferUpgradeCMP, class
> openejb.com.cubic.cts.faretable.entity.TimePeriodCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferFareLevelCMP, class
> openejb.com.cubic.cts.faretable.entity.FareGroupCMP, class
> openejb.com.cubic.cts.bestfare.entity.Bestfare, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.DisplayResourceCMP,
> class openejb.com.cubic.cts.faretable.entity.ServiceTypeXTimeCMP, class
> openejb.com.cubic.cts.faretable.entity.ServiceTypeCMP, class
> openejb.com.cubic.cts.faretable.entity.FareInstrumentTypeCMP, class
> openejb.com.cubic.cts.tl.rule.DeviceXMLRepository, class
> openejb.com.cubic.cts.transitappmgmt.entity.AddressCMP, class
> openejb.com.cubic.cts.faretable.entity.FaretableXFareInstCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferToStopPointCMP, class
> openejb.com.cubic.cts.bestfare.entity.BestfarePricePoints, class
> openejb.com.cubic.cts.faretable.entity.TransferConditionCMP, class
> openejb.com.cubic.cts.faretable.entity.FareActionCMP, class
> openejb.com.cubic.cts.faretable.entity.KeyOperationCMP, class
> openejb.com.cubic.cts.faretable.entity.FareActionCodeCMP, class
> openejb.com.cubic.cts.prepaidbenefits.entity.MemberNotesCMP, class
> openejb.com.cubic.cts.faretable.entity.BonusSchemeCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpPublishEvent, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.SectorCMP, class
> openejb.com.cubic.cts.faretable.entity.UseControlsCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpConfigSet, class
> openejb.com.cubic.cts.transitappmgmt.entity.RiderClassificationCMP, class
> openejb.com.cubic.cts.security.ejb.entity.GlobalAccessParamCMP, class
> openejb.com.cubic.cts.faretable.entity.FareModeCMP, class
> openejb.com.cubic.cts.prepaidbenefits.entity.PpbMemberInfoVCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpPublishManifest, class
> openejb.com.cubic.cts.faretable.entity.FareEquipmentKeyCMP, class
> openejb.com.cubic.cts.operationparams.entity.DefaultPublishMessage, class
> openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipManifest, class
> openejb.com.cubic.cts.faretable.entity.DepositCMP, class
> openejb.com.cubic.cts.faremedia.entity.FareMediaStatusHistoryCMP, class
> openejb.com.cubic.cts.faretable.entity.UseChargeZoneDistanceCMP, class
> openejb.com.cubic.cts.faretable.entity.TimeCategoryCMP, class
> openejb.com.cubic.cts.faretable.entity.TransferChargeZoneDistanceCMP,
> class
> openejb.com.cubic.cts.faretable.entity.PurchaseControlValueSelectCMP,
> class
> openejb.com.cubic.cts.faretable.entity.PurchaseBonusCMP, class
> openejb.com.cubic.cts.faretable.entity.DayTypeCMP, class
> openejb.com.cubic.cts.faretable.entity.ValidAuthorityCMP, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.DeviceControlGroup,
> class openejb.com.cubic.cts.faretable.entity.UseRestrictionCMP, class
> openejb.com.cubic.cts.faretable.entity.TimePriorityCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpPublishSetXConfig, class
> openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipMessage, class
> openejb.com.cubic.cts.faretable.entity.PassTypeCMP, class
> openejb.com.cubic.cts.hotlist.entity.MagneticHotlistPending, class
> openejb.com.cubic.cts.faretable.entity.TransferCodeCMP, class
> openejb.com.cubic.cts.operationparams.sysconfig.entity.EventCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpConfigEntry, class
> openejb.com.cubic.cts.faretable.entity.TicketTypeCMP, class
> openejb.com.cubic.cts.operationparams.entity.OperationalParamsInstance,
> class openejb.com.cubic.cts.operationparams.sysconfig.entity.ScOperator,
> class openejb.com.cubic.cts.faretable.entity.NormalFareActionCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpExtDownloadData, class
> openejb.com.cubic.cts.faretable.entity.TransferFromLineRouteCMP, class
> openejb.com.cubic.cts.faretable.entity.PurchaseChargeP2pCMP, class
> openejb.com.cubic.cts.bus.entity.Bus, class
> openejb.com.cubic.cts.faretable.entity.TransferUpgradeMapCMP, class
> openejb.com.cubic.cts.operationparams.entity.OpPubSetXSoftwareMsg, class
> openejb.com.cubic.cts.hotlist.entity.FareMediaHotlistPending, class
> openejb.com.cubic.cts.operationparams.entity.OpDeviceHardwareManifest]".
> 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.
> 2017-02-24T05:10:17,348 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpPublishManifest.
> opNTCIPMessages"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,377 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage.
> OpPublishManifest_opNTCIPMessages"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,398 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpPublishConfigSet.
> opPublishSetXConfigs"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,405 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.
> OpPublishEvent.opAssignments"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,422 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpConfigSet.opConfigEntries"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,422 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpConfigSet.opCsSubsets" are
> not a default persistent type, and do not have any annotations indicating
> their persistence strategy. They will be treated as non-persistent. If you
> intended for these fields to be persistent, be sure to annotate them
> appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,427 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OperationalParamsInstance.
> OpConfigSet_opConfigEntries"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,438 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipManifest.
> opDeviceNtcipMessages"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:17,449 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.bestfare.entity.Bestfare.bestfarePricePoints" are
> not
> a default persistent type, and do not have any annotations indicating their
> persistence strategy. They will be treated as non-persistent. If you
> intended for these fields to be persistent, be sure to annotate them
> appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:20,167 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpPublishManifest.
> opNTCIPMessages"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
> 2017-02-24T05:10:20,169 [WARN ] localhost-startStop-1 Runtime - Fields
> "openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage.
> OpPublishManifest_opNTCIPMessages"
> are not a default persistent type, and do not have any annotations
> indicating their persistence strategy. They will be treated as
> non-persistent. If you intended for these fields to be persistent, be sure
> to annotate them appropriately. Otherwise annotate them with @Transient.
>
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681161.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Sorry to keep you bugging Romain

When we deploy it in another Linux environment similarly, we again got the
same issue. Here is the exception.

java.lang.IllegalStateException: No tx on thread
Root analysis: java.lang.IllegalStateException: No tx on thread

at
com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.cloneFareTable(ManageFaretableVersionsAction.java:195)
at
com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.process(ManageFaretableVersionsAction.java:91)
at
com.cubic.cts.struts.faretable.BaseFareTableAction.process(BaseFareTableAction.java:30)
at com.cubic.cts.struts.BaseAction.execute(BaseAction.java:162)
at
com.cubic.cts.struts.NCSActionServlet.access$101(NCSActionServlet.java:32)
at com.cubic.cts.struts.NCSActionServlet$1.run(NCSActionServlet.java:101)
StackTrace: java.lang.IllegalStateException: No tx on thread
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.getActiveTransactionImpl(TransactionManagerImpl.java:201)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.getResource(TransactionManagerImpl.java:194)
at
org.apache.openejb.core.transaction.JtaTransactionPolicy.getResource(JtaTransactionPolicy.java:112)
at
org.apache.openejb.core.transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:80)
at
org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:255)
at
org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:203)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:265)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:260)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:89)
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:347)
at com.sun.proxy.$Proxy348.getExtendedFareTable(Unknown Source)
at
com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.cloneFareTable(ManageFaretableVersionsAction.java:195)
at
com.cubic.cts.struts.faretable.ManageFaretableVersionsAction.process(ManageFaretableVersionsAction.java:91)
at
com.cubic.cts.struts.faretable.BaseFareTableAction.process(BaseFareTableAction.java:30)
at com.cubic.cts.struts.BaseAction.execute(BaseAction.java:162)

We did exactly the same. But, one difference that we see during startup is,
when we get the issue we are getting below message repeated number of times.
In windows, we don't see " Enhance - Creating subclass for" message, but we
see " Otherwise annotate them with @Transient." only once. I know it is very
difficult to guess what is going on, but any suggestion from you will help
us a lot. This is really frustrating us.

270 [WARN ] localhost-startStop-1 Enhance - Creating subclass for "[class
openejb.com.cubic.cts.faretable.entity.FareLevelModeCMP, class
openejb.com.cubic.cts.faretable.entity.TransferChargeCMP, class
openejb.com.cubic.cts.faretable.entity.TransferRuleCMP, class
openejb.com.cubic.cts.faretable.entity.ProcessingControlCMP, class
openejb.com.cubic.cts.faretable.entity.TransferControlsCMP, class
openejb.com.cubic.cts.faretable.entity.UseChargeCMP, class
openejb.com.cubic.cts.prepaidbenefits.entity.CustomerBenefitDefinitionCMP,
class
openejb.com.cubic.cts.operationparams.sysconfig.entity.TransitFacility,
class openejb.com.cubic.cts.faretable.entity.ValidOperatorCMP, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.Device, class
openejb.com.cubic.cts.operationparams.entity.OpPublishConfigSet, class
openejb.com.cubic.cts.faretable.entity.TravelSegmentCMP, class
openejb.com.cubic.cts.faretable.entity.FareTableCMP, class
openejb.com.cubic.cts.faretable.entity.TransferChargeP2pCMP, class
openejb.com.cubic.cts.faretable.entity.UseChargeP2pCMP, class
openejb.com.cubic.cts.faretable.entity.PurchaseChargeCMP, class
openejb.com.cubic.cts.env.settings.entity.NextfareSetting, class
openejb.com.cubic.cts.transitappmgmt.entity.PhoneCMP, class
openejb.com.cubic.cts.faretable.entity.TransferFromStopPointCMP, class
openejb.com.cubic.cts.operationparams.entity.OpUpdateIndicator, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.ZonesCMP, class
openejb.com.cubic.cts.operationparams.entity.OpFacilityManifest, class
openejb.com.cubic.cts.faretable.entity.TransactionControlCMP, class
openejb.com.cubic.cts.faretable.entity.FareInstrumentCMP, class
openejb.com.cubic.cts.faretable.entity.FareLevelCMP, class
openejb.com.cubic.cts.faretable.entity.FareInstrumentGroupCMP, class
openejb.com.cubic.cts.faretable.entity.PurchaseChargeZoneDistanceCMP, class
openejb.com.cubic.cts.faretable.entity.FareInstrumentCategoryCMP, class
openejb.com.cubic.cts.operationparams.entity.OpCsSubset, class
openejb.com.cubic.cts.faretable.entity.TransferToLineRouteCMP, class
openejb.com.cubic.cts.faretable.entity.LampLitCMP, class
openejb.com.cubic.cts.operationparams.entity.OperationalParamsType, class
openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage, class
openejb.com.cubic.cts.faretable.entity.MonetaryInstTypeCMP, class
openejb.com.cubic.cts.operationparams.entity.OpAssignment, class
openejb.com.cubic.cts.faretable.entity.PurchaseControlsCMP, class
openejb.com.cubic.cts.faretable.entity.BypassFareActionCMP, class
openejb.com.cubic.cts.transitappmgmt.entity.FareMediaInventoryNotesCMP,
class openejb.com.cubic.cts.faretable.entity.TransferUpgradeCMP, class
openejb.com.cubic.cts.faretable.entity.TimePeriodCMP, class
openejb.com.cubic.cts.faretable.entity.TransferFareLevelCMP, class
openejb.com.cubic.cts.faretable.entity.FareGroupCMP, class
openejb.com.cubic.cts.bestfare.entity.Bestfare, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.DisplayResourceCMP,
class openejb.com.cubic.cts.faretable.entity.ServiceTypeXTimeCMP, class
openejb.com.cubic.cts.faretable.entity.ServiceTypeCMP, class
openejb.com.cubic.cts.faretable.entity.FareInstrumentTypeCMP, class
openejb.com.cubic.cts.tl.rule.DeviceXMLRepository, class
openejb.com.cubic.cts.transitappmgmt.entity.AddressCMP, class
openejb.com.cubic.cts.faretable.entity.FaretableXFareInstCMP, class
openejb.com.cubic.cts.faretable.entity.TransferToStopPointCMP, class
openejb.com.cubic.cts.bestfare.entity.BestfarePricePoints, class
openejb.com.cubic.cts.faretable.entity.TransferConditionCMP, class
openejb.com.cubic.cts.faretable.entity.FareActionCMP, class
openejb.com.cubic.cts.faretable.entity.KeyOperationCMP, class
openejb.com.cubic.cts.faretable.entity.FareActionCodeCMP, class
openejb.com.cubic.cts.prepaidbenefits.entity.MemberNotesCMP, class
openejb.com.cubic.cts.faretable.entity.BonusSchemeCMP, class
openejb.com.cubic.cts.operationparams.entity.OpPublishEvent, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.SectorCMP, class
openejb.com.cubic.cts.faretable.entity.UseControlsCMP, class
openejb.com.cubic.cts.operationparams.entity.OpConfigSet, class
openejb.com.cubic.cts.transitappmgmt.entity.RiderClassificationCMP, class
openejb.com.cubic.cts.security.ejb.entity.GlobalAccessParamCMP, class
openejb.com.cubic.cts.faretable.entity.FareModeCMP, class
openejb.com.cubic.cts.prepaidbenefits.entity.PpbMemberInfoVCMP, class
openejb.com.cubic.cts.operationparams.entity.OpPublishManifest, class
openejb.com.cubic.cts.faretable.entity.FareEquipmentKeyCMP, class
openejb.com.cubic.cts.operationparams.entity.DefaultPublishMessage, class
openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipManifest, class
openejb.com.cubic.cts.faretable.entity.DepositCMP, class
openejb.com.cubic.cts.faremedia.entity.FareMediaStatusHistoryCMP, class
openejb.com.cubic.cts.faretable.entity.UseChargeZoneDistanceCMP, class
openejb.com.cubic.cts.faretable.entity.TimeCategoryCMP, class
openejb.com.cubic.cts.faretable.entity.TransferChargeZoneDistanceCMP, class
openejb.com.cubic.cts.faretable.entity.PurchaseControlValueSelectCMP, class
openejb.com.cubic.cts.faretable.entity.PurchaseBonusCMP, class
openejb.com.cubic.cts.faretable.entity.DayTypeCMP, class
openejb.com.cubic.cts.faretable.entity.ValidAuthorityCMP, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.DeviceControlGroup,
class openejb.com.cubic.cts.faretable.entity.UseRestrictionCMP, class
openejb.com.cubic.cts.faretable.entity.TimePriorityCMP, class
openejb.com.cubic.cts.operationparams.entity.OpPublishSetXConfig, class
openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipMessage, class
openejb.com.cubic.cts.faretable.entity.PassTypeCMP, class
openejb.com.cubic.cts.hotlist.entity.MagneticHotlistPending, class
openejb.com.cubic.cts.faretable.entity.TransferCodeCMP, class
openejb.com.cubic.cts.operationparams.sysconfig.entity.EventCMP, class
openejb.com.cubic.cts.operationparams.entity.OpConfigEntry, class
openejb.com.cubic.cts.faretable.entity.TicketTypeCMP, class
openejb.com.cubic.cts.operationparams.entity.OperationalParamsInstance,
class openejb.com.cubic.cts.operationparams.sysconfig.entity.ScOperator,
class openejb.com.cubic.cts.faretable.entity.NormalFareActionCMP, class
openejb.com.cubic.cts.operationparams.entity.OpExtDownloadData, class
openejb.com.cubic.cts.faretable.entity.TransferFromLineRouteCMP, class
openejb.com.cubic.cts.faretable.entity.PurchaseChargeP2pCMP, class
openejb.com.cubic.cts.bus.entity.Bus, class
openejb.com.cubic.cts.faretable.entity.TransferUpgradeMapCMP, class
openejb.com.cubic.cts.operationparams.entity.OpPubSetXSoftwareMsg, class
openejb.com.cubic.cts.hotlist.entity.FareMediaHotlistPending, class
openejb.com.cubic.cts.operationparams.entity.OpDeviceHardwareManifest]".
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.
2017-02-24T05:10:17,348 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpPublishManifest.opNTCIPMessages"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,377 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage.OpPublishManifest_opNTCIPMessages"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,398 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpPublishConfigSet.opPublishSetXConfigs"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,405 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpPublishEvent.opAssignments"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,422 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpConfigSet.opConfigEntries"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,422 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpConfigSet.opCsSubsets" are
not a default persistent type, and do not have any annotations indicating
their persistence strategy. They will be treated as non-persistent. If you
intended for these fields to be persistent, be sure to annotate them
appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,427 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OperationalParamsInstance.OpConfigSet_opConfigEntries"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,438 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpDeviceNtcipManifest.opDeviceNtcipMessages"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:17,449 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.bestfare.entity.Bestfare.bestfarePricePoints" are not
a default persistent type, and do not have any annotations indicating their
persistence strategy. They will be treated as non-persistent. If you
intended for these fields to be persistent, be sure to annotate them
appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:20,167 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpPublishManifest.opNTCIPMessages"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.
2017-02-24T05:10:20,169 [WARN ] localhost-startStop-1 Runtime - Fields
"openejb.com.cubic.cts.operationparams.entity.OpNTCIPMessage.OpPublishManifest_opNTCIPMessages"
are not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be sure
to annotate them appropriately. Otherwise annotate them with @Transient.






--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681161.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm

xerces is know has impacting and useless these days, others shouldnt be
modified compared to a plain tomee instance - we do it for you.


Le 23 févr. 2017 20:04, "seenu.atluri" <se...@gmail.com> a écrit :

> Thank you Romain
>
> When we look at it closely, our catilina.bat is customized to have endorsed
> directory, but not catalina.sh.
> Here are the list of jars we have in endorsed.
>
> annotation-api.jar
> jaxb-api.jar
> xercesImpl.jar
> xercesImpl-2.9.0.jar
>
> Don't like the fact that these 4 jars could impact the application this
> way.
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681147.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Thank you Romain

When we look at it closely, our catilina.bat is customized to have endorsed
directory, but not catalina.sh.
Here are the list of jars we have in endorsed.

annotation-api.jar
jaxb-api.jar
xercesImpl.jar
xercesImpl-2.9.0.jar

Don't like the fact that these 4 jars could impact the application this way.

Thanks & Regards,
Srinivas Atluri.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681147.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
do you launch it the same way? openejb-javaagent is there in all cases?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-23 16:00 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Yes Romain.
>
> Not only this we are seeing one more issue. In windows "fetch=EAGER" on
> one-to-many is working fine. When the same is deployed in Unix/Linux we are
> getting below exception. I googled it, there are posts discussing about
> Eager fetch is not supported when
> "openjpa.RuntimeUnenhancedClasses=supported". Looks like TomEE set it to
> supported by default, but wondering why we are not seeing this issue in
> windows.
>
> You had helped us a lot during this migration process. We tested
> application
> in Windows locally,but when it is being tested in integration environment
> on
> linux we are seeing all these issues. your help in this regard is highly
> appreciated.
>
>
> Caused by:
> org.apache.openejb.core.transaction.TransactionRolledbackException: The
> transaction has been marked rollback only because the bean encountered a
> non-application exception
> :org.apache.openjpa.persistence.PersistenceException : null
>         at
> org.apache.openejb.core.transaction.EjbTransactionUtil.
> handleSystemException(EjbTransactionUtil.java:151)
> [openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.cmp.CmpContainer.findEJBObject(
> CmpContainer.java:750)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at org.apache.openejb.core.cmp.CmpContainer.invoke(
> CmpContainer.java:271)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.entity.EntityEjbHomeHandler.
> findX(EntityEjbHomeHandler.java:65)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(
> EjbHomeProxyHandler.java:199)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         ... 68 more
> Caused by: org.apache.openjpa.persistence.PersistenceException
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1029)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:928)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> JDBCStoreManager.java:1032)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.jdbc.sql.AbstractResult.load(
> AbstractResult.java:280)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(
> SelectImpl.java:2382)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.jdbc.sql.AbstractResult.load(
> AbstractResult.java:274)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.
> getResultObject(InstanceResultObjectProvider.java:59)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:35)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.
> java:1257)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.
> java:1013)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:800)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.kernel.DelegatingQuery.execute(
> DelegatingQuery.java:541)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.persistence.QueryImpl.execute(
> QueryImpl.java:274)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:290)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openejb.core.cmp.jpa.JpaCmpEngine.executeSelectQuery(
> JpaCmpEngine.java:280)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.cmp.jpa.JpaCmpEngine.queryBeans(
> JpaCmpEngine.java:234)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.cmp.CmpContainer.findEJBObject(
> CmpContainer.java:702)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at org.apache.openejb.core.cmp.CmpContainer.invoke(
> CmpContainer.java:271)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.entity.EntityEjbHomeHandler.
> findX(EntityEjbHomeHandler.java:65)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(
> EjbHomeProxyHandler.java:199)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         ... 68 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(
> JDBCStoreManager.java:452)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(
> JDBCStoreManager.java:412)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.
> initialize(JDBCStoreManager.java:305)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> DelegatingStoreManager.java:112)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.kernel.ROPStoreManager.initialize(
> ROPStoreManager.java:57)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.BrokerImpl.initialize(
> BrokerImpl.java:1048)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1006)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:928)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> JDBCStoreManager.java:1032)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.jdbc.sql.AbstractResult.load(
> AbstractResult.java:280)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(
> SelectImpl.java:2382)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.jdbc.sql.AbstractResult.load(
> AbstractResult.java:274)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.
> getResultObject(InstanceResultObjectProvider.java:59)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:35)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.
> java:1257)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.
> java:1013)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:800)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.kernel.DelegatingQuery.execute(
> DelegatingQuery.java:541)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at org.apache.openjpa.persistence.QueryImpl.execute(
> QueryImpl.java:274)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:290)
> ~[openjpa-2.4.1.jar:2.4.1]
>         at
> org.apache.openejb.core.cmp.jpa.JpaCmpEngine.executeSelectQuery(
> JpaCmpEngine.java:280)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.cmp.jpa.JpaCmpEngine.queryBeans(
> JpaCmpEngine.java:234)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.cmp.CmpContainer.findEJBObject(
> CmpContainer.java:702)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at org.apache.openejb.core.cmp.CmpContainer.invoke(
> CmpContainer.java:271)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.entity.EntityEjbHomeHandler.
> findX(EntityEjbHomeHandler.java:65)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         at
> org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(
> EjbHomeProxyHandler.java:199)
> ~[openejb-core-7.0.1.jar:7.0.1]
>         ... 68 more
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136p4681143.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: CMP2 enitity get is making update query in Linux environment

Posted by "seenu.atluri" <se...@gmail.com>.
Yes Romain.

Not only this we are seeing one more issue. In windows "fetch=EAGER" on
one-to-many is working fine. When the same is deployed in Unix/Linux we are
getting below exception. I googled it, there are posts discussing about
Eager fetch is not supported when
"openjpa.RuntimeUnenhancedClasses=supported". Looks like TomEE set it to
supported by default, but wondering why we are not seeing this issue in
windows.

You had helped us a lot during this migration process. We tested application
in Windows locally,but when it is being tested in integration environment on
linux we are seeing all these issues. your help in this regard is highly
appreciated.


Caused by:
org.apache.openejb.core.transaction.TransactionRolledbackException: The
transaction has been marked rollback only because the bean encountered a
non-application exception
:org.apache.openjpa.persistence.PersistenceException : null
	at
org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException(EjbTransactionUtil.java:151)
[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.cmp.CmpContainer.findEJBObject(CmpContainer.java:750)
~[openejb-core-7.0.1.jar:7.0.1]
	at org.apache.openejb.core.cmp.CmpContainer.invoke(CmpContainer.java:271)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:65)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:199)
~[openejb-core-7.0.1.jar:7.0.1]
	... 68 more
Caused by: org.apache.openjpa.persistence.PersistenceException
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1029)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:928)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1032)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2382)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:274)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:35)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1257)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1013)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:800)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:541)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:290)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openejb.core.cmp.jpa.JpaCmpEngine.executeSelectQuery(JpaCmpEngine.java:280)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.cmp.jpa.JpaCmpEngine.queryBeans(JpaCmpEngine.java:234)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.cmp.CmpContainer.findEJBObject(CmpContainer.java:702)
~[openejb-core-7.0.1.jar:7.0.1]
	at org.apache.openejb.core.cmp.CmpContainer.invoke(CmpContainer.java:271)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:65)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:199)
~[openejb-core-7.0.1.jar:7.0.1]
	... 68 more
Caused by: java.lang.NullPointerException
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setInverseRelation(JDBCStoreManager.java:452)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:412)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:305)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1048)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1006)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:928)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1032)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2382)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:274)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:35)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1257)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1013)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:869)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:800)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:541)
~[openjpa-2.4.1.jar:2.4.1]
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:290)
~[openjpa-2.4.1.jar:2.4.1]
	at
org.apache.openejb.core.cmp.jpa.JpaCmpEngine.executeSelectQuery(JpaCmpEngine.java:280)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.cmp.jpa.JpaCmpEngine.queryBeans(JpaCmpEngine.java:234)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.cmp.CmpContainer.findEJBObject(CmpContainer.java:702)
~[openejb-core-7.0.1.jar:7.0.1]
	at org.apache.openejb.core.cmp.CmpContainer.invoke(CmpContainer.java:271)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:65)
~[openejb-core-7.0.1.jar:7.0.1]
	at
org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:199)
~[openejb-core-7.0.1.jar:7.0.1]
	... 68 more



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-Linux-environment-tp4681136p4681143.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: CMP2 enitity get is making update query in Linux environment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

did you ensure you have the exact same database and datasource
configuration on both OS?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-02-23 7:33 GMT+01:00 seenu.atluri <se...@gmail.com>:

> Hi,
>
> We have legacy application with bunch of CMP2 beans migrated to TomEE from
> Weblogic. We have a getEntity business methods in SSB which are running in
> transaction. During transaction commit, OpenJPA is making update query with
> no values changed for all child entities (one-to-many relationship)
> although
> there is no change to the entity. This making the process too slow and
> leading transaction time-out sometimes. Obviously, Session cache is
> expected
> to hold these entities and make db hit only if the child entities are
> changed, not always.
>
> We see this behavior only in Unix, not in Windows environment. Does anybody
> experience this problem?
> Would appreciate your help.
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/CMP2-enitity-get-is-making-update-query-in-
> Linux-environment-tp4681136.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>