-
Notifications
You must be signed in to change notification settings - Fork 1
/
2013-06-07.html
256 lines (186 loc) · 7.7 KB
/
2013-06-07.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta name="description" content="Client Server Web Architecture includes REST inspired Web APIs, significant JavaScript client side processing and Java or other server side language (many of which are available on the Java Virtual Machine).">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width" />
<title>Client Server Web Application Development - webapis</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/foundation.min.css" />
<link rel="stylesheet" href="js/assets/base.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<style>
body {line-height: 1.4;}
html { overflow-y: scroll !important;}
img {height: 25px;}
pre {
font-size: 12px;
line-height: 1
padding: 15px;
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */
overflow: auto;
}
span.tag{
position:relative;
left:-10px;
}
div.box {
position:relative;
width:90px;
height:20px;
top:-10px;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
border:27px solid #FFFF00;
background-color:#F2AD0C;
-webkit-box-shadow: #B3B3B3 5px 5px 5px;
-moz-box-shadow: #B3B3B3 5px 5px 5px;
box-shadow: #B3B3B3 5px 5px 5px;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /*for IE*/
-o-transform: rotate(20deg);}
div.jvm {color:red;}
div.webapis{color:blue;}
div.javascript{color: green;}
div.java{color: purple;}
</style>
<script src="js/vendor/custom.modernizr.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40376887-1', 'clientserverweb.com');
ga('send', 'pageview');
</script>
</head>
<body>
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1><a href='/'>Client Server Web Applications</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="left">
</ul>
<ul class="right">
<li class="active"><a href="jvm.html">JVM</a></li>
<li class="active"><a href="java.html">Java</a></li>
<li class="divider"></li>
<li><a href="javascript.html">JavaScript</a></li>
<li><a href="webapis.html">Web APIs</a></li>
<li class="divider hide-for-small"></li>
<li><a href="about.html">About</a></li>
</ul>
</section>
</nav>
<div class="row">
<div class="large-2 columns">
<h4>2013-06-07</h4>
<div class='box jvm'><span class='tag'>jvm</span></div>
</div>
<div class="large-10 columns">
<div class="panel">
<p>
<h4>JDK 7 for OSX: java.net.UnknownHostException</h4>
<p>
TLDR: Add the name of your machine to /etc/hosts.
</p>
<p>
When working on a <a href='http://www.playframework.com/'>play</a> app in JDK 7 on OSX using
JDK 7: a java.net.UnknownHostException occurred (nodename nor servname provided, or not known).
The specific versions involved.
<table>
<tr><th>Component</th> <th>Version</th></tr>
<tr><td>OSX</td> <td>10.7.5</td></tr>
<tr><td>Play</td> <td>2.1.1</td></tr>
<tr><td>Java Full Version</td> <td>1.7.0_21-b12</td></tr>
</table>
An example of how this looked when I ran a new play app and hit the server in a browser
<pre>
[app] $ run
--- (Running the application from SBT, auto-reloading is enabled) ---
22:26:54,124 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
22:26:54,124 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
22:26:54,124 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/Users/cs/Desktop/play-2.1.1/repository/local/play/play_2.10/2.1.1/jars/play_2.10.jar!/logback.xml]
22:26:54,138 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@162ccef8 - URL [jar:file:/Users/cs/Desktop/play-2.1.1/repository/local/play/play_2.10/2.1.1/jars/play_2.10.jar!/logback.xml] is not of type file
22:26:54,165 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
22:26:54,200 |-ERROR in ch.qos.logback.core.util.ContextUtil@57c80727 - Failed to get local hostname java.net.UnknownHostException: MyMacBookAir: MyMacBookAir: nodename nor servname provided, or not known
at java.net.UnknownHostException: MyMacBookAir: MyMacBookAir: nodename nor servname provided, or not known
</pre>
</p>
<p>
This is a <a href='http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7180557'>bug</a> that has been reported, and the
<a href='https://groups.google.com/forum/?fromgroups#!topic/h2-database/DuIlTLN5KOo'>workaround</a>
for the moment is to add the name of your machine to your <b>/etc/hosts</b> file.
<pre>
127.0.0.1 MyMacBookAir
</pre>
</p>
</p>
</div>
</div>
</div>
<div class="row">
<div class="large-2 columns">
</div>
<div class="large-10 columns">
<!-- REPO -->
</div>
</div>
<div class="row">
<div class="large-2 columns">
<a href="rss.xml"><img src='/img/rss.jpeg' /></a>
</div>
<div class="large-10 columns">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'clientserverweb';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
<script>
document.write('<script src=' +
('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
'.js><\/script>')
</script>
<script src="js/foundation.min.js"></script>
<!--
<script src="js/foundation/foundation.js"></script>
<script src="js/foundation/foundation.alerts.js"></script>
<script src="js/foundation/foundation.clearing.js"></script>
<script src="js/foundation/foundation.cookie.js"></script>
<script src="js/foundation/foundation.dropdown.js"></script>
<script src="js/foundation/foundation.forms.js"></script>
<script src="js/foundation/foundation.joyride.js"></script>
<script src="js/foundation/foundation.magellan.js"></script>
<script src="js/foundation/foundation.orbit.js"></script>
<script src="js/foundation/foundation.placeholder.js"></script>
<script src="js/foundation/foundation.reveal.js"></script>
<script src="js/foundation/foundation.section.js"></script>
<script src="js/foundation/foundation.tooltips.js"></script>
<script src="js/foundation/foundation.topbar.js"></script>
-->
<script>
$(document).foundation();
</script>
</body>
</html>