You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by naciu <na...@gmail.com> on 2022/01/13 08:46:37 UTC
Tomee7.1.4 plume rest post request not working
Time ago i tried to write a web app with tomee 7.1.4 plume and jdk 1.8.
I have a entity jpa.
When i try to save a new entity with curl- or from the gui with a post
request to my rest service a get a exception .
some of you have the same problem?
Project mybookstore on GitHub.
https://github.com/maurojava/mybookstore/
<https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java>
Using jsf Is ok (i not use rest service)
https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/index.xhtml
(Here i created another ejb for jsf that not use the rest service and the
jsf Page save the new entity).
https://github.com/maurojava/mybookstore/blob/master/src/main/java/jsfejbs/BookFacade.java
-----------------6
But:
Into curl- or using :
https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/restclient.html
I get exceptions of mapping ....
The rest service Is the following:
https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java
Please
Try this Project with tomee7.1.4plume
I not can risolve.
Mauro
Re: Tomee7.1.4 plume rest post request not working
Posted by naciu <na...@gmail.com>.
The jsf crud is working. But the jQuery not work. i get :
Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast
to bookstore.entity.Book ```
Il Gio 13 Gen 2022, 12:00 Jean-Louis Monteiro <jl...@tomitribe.com> ha
scritto:
> Do you have any exceptions you can share here?
>
> I can of course clone you project and try myself, but at least we would
> have everything in this thread for people in the future.
>
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
>
> On Thu, Jan 13, 2022 at 9:46 AM naciu <na...@gmail.com> wrote:
>
> > Time ago i tried to write a web app with tomee 7.1.4 plume and jdk 1.8.
> >
> > I have a entity jpa.
> >
> > When i try to save a new entity with curl- or from the gui with a post
> > request to my rest service a get a exception .
> >
> > some of you have the same problem?
> >
> > Project mybookstore on GitHub.
> >
> > https://github.com/maurojava/mybookstore/
> > <
> >
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java
> > >
> >
> >
> > Using jsf Is ok (i not use rest service)
> >
> >
> >
> https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/index.xhtml
> >
> >
> > (Here i created another ejb for jsf that not use the rest service and the
> > jsf Page save the new entity).
> >
> >
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/jsfejbs/BookFacade.java
> >
> > -----------------6
> > But:
> >
> > Into curl- or using :
> >
> >
> >
> >
> https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/restclient.html
> >
> > I get exceptions of mapping ....
> >
> > The rest service Is the following:
> >
> >
> >
> >
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java
> >
> > Please
> > Try this Project with tomee7.1.4plume
> >
> > I not can risolve.
> >
> > Mauro
> >
>
Re: Tomee7.1.4 plume rest post request not working
Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
Do you have any exceptions you can share here?
I can of course clone you project and try myself, but at least we would
have everything in this thread for people in the future.
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Thu, Jan 13, 2022 at 9:46 AM naciu <na...@gmail.com> wrote:
> Time ago i tried to write a web app with tomee 7.1.4 plume and jdk 1.8.
>
> I have a entity jpa.
>
> When i try to save a new entity with curl- or from the gui with a post
> request to my rest service a get a exception .
>
> some of you have the same problem?
>
> Project mybookstore on GitHub.
>
> https://github.com/maurojava/mybookstore/
> <
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java
> >
>
>
> Using jsf Is ok (i not use rest service)
>
>
> https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/index.xhtml
>
>
> (Here i created another ejb for jsf that not use the rest service and the
> jsf Page save the new entity).
>
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/jsfejbs/BookFacade.java
>
> -----------------6
> But:
>
> Into curl- or using :
>
>
>
> https://github.com/maurojava/mybookstore/blob/master/src/main/webapp/restclient.html
>
> I get exceptions of mapping ....
>
> The rest service Is the following:
>
>
>
> https://github.com/maurojava/mybookstore/blob/master/src/main/java/bookstore/service/BookFacadeREST.java
>
> Please
> Try this Project with tomee7.1.4plume
>
> I not can risolve.
>
> Mauro
>