danjohnson1971 (6) [Avatar] Offline
#1
Hi,

I have started working on this book and got through recipe 2.1 using Jetty as the server. I wanted to try to use the vFabric server that came with STS. I have successfully import the recipe and deployed it to the server. When I try to start the server, it can't find my environment.properties file. I have added an entry to the VM arguments in the Launch Configuration of the server and have even added it in the Environment Variables of the server as well.

The entry I added in the VM arguments is: -Dsip.conf.dir="/Users/DJ/dev/projects/sip/conf". This is where my environment.properties file is located on my machine.

Has anyone had this problem and gotten around it?

Thanks,

Dan
mavnewbie (7) [Avatar] Offline
#2
Re: STS vFabric tc Server and this book
Please see this link or search in this forum "Re: Problem accessing /com.springinpractice.02_01. Reason:"

If you still have problem place a copy of your environment.property to the resource dir "src/main/resources".
danjohnson1971 (6) [Avatar] Offline
#3
Re: STS vFabric tc Server and this book
Thanks for responding. I probably should've added some things. I have gotten the recipe to work using Jetty and executing mvn -e clean jetty:run with no issues. I just thought I would also try to get it to work using the web container that came with Spring Tool Suite (vFabric tc). Is it really that easy as putting the file in the resources folder? I will give that a try and let you know.

But also wouldn't you want the environment.properties file outside of the project itself?

Thanks,

Dan

Message was edited by:
danjohnson1971
mavnewbie (7) [Avatar] Offline
#4
Re: STS vFabric tc Server and this book
Dan, if you had it working the way you had described that's the ideal way.
danjohnson1971 (6) [Avatar] Offline
#5
Re: STS vFabric tc Server and this book
Yeah, it is working that way. But I would like to get it running through a server that has an adapter with Spring Tool Suite. There is benefit to doing that like being able to run it in Debug and step through the lines of code if need be. So I chose the vFarbic tc since it was there, but maybe I should try it in JBoss.

Thanks,

Dan
MikB (202) [Avatar] Offline
#6
Re: STS vFabric tc Server and this book
You can also use "debug as" in Eclipse/STS with maven installed servers. I find the native server function in Eclipse too limited so I stay away from it. I haven't tried vFabric though.
danjohnson1971 (6) [Avatar] Offline
#7
Re: STS vFabric tc Server and this book
Thanks for your help. Hopefully I won't need to Debug anything as I work through this book...but who knows? smilie


Thanks,
Dan