How to execute a R script file from java - java

I would like to call an R script from Java. I have done google searches on the topic, but almost all of the results I have seen would require me to add a dependency to some third party library. Can anyone show me a good way to accomplish the same thing without adding any dependencies to my code?
I'm setting up a new application which runs R script file from java using the following line
Runtime.getRuntime().exec("C:\\Users\\Thiru\\Desktop helloWorld.R");
but when I run the application I am getting following exception:
SEVERE: Servlet.service() for servlet [RenjinServlet] in context with
path
[/REngineCheck] threw exception
java.io.IOException: Cannot run program "C:\Users\Thiru\Desktop":
CreateProcess error=5, Access is denied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.r.Check.RenjinServlet.doGet(RenjinServlet.java:102)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:291)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:217)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke
(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process
(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun
(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run
(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=5, Access is denied
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 28 more

You should set up your path in a bracket like
("your_path\Rscript.exe your_path\filename.R")
If you set the environment, you can use Rscript
Example:
Runtime.getRuntime().exec("C:\\Program Files\\R\\R-3.6.1\\bin\\x64\\Rscript.exe C:\\Users\\Thiru\\Desktop\\helloWorld.R");

Related

Jenkins is not getting start on windows 10

java.lang.IllegalStateException: Expected 1 instance of hudson.PluginManager$PluginUpdateMonitor but got 0
at hudson.ExtensionList.lookupSingleton(ExtensionList.java:451)
at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:2188)
at hudson.maven.PluginImpl.init(PluginImpl.java:58)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:1133)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused: org.jvnet.hudson.reactor.ReactorException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:50)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:1166)
at jenkins.model.Jenkins.<init>(Jenkins.java:966)
at hudson.model.Hudson.<init>(Hudson.java:85)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.WebAppMain$3.run(WebAppMain.java:233)
Caused: hudson.util.HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:250)
Recently install Jenkins by downloading its war file(jenkins.war), and installation I downloaded some maven plugins and then I tried to restart it again but did not find any way to restart it.
so I just open the cmd and hit the command java -jar jenkins.war. After that Jenkins stops(cmd showing the message: jenkins.model.Jenkins#cleanUp: Jenkins stopped).
Now how can I start it again, when I am hitting the localhost:8080/jenkins, it is showing the above error.

Eclipse gradle plugin error importing project

I'm trying to import a gradle project using the eclipse plugin 'buildship'. At the end of the eclipse import throws this error.
Synchronize Gradle projects with workspace failed due to an error connecting to the Gradle build.
Could not run build action using Gradle distribution
'https://services.gradle.org/distributions/gradle-3.3-bin.zip'.
Could not determine the class-path for class org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.
java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Eclipse Neon/plugins/org.gradle.toolingapi_3.4.0.v20170220163122.jar
Illegal character in path at index 16: file:/C:/Eclipse Neon/plugins/org.gradle.toolingapi_3.4.0.v20170220163122.jar
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.3-bin.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:48)
at com.gradleware.tooling.toolingclient.internal.DefaultToolingClient.executeAndWait(DefaultToolingClient.java:106)
at com.gradleware.tooling.toolingclient.internal.DefaultBuildActionRequest.executeAndWait(DefaultBuildActionRequest.java:51)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository$13.get(DefaultModelRepository.java:287)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeAndWait(DefaultModelRepository.java:355)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.access$100(DefaultModelRepository.java:49)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository$14.call(DefaultModelRepository.java:313)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.getFromCache(DefaultModelRepository.java:330)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeRequest(DefaultModelRepository.java:309)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.executeRequest(DefaultModelRepository.java:280)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultModelRepository.fetchEclipseGradleProjects(DefaultModelRepository.java:238)
at org.eclipse.buildship.core.workspace.internal.DefaultModelProvider.fetchEclipseGradleProjects(DefaultModelProvider.java:66)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.fetchEclipseProjects(SynchronizeGradleBuildsJob.java:87)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:79)
at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:72)
at org.eclipse.buildship.core.util.progress.ToolingApiJob$1.run(ToolingApiJob.java:73)
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:62)
at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.gradle.api.GradleException: Could not determine the class-path for class org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.
at org.gradle.tooling.internal.provider.serialization.ClasspathInferer.find(ClasspathInferer.java:143)
at org.gradle.tooling.internal.provider.serialization.ClasspathInferer.getClassPathFor(ClasspathInferer.java:61)
at org.gradle.tooling.internal.provider.serialization.ClientSidePayloadClassLoaderRegistry$1.visitClass(ClientSidePayloadClassLoaderRegistry.java:78)
at org.gradle.tooling.internal.provider.serialization.WellKnownClassLoaderRegistry$1.visitClass(WellKnownClassLoaderRegistry.java:65)
at org.gradle.tooling.internal.provider.serialization.PayloadSerializerObjectOutputStream.writeClassLoader(PayloadSerializerObjectOutputStream.java:63)
at org.gradle.tooling.internal.provider.serialization.PayloadSerializerObjectOutputStream.writeClass(PayloadSerializerObjectOutputStream.java:55)
at org.gradle.tooling.internal.provider.serialization.PayloadSerializerObjectOutputStream.writeClassDescriptor(PayloadSerializerObjectOutputStream.java:43)
at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source)
at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at org.gradle.tooling.internal.provider.serialization.PayloadSerializer.serialize(PayloadSerializer.java:45)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:121)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:208)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerConnection$CancellableActionRunner.run(CancellableConsumerConnection.java:99)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:62)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:59)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:79)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.gradle.internal.UncheckedException: java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Eclipse Neon/plugins/org.gradle.toolingapi_3.4.0.v20170220163122.jar
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:45)
at org.gradle.internal.classloader.ClasspathUtil.getClasspathForClass(ClasspathUtil.java:88)
at org.gradle.tooling.internal.provider.serialization.ClasspathInferer.find(ClasspathInferer.java:92)
... 27 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Eclipse Neon/plugins/org.gradle.toolingapi_3.4.0.v20170220163122.jar
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at java.net.URL.toURI(Unknown Source)
at org.gradle.internal.classloader.ClasspathUtil.getClasspathForClass(ClasspathUtil.java:74)
... 28 more
Before importing project on eclipse I execute the 'gradle eclipse' command and everything goes well.
What I could do?
Thanks.
There was a bug in Gradle up to Version 3.4(?), where spaces within the build path were not allowed
https://github.com/gradle/gradle/issues/1180
Because your build path contains a space because of "Eclipse Neon" it will fail.
Suggestions:
Either update to the latest version
or try to prevent the error by moving your eclipse neon installation so the path does not include spaces

Apache Tomcat home page not coming

I installed Apache server (Tomcat 7.63) on client machine (Window 7 system 32 bit), The Java version used in client machine is (JDK 1.8 update 60)
Problem
Tomcat server is started by running the file (...\bin\Tomcat7.exe). But when I tried to open the home page (http://localhost:8080/) it is not coming on browser and I can see the following exception on Apache log:
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler process
SEVERE: Error reading request, ignored
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider.lookup(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider.access$000(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider$1.next(Unknown Source)
at sun.nio.cs.AbstractCharsetProvider$1.next(Unknown Source)
at java.nio.charset.Charset.put(Unknown Source)
at java.nio.charset.Charset.access$200(Unknown Source)
at java.nio.charset.Charset$3.run(Unknown Source)
at java.nio.charset.Charset$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.nio.charset.Charset.availableCharsets(Unknown Source)
at org.apache.tomcat.util.buf.B2CConverter.<clinit>(B2CConverter.java:51
)
at org.apache.tomcat.util.buf.ByteChunk.<clinit>(ByteChunk.java:102)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:58)
at org.apache.tomcat.util.buf.MessageBytes.<init>(MessageBytes.java:36)
at org.apache.tomcat.util.buf.MessageBytes$MessageBytesFactory.newInstan
ce(MessageBytes.java:685)
at org.apache.tomcat.util.buf.MessageBytes.newInstance(MessageBytes.java
:78)
at org.apache.coyote.Request.<init>(Request.java:83)
at org.apache.coyote.AbstractProcessor.<init>(AbstractProcessor.java:61)
at org.apache.coyote.http11.AbstractHttp11Processor.<init>(AbstractHttp1
1Processor.java:273)
at org.apache.coyote.http11.Http11Processor.<init>(Http11Processor.java:
56)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.creat
eProcessor(Http11Protocol.java:165)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.creat
eProcessor(Http11Protocol.java:103)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:586)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sun.nio.cs.CharsetMapping.load(Unknown Source)
at sun.nio.cs.CharsetMapping$1.run(Unknown Source)
at sun.nio.cs.CharsetMapping$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.cs.CharsetMapping.get(Unknown Source)
at sun.nio.cs.ext.SJIS_0213$1.run(Unknown Source)
at sun.nio.cs.ext.SJIS_0213$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.nio.cs.ext.SJIS_0213.<clinit>(Unknown Source)
... 30 more
Exception in thread "http-bio-8085-exec-1" java.lang.NullPointerException
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:731)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh
read.java:61)
at java.lang.Thread.run(Unknown Source)
What is really weird to me that if I start Apache server from Services Management Console from the administrator account: Administrative Tools -> Services , it is working fine and I can see that the home page (http://localhost:8080/) is coming on browser.
Question
Why Apache home page is not coming if we run Apache server using the .exe file (...\bin\Tomcat7.exe) ? Why the home page is coming if the server started using Windows service ? In both cases the same .exe file is execute to run the server, what is the difference between the two cases ?
Tomcat cannot be started by using the exe directly (unless the correct parameters are supplied), you should use one of the included .bat files if you want to do that: startup.bat
Just be sure to define your environment variables, such as JAVA_HOME, and/or JRE_HOME

solr.Caused by: java.lang.RuntimeException: [solrconfig.xml] requestHandler: missing mandatory attribute 'class'

I try to introduce with apache Solr. At this resource I find out popular question: Apache Solr java tutorials
I tryed to start from 1 link:
simple example
When I reached the point
Stop and restart solr instance. Check if there are any jdbc errors, this could happen if the jdbc drivers are not properly installed.
I see next trace(last version):
2875 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer Ц F
ailed to load file D:\solr2\example\solr\collection1\solrconfig.xml
2875 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer Ц U
nable to create core: collection1
org.apache.solr.common.SolrException: Could not load config file D:\solr2\exampl
e\solr\collection1\solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:525)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:592)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:271)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:263)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: [solrconfig.xml] requestHandler: missing
mandatory attribute 'class'
at org.apache.solr.util.DOMUtil.getAttr(DOMUtil.java:80)
at org.apache.solr.util.DOMUtil.getAttr(DOMUtil.java:87)
at org.apache.solr.core.PluginInfo.<init>(PluginInfo.java:51)
at org.apache.solr.core.SolrConfig.readPluginInfos(SolrConfig.java:296)
at org.apache.solr.core.SolrConfig.loadPluginInfo(SolrConfig.java:281)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:219)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:522)
... 11 more
2875 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer Ц n
ull:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:
977)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:601)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:271)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:263)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Could not load config file D:\s
olr2\example\solr\collection1\solrconfig.xml
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:525)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:592)
... 10 more
Caused by: java.lang.RuntimeException: [solrconfig.xml] requestHandler: missing
mandatory attribute 'class'
at org.apache.solr.util.DOMUtil.getAttr(DOMUtil.java:80)
at org.apache.solr.util.DOMUtil.getAttr(DOMUtil.java:87)
at org.apache.solr.core.PluginInfo.<init>(PluginInfo.java:51)
at org.apache.solr.core.SolrConfig.readPluginInfos(SolrConfig.java:296)
at org.apache.solr.core.SolrConfig.loadPluginInfo(SolrConfig.java:281)
at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:219)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:522)
... 11 more
2875 [main] INFO org.apache.solr.servlet.SolrDispatchFilter Ц user.dir=D:\solr
2\example
2875 [main] INFO org.apache.solr.servlet.SolrDispatchFilter Ц SolrDispatchFilt
er.init() done
2922 [main] INFO org.eclipse.jetty.server.AbstractConnector Ц Started SocketCo
nnector#0.0.0.0:8983
Can you help me?
update
solrconfig.xml:
http://www.mediafire.com/view/2b67m83v5cy05zd/solrconfig.xml
It is not finding your solr config file:
Could not load config file D:\solr2\example\solr\collection1\solrconfig.xml
Double check to see if your solr config file is in the specified directory.

Using kenai plugin for netbeans which operates the Google application engine

using NetBeans 6.9.1
using Google App Engine plugin for NetBeans from Kenai
I did exactly the same as shown on this video tutorial: http://www.youtube.com/watch?v=kAhaDNs87sc
For some reason after I hit the deploy to google app engine I get a very long exception:
(this view is not the full text of this error..)
Why is it happening?
Reading application configuration data...
29/04/2011 00:57:59 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:/Users//Documents/NetBeansProjects/applet-example/build/web\WEB-INF/appengine-web.xml
29/04/2011 00:57:59 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:/Users//Documents/NetBeansProjects/applet-example/build/web\WEB-INF/web.xml
Beginning server interaction for applet-example...
0% Creating staging directory
5% Scanning for jsp files.
8% Compiling jsp files.
Error Details:
29/04/2011 00:58:00 org.apache.jasper.compiler.AntCompiler generateClass
SEVERE: Error compiling file: C:\Users\4EBE~1\AppData\Local\Temp\appcfg75983006369417083.tmp\WEB-INF\classes\org\apache\jsp\index_jsp.java [javac] Compiling 1 source file
29/04/2011 00:58:00 org.apache.jasper.compiler.AntCompiler generateClass
SEVERE: Javac exception
Error running javac.exe compiler
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:473)
at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:47)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:226)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.JspC.processFile(JspC.java:1192)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:18)
Caused by: java.io.IOException: Cannot run program "javac.exe": CreateProcess error=2, ???????? ??? ?????? ???? ?? ?÷??? ?????
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:470)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, ???????? ??? ?????? ???? ?? ?÷??? ?????
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 18 more
--- Nested Exception ---
java.io.IOException: Cannot run program "javac.exe": CreateProcess error=2, ???????? ??? ?????? ???? ?? ?÷??? ?????
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:470)
at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:47)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:226)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.JspC.processFile(JspC.java:1192)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:18)
Caused by: java.io.IOException: CreateProcess error=2, ???????? ??? ?????? ???? ?? ?÷??? ?????
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 18 more
29/04/2011 00:58:00 org.apache.jasper.compiler.AntCompiler generateClass
SEVERE: Environment: Compile: javaFileName=C:\Users\4EBE~1\AppData\Local\Temp\appcfg75983006369417083.tmp\WEB-INF\classes\org\apache\jsp\index_jsp.java
classpath=/C:/appengine-java-sdk-1.4.3/appengine-java-sdk-1.4.3/lib/impl/appengine-
.....
After having a look at their bug tracker, Netbeans 6.9.1 seems to be unsupported.
http://kenai.com/jira/browse/NBAPPENGINE-50

Categories

Resources