Reputation: 85
When I run an app locally I have no problem accessing a rest resource using GET localhost:8080/resources/sqlData/projects, but for some reason when I try it on my AWS server, I get a 404 error using my-app.elasticbeanstalk.com/resources/sqlData/projects.
Does Amazon Web Services need a certain version of Resteasy or something? Here are my logs:
172.31.2.30 (70.114.214.76, 172.31.2.30) - - [24/Nov/2014:00:12:28 +0000] "GET /images/server.png HTTP/1.1" 200 662 "my-app.elasticbeanstalk.com/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/7.0; MDDCJS)" 172.31.2.30 (70.114.214.76, 172.31.2.30) - - [24/Nov/2014:00:12:28 +0000] "GET /images/database.png HTTP/1.1" 200 753 "my-app.elasticbeanstalk.com/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/7.0; MDDCJS)" 172.31.20.210 (70.114.214.76, 172.31.20.210) - - [24/Nov/2014:00:14:18 +0000] "GET /resources/sqlData/projects HTTP/1.1" 404 1003 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0" 172.31.20.210 (70.114.214.76, 172.31.20.210) - - [24/Nov/2014:00:15:32 +0000] "GET /resources/sqlData/projects HTTP/1.1" 404 1003 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0"
Any ideas?
Upvotes: 0
Views: 1319
Reputation: 85
So, I finally found out what was causing the problem. I was setting the the jvm to v. 1.8, but I guess I needed it set to v. 1.7 for AWS. Anyways, I changed the following plugin in my pom.xml to 1.7 and Rest suddenly worked as expected.
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source><!-- changed from 1.8 -->
<target>1.7</target><!-- changed from 1.8 -->
</configuration>
</plugin>
</plugins>
Upvotes: 0