There was a problem with a Velocity script
Pagesports/mten/2019-20/headlines-template
ErrorInvocation of method 'include' in class com.prestosports.render.ContentEngineInvoker threw exception java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. at xkwrdzuebi637ncgsports/mten/2019-20/headlines-template[line 2, column 10]
Page source:
1: ## PICK UP OPTIONS
2: $website.include("options")
3: #set ($options = $request.getAttribute("options"))
4: 
5: #if ($restriction.code == 2)
6: ## IMAGES (PHOTO GALLERY)
7: 
8:   $website.includeAgain("${page.url}?tmpl=photo-gallery-template")
9: 
10: #elseif ($restriction.code == 3)
11: ## Bios (roster)
12: 	$website.includeAgain("${page.url}?tmpl=${request.getAttribute('rosterTemplate')}&${request.getQueryString()}")
13: #elseif ($restriction.code == 11) ## Video
14: 
15:     ## #set ($inclURL = "${page.url}?tmpl=video-grid-template") ## used previously
16:     #set ($inclURL = "${page.url}?tmpl=news-template&showToggleButtons=false")
17:     
18:     #if ($website.isIncluded() && (!$request.getParameter("playlist") || $request.getParameter("playlist") != false))
19:         #set ($inclURL = "${page.url}?tmpl=video-headline-template")
20:     #end
21: 
22:     $website.includeAgain($inclURL)
23: 
24: #elseif ($restriction.code == 12)
25:   ## Podcast
26: 
27: <h3>Podcast Feed#if ($page.title.length() > 0) For: $page.title #end</h3>
28: 
29: <p>
30: Please add the entire URL Below to your Podcast Software:
31: </p>
32: 
33: <input type="text" size="60" value="https://${request.serverName}${page.url}?feed=rss_2.0" name="searchterm"/>
34: 
35: <p>
36: How to Listen to this Podcast:
37: </p>
38: <ol class="list list-unstyled">
39:         <li>Download a Podcast Aggregator from <a href="http://juicereceiver.sourceforge.net/">here</a>.</li>
40:         <li>Copy the entire link in the box above to the "URL" or "feed" field in your software.</li>
41:         <li>Listen to, and enjoy!</li>
42: </ol>
43: 
44: #elseif ($restriction.code == 15)
45:   ## unkonwn
46: 
47: #set ($itemsRendered = 0)
48: <div class="store-wrapper">
49: <div class="store-items">
50: <div class="table-responsive">
51:         <table class="table table-striped table-hover">
52:                 #foreach ($article in $headlines)
53: 
54:                         #if ($itemsRendered > 0)<tr><td colspan="5" class="sep"></td></tr>#end
55: 
56:                         <tr>
57: 
58:                                 #set ($item = $article.dataAsObject)
59: 
60:                                 ## This skips items where bidding has ended
61:                                 #if ($item.endBidding.after($now))
62: 
63:                                 <td class="py-1" style="width: 80px;">
64:                                         #if ($article.thumbnailURL.length() > 0)
65:                                                 <img src="$article.thumbnailURL?max_width=70&max_height=70&crop=true" class="img-fluid"/>
66:                                         #else
67:                                                 <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=70&max_height=70&crop=true" class="img-fluid"/><br />
68:                                         #end
69:                                 </td>
70: 
71:                                 <td class="w-25" style="width: 35%;">
72:                                 <a href="$article.url" class="title">$article.title#if (!($article.title.length() > 0))<i>No title</i>#end</a><br />
73:                                 #if ($article.leadIn.length() > 0)
74:                                 $article.leadIn
75:                                 #end
76:                                 </td>
77:                                 <td align="center"><strong>Current bid:</strong><br />$formatter.formatCurrency($item.price)</td>
78:                                 <td align="center"><strong># of bids:</strong><br /> #if ($item.history) $item.history.size() #else None #end</td>
79:                                 <td align="center"><strong>Ends:</strong><br /> $formatter.formatDateSiteTimezone($item.endBidding, "EEE MMM  d, h:mm a")</td>
80: 
81:                                 #set ($itemsRendered = $itemsRendered+1) 
82: 
83:                                 #end
84:                         </tr>
85:                 #end ## foreach
86:         </table>
87: </div>
88: 
89: #if ($itemsRendered == 0)
90: <h1>No Items Available</h1>
91: <p>Check back soon!</p>
92: #end
93: 
94: </div>
95: </div>
96: 
97: 
98: 
99: #elseif ($restriction.code == 16)
100:   ## Merchandise
101: 
102: 
103: #set ($totalItems = 0)
104: #set ($totalRows = 0)
105: #set ($itemsRead = 0)
106: #foreach ($article in $headlines)
107: #set ($totalItems = $totalItems + 1)
108: #if ($velocityCount % 4 == 1) #set ($totalRows = $totalRows + 1) #end
109: #end
110: 
111: 
112: <div class="store-wrapper">
113: 
114: #if ($page.title.length() > 0) <h1>$!page.title</h1>#end
115:  <div class="store-items">
116: <div class="table-responsive">
117: <table class="table table-hover">
118: 
119: #foreach( $currentRow in [1..$totalRows] )
120: 
121: <tr>
122: 
123: ## 1st Loop for the image and caption
124: #foreach ($article in $headlines)
125: 
126: #if ( ($velocityCount > $itemsRead) and ($velocityCount <= ($currentRow * 4))   )
127: 
128: #set ($item = $article.dataAsObject)
129: 
130: <td class="text-center w-25">
131:   <a href="$article.url" class="container">
132:    #if ($article.thumbnailURL.length() > 0)
133:     <img src="$article.thumbnailURL?max_width=125&max_height=125&crop=true" class="img-fluid"/><br />
134:    #else
135:      <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=125&max_height=125&crop=true" class="img-fluid"/><br />
136:     #end
137:   <span class="caption">$formatter.formatCurrency($item.price)<br />Buy Now</span>
138:   </a>
139:  </td>
140: 
141: #end ## ends if check
142: 
143: #end ## ends foreach
144: 
145: </tr>
146: <tr>
147: 
148: ## Second Loop for the titles
149: #foreach ($article in $headlines)
150: 
151: #if ( ($velocityCount > $itemsRead) and ($velocityCount <= ($currentRow * 4))   )
152: 
153: #set ($item = $article.dataAsObject)
154: 
155: <td class="text-center w-25">
156:   <a href="$article.url">
157:   #if ($article.title.length() > 0)
158:     <strong class="item-title">$article.title</strong>
159:   #else
160:     <strong class="item-title" style="font-style: italic;">No title</strong>
161:   #end
162:   </a>
163:  </td>
164: 
165: #end ## ends if check
166: 
167: #end ## ends foreach
168: 
169: #set ($itemsRead = $itemsRead + 4)
170: 
171: </tr>
172: 
173: #end ## ends outerloop
174: 
175: </table>
176: </div>
177: 
178:  </div>
179: </div>
180: 
181: 
182: 
183: #elseif ($restriction.code == 17)
184:   ## Marketplace
185: <div class="store-wrapper">
186: 
187: ## BUYNOW / BIDNOW
188: #if ($page.title.length() > 0) <h1>$!page.title</h1>#end
189: 
190:    <div class="store-items">
191: <div class="table-responsive">
192: <table class="table table-hover">
193:  <tr>
194: 
195: #set ($colCount = 0)
196: 
197: #foreach ($article in $headlines)
198: 
199: #set ($item = $article.dataAsObject)
200: 
201: #if ($formatter.isNull($item.endBidding, false))
202:   #set ($isStoreOrAuction = "auction")
203: #else
204:  #set ($isStoreOrAuction = "store")
205: #end
206: 
207: #if ($isStoreOrAuction == "auction" && $item.endBidding.before($now))
208: 
209: #else
210: 
211: #set ($colCount = $colCount + 1)
212: 
213: <td class="text-center w-25">
214: 
215: 
216:   <a href="$article.url" class="container">
217: ## THUMBNAIL
218:    #if ($article.thumbnailURL.length() > 0)
219:     <img src="$article.thumbnailURL?max_width=125&max_height=125&crop=true" class="img-fluid"/>
220:    #else
221:      <img src="$website.includeAgain("marketplace_thumbnail.jpg?print=src")?max_width=125&max_height=125&crop=true" class="img-fluid"/><br />
222:     #end
223:   <span class="caption">
224: 
225:   ## WHETHER A STORE ITEM OR AUCTION ITEM
226:   #if ($isStoreOrAuction == "auction")
227:     Current Bid: $formatter.formatCurrency($item.price)<br />Bid Now
228:   #else
229:     Price: $formatter.formatCurrency($item.price)<br />Buy Now
230:   #end
231: 
232:   </span>
233: 
234: ## ITEM TITLE
235:   #if ($article.title.length() > 0)<strong class="item-title" style="margin-bottom: 5px;">$article.title</strong>#else<strong class="item-title" style="font-style: italic;">No title</strong>#end
236:   </a>
237: ## SHOW TIME REMAINING IF AUCTION ITEM
238:    #if ($isStoreOrAuction == "auction")
239:     <br />
240:      #if ($item.endBidding.after($now))
241:      Time Remaining: <br>
242:      <span class="value">$formatter.formatTimeRemaining($item.endBidding)</span>
243:      #else
244:      <span class="value">Bidding is Over!</span>
245:      #end
246:    #end
247: 
248:  </td>
249: 
250: #if ($colCount % 4 == 0 && $velocityCount < $headlines.size())
251:   #set ($colCount = 0)
252:     </tr><tr>
253: #end
254: 
255: #end ## end bidding check
256: 
257: #end ## foreach
258: </tr>
259: </table>
260: </div>
261: </div>
262: 
263: </div>
264: #elseif ($restriction.code == 18)
265:   ## Splash, do not print nothing.
266:   #foreach ($splash in $headlines)
267:     #if ($splash.contentType != "loki/splash" && $wiki.valid())
268:     <div role="alert" class="alert alert-warning"><strong>Error Notice:</strong> $splash is not a supported content-type. Please review the content being <a href="${page.url}">featured here</a>.</div>
269:     #else
270:         #set ($item = $splash.dataAsObject)
271:         ## This skips items where bidding has ended
272:         #if ($item.expirationDate.after($now) && $item.liveDate.before($now))
273:             $website.include("$splash.url?from_headlines=true")
274:             #stop
275:         #end
276:     #end
277:   #end
278: #else
279: ## Default headlines rendering
280:  
281: #if ($request.getParameter("view"))
282:   $website.includeAgain("${page.url}?tmpl=news-template&showFilters=true&view=${request.getParameter('view')}")
283: #else 
284:   $website.includeAgain("${page.url}?tmpl=news-template&showFilters=true")
285: #end
286: 
287: 
288: 
289: 
290: 
291: 
292: #end ## Done with different types of headlines
293: 
294: #if ($request.getParameter("ajax") == "true")
295:   $website.decorate("ajax-decorator")
296: #end
297: 
298: $rss
299: 
300: $wiki
301: 
302: <!-- from: generic theme -->