I am getting the error below when I am running an integration test, and attempting to render a template. The unique part of this is the template is rendering a template inside it on line 93. The reason I am doing this is to have a template that I am rendering to convert it to a PDF, it contains a styling template that calls the view template. Then the same view template I am using to set in a gsp page with styling for preview within the browser
The template containing the nested template is below minus the styling
<html>
<head>
<style type="text/css" media="print"></style>
</head>
<body>
<g:render template="depositStatement"/>
</body>
</html>
This works when running the application, but does not work when running integration tests.
Failure: |
Print Deposit Request(com.srm.billing.BillingPaymentRequestControllerIntegrationSpec)
|
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: null
at org.codehaus.groovy.grails.web.pages.GroovyPage.throwRootCause(GroovyPage.java:527)
at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:470)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at C__Development_Grails36_sales_revenue_webapp_grails_app_views_billingPaymentRequest__printDepositStatement_gsp.run_closure1(_printDepositStatement.gsp:93)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at groovy.lang.Closure.call(Closure.java:423)
at groovy.lang.Closure.call(Closure.java:417)
at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.executeClosure(GroovyPageTagBody.java:206)
at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.captureClosureOutput(GroovyPageTagBody.java:108)
at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.call(GroovyPageTagBody.java:219)
at org.codehaus.groovy.grails.plugins.web.taglib.SitemeshTagLib.captureTagContent(SitemeshTagLib.groovy:49)
at org.codehaus.groovy.grails.plugins.web.taglib.SitemeshTagLib$_closure3.doCall(SitemeshTagLib.groovy:157)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at groovy.lang.Closure.call(Closure.java:423)
at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:501)
at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:419)
at C__Development_Grails36_sales_revenue_webapp_grails_app_views_billingPaymentRequest__printDepositStatement_gsp.run(_printDepositStatement.gsp:94)
at org.codehaus.groovy.grails.web.pages.GroovyPageWritable.doWriteTo(GroovyPageWritable.java:217)
at org.codehaus.groovy.grails.web.pages.GroovyPageWritable.writeTo(GroovyPageWritable.java:128)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.makeTemplate(GroovyPagesTemplateRenderer.java:219)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.render(GroovyPagesTemplateRenderer.java:105)
at org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib$_closure7.doCall(RenderTagLib.groovy:364)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at groovy.lang.Closure.call(Closure.java:423)
at org.codehaus.groovy.grails.web.pages.GroovyPage.captureTagOutput(GroovyPage.java:586)
at org.codehaus.groovy.grails.web.util.TagLibraryMetaUtils.registerMethodMissingForTags_closure3(TagLibraryMetaUtils.groovy:55)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at com.srm.billing.BillingPaymentRequestService.renderOutput(BillingPaymentRequestService.groovy:656)
at com.srm.billing.BillingPaymentRequestService.getOrCreateBillingDepositRequest(BillingPaymentRequestService.groovy:94)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)
at com.srm.billing.BillingPaymentRequestControllerIntegrationSpec.Print Deposit Request(BillingPaymentRequestControllerIntegrationSpec.groovy:73)
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.generateScaffoldedTemplate(GroovyPagesTemplateRenderer.java:248)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.access$300(GroovyPagesTemplateRenderer.java:64)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer$1$1.updateValue(GroovyPagesTemplateRenderer.java:164)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer$1$1.updateValue(GroovyPagesTemplateRenderer.java:135)
at grails.util.CacheEntry.getValue(CacheEntry.java:141)
at grails.util.CacheEntry.getValue(CacheEntry.java:81)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.findAndCacheTemplate(GroovyPagesTemplateRenderer.java:132)
at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.render(GroovyPagesTemplateRenderer.java:100)
at org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib$_closure7.doCall(RenderTagLib.groovy:364)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at groovy.lang.Closure.call(Closure.java:423)
at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:501)
at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:419)
... 36 more
|Completed 3 integration tests, 1 failed in 0m 3s
It doesn't mean render tag is null, your gsp has null pointer exception, so check your second gsp for possible NPE. Just to verify its not render tag issue, you can remove every thing from your second gsp and that should fix it, which will prove render is not an issue, and then find out the cause of NPE
Related
I have a spring backed form with a model object Foo that contains Bar
<form action="#" th:action="#{/some/action}" th:object="${foo}" method="post">
now, I would like to do something like this:
<input type="text" id="bar.createdAt" name="bar.createdAt" th:value="*{bar.createdAt} ? ${#dates.format(bar.createdAt, #messages.msg('app.dateformat.datetime'))}"/>
but the following parsing exeption is thrown:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "#dates.format(bar.createdAt, #messages.msg('app.dateformat.datetime'))" (registration:93)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "#dates.format(bar.createdAt, #messages.msg('app.dateformat.datetime'))" (registration:93)
org.thymeleaf.spring4.expression.SpelVariableExpressionEvaluator.evaluate(SpelVariableExpressionEvaluator.java:161)
org.thymeleaf.standard.expression.VariableExpression.executeVariable(VariableExpression.java:154)
org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:59)
root cause
org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 7): Property or field 'createdAt' cannot be found on null
org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:211)
org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85)
org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:43)
org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:341)
I've already tried:
...#dates.format(*{bar.createdAt}..., ...#dates.format(__*{bar.createdAt}__...but none has worked out.
the same without the form (directly accessing view model object) works fine.
Any idea what would be the right construct?
Thanks in advance!!!
Instead of :
${#dates.format(bar.createdAt, #messages.msg('app.dateformat.datetime'))}
Change it to :
*{#dates.format(bar.createdAt, #messages.msg('app.dateformat.datetime'))}
So that the utility object will work on the bar property of the last selected object which is the form backing object, ${foo}, in your case.
I think the clue is in the line:
Property or field 'createdAt' cannot be found on null
Are you sure that bar is not null?
My Scenerios:
I am using grails remoteFunction which is rendering template. I have a slider on the render template which is using some Jquery methods. Previously I have kept js within this template but the problem is with performance. Everytime the ajax loads the jquery classes which is causing the performance issues.
Is there a way to get the parent resource by templates after rendering thru Ajax ?
Inside index.gsp page:
<g:if test="${action=="individual"}">
<g:render template="individual" />
</g:if>
<g:if test="${action=="project"}">
<g:render template="project" />
</g:if>
<asset:javascript src="bootstrap/jquery-1.10.2.js"></asset:javascript>
<asset:javascript src="bootstrap/bootstrap-slider.js"></asset:javascript>
<asset:javascript src="resource_utilization/slider.js"></asset:javascript>
<asset:javascript src="resource_utilization/resource-utilization.js"></asset:javascript>
<asset:javascript src="jquery.blockUI.js"></asset:javascript>
In controller:
render template:"individual"
Please read this link. When you render template inside parent then your jquery will not work. For that to work you have to reactivate the js resource.
I have done the following. In parent gsp load all the resources and add one method to initialize your slider.
<script type="text/javascript">
function refreshUI () {
// your slider initialization code goes here
};
</script>
In template at the end just call the parent function.
<script>
refreshUI();
</script>
This will refresh your UI and everything will work fine.
I am using ckeditor in my gwt project. The editor is being displayed but when i try to get the edited content, using the method getHTML() of class CKEditor,
i get an exception :-
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Cannot read property 'document' of null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.gwtck.client.CKEditor.getNativeHTML(CKEditor.java) at com.gwtck.client.CKEditor.getHTML(CKEditor.java:162) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:54) at com.google.gwt.event.dom.client.ClickEvent.dispatch(ClickEvent.java:1) at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1) at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40) at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193) at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88) at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127) at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129) at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116) at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213) at sun.reflect.GeneratedMethodAccessor337.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:662)
I'm trying to index an HTML document using Apache Solr and the TikaEntityProcessor, with the idea being that I can use XPath to select specific elements from the HTML.
I have followed the advanced example shown at the bottom of the TikaEntityProcessor Solr Wiki page.
When I try to complete a data import command, I receive the following error message(s):
03-Oct-2012 16:39:48 org.apache.solr.handler.dataimport.DataImporter doFullImport
INFO: Starting Full Import
03-Oct-2012 16:39:48 org.apache.solr.core.SolrCore execute
INFO: [htmlTest] webapp=/apache-solr-3.6.1 path=/dataimport params={command=full-import} status=0 QTime=31
03-Oct-2012 16:39:48 org.apache.solr.handler.dataimport.SimplePropertiesWriter readIndexerProperties
INFO: Read dataimport.properties
03-Oct-2012 16:39:48 org.apache.solr.update.DirectUpdateHandler2 deleteAll
INFO: [htmlTest] REMOVING ALL DOCUMENTS FROM INDEX
03-Oct-2012 16:39:48 org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
commit{dir=C:\Program Files\Apache Tomcat\conf\apache-solr-3.5.0\htmlTest\data\index,segFN=segments_1e,version=1349187077567,generation=50,filenames=[_u.fnm, _u.nrm, _u.tis, _u.prx, _u.frq, _u.fdx, _u.fdt, _u.tii, segments_1e]
03-Oct-2012 16:39:48 org.apache.solr.core.SolrDeletionPolicy updateCommits
INFO: newest commit = 1349187077567
03-Oct-2012 16:39:48 org.apache.solr.handler.dataimport.SqlEntityProcessor initQuery
SEVERE: The query failed 'null'
java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.apache.solr.handler.dataimport.FileDataSource.getFile(FileDataSource.java:96)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:53)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:44)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.pullRow(EntityProcessorWrapper.java:330)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:296)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:683)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:709)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:619)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:327)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:225)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:375)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:445)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:426)
03-Oct-2012 16:39:48 org.apache.solr.common.SolrException log
SEVERE: Exception while processing: tika-test document : SolrInputDocument[{text=text(1.0)={<html>
<meta name="Content-Encoding" content="ISO-8859-1">
<meta name="Content-Type" content="text/html">
<title></title>
<body>
<h1>This is my first heading</h1>
This is some content
<h1>This is my second heading</h1>
This is some more content
</body></html>}}]:org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NullPointerException
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:65)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.pullRow(EntityProcessorWrapper.java:330)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:296)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:683)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:709)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:619)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:327)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:225)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:375)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:445)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:426)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.apache.solr.handler.dataimport.FileDataSource.getFile(FileDataSource.java:96)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:53)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:44)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
... 11 more
03-Oct-2012 16:39:48 org.apache.solr.update.processor.LogUpdateProcessor finish
INFO: {deleteByQuery=*:*} 0 31
03-Oct-2012 16:39:48 org.apache.solr.common.SolrException log
SEVERE: Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NullPointerException
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:264)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:375)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:445)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:426)
Caused by: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NullPointerException
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:621)
at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:327)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:225)
... 3 more
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.NullPointerException
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:65)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.pullRow(EntityProcessorWrapper.java:330)
at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:296)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:683)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:709)
at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:619)
... 5 more
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.apache.solr.handler.dataimport.FileDataSource.getFile(FileDataSource.java:96)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:53)
at org.apache.solr.handler.dataimport.BinFileDataSource.getData(BinFileDataSource.java:44)
at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
... 11 more
03-Oct-2012 16:39:48 org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
03-Oct-2012 16:39:48 org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
My data import configuration is:
<dataConfig>
<dataSource type="BinFileDataSource"/>
<dataSource type="FieldReaderDataSource" name="fld"/>
<document>
<entity name="tika-test" processor="TikaEntityProcessor"
url="C:/Program Files/Apache Tomcat/conf/apache-solr-3.5.0/htmlTest/data/html_basic.html" format="html">
<field column="text"/>
<entity type="XPathEntityProcessor" forEach="/html" dataField="text">
<field xpath="//h1" column="date" />
</entity>
</entity>
</document>
</dataConfig>
And the HTML document Solr is indexing is:
<html>
<head>
</head>
<body>
<h1>This is my first heading</h1>
<div>
This is some content
</div>
<h1>This is my second heading</h1>
<div>
This is some more content
</div>
</body>
You seem to be missing a reference to the right data source. It needs to be an attribute on entity called dateSource which matches attribute name on the datasource definition itself. You seem to have defined the name fld but did not reference it.
I recommend doing this explicitly for both data sources and the corresponding entities to avoid confusion.
I got error when I write this code #Html.X().ResourceManager() in view
error message :
Compiler Error Message: CS1928: 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'X' and the best extension method overload 'Ext.Net.Extensions.X(System.Web.UI.Page)' has some invalid arguments
is there a setting that is less ?
thanks
This posted code looks to me as a WebForm syntax.
If you are using ASP.NET MVC Razor and the latest Ext.NET v2.x release, you can render all/any of the Ext.NET Components using Razor syntax.
The following sample demonstrates rendering a very simple TabPanel.
#{
Layout = "";
}
<!DOCTYPE html>
<html>
<head>
<title>Ext.NET Examples</title>
</head>
<body>
#Html.X().ResourceManager()
#(Html.X().TabPanel()
.Height(300)
.Items(items => {
items.Add(Html.X().Panel().Title("Test"));
}));
</body>
</html>