ASP.NET MVC Razor design table with rowspan - asp.net-mvc

How can I merge cells in a table using rowspan inside a Razor view? I want to automatically merge date and link cells so I only have one of each for all data from a given day, instead of “Date” and “link” Cell in each row. I tried to solve it using conditions, but I either get an error (syntax problem I guess) or I get a different result than I wanted (example code down).
<tbody>
#foreach (var dayIncidentPair in Model.List)
{
<tr>
<td rowspan="#dayIncidentPair.Item3.Count()">Finded segment in #dayIncidentPair.Datetime.ToString("d")</td>
<td rowspan="#dayIncidentPair.Item3.Count()">Link here</td>
#{int i = 0; }
#foreach (var segmentInfo in dayIncidentPair.Item3)
{
if (i > 0)
{
<text></tr>
<tr></text>
}
<td>#segmentInfo.MValue1.Time.ToString("t")</td>
<td>#String.Format("{0:f1}", #segmentInfo. MValue1.Value)</td>
<td>#segmentInfo.MValue1.Type</td>
<td>#segmentInfo.MValue2.Time.ToString("t")</td>
<td>#String.Format("{0:f1}", #segmentInfo.MValue2.Value)</td>
<td>#segmentInfo.MValue2.Type</td>
i++;
}
</tr>
}
</tbody>
I want something like this
╔════════════╦════════════╦═════════╦══════════╦═════════╦═════════╦══════════╦═════════╗
║ Date ║ Link ║ Time V1 ║ Value V1 ║ Type V1 ║ Time V2 ║ Value V2 ║ Type V2 ║
╠════════════╬════════════╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ 25.01.2017 ║ Link ║ ║ ║ ║ ║ ║ ║
║ ║ to XXX ║ 9:10 ║ 1.1 ║ A ║ 9:15 ║ 5.3 ║ Q ║
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ╠ ╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ║ ║ 9:30 ║ 2.0 ║ B ║ 11:30 ║ 4.1 ║ A ║
║ ║ ║ ║ ║ ║ ║ ║ ║
╠════════════╬════════════╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ 26.01.2017 ║ Linkto XYX ║ ║ ║ ║ ║ ║ ║
║ ║ ║ 11:50 ║ 6.2 ║ A ║ 14:27 ║ 5.3 ║ P ║
║ ║ ║ ║ ║ ║ ║ ║ ║
╠════════════╬════════════╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ 27.01.2017 ║ Linkto XXY ║ ║ ║ ║ ║ ║ ║
║ ║ ║ 8:03 ║ 2.5 ║ Q ║ 9:47 ║ 2.5 ║ A ║
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ╠ ╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ║ ║ 13:21 ║ 4.6 ║ A ║ 14:53 ║ 4.3 ║ C ║
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ╠ ╬═════════╬══════════╬═════════╬═════════╬══════════╬═════════╣
║ ║ ║ ║ ║ ║ ║ ║ ║
║ ║ ║ 15:10 ║ 7.4 ║ C ║ 15:45 ║ 7.3 ║ B ║
║ ║ ║ ║ ║ ║ ║ ║ ║
╚════════════╩════════════╩═════════╩══════════╩═════════╩═════════╩══════════╩═════════╝

I looked at the Issue from a different angle and I found a solution. Apparently there was a problem with marking HTML tags through an IF condition.
The solution is therefore not to use use tag <text> but to use #:
<tbody>
#foreach (var dayIncidentPair in Model.List)
{
<tr>
<td rowspan="#dayIncidentPair.Item3.Count()">Finded segment in #dayIncidentPair.Datetime.ToString("d")</td>
<td rowspan="#dayIncidentPair.Item3.Count()">Link here</td>
#{int i = 0; }
#foreach (var segmentInfo in dayIncidentPair.Item3)
{
if (i > 0)
{
#:</tr><tr>
}
<td>#segmentInfo.MValue1.Time.ToString("t")</td>
<td>#String.Format("{0:f1}", #segmentInfo...

Related

ZPL print € and characters with an acute

I'm trying to print labels with the euro sign (€) and with characters with an acute on (é, è, à, ë,...).
I have fixed the isolated problems of both:
The euro sign was fixed by adding ^CI0,21,36.
The acute problem was solved using ^CI28 and ^FDBelgi_C3_AB (to print België).
But I fail to find a way to make them both print because one if using CI0 and the other one is using CI28. How can print €, ë, é, è, à, ... all on one label?
Using CI28,21,36 also doesn't solve the issue.
I already looked at This question, this question and this question and am using a Zebra ZD420 printer.
You can use CP-1252 (^CI27) to print all those characters:
^XA
^CI27
^FO70,70^A0N30,30
^FH^FDprint _80, _EB, _E9, _E8, _E0, ... all on one label?^FS
^XZ
Full listing of hex values for CP-1252 can be found in the "Zebra Code Pages" section of the ZPL manual.
╔═════════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╦══════╗
║ Code ║ ...0 ║ ...1 ║ ...2 ║ ...3 ║ ...4 ║ ...5 ║ ...6 ║ ...7 ║ ...8 ║ ...9 ║ ...A ║ ...B ║ ...C ║ ...D ║ ...E ║ ...F ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 2... ║ ║ ! ║ " ║ # ║ $ ║ % ║ & ║ ' ║ ( ║ ) ║ * ║ + ║ , ║ - ║ . ║ / ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 3... ║ 0 ║ 1 ║ 2 ║ 3 ║ 4 ║ 5 ║ 6 ║ 7 ║ 8 ║ 9 ║ : ║ ; ║ < ║ = ║ > ║ ? ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 4... ║ # ║ A ║ B ║ C ║ D ║ E ║ F ║ G ║ H ║ I ║ J ║ K ║ L ║ M ║ N ║ O ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 5... ║ P ║ Q ║ R ║ S ║ T ║ U ║ V ║ W ║ X ║ Y ║ Z ║ [ ║ \ ║ ] ║ ^ ║ _ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 6... ║ ` ║ a ║ b ║ c ║ d ║ e ║ f ║ g ║ h ║ i ║ j ║ k ║ l ║ m ║ n ║ o ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 7... ║ p ║ q ║ r ║ s ║ t ║ u ║ v ║ w ║ x ║ y ║ z ║ { ║ ║ ║ } ║ ~ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 8... ║ € ║ ║ ‚ ║ ƒ ║ „ ║ … ║ † ║ ‡ ║ ˆ ║ ‰ ║ Š ║ ‹ ║ Œ ║ ║ Ž ║ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ 9... ║ ║ ‘ ║ ’ ║ “ ║ ” ║ • ║ – ║ — ║ ˜ ║ ™ ║ š ║ › ║ œ ║ ║ ž ║ Ÿ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ A... ║ ║ ¡ ║ ¢ ║ £ ║ ¤ ║ ¥ ║ ¦ ║ § ║ ¨ ║ © ║ ª ║ « ║ ¬ ║ - ║ ® ║ ¯ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ B... ║ ° ║ ± ║ ² ║ ³ ║ ´ ║ µ ║ ¶ ║ · ║ ¸ ║ ¹ ║ º ║ » ║ ¼ ║ ½ ║ ¾ ║ ¿ ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ C... ║ À ║ Á ║ Â ║ Ã ║ Ä ║ Å ║ Æ ║ Ç ║ È ║ É ║ Ê ║ Ë ║ Ì ║ Í ║ Î ║ Ï ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ D... ║ Ð ║ Ñ ║ Ò ║ Ó ║ Ô ║ Õ ║ Ö ║ × ║ Ø ║ Ù ║ Ú ║ Û ║ Ü ║ Ý ║ Þ ║ ß ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ E... ║ à ║ á ║ â ║ ã ║ ä ║ å ║ æ ║ ç ║ è ║ é ║ ê ║ ë ║ ì ║ í ║ î ║ ï ║
╠═════════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╬══════╣
║ F... ║ ð ║ ñ ║ ò ║ ó ║ ô ║ õ ║ ö ║ ÷ ║ ø ║ ù ║ ú ║ û ║ ü ║ ý ║ þ ║ ÿ ║
╚═════════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╩══════╝
You can put both on the same label. See the example below.
^XA
^CI0,21,36
^FO100,20^A0N50,50^FD$0123^FS
^CI28,21,36
^FH^FO100,70^A0N50,50^FDBelgi_C3_AB^FS
^XZ

Partial info stored in task repository when execute tasks

I am running a simple hello world task.
I am running the spring cloud data flow server backed by a Postgres db.
When I execute my task and then query the data flow server, I see:
dataflow:>task execution list
╔═════════╤══╤══════════╤════════╤═════════╗
║Task Name│ID│Start Time│End Time│Exit Code║
╠═════════╪══╪══════════╪════════╪═════════╣
║mytask │5 │ │ │0 ║
║mytask │4 │ │ │0 ║
║mytask │3 │ │ │0 ║
║mytask │2 │ │ │0 ║
║mytask │1 │ │ │0 ║
╚═════════╧══╧══════════╧════════╧═════════╝
I did query the database as well:
anand=# select * from task_execution;
task_execution_id | start_time | end_time | task_name | exit_code | exit_message | error_message | last_updated | external_execution_id
-------------------+------------+----------+-----------+-----------+--------------+---------------+-------------------------+---------------------------------
1 | | | mytask | | | | 2017-05-01 23:57:16.734 | mytask-87bc3b77-157d-4ff6-9b9a-d
2 | | | mytask | | | | 2017-05-01 23:57:57.762 | mytask-57d98d02-9aac-4283-a410-a
3 | | | mytask | | | | 2017-05-04 14:31:13.687 | mytask-5495ffd2-2f13-43bd-bdeb-5
4 | | | mytask | | | | 2017-05-04 14:37:06.435 | mytask-0063c9f5-df40-4eac-92d8-9
5 | | | mytask | | | | 2017-05-04 14:39:36.191 | mytask-98bbed0a-12e6-4318-b4f2-3
(5 rows)
Where am I going wrong that's causing the task execution info being partial in the database?

Error in reloading taglib classes in grails 2.5.2

I am using grails 2.5.2 and working on a taglib. When I execute grails run-app everything runs fine, but whenever I make a change in my taglib and save the file I get the following error
Error |
2016-02-26 16:29:30,628 [Thread-9] ERROR plugins.AbstractGrailsPluginManager - Plugin [groovyPages:2.5.2] could not reload changes to file [D:\...\BootstrapTagLib.groovy]: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Message: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Line | Method
->> 3241 | chooseMostSpecificParams in groovy.lang.MetaClassImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 3194 | chooseMethodInternal in ''
| 3137 | chooseMethod . . . . . . . . in ''
| 1328 | getMethodWithCachingInternal in ''
| 3405 | createPogoCallSite . . . . . in ''
| 1314 | createPogoCallSite in groovy.lang.ExpandoMetaClass
| 150 | createPogoSite . . . . . . . in org.codehaus.groovy.runtime.callsite.CallSiteArray
| 164 | createCallSite in ''
| 48 | defaultCall . . . . . . . . in ''
| 113 | call in org.codehaus.groovy.runtime.callsite.AbstractCallSite
| 125 | call . . . . . . . . . . . . in ''
| 342 | doCall in org.codehaus.groovy.grails.plugins.web.GroovyPagesGrailsPlugin$_closure5
| -2 | invoke0 . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| 57 | invoke in ''
| 43 | invoke . . . . . . . . . . . in sun.reflect.DelegatingMethodAccessorImpl
| 606 | invoke in java.lang.reflect.Method
| 1426 | jlrMethodInvoke . . . . . . in org.springsource.loaded.ri.ReflectiveInterceptor
| 93 | invoke in org.codehaus.groovy.reflection.CachedMethod
| 325 | doMethodInvoke . . . . . . . in groovy.lang.MetaMethod
| 1210 | invokeMethod in groovy.lang.MetaClassImpl
| 1123 | invokeMethod . . . . . . . . in groovy.lang.ExpandoMetaClass
| 1019 | invokeMethod in groovy.lang.MetaClassImpl
| 426 | call . . . . . . . . . . . . in groovy.lang.Closure
| 767 | invokeOnChangeListener in org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin
| 716 | notifyOfEvent . . . . . . . in ''
| 731 | notifyOfEvent in ''
| 408 | informOfClassChange . . . . in org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager
| 366 | informOfFileChange in ''
| 226 | informPluginManager . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher
| 48 | access$400 in ''
| 152 | onNew . . . . . . . . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher$1
| 76 | fireOnNew in org.codehaus.groovy.grails.compiler.AbstractDirectoryWatcher
| 104 | run . . . . . . . . . . . . in org.codehaus.groovy.grails.compiler.WatchServiceDirectoryWatcher
| 154 | run in org.codehaus.groovy.grails.compiler.DirectoryWatcher
^ 161 | run . . . . . . . . . . . . in org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher
I investigated a bit and found the following JIRA which says that this error was fixed since grails 2.3.3. I´ll be working extensively with taglibs, and having to restart the app every time I make a change is very time consuming.
Is there an override I could do in in resources.groovy? Is this error present in grails 2.5.3 or 2.5.1?
Good day and thanks.

Setting Java System.Property (to Enable TLS1.1) for older grails site (Grails 2.3)

We have a rather ancient Grails site (2.3) that has been serving our needs for quite a while. The server needs to call out to another service for customer details, and that service will soon require TLS 1.1 or higher only. Our site is running on java 1.7, which should support TLS 1.1 and 1.2, but requires it to be enabled explicitly. I'm having trouble enabling it in the grails site.
Primarily what I've tried is to start grails by running
grails -Dhttps.protocols=TLSv1.1 run-app
based on the instructions here, and the hint here. But when I do, the socket is still closed when I try to login to the other site:
Message: Connection reset
Line | Method
->> 196 | read in java.net.SocketInputStream
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 122 | read in ''
| 82 | flushBuffer . . . . . . in java.io.BufferedOutputStream
| 140 | flush in ''
| 191 | flush . . . . . . . . . in org.apache.commons.httpclient.ChunkedOutputStream
| 99 | flush in com.ctc.wstx.io.UTF8Writer
| 214 | flush . . . . . . . . . in com.ctc.wstx.sw.BufferingXmlWriter
| 311 | flush in com.ctc.wstx.sw.BaseStreamWriter
| 50 | flush . . . . . . . . . in org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper
| 230 | flush in org.apache.axiom.om.impl.MTOMXMLStreamWriter
| 91 | serialize . . . . . . . in org.apache.axis2.databinding.ADBDataSource
| 638 | internalSerialize in org.apache.axiom.om.impl.llom.OMSourcedElementImpl
| 563 | serializeChildren . . . in org.apache.axiom.om.impl.util.OMSerializerUtil
| 846 | internalSerialize in org.apache.axiom.om.impl.llom.OMElementImpl
| 267 | serializeInternally . . in org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl
| 229 | internalSerialize in ''
| 188 | serializeAndConsume . . in org.apache.axiom.om.impl.llom.OMSerializableImpl
| 74 | writeTo in org.apache.axis2.transport.http.SOAPMessageFormatter
| 84 | writeRequest . . . . . in org.apache.axis2.transport.http.AxisRequestEntity
| 499 | writeRequestBody in org.apache.commons.httpclient.methods.EntityEnclosingMethod
| 2114 | writeRequest . . . . . in org.apache.commons.httpclient.HttpMethodBase
| 1096 | execute in ''
| 398 | executeWithRetry . . . in org.apache.commons.httpclient.HttpMethodDirector
| 171 | executeMethod in ''
| 397 | executeMethod . . . . . in org.apache.commons.httpclient.HttpClient
| 621 | executeMethod in org.apache.axis2.transport.http.AbstractHTTPSender
| 193 | sendViaPost . . . . . . in org.apache.axis2.transport.http.HTTPSender
| 75 | send in ''
| 404 | writeMessageWithCommons in org.apache.axis2.transport.http.CommonsHTTPTransportSender
| 231 | invoke in ''
| 443 | send . . . . . . . . . in org.apache.axis2.engine.AxisEngine
| 406 | send in org.apache.axis2.description.OutInAxisOperationClient
| 229 | executeImpl . . . . . . in ''
| 165 | execute in org.apache.axis2.client.OperationClient
| 3916 | login . . . . . . . . . in com.zuora.api.ZuoraServiceStub
| 51 | ___init___ in com.zuora.zortal.util.ZApi$$EPbnSoym
| 48 | <init> . . . . . . . . in com.zuora.zortal.repository.ZuoraRepository
| 40 | login in saaseiportal.unauthorized.LoginController
| 195 | doFilter . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . . in java.lang.Thread
I have confirmed that my system and system's java support TLS 1.1. I created an example java client to connect directly to the site. It gets a similar connection reset message when I run it regularly, but it gets a valid response when I try
java -Dhttps.protocols=TLSv1.1 SampleHttpTest
I suspect somewhere in grails is actually clearing out my setting. Immediately before the login call that generates the exception, I added a logging call to
System.out.println(System.getProperty("https.protocols"));
And it just logs a null. Setting that property immediately before I try to login has no effect, possibly because it's far too late in the application's life (some factory already created or something).
I'm actually something of a grails novice, so upgrading the app to grails 2.5 and java 8 is actually a rather daunting prospect. I'm hoping someone can point out something simple like:
"Here's where grails lets you set system properties before running any other java code"
or
"Here's where grails sets a bunch of default settings and you should check the values there already"
or
"It's probably the authentication plugin (or something) that needs to clear/fiddle with those settings"
Thanks in advance for any help!!
It may be the fork mode. To pass a JVM argument to a forked Java you have to change the BuildConfig.groovy a bit:
grails.project.fork = [
...
run : [maxMemory: 1280, minMemory: 128, debug: false, maxPerm: 256, forkReserve: true, jvmArgs: ['-Dhttps.protocols=TLSv1.1']],
...
]
But it could be something else as well.

Grails: CLI interaction while application is running

Is there anything bad about interacting with Grails via command line while an application is running? For example, I had an application running on my local machine via the grails run-app target and then I opened another command prompt and created a domain class, I noticed that it created the domain class and the equivalent test class but in the other terminal where I had the application running I got a fair bit amount of red text like this:
| Error 2015-03-01 10:40:10,392 [Thread-10] ERROR plugins.AbstractGrailsPluginManager
- Plugin [domainClass:2.3.8] could not reload changes to file [C:\Users\user\Dropbo
x\MoeStuff\Projects\qotd\grails-app\domain\qotd\Quote.groovy]: Ambiguous method overl
oading for method grails.spring.BeanBuilder#registerBeans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes betwee
n:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfigurati
on]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Message: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBe
ans.
Cannot resolve which method to invoke for [null] due to overlapping prototypes betwee
n:
[interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfigurati
on]
[interface org.springframework.beans.factory.support.BeanDefinitionRegistry]
Line | Method
->> 3034 | chooseMostSpecificParams in groovy.lang.MetaClassImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 2986 | chooseMethodInternal in ''
| 2929 | chooseMethod . . . . . . . . in ''
| 1204 | getMethodWithCachingInternal in ''
| 3163 | createPogoCallSite . . . . . in ''
| 1306 | createPogoCallSite in groovy.lang.ExpandoMetaClass
| 147 | createPogoSite . . . . . . . in org.codehaus.groovy.runtime.callsite.CallS
iteArray
| 161 | createCallSite in ''
| 45 | defaultCall . . . . . . . . in ''
| 108 | call in org.codehaus.groovy.runtime.callsite.Abstr
actCallSite
| 116 | call . . . . . . . . . . . . in ''
| 156 | doCall in org.codehaus.groovy.grails.plugins.DomainC
lassGrailsPlugin$_closure3
| -2 | invoke0 . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| 57 | invoke in ''
| 43 | invoke . . . . . . . . . . . in sun.reflect.DelegatingMethodAccessorImpl
| 606 | invoke in java.lang.reflect.Method
| 1254 | jlrMethodInvoke . . . . . . in org.springsource.loaded.ri.ReflectiveInter
ceptor
| 90 | invoke in org.codehaus.groovy.reflection.CachedMetho
d
| 233 | doMethodInvoke . . . . . . . in groovy.lang.MetaMethod
| 1086 | invokeMethod in groovy.lang.MetaClassImpl
| 1110 | invokeMethod . . . . . . . . in groovy.lang.ExpandoMetaClass
| 910 | invokeMethod in groovy.lang.MetaClassImpl
| 411 | call . . . . . . . . . . . . in groovy.lang.Closure
| 767 | invokeOnChangeListener in org.codehaus.groovy.grails.plugins.Default
GrailsPlugin
| 716 | notifyOfEvent . . . . . . . in ''
| 731 | notifyOfEvent in ''
| 409 | informOfClassChange . . . . in org.codehaus.groovy.grails.plugins.Abstrac
tGrailsPluginManager
| 367 | informOfFileChange in ''
| 243 | informPluginManager . . . . in org.codehaus.groovy.grails.compiler.Grails
ProjectWatcher
| 46 | access$400 in ''
| 169 | onNew . . . . . . . . . . . in org.codehaus.groovy.grails.compiler.Grails
ProjectWatcher$1
| 210 | cacheFilesForDirectory in org.codehaus.groovy.grails.compiler.Direct
oryWatcher
| 204 | cacheFilesForDirectory . . . in ''
| 187 | checkForNewFiles in ''
| 163 | run . . . . . . . . . . . . in ''
^ 178 | run in org.codehaus.groovy.grails.compiler.Grails
ProjectWatcher
Can anyone please talk a bit about what this error(s) means? And is it ok to be doing what I was doing in the first place or should I ALWAYS stop an application from running before issuing any commands to grails that have to do with artefact creation/modification or do CLI interaction with Grails? Thanks.
It's a best practice to stop your application when doing artifact creation. Modification you can usually get away with keeping the application running, so long as you aren't doing major modifications to the class hierarchy.
The reason for this is in development mode Grails watches for changes artifacts and attempts to reload those changes. In the case of creation it may hit just at the wrong time and confuse your application (what you are seeing in your question).
Reloading of changed/new resources (Domain classes in particular) isn't perfect, but it works most of the time. Save yourself the headache and stop your application during creation.
So grails is going to try compile and load changes to files. So what you are seeing here is grails tried to compile a file you modified or were in the process of modifying and it failed.
Now how well can grails load and compile changes is a somewhat hit or miss. It will load them, but sometimes it just doesn't work and the server needs to be rebooted. Also the amount of processor needed to watch files can be overloaded especially when you checkout new code while your server is running.
So does this harm anything? Well no it just may or may not work. Your server may not reflect changes or it may give you wrong responses than what the code says because it couldn't loaded that code. Changing domain objects could affect your database or persistence layer, but some changes may not be compatible with your DB so you'll have to stop it.

Resources