Re: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread Evgeny Shepelyuk
Hello,

Nice to know Spring problems are fixed.

But i can't undeerstand your changes in attached archive.
Why it's required to point full path in reouter configuration ?


 Hi Evgeny,

 I'm happy to report that the Spring issues with ServerResource that you
 reported are now fixed in SVN trunk. Thanks also to Rhett for the help
 fixing this.

 Note that there was a URI issue in your Spring XML configuration file.  
 See
 the updated version attached.

 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com


 -Message d'origine-
 De : Rhett Sutphin [mailto:rh...@detailedbalance.net]
 Envoyé : lundi 7 septembre 2009 07:40
 À : discuss@restlet.tigris.org
 Objet : Re: Problem with SpringBeanFinder in Restlet 2.0m4

 Hi Evgeny,

 Thanks for the test code.  This is now in the issue tracker here:

 http://restlet.tigris.org/issues/show_bug.cgi?id=892

 Rhett

 On Sep 2, 2009, at 2:41 AM, Evgeny Shepelyuk wrote:

 Hi !

 Here goes test project

 Hi Evgeny,

 Someone else had this problem, but I think we thought it was fixed in
 2.0M4.  I'll can take a look at it in the next few days.  Can you
 file
 a bug?

 Thanks,
 Rhett

 On Aug 31, 2009, at 5:00 AM, Evgeny Shepelyuk wrote:

 Hello,

 I'm migrating application from 1.1 branch to 2.0 and have problems
 with
 SpringBeanFinder.
 Is it usable in 2.0 branch ? While debugging i've discovered that
 check is
 performsed against targetClass property.
 This happen in superclass Finder. But this shouldn't be taken into
 account. The same code worked OK in 1.1 branch.
 Let me put snippet of XML to illustrate. TransactionResource extends
 ServerResource.

bean id=transactionResource
 class=com.si.prydbay.billing.restlet.TransactionResource
 scope=prototype
property name=transactionService
 ref=transactionService/
property name=transactionsHtml
 value=classpath:transactions.html/
property name=tokenService ref=tokenService/
/bean

bean id=merchantRouter
 class=org.restlet.ext.spring.SpringRouter
property name=attachments
map
entry key=/transactions/{transactionId}
bean
 class=org.restlet.ext.spring.SpringBeanFinder
property name=beanName
 value=transactionResource/
/bean
/entry
/map
/property
/bean

 --
 Regards,
 Evgeny Shepelyuk

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23888
 16

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23899
 14



 --
 Regards,
 Evgeny Shepelyuk

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23900
 72
 src.zip

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23917
 44

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2399592


-- 
Regards,
Evgeny Shepelyuk

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400113


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread Jerome Louvel
Hi Evgeny,

The full path was the only change in your code indeed. It is necessary because 
you use no router or virtual host for the host part of your URI which also 
needs to be 'consumed' if you want to be able to match your target resource. 
When you use Restlet applications, this is done transparently so you don't 
realize, but here with just a bare Server connector, you need to care :)

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com




-Message d'origine-
De : news [mailto:n...@ger.gmane.org] De la part de Evgeny Shepelyuk
Envoyé : vendredi 25 septembre 2009 09:45
À : discuss@restlet.tigris.org
Objet : Re: Problem with SpringBeanFinder in Restlet 2.0m4

Hello,

Nice to know Spring problems are fixed.

But i can't undeerstand your changes in attached archive.
Why it's required to point full path in reouter configuration ?


 Hi Evgeny,

 I'm happy to report that the Spring issues with ServerResource that you
 reported are now fixed in SVN trunk. Thanks also to Rhett for the help
 fixing this.

 Note that there was a URI issue in your Spring XML configuration file.  
 See
 the updated version attached.

 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com


 -Message d'origine-
 De : Rhett Sutphin [mailto:rh...@detailedbalance.net]
 Envoyé : lundi 7 septembre 2009 07:40
 À : discuss@restlet.tigris.org
 Objet : Re: Problem with SpringBeanFinder in Restlet 2.0m4

 Hi Evgeny,

 Thanks for the test code.  This is now in the issue tracker here:

 http://restlet.tigris.org/issues/show_bug.cgi?id=892

 Rhett

 On Sep 2, 2009, at 2:41 AM, Evgeny Shepelyuk wrote:

 Hi !

 Here goes test project

 Hi Evgeny,

 Someone else had this problem, but I think we thought it was fixed in
 2.0M4.  I'll can take a look at it in the next few days.  Can you
 file
 a bug?

 Thanks,
 Rhett

 On Aug 31, 2009, at 5:00 AM, Evgeny Shepelyuk wrote:

 Hello,

 I'm migrating application from 1.1 branch to 2.0 and have problems
 with
 SpringBeanFinder.
 Is it usable in 2.0 branch ? While debugging i've discovered that
 check is
 performsed against targetClass property.
 This happen in superclass Finder. But this shouldn't be taken into
 account. The same code worked OK in 1.1 branch.
 Let me put snippet of XML to illustrate. TransactionResource extends
 ServerResource.

bean id=transactionResource
 class=com.si.prydbay.billing.restlet.TransactionResource
 scope=prototype
property name=transactionService
 ref=transactionService/
property name=transactionsHtml
 value=classpath:transactions.html/
property name=tokenService ref=tokenService/
/bean

bean id=merchantRouter
 class=org.restlet.ext.spring.SpringRouter
property name=attachments
map
entry key=/transactions/{transactionId}
bean
 class=org.restlet.ext.spring.SpringBeanFinder
property name=beanName
 value=transactionResource/
/bean
/entry
/map
/property
/bean

 --
 Regards,
 Evgeny Shepelyuk

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23888
 16

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23899
 14



 --
 Regards,
 Evgeny Shepelyuk

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23900
 72
 src.zip

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=23917
 44

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2399592


-- 
Regards,
Evgeny Shepelyuk

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400113

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400145


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread webpost
Hi,
I need this fix so I just checked out the Restlet trunk from SVN and am trying 
to build the project by just running ant from the build/ directory. 

I get the following errors regarding a missing library dependency. I am using 
ant 1.7 on OS-X with Java 1.6. The script eventually gets a null pointer along 
with more warnings about this missing dependency. Pointers?

generate-poms:
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​project.xml
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/module​s
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/librar​ies
 [fmpp] Missing library.xml file inside: 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​../libraries/com.sun​.rowset_1.0
 [fmpp] Missing library.xml file inside: 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​../libraries/org.mor​tbay.jetty_4.2
 [fmpp] Missing library dependency: xdb for module xdb
 [fmpp] File processed.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400252


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread Jerome Louvel
Hi there,

As a workaround, there is a new snapshot available including the Spring fixes:
http://www.restlet.org/downloads/unstable

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-Message d'origine-
De : webp...@tigris.org [mailto:webp...@tigris.org] 
Envoyé : vendredi 25 septembre 2009 16:02
À : discuss@restlet.tigris.org
Objet : RE: Problem with SpringBeanFinder in Restlet 2.0m4

Hi,
I need this fix so I just checked out the Restlet trunk from SVN and am trying 
to build the project by just running ant from the build/ directory. 

I get the following errors regarding a missing library dependency. I am using 
ant 1.7 on OS-X with Java 1.6. The script eventually gets a null pointer along 
with more warnings about this missing dependency. Pointers?

generate-poms:
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​project.xml
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/module​s
 [fmpp] fichier 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/librar​ies
 [fmpp] Missing library.xml file inside: 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​../libraries/com.sun​.rowset_1.0
 [fmpp] Missing library.xml file inside: 
/Users/lowbowow/Docu​ments/workspace-3.5/​restlet-trunk/build/​../libraries/org.mor​tbay.jetty_4.2
 [fmpp] Missing library dependency: xdb for module xdb
 [fmpp] File processed.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400252

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400302


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread norton borf
Thanks for posting that.

I just updated to the latest jars in the snapshot you referenced. My project 
includes org.restlet.jar and org.restlet.spring.jar in my WAR file, however it 
is reporting the following on startup. I looked at the org.restlet.spring.jar 
contents and it does not include this servlet. Which jar should I be 
referencing instead?

exception

javax.servlet.ServletException: PWC1397: Wrapper cannot find servlet class 
org.restlet.ext.spring.SpringServerServlet or a class it depends on

root cause

java.lang.ClassNotFoundException: org.restlet.ext.spring.SpringServerServlet

 Hi there,
 
 As a workaround, there is a new snapshot available including the Spring fixes:
 http://www.restlet.org/downloads/unstable
 
 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com
 


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400317


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread norton borf
In the below, i mean I am including org.restlet.ext.spring.jar ( I mis-typed 
below)


 Thanks for posting that.
 
 I just updated to the latest jars in the snapshot you referenced. My project 
 includes org.restlet.jar and org.restlet.spring.jar in my WAR file, however 
 it is reporting the following on startup. I looked at the 
 org.restlet.spring.jar contents and it does not include this servlet. Which 
 jar should I be referencing instead?
 
 exception
 
 javax.servlet.ServletException: PWC1397: Wrapper cannot find servlet class 
 org.restlet.ext.spring.SpringServerServlet or a class it depends on
 
 root cause
 
 java.lang.ClassNotFoundException: org.restlet.ext.spring.SpringServerServlet
 
  Hi there,
  
  As a workaround, there is a new snapshot available including the Spring 
  fixes:
  http://www.restlet.org/downloads/unstable
  
  Best regards,
  Jerome Louvel
  --
  Restlet ~ Founder and Lead developer ~ http://www.restlet.org
  Noelios Technologies ~ Co-founder ~ http://www.noelios.com
  
 

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400319


RE: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread norton borf
Ok, so I manually copied the SpringServerServlet.class from an older 2.0 
snapshot jar and redeployed, now I get this

descriptionThe server encountered an internal error () that prevented it from 
fulfilling this request.

exception

javax.servlet.ServletException: PWC1381: Error allocating a servlet instance

root cause

java.lang.NoClassDefFoundError: org/restlet/ext/servlet/ServerServlet

root cause

java.lang.ClassNotFoundException: org.restlet.ext.servlet.ServerServlet

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400322


Re: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread Rhett Sutphin
Hi Norton,

On Sep 25, 2009, at 11:36 AM, norton borf wrote:

 Thanks for posting that.

 I just updated to the latest jars in the snapshot you referenced. My  
 project includes org.restlet.jar and org.restlet.spring.jar in my  
 WAR file, however it is reporting the following on startup. I looked  
 at the org.restlet.spring.jar contents and it does not include this  
 servlet. Which jar should I be referencing instead?

Did you download the JEE edition?  SpringServerServlet is not included  
in the JSE edition.  I see it in lib/org.restlet.ext.spring.jar in  
restlet-jee-2.0snapshot.zip.

Rhett


 exception

 javax.servlet.ServletException: PWC1397: Wrapper cannot find servlet  
 class org.restlet.ext.spring.SpringServerServlet or a class it  
 depends on

 root cause

 java.lang.ClassNotFoundException:  
 org.restlet.ext.spring.SpringServerServlet

 Hi there,

 As a workaround, there is a new snapshot available including the  
 Spring fixes:
 http://www.restlet.org/downloads/unstable

 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com



 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400317

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400325


RE: Re: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-25 Thread norton borf
Yep, I just got done realizing that myself! Thanks for the note!

OK, so I am now running the latest unstable JEE snapshot and my simple spring 
test work's using SpringRouter, but not the SpringBeanRouter method. See 
examples below

---
THIS BELOW CONFIG WORKS AS EXPECTED;
-

bean id=router class=org.restlet.ext.spring.SpringRouter

 constructor-arg ref=myRestApp /
 
 property name=attachments
 map
 entry key=/dog  
value=com.my.package.rest.v1.resource.UserResource /
 /map
 /property
 /bean


---
THIS BELOW CONFIG FAILS WITH:

No target class was defined for this finder
org.restlet.ext.spring.springbeanfin...@47696dad
-

bean name=router class=org.restlet.ext.spring.SpringBeanRouter/

bean name=/dog 
id=userResource 
autowire=byName 
scope=prototype 
class=com.my.package.rest.v1.resource.UserResource/

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2400334


Re: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-06 Thread Rhett Sutphin
Hi Evgeny,

Thanks for the test code.  This is now in the issue tracker here:

http://restlet.tigris.org/issues/show_bug.cgi?id=892

Rhett

On Sep 2, 2009, at 2:41 AM, Evgeny Shepelyuk wrote:

 Hi !

 Here goes test project

 Hi Evgeny,

 Someone else had this problem, but I think we thought it was fixed in
 2.0M4.  I'll can take a look at it in the next few days.  Can you  
 file
 a bug?

 Thanks,
 Rhett

 On Aug 31, 2009, at 5:00 AM, Evgeny Shepelyuk wrote:

 Hello,

 I'm migrating application from 1.1 branch to 2.0 and have problems
 with
 SpringBeanFinder.
 Is it usable in 2.0 branch ? While debugging i've discovered that
 check is
 performsed against targetClass property.
 This happen in superclass Finder. But this shouldn't be taken into
 account. The same code worked OK in 1.1 branch.
 Let me put snippet of XML to illustrate. TransactionResource extends
 ServerResource.

 bean id=transactionResource
 class=com.si.prydbay.billing.restlet.TransactionResource
 scope=prototype
 property name=transactionService ref=transactionService/
 property name=transactionsHtml
 value=classpath:transactions.html/
 property name=tokenService ref=tokenService/
 /bean

 bean id=merchantRouter
 class=org.restlet.ext.spring.SpringRouter
 property name=attachments
 map
 entry key=/transactions/{transactionId}
 bean 
 class=org.restlet.ext.spring.SpringBeanFinder
 property name=beanName 
 value=transactionResource/
 /bean
 /entry
 /map
 /property
 /bean

 --
 Regards,
 Evgeny Shepelyuk

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2388816

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2389914



 -- 
 Regards,
 Evgeny Shepelyuk

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2390072
  
 src.zip

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2391744


Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-01 Thread Evgeny Shepelyuk
Hello,

I'm migrating application from 1.1 branch to 2.0 and have problems with  
SpringBeanFinder.
Is it usable in 2.0 branch ? While debugging i've discovered that check is  
performsed against targetClass property.
This happen in superclass Finder. But this shouldn't be taken into  
account. The same code worked OK in 1.1 branch.
Let me put snippet of XML to illustrate. TransactionResource extends  
ServerResource.

bean id=transactionResource  
class=com.si.prydbay.billing.restlet.TransactionResource  
scope=prototype
property name=transactionService ref=transactionService/
property name=transactionsHtml 
value=classpath:transactions.html/
property name=tokenService ref=tokenService/
/bean

bean id=merchantRouter class=org.restlet.ext.spring.SpringRouter
property name=attachments
map
entry key=/transactions/{transactionId}
bean 
class=org.restlet.ext.spring.SpringBeanFinder
property name=beanName 
value=transactionResource/
/bean
/entry
/map
/property
/bean

-- 
Regards,
Evgeny Shepelyuk

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2388816


Re: Problem with SpringBeanFinder in Restlet 2.0m4

2009-09-01 Thread Rhett Sutphin
Hi Evgeny,

Someone else had this problem, but I think we thought it was fixed in  
2.0M4.  I'll can take a look at it in the next few days.  Can you file  
a bug?

Thanks,
Rhett

On Aug 31, 2009, at 5:00 AM, Evgeny Shepelyuk wrote:

 Hello,

 I'm migrating application from 1.1 branch to 2.0 and have problems  
 with
 SpringBeanFinder.
 Is it usable in 2.0 branch ? While debugging i've discovered that  
 check is
 performsed against targetClass property.
 This happen in superclass Finder. But this shouldn't be taken into
 account. The same code worked OK in 1.1 branch.
 Let me put snippet of XML to illustrate. TransactionResource extends
 ServerResource.

   bean id=transactionResource
 class=com.si.prydbay.billing.restlet.TransactionResource
 scope=prototype
   property name=transactionService ref=transactionService/
   property name=transactionsHtml  
 value=classpath:transactions.html/
   property name=tokenService ref=tokenService/
   /bean

   bean id=merchantRouter  
 class=org.restlet.ext.spring.SpringRouter
   property name=attachments
   map
   entry key=/transactions/{transactionId}
   bean 
 class=org.restlet.ext.spring.SpringBeanFinder
   property name=beanName 
 value=transactionResource/
   /bean
   /entry
   /map
   /property
   /bean

 -- 
 Regards,
 Evgeny Shepelyuk

 --
 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2388816

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2389914