I was unable to implement 2nd approach from link above. 3rd approach gives the same exception org.apache.openjpa.persistence.PersistenceProviderImpl cannot be cast to javax.persistence.spi.PersistenceProvider.
I will try to resolve this issue. On Wed, Aug 10, 2011 at 19:00, Alexei Fedotov <[email protected]>wrote: > Trying to reproduce this. > -- > With best regards / с наилучшими пожеланиями, > Alexei Fedotov / Алексей Федотов, > http://dataved.ru/ > +7 916 562 8095 > > > > > On Wed, Aug 10, 2011 at 1:55 AM, [email protected] > <[email protected]> wrote: > > ++ you might check the latest red5. Maybe that one already uses a > different > > j2ee-x.jar > > > > Sebastian > > > > 2011/8/9 [email protected] <[email protected]> > >> > >> Okay I see, > >> > >> those are some internals that we have not so much control about. > >> Stupid question: openjpa-all-2.1.0.jar, do we need the *ALL-Jar* are > there > >> some "fine-granular"ed JARs? That might help to identify the conflict > >> better. > >> > >> Have you check what version of the interface PersistanceProvider our > >> openJPA version uses? Maybe we can downgrade openJPA to a version that > is > >> compatible with the one from the red5-lib? > >> > >> For the moment maybe you might try the quick and dirty fix and we review > >> this part again. > >> > >> The docs say > >> > >> > http://static.springsource.org/spring/docs/3.0.x/reference/orm.html#orm-jpa > >> > >> *The Spring JPA support offers three ways of setting up the JPA > >> EntityManagerFactory that will be used by the application to obtain an > >> entity manager.* > >> > >> So there must be at least two other ways that we might try too. > >> > >> Sebastian > >> > >> > >> > >> 2011/8/9 Maxim Solodovnik <[email protected]> > >>> > >>> I need this for string+openJPA integration > >>> I add following red5-applicationContext.xml > >>> <?xml version="1.0" encoding="UTF-8"?> > >>> <beans xmlns="http://www.springframework.org/schema/beans" > >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>> xmlns:mvc="http://www.springframework.org/schema/mvc" > >>> xsi:schemaLocation="http://www.springframework.org/schema/beans > >>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > >>> http://www.springframework.org/schema/mvc > >>> http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd" > >>> > > >>> <bean id="entityManagerFactory" > >>> class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"> > >>> <property name="persistenceUnitName" value="openmeetings" /> > >>> </bean> > >>> <bean id="transactionManager" > >>> class="org.springframework.orm.jpa.JpaTransactionManager"> > >>> <property name="entityManagerFactory" ref="entityManagerFactory" /> > >>> </bean> > >>> <bean > >>> > class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" > >>> /> > >>> <bean class="org.springframework.orm.jpa.JpaTransactionManager"> > >>> <property name="entityManagerFactory" ref="entityManagerFactory" /> > >>> </bean> > >>> <bean id="daoTransaction" > >>> class="org.openmeetings.app.persistence.utils.DAOTransaction"/> > >>> </beans> > >>> and get following log: > >>> > >>> [INFO] [Launcher:/openmeetings] > >>> org.springframework.orm.jpa.LocalEntityManagerFactoryBean - Building > JPA > >>> EntityManagerFactory for > >>> persistence unit 'openmeetings' > >>> [INFO] [Launcher:/openmeetings] > >>> org.springframework.beans.factory.support.DefaultListableBeanFactory - > >>> Destroying singletons in or > >>> > >>> > g.springframework.beans.factory.support.DefaultListableBeanFactory@3c4178d0 > : > >>> defining beans [entityManagerFactory,transactionManag > >>> > >>> > er,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,org.springframework.orm.jpa.JpaTransactionManager# > >>> > >>> > 0,daoTransaction,placeholderConfig,web.context,web.scope,web.handler,openmeetings.ClientListManager,openmeetings.EmoticonsManager, > >>> > >>> > openmeetings.WhiteBoardObjectListManager,openmeetings.WhiteBoardObjectListManagerById,appointmentcategoryservice.service,appointme > >>> > >>> > ntreminderservice.service,calendarservice.service,meetingmemberservice.service,fileservice.service,openmeetings.FileProcessor,open > >>> > >>> > meetings.FlvExplorerConverter,openmeetings.FileExplorerItemDaoImpl,conferenceservice.service,openmeetings.Roommanagement,userservi > >>> > >>> > ce.service,openmeetings.UsersDaoImpl,organisationservice.service,configservice.service,openmeetings.Configurationmanagement,errors > >>> > >>> > ervice.service,pollservice.service,xmlcrm.service,languageservice.service,chatservice.service,streamservice.service,invitationserv > >>> > >>> > ice.service,whiteboardservice.service,printservice.service,flvrecorderservice.service,openmeetings.FlvRecordingDaoImpl,openmeeting > >>> > >>> > s.FlvRecordingMetaDataDaoImpl,openmeetings.FlvRecordingLogDaoImpl,openmeetings.FlvRecordingMetaDeltaDaoImpl,openmeetings.TaskExecu > >>> > >>> > tor,openmeetings.FlvRecorderConverterTask,openmeetings.FlvInterviewConverterTask,openmeetings.FlvInterviewReConverterTask,openmeet > >>> > >>> > ings.FlvInterviewConverter,openmeetings.FlvRecorderConverter,openmeetings.FlvInterviewReConverter,ldapconfigservice.service,openme > >>> etings.LdapConfigDaoImpl]; parent: > >>> > org.springframework.beans.factory.support.DefaultListableBeanFactory@2ff1f38e > >>> Exception in thread "Launcher:/openmeetings" > >>> org.springframework.beans.factory.BeanCreationException: Error creating > bean > >>> with nam > >>> e 'entityManagerFactory' defined in ServletContext resource > >>> [/WEB-INF/red5-applicationContext.xml]: Invocation of init method fail > >>> ed; nested exception is javax.persistence.PersistenceException: The > >>> instance of the object with the class name 'org.apache.openjpa > >>> .persistence.PersistenceProviderImpl' in the ClassLoader > >>> 'WebappClassLoader > >>> delegate: false > >>> repositories: > >>> /WEB-INF/classes/ > >>> ----------> Parent Classloader: > >>> java.net.URLClassLoader@60750159 > >>> ' is not an instance of PersistenceProvider interface. > >>> at > >>> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBean > >>> Factory.java:1401) > >>> at > >>> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFa > >>> ctory.java:512) > >>> at > >>> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFact > >>> ory.java:450) > >>> at > >>> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290) > >>> at > >>> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:2 > >>> 22) > >>> at > >>> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287) > >>> at > >>> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189) > >>> at > >>> > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactor > >>> y.java:540) > >>> at > >>> > org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationConte > >>> xt.java:842) > >>> at > >>> > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416) > >>> at > >>> org.red5.server.tomcat.TomcatLoader$1.run(TomcatLoader.java:594) > >>> Caused by: javax.persistence.PersistenceException: The instance of the > >>> object with the class name 'org.apache.openjpa.persistence. > >>> PersistenceProviderImpl' in the ClassLoader 'WebappClassLoader > >>> On Wed, Aug 10, 2011 at 04:24, [email protected] > >>> <[email protected]> wrote: > >>>> > >>>> What do you need this class for? > >>>> Does the conflict actually has sth todo with the Exception or do you > >>>> need this Class ** for the Spring <=> OpenJPA integration? > >>>> Cause I don't see any reference to this class if you follow the > >>>> Spring/JPA Guide: > >>>> > >>>> > http://static.springsource.org/spring/docs/3.0.x/reference/orm.html#orm-jpa > >>>> > >>>> You could add the quick & dirty solution of Vasiliy anyway, if it > really > >>>> improves the situation. > >>>> > >>>> Sebastian > >>>> > >>>> 2011/8/9 Maxim Solodovnik <[email protected]> > >>>>> > >>>>> Hello Sebastian, > >>>>> I was unable to take a look at your latest logs, but suppose it is > >>>>> also > >>>>> "InvalidStateException: This operation cannot be performed while a > >>>>> Transaction is active." > >>>>> To handle it I add EntityManager injection via Spring config as was > >>>>> previously discussed. > >>>>> Unfortunately I'm currently stuck on following library conflict: > >>>>> 1) red5 is dependant on javaee-api-5.1.1.jar which > >>>>> contains javax\persistence\spi\PersistenceProvider definition > >>>>> 2) and openjpa-all-2.1.0.jar contains definition of this class > >>>>> as well as implementation > >>>>> (org.apache.openjpa.persistence.PersistenceProviderImpl) > >>>>> The problem is: these two classes seems to be incompatible: > >>>>> javax.persistence.PersistenceException: The instance of the object > with > >>>>> the class name > 'org.apache.openjpa.persistence.PersistenceProviderImpl' in > >>>>> the ClassLoader 'WebappClassLoader' is not an instance of > >>>>> PersistenceProvider interface. > >>>>> I tried to get fresh version of javaee-api*.jar > >>>>> but > >>>>> 1) the version downloaded from maven repository javaee-api-6.0.jar > >>>>> doesn't have all necessary packages > >>>>> 2) the version downloaded > >>>>> from > http://www.jarvana.com/jarvana/browse/org/ow2/jonas/osgi/javaee-api/ has > >>>>> all packages BUT has incompatible version of PersistenceProvider > interface > >>>>> Maybe you have idea how can I resolve this? > >>>>> Thanks a lot in advance > >>>>> p.s. May be I can implement DAOTransaction abstract class (from > initial > >>>>> Vasiliy's proposal) as quick and dirty solution? > >>>>> > >>>>> On Mon, Aug 8, 2011 at 15:58, [email protected] > >>>>> <[email protected]> wrote: > >>>>>> > >>>>>> meanwhile the service become unavailable, > >>>>>> you might grab the latest Logfile: > >>>>>> http://demo.openmeetings.de/jvm.stdout > >>>>>> > >>>>>> I might switch back to the previous version later today. > >>>>>> > >>>>>> We might at least agree on a road to take to solve those issues. > >>>>>> > >>>>>> > >>>>>> Sebastian > >>>>>> > >>>>>> 2011/8/8 Maxim Solodovnik <[email protected]> > >>>>>>> > >>>>>>> Hello Alexei, > >>>>>>> should i take a look at all these issues? Vasiliy is on vacation > >>>>>>> right now. > >>>>>>> > >>>>>>> On Mon, Aug 8, 2011 at 00:43, [email protected] > >>>>>>> <[email protected]> wrote: > >>>>>>>> > >>>>>>>> Hi, > >>>>>>>> > >>>>>>>> there are a number of Issues with openJPA and the migration. > >>>>>>>> The demo server is now updated but I needed several hours to get > the > >>>>>>>> basic functions running again. > >>>>>>>> > >>>>>>>> Also the shift with the user_ids in the import/export is still > todo > >>>>>>>> for the profiles_$userId thing. > >>>>>>>> Somehow we could agree that we make a unique MD5 hash for each > user > >>>>>>>> for his profile path. > >>>>>>>> > >>>>>>>> The user sign up process is basically fixed, however when you > >>>>>>>> repress the button to sign up again, or you just enter an existing > user > >>>>>>>> again, it will show the message that you have successfully signup, > instead > >>>>>>>> of showing a message that the user/login is already taken (which > is what > >>>>>>>> already implemented). > >>>>>>>> > >>>>>>>> I think there is really quite a bit to test and fix, the > >>>>>>>> openmeetings service became unresponsible/did not react to any > user > >>>>>>>> interaction after just 30 minutes without any message about the > reason in > >>>>>>>> the logfile. > >>>>>>>> > >>>>>>>> Also there are Issue with the Caching. Example: > >>>>>>>> I do create a new conference room with type restricted, max number > >>>>>>>> 16, type public > >>>>>>>> goto conference rooms, see the conference room, > >>>>>>>> go back to administration, edit that room set max number to 100, > >>>>>>>> goto conference rooms, see the conference room => STILL 16 > >>>>>>>> > >>>>>>>> => That is really bad, cause to track down this problem you really > >>>>>>>> will need to rethink the hole procedure of insert/update/delete > and how it > >>>>>>>> behaves by running in multiple Threads. This behaviour can lead to > various > >>>>>>>> unpredictable situations, strongly depending on what usage > scenario and how > >>>>>>>> many records you already have in the database > >>>>>>>> I've spend weeks to track down such problems with the previous > >>>>>>>> implementation, where the only really solution is to use the > spring injected > >>>>>>>> session and let spring manage the session-context. However it > really needs > >>>>>>>> some in depth testing. We can hardly release a package right now. > >>>>>>>> > >>>>>>>> Sebastian > >>>>>>>> > >>>>>>>> > >>>>>>>> -- > >>>>>>>> Sebastian Wagner > >>>>>>>> http://www.webbase-design.de > >>>>>>>> http://openmeetings.googlecode.com > >>>>>>>> http://www.wagner-sebastian.com > >>>>>>>> [email protected] > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> -- > >>>>>>> WBR > >>>>>>> Maxim aka solomax > >>>>>> > >>>>>> > >>>>>> > >>>>>> -- > >>>>>> Sebastian Wagner > >>>>>> http://www.webbase-design.de > >>>>>> http://openmeetings.googlecode.com > >>>>>> http://www.wagner-sebastian.com > >>>>>> [email protected] > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> WBR > >>>>> Maxim aka solomax > >>>> > >>>> > >>>> > >>>> -- > >>>> Sebastian Wagner > >>>> http://www.webbase-design.de > >>>> http://openmeetings.googlecode.com > >>>> http://www.wagner-sebastian.com > >>>> [email protected] > >>> > >>> > >>> > >>> -- > >>> WBR > >>> Maxim aka solomax > >> > >> > >> > >> -- > >> Sebastian Wagner > >> http://www.webbase-design.de > >> http://openmeetings.googlecode.com > >> http://www.wagner-sebastian.com > >> [email protected] > > > > > > > > -- > > Sebastian Wagner > > http://www.webbase-design.de > > http://openmeetings.googlecode.com > > http://www.wagner-sebastian.com > > [email protected] > > > -- WBR Maxim aka solomax -- You received this message because you are subscribed to the Google Groups "OpenMeetings developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/openmeetings-dev?hl=en.
