You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Raphael Monroe - Leucotron (DES)" <rm...@leucotron.com.br> on 2009/07/30 22:07:31 UTC

Persistence Error with Wicket.

Hi everyone,

It´s my first post to the list so I'm sorry if I'm broking any rules or 
writing in a wrong text format.
I'm here to learn and I hope I'll with you guys.

Firstly, I should explain my huge(or not?) problem.
Since 2 days ago, I'm having this persistence error in my project.

I mean, when I get my program running, I have this follow message:

javax.persistence.PersistenceException: No Persistence provider for 
EntityManager named classePer
        at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:56)
        at 
com.leucotron.database.JDataBaseConnection.<init>(JDataBaseConnection.java:34)
        at 
com.leucotron.database.JDataBaseConnection.getInstance(JDataBaseConnection.java:41)
        at com.leucotron.exemplowicket.Testando.<init>(Testando.java:24)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at 
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
        at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
        at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
        at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
        at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
        at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1241)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1320)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
        at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
        at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)


I have no idea why I'm having this. Then, I have thought that is a 
wicket problem because when I use the same codes in a Desktop 
application I can run that very normal.

I've tried to put the persistence.xml in several places, but I didn't 
have any sucess so far.
I've also tried to add (even manually), all the .jars related to the 
hibernate lib. However, I still continued with the same problem.

I kinda lost myself and I do not know how to fix my code or even how to 
do any modification to get my web application running as normal as my 
desktop application.

Thank you guys,

[]s

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Persistence Error with Wicket.

Posted by Erik Post <er...@gmail.com>.
Hi Raphael,

You're using JPA, which complains that it can't find a persistence
provider (i.e. Hibernate). Have you added the JPA-specific Hibernate
jars such as hibernate-entitymanager.jar (and, while you're at it,
hibernate-annotations.jar) as well? And where did you put your
persistence.xml? Also, please include the relevant bits of your
persistence.xml file, in particular:

  <persistence-unit name="foo" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
     <!-- ... -->
  </persistence-unit>

This does not seem to be a Wicket-specific problem btw, althoug it may
have something to do with your project's directory structure.

Cheers,
Erik


On Thu, Jul 30, 2009 at 10:07 PM, Raphael Monroe - Leucotron
(DES)<rm...@leucotron.com.br> wrote:
> Hi everyone,
>
> It愀 my first post to the list so I'm sorry if I'm broking any rules or
> writing in a wrong text format.
> I'm here to learn and I hope I'll with you guys.
>
> Firstly, I should explain my huge(or not?) problem.
> Since 2 days ago, I'm having this persistence error in my project.
>
> I mean, when I get my program running, I have this follow message:
>
> javax.persistence.PersistenceException: No Persistence provider for
> EntityManager named classePer
> at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:56)
>       at com.leucotron.database.JDataBaseConnection.<init>(JDataBaseConnection.java:34)
>       at  com.leucotron.database.JDataBaseConnection.getInstance(JDataBaseConnection.java:41)
>       at com.leucotron.exemplowicket.Testando.<init>(Testando.java:24)

>
> I have no idea why I'm having this. Then, I have thought that is a wicket
> problem because when I use the same codes in a Desktop application I can run
> that very normal.
>
> I've tried to put the persistence.xml in several places, but I didn't have
> any sucess so far.
> I've also tried to add (even manually), all the .jars related to the
> hibernate lib. However, I still continued with the same problem.
>
> I kinda lost myself and I do not know how to fix my code or even how to do
> any modification to get my web application running as normal as my desktop
> application.
>
> Thank you guys,
>
> []s
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org