Return-Path: X-Original-To: apmail-openejb-users-archive@www.apache.org Delivered-To: apmail-openejb-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A906DD04 for ; Tue, 21 Aug 2012 15:17:01 +0000 (UTC) Received: (qmail 29906 invoked by uid 500); 21 Aug 2012 15:17:01 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 29883 invoked by uid 500); 21 Aug 2012 15:17:01 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 29875 invoked by uid 99); 21 Aug 2012 15:17:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2012 15:17:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rmannibucau@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vb0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Aug 2012 15:16:55 +0000 Received: by vbme21 with SMTP id e21so8393257vbm.35 for ; Tue, 21 Aug 2012 08:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=5JGTgtr/v+1iegtaqSVlUDT4kj+MBMDAlR4G3qGitYA=; b=g1qhCVCiSdbKV5FOS7kFch5x/mj6nTZWGLiw76Kntq3ZZcsejkU6rjbgwpmOTmn7dS uhKXM+CmNILKpUH3878cu93vapA56Z2JmzhiUipJPgpxNrd1xxxWCGKySIoM5gIXfiuf wMyLkM7FYRoNTcUN6FDyq6Qh8nFSVrGT0vYXuhcVpodMjZ9W55w5gTFdLCSVZN1MUG1+ opIl8eUaO+xCG+xVFi522qDmFN4PHjoDJDf12b+4Cz0Waf0msQshrg/CwRGL+UBf2zUU wMsz2z2/n4X9NmmlOD26RX+d5JCb+4R6idm8xEwWqNilJ7YQuXWAslTZLTd++5dl6ATO 4thQ== Received: by 10.52.66.162 with SMTP id g2mr11559626vdt.32.1345562194456; Tue, 21 Aug 2012 08:16:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.127.193 with HTTP; Tue, 21 Aug 2012 08:16:14 -0700 (PDT) In-Reply-To: References: From: Romain Manni-Bucau Date: Tue, 21 Aug 2012 17:16:14 +0200 Message-ID: Subject: Re: IllegalArgumentException: Class 'java.lang.Object' is not annotated with Path To: users@openejb.apache.org Content-Type: multipart/alternative; boundary=20cf307f3bb29fb00304c7c81c95 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307f3bb29fb00304c7c81c95 Content-Type: text/plain; charset=ISO-8859-1 no pb ;) *Romain Manni-Bucau* *Twitter: @rmannibucau* *Blog: http://rmannibucau.wordpress.com* 2012/8/21 Todd Deshane > Awesome. It works! Thanks so much for the help with this! > > On Tue, Aug 21, 2012 at 10:07 AM, Romain Manni-Bucau > wrote: > > you simply need to define the jaxrs application in your server.xml with > the > > application as class or with the annotation @ApplicationConfig > > > > you can have a look to > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/rest-example-with-application/ > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau* > > *Blog: http://rmannibucau.wordpress.com* > > > > > > > > > > 2012/8/21 Todd Deshane > > > >> On Tue, Aug 21, 2012 at 8:41 AM, Romain Manni-Bucau > >> wrote: > >> > location? > >> > > >> > >> I do mean location, location is in the HTTP response header. > >> > >> > id you mean? > >> > >> The id is included in that path as well yes. > >> > >> > you can probably activate cxf logs adding > *faultStackTraceEnabled=true* > >> > * > >> > * > >> > you should be able to do so adding a file META-INF/resources.xml > >> containing: > >> > > >> > > >> > > >> > > >> > cxf.jaxrs.properties = config > >> > > >> > > >> > > >> > faultStackTraceEnabled=true > >> > > >> > > >> > > >> > >> Cool. I added some debug code and figured out that the issue is with > >> the customerDB object. > >> > >> > >> Aug 21, 2012 9:14:14 AM org.apache.openejb.server.rest.RESTService > >> deployPojo > >> INFO: REST Service: > http://localhost:8080/workbook-ex03_1-1.0/customers/.* -> P > >> ojo com.restfully.shop.services.CustomerResource > >> reading customer > >> customerDB size: 1 (in POST) > >> Created customer 1 (in POST) > >> customerDB size: 0 (in GET) > >> Aug 21, 2012 9:14:19 AM > >> org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper > >> toResponse > >> WARNING: WebApplicationException has been caught : no cause is available > >> > >> I think what is happening is that the code assumes JAX-RS singleton > >> mode (one and only one Java object services the HTTP requests), but I > >> think that the JAX-RS in TomEE is probably set to per-request (a Java > >> object is created to process each incoming request and is thrown away > >> at the end of the request) [1] > >> > >> Is there a way to switch the JAX-RS with a configuration setting > perhaps? > >> > >> Thanks, > >> Todd > >> > >> [1] Concepts from RESTful Java with JAX-RS by Bill Burke > >> > --20cf307f3bb29fb00304c7c81c95--