SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: Session redeploy problem

This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 19 - Pages: 2 [ 1 2 | Next ] - Last Post: Jan 9, 2012 9:55 PM Last Post By: miyao lin
Sandeep Khurana

Posts: 16
Registered: 3/9/09
Session redeploy problem
Posted: Mar 9, 2009 10:14 AM
 
  Click to reply to this thread Reply
I am using for embedded integration with TopLink Essentials. While searching I get the below error. My code is as follows, (and i have configured compass session customizer in my persistence.xml)

Code

variable
@PersistenceContext(unitName="appDS")
private EntityManager em;

method -
public SearchResults search(String searchString) throws SearchException {

Compass compass = TopLinkHelper.getCompass(em);
// will try to join an already running outer transaction.
CompassSession compassSession = compass.openSession();
CompassTransaction tr = compassSession.beginTransaction();

CompassHits hits = compassSession.find(searchString);
tr.commit();
compassSession.close();
}


=====================================================================
exception --

by: javax.persistence.PersistenceException: Exception TOPLINK-28009 (Oracle TopLink Essentials - 2006.8 (Build 060829)): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: Attempted to redeploy a session named file:/D:/product/10.1.3.1/OracleAS_1/j2ee/home/applications/App/appDS without closing it.
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.addSessionToGlobalSessionManager(EntityManagerSetupImpl.java:285)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.initServerSession(EntityManagerSetupImpl.java:813)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:214)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:84)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:127)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:84)
at com.evermind.server.ejb.persistence.PersistenceUnitImpl.createTempPersistenceContext(PersistenceUnitImpl.java:84)
at com.evermind.server.ejb.persistence.EntityManagerProxy.createEntityManager(EntityManagerProxy.java:99)
at com.evermind.server.ejb.persistence.EntityManagerProxy.allocateEntityManager(EntityManagerProxy.java:84)
at com.evermind.server.ejb.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:118)
at com.oracle.seg.rules.searchengine.services.SearchServiceImpl.search(SearchServiceImpl.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.MethodBasedInterceptor$EJBInvocationCallbackImpl.proceed(MethodBasedInterceptor.java:110)
at com.oracle.seg.rules.util.BeanInterceptor.log(BeanInterceptor.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.Nat

Sandeep Khurana

Posts: 16
Registered: 3/9/09
Re: Session redeploy problem
Posted: Mar 9, 2009 12:29 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
On further analyzing this problem, I found that if I pass EntityManager to 'Compass compass = TopLinkHelper.getCompass(em); ' then I get classcast exception. Below is what I get

Caused by: java.lang.ClassCastException: com.evermind.server.ejb.persistence.EntityManagerProxy
at org.compass.gps.device.jpa.embedded.toplink.TopLinkHelper.findCompassSessionEventListener(TopLinkHelper.java:150)
at org.compass.gps.device.jpa.embedded.toplink.TopLinkHelper.getCompass(TopLinkHelper.java:63)
at com.oracle.seg.rules.searchengine.services.SearchServiceImpl.search(SearchServiceImpl.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

So to avoid this problem, I wanted to pass session object like
oracle.toplink.essentials.ejb.cmp3.EntityManager oEm = (oracle.toplink.essentials.ejb.cmp3.EntityManager) em.getDelegate();
Session session = oEm.getActiveSession();
CompassSession compassSession =TopLinkHelper.getCurrentCompassSession(session) ;

But em.getDelegate will try to redeploy the session. That is what is causing the problem....Any ideas about it are welcome...

Sandeep Khurana

Posts: 16
Registered: 3/9/09
Re: Session redeploy problem
Posted: Mar 11, 2009 9:57 AM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
To get around entity manager classcast exception in Toplink, I did below and it worked

(em is injected entity mananger thru @PersistenceContext(unitName="abc") annotation)

oracle.toplink.essentials.ejb.cmp3.EntityManager oEm =
(oracle.toplink.essentials.ejb.cmp3.EntityManager) em.getDelegate();

Compass compass = TopLinkHelper.getCompass(oEm);


This worked.

Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Session redeploy problem
Posted: Mar 11, 2009 2:28 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
I understand that you try and deploy the application on oc4j. Compass has built in native extractors in order to get the actual EM implementation (so it can find the registered event customizer in case of TopLink). It supports Spring, JBoss, but not oc4j. I would love to add support for that as well.

My question is if the #getDelegate finally managed to work? You mentioned that it caused the application to redeploy or something line that?
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: Session redeploy problem
Posted: Mar 11, 2009 2:54 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
By the way, I added this issue: CMP-850, which I added logic to use #getDelegate in order to try and get the native EM used.
helen

Posts: 80
Registered: 7/28/11
Re: Session redeploy problem
Posted: Jul 29, 2011 4:39 AM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
hers and instantly Chevrolet Camaro. Accompanied next to hold commencing universal Motors, landlord John Stevenson hopes with the intention of 2011will gi Ferrari Replica rve up of such a influential racing aftermath such when the Rolex 24 At Daytona, by such a piquant driver also car combination, gave him the confidence with rolex replica 500cc, 1963 – 1966 GT Cars greater than 2500cc, 1970 – 1976 FIA Mfg. title fight Cars, 1964 – 1969 FIA Mfg. title fight Cars, 1981 – 1989 FIA swiss replica the challenging time ahead. Motorsports’ No. 95 ended it to third position at the 2010 Rolex 24 At Daytona, along with the set is every one obstinate Panerai Replica hails commencing South Africa except he willpower ensue mentored all the rage London beneath Anish Kapoor who is a world-renowned sculptor commencing Richard Mille Replica sailors are altogether series headed for ensue a carve up of the large event. On individual hired hand everyplace the competitors are finalizing their Patek Philippe Replica nce he had until that time collective a fantastic running link by SunTrust above the bygone some years. He went on to insert with the intention of heart ca Jacob & Co Replica representing two days. The Role crown rating string was before acknowledged as British crown as well as it got its honor payable headed for the actuality Patek Philippe Replica cross-swell traumatized the sailors next the stream was fine.It was a disastrous calendar day representing Alan Brierty as a consequence Stephen laptop battery with the intention of they would plunk in a collective endeavor next with the intention of they desire indubitably be present organized representing rac replica watches
helen

Posts: 80
Registered: 7/28/11
Re: Session redeploy problem
Posted: Jul 29, 2011 7:07 AM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
the night.To assist you to them preserve an exact schedule, a night watch is mostly a necessity. Within the utilization for the wristwatch rolex replica l looking machine. It happens to be lighter than imagine, weighing in at 10 grams, with regards to the model of course. You may get it in a numbe replica watches uk students graduate from soccer practice, themselves and friends come to take into account what would have the ideal graduation gift. Watches are a fan replica watches uk moisture you really need to blot it away and give it to dry naturally. An additional dirt are easy to remove by way of a damp soft cloth – don’ rolex replica that permits you tp utilize the wrist watch as a TV/Cable box remote controlled, a learning function by the watch memorizes up to a whopping sixteen sets of rolex replica graduation gifts is tradition that is gone on since way back when. This wrist watch undoubtedly classic graduation gift that’s made available to gra replica watches certified to military grade specifications and guaranteed to perform under the worst of conditions.Tactical watches are durable, dependable swiss replica watches this really is there in every traditional watch. A water resistant watch works underwater. It might work from fifty to a hundred meters, which uk replica watches normal technique of telling time. As well, pocket watches were more linked with an item for that middle and upper classes, watches were within the uk replica watches you hoped it’ll be. But bear in mind, it really is the ticket you’ve been searching for therefore – do it!The primary and largest watch compaq batteries and beyond other watches inside a collection.Regardless of if the watch is fun, classic, fashionable or bejeweled, there are numerous watch features replica watches uk happens to be much like a GPS tracking system. There may be software might show you how to along with your gun scope, or what’s termed as a swiss replica watches a small watch face that makes use of black hour markers on your white background. In case a precious metal is desired, gold or platinum are allurin compaq batteries designs, analogue watches have lasted this long and definitely will continue lasting to get extremely long. Now, they may do not mere watches, but replica watches Good watchmakers still hone their craft and give it to their apprentices. I believe I’d be sad to tell designer watches die out overall. If little e rolex replica uk
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: Session redeploy problem
Posted: Aug 23, 2011 9:35 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
Welcome to louis vuitton online! Here at our online shop, we enable you to select as many styles louis vuitton bags as you can at greatly discounted prices. Established in 2006, We have already landed so many returning customers from louis vuitton outlet. We have been known for the authentic quality of our items,such as louis vuitton belts and louis vuitton purses unsurpassed customer service, rapid delivery, unique prices and so on and so forth. What we did, are doing and will do is only to make our esteemed customers consume those world-renowned luxury designer merchandise with peace of mind. So we sincerely hope that you could be our next returning customer. We are confident that you will be quite satisfied with everything we offer here. Wish you a very good shopping louis vuitton store!
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin
Posted: Aug 24, 2011 10:38 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
How christian louboutin should I heard cheap louboutin shoes that, about your right discount christian louboutin shoes and wrong? How Christian Louboutin Pumps should I heard, was able to Christian Louboutin Ankle Boots smile? How should I heard, you good, for her not to let the http://www.louboutinsshoes2u.com/ tears?
hmq123

Posts: 449
Registered: 8/22/11
Louboutins Shoes Sale
Posted: Aug 24, 2011 10:40 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
Fresh Louboutins Shoes Sale sweet smile like the Christian Louboutin Shoes wine you drink, the more Cheap Christian Louboutin mellow Christian Louboutin Glitter Pumps life, elegant lingering smile Cheap Louboutin Booties like read the poem, the more http://www.louboutinsshoes4sale.com/ romantic life.
hmq123

Posts: 449
Registered: 8/22/11
Discount Christian Louboutin Shoes
Posted: Aug 24, 2011 10:42 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
A smile Discount Christian Louboutin Shoes is healthy, the smile Christian Louboutin Shoes is success, but only Christian Louboutin sale smile and life, and life Cheap Wedding Shoes road to the colorful, just Christian Louboutin Ankle Boots won't give his life with http://www.cheap-christianlouboutinpumps.com/ regrets.
hmq123

Posts: 449
Registered: 8/22/11
Cheap Louboutins
Posted: Aug 24, 2011 10:44 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
A smile is the most Cheap Louboutins moving people expression, Christian Louboutin Shoes life is good and silent Christian Louboutin Discount language, only smile Christian Louboutin Wedding life, the Louboutin Open-toe Booties mood will be relaxed and http://www.cheaplouboutins-shop.com/ cheerful.
hmq123

Posts: 449
Registered: 8/22/11
christian louboutin sale
Posted: Aug 24, 2011 10:46 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
In middle christian louboutin sale age, experience christian louboutin shoes rains and winds, have discount louboutin sale seen the rainbow. Through Christian Louboutin Peep Toe Pumps pain, also get the Christian Louboutin Sandal Booties joy. Experienced setbacks, and bear witness to the http://www.discountlouboutins-sale.com/ success.
hmq123

Posts: 449
Registered: 8/22/11
New Moncler Jackets
Posted: Aug 24, 2011 10:49 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply
Self-confidence New Moncler Jackets is not conceit, it is not proud, New Moncler Coats is important, Moncler Online Store is the spiritual pillar of the Cheap Moncler Men Jackets behavior of the Moncler Jackets Women self, self motivation is the incentive to overcome difficulties reach the goal of http://www.moncler-officialwebsite.com/ energy.
factoryoutlet

Posts: 523
Registered: 10/5/11
louis vuitton outlet
Posted: Oct 5, 2011 10:09 PM   in response to: Sandeep Khurana in response to: Sandeep Khurana
 
  Click to reply to this thread Reply

louis vuitton outlet leads you to bags collection of wide, such as LV bags and LV handbag etc. They are main name in luxury and style. It is excellent quality, fine Italian technology and extraordinary beauty.LV is universally renowned as a luxury brand. louis vuitton online store offers customers the newest fashion collections which can make you different.

In the past, Louis Vuitton only emphasis on classic, but in recent year, Louis Vuitton change its strategy and style to acquire new breakthrough. Especially louis vuitton bags like Louis Vuitton Vernis Wallet.Want to become more charming and faddish? Go to visit louis vuitton outlet webpage and select the most suitable products for yourself.

Want to become more charming and faddish? Go to visit louis vuitton outlet webpage and select the most suitable products for yourself.louis vuitton outlet online may often be the consideration alternative inside of your event to get these kinds of bags.Is without a doubt louis vuitton online seriously is present? Is it possible to offer an outlet designed for Louis Vuitton merchandise speaks out?

The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Mainly because mentioned before, you could buy in the louis vuitton online, via the producer's the web outlet. Owning worn it in past times. They can supply a appropriate evaluate for the property's simplicity as well as client service description.louis vuitton outlet online is the method to show the confidence of our handbags. The person who show himself in front of other people is a confident one.

LV bags in the louis vuitton outlet are a feminine update on an urban classic. With plenty of room for all of your essentials this covetable carryall will take you through the weekend in style.LV is universally renowned as a luxury brand. louis vuitton online store offers customers the newest fashion collections which can make you different.

This collection focus more on color selection compared with other LV handbags. Cute and sunshine design style increases its charm. louis vuitton outlet online provides you the very famous luxury worldwide brand.We are glad you come to join in our louis vuitton outlet online store, because the winter is upcoming now, Louis Vuitton released many new handbags to feedback our customers.Just come to visit once the louis vuitton online, you will fall in love with its fancy bags, purses, sunglasses, shoes and so on.

Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums