I wanted to start using LibGDX but since they switcher to gradle recently I folowed their guides.
According to those,I installed the plugin Gradle support on NetBeans 8.0 and when I try to open a Gradle Project
I get the error:
Failed to load Gradle Project:test
and when i go to the stacktrace, i get this
Issue 1
Requested project: C:\Users\Halo\Downloads\test
Stack trace:
org.gradle.tooling.GradleConnectionException: Could not run build action using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.10-all.zip'.
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter.run(DefaultBuildActionExecuter.java:43)
at org.netbeans.gradle.model.GenericModelFetcher.getModels(GenericModelFetcher.java:166)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader$ProjectModelFetcher.getModels(NbGradle18ModelLoader.java:374)
at org.netbeans.gradle.project.model.NbGradle18ModelLoader.loadModels(NbGradle18ModelLoader.java:79)
at org.netbeans.gradle.project.model.GradleModelLoader.loadModelWithProgress(GradleModelLoader.java:496)
at org.netbeans.gradle.project.model.GradleModelLoader.access$600(GradleModelLoader.java:57)
at org.netbeans.gradle.project.model.GradleModelLoader$6.run(GradleModelLoader.java:364)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:24)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:14)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.run(GradleDaemonManager.java:105)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$3.run(GradleDaemonManager.java:130)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused by: org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.10/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:34)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:109)
at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:90)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:95)
at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:72)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:149)
at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:74)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:42)
at org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:53)
at org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.java:30)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:106)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:100)
at org.gradle.tooling.internal.provider.DefaultConnection.run(DefaultConnection.java:143)
at org.gradle.tooling.internal.consumer.connection.ActionAwareConsumerConnection.run(ActionAwareConsumerConnection.java:40)
at org.gradle.tooling.internal.consumer.DefaultBuildActionExecuter$1.run(DefaultBuildActionExecuter.java:53)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:82)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.java:44)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
In the code it says that it's caused by Daemon, can someone explain to me how to fix it? it's really torturing my head and I'm about to give the finger to LibGDX and smash my pc into smitherings.
I'll add that I've tried to use the gradlew inside the folder of the project that LibGDX has built (using cmd) but i've got no clue to what to do and, apart for the Gradle support plug-in i've got nothing else about gradle on my pc
I had same problem, turned out to be a proxy problem. Gradle does not see your proxy setting and you have to add them manually to the gradle.properties file in the project.
It then donwloads all relevant jar files when you build the project.
Used this page setup : http://www.gradle.org/docs/current/userguide/build_environment.html
Related
Getting (java.net.MalformedURLException) unknown protocol: jrt error, with suggestion to rebuild the project, in Intellij.
Stack trace -
Error:Internal error: (java.net.MalformedURLException) unknown protocol: jrt
java.net.MalformedURLException: unknown protocol: jrt
at java.net.URL.<init>(URL.java:421)
at java.net.URL.<init>(URL.java:310)
at java.net.URL.<init>(URL.java:333)
at com.intellij.compiler.instrumentation.InstrumentationClassFinder.createJDKPlatformUrl(InstrumentationClassFinder.java:61)
at org.jetbrains.jps.incremental.instrumentation.ClassProcessingBuilder.createInstrumentationClassFinder(ClassProcessingBuilder.java:125)
at org.jetbrains.jps.incremental.instrumentation.ClassProcessingBuilder.build(ClassProcessingBuilder.java:93)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1246)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:923)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:995)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:886)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:719)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:371)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:308)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:138)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:235)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Please perform full project rebuild (Build | Rebuild Project)
Building full project via mvn is failing due to other artifact issue.
Specs -
java version "1.8.0_201"
IntelliJ IDEA 2017.3.7 (Ultimate Edition)
The JRT namespace has been introduced with Java 9. You cannot access module data with Java 8 and below.
For future users who are confused why the following line appears in the build log:
javac 9 was used to compile java sources
Even though you've configured the bytecode version, compiler etc to 1.8, I'd suggest trying an alternative SDK, like Amazon Coretto (Project Structure -> Project Settings -> Project -> Project SDK -> Add SDK...).
This fixed my problem that landed me at this very obscure question.
I created the war file and deployed into tomcat server but while submitting the registration page(having recaptcha) this error is happening, but not in the local machine and app running in the local machine using the GGTS IDE.
Following is the error happening in the production server
errors.GrailsExceptionResolver - ClassNotFoundException occurred when processing request: [POST] /IFP/signup/completeSignUp
grails.plugins.rest.client.RestBuilder. Stacktrace follows:
java.lang.ClassNotFoundException: grails.plugins.rest.client.RestBuilder
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at com.megatome.grails.recaptcha.ReCaptcha.checkAnswer(ReCaptcha.groovy:171)
at com.megatome.grails.RecaptchaService.verifyAnswer(RecaptchaService.groovy:147)
at com.controllers.portal.SignupController.completeSignUp(SignupController.groovy:42)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
From my view this exception is happening after the implementation of recaptcha.
Please help me for resolving this issue.
java.lang.ClassNotFoundException: grails.plugins.rest.client.RestBuilder
states clearly that this class is missing in your production war or Tomcat.
Make sure you are setting proper dependencies in your gradle config as per plugin ref-doc:
compile "org.grails.plugins:rest-client-builder:2.1.1"
Check that those jars are also present in your war or Tomcat's classpath
Copying the file grails-datastore-rest-client-3.1.4.RELEASE.jar into the tomcat lib folder resolved the problem.
You can download the jar file from here.
If someone is still looking for the answer: Please add the line below to build.gradle and it should work (pulls in a necessary dependency):
implementation 'org.grails:grails-datastore-rest-client:6.1.9.RELEASE'
Maybe you can help me
I got a strange apache maven's problem, when opening my project at Intellij Idea 13.
When projects was open I have no libraries at External Libraries section. And at all pom.xml files from diff's modules I see error "Cannot reconnect".
I tried to Invalidate Cache/Restart Idea, try to use Maven Reimport but problem still take a place.
But if I do mvn clean install, and deploy my projects everything works fine.
I use Maven 3.2.3. and Java 1.8.
Maven settings:
Aded idea.log files:
2015-06-03 11:54:24,585 [ 441715] INFO - #org.jetbrains.idea.maven - Cannot reconnect.
java.lang.RuntimeException: Cannot reconnect.
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:98)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper.resolveProject(MavenEmbedderWrapper.java:97)
at org.jetbrains.idea.maven.project.MavenProjectReader.resolveProject(MavenProjectReader.java:462)
at org.jetbrains.idea.maven.project.MavenProject.resolve(MavenProject.java:624)
at org.jetbrains.idea.maven.project.MavenProjectsTree.resolve(MavenProjectsTree.java:1215)
at org.jetbrains.idea.maven.project.MavenProjectsProcessorResolvingTask.perform(MavenProjectsProcessorResolvingTask.java:42)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:131)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$100(MavenProjectsProcessor.java:28)
at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
at org.jetbrains.idea.maven.utils.MavenUtil$6.run(MavenUtil.java:440)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:351)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$254(TCPTransport.java:683)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/99407688.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at com.sun.proxy.$Proxy121.resolveProject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:106)
at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:167)
at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
at com.sun.proxy.$Proxy121.resolveProject(Unknown Source)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:100)
at org.jetbrains.idea.maven.server.MavenEmbedderWrapper$4.execute(MavenEmbedderWrapper.java:97)
at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:89)
... 16 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
at org.apache.maven.wagon.providers.file.FileWagon.resolveDestinationPath(FileWagon.java:206)
at org.apache.maven.wagon.providers.file.FileWagon.resourceExists(FileWagon.java:265)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:577)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2015-06-03 11:54:24,586 [ 441716] WARN - ution.rmi.RemoteProcessSupport - Exception in thread "pool-6-thread-1" java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils
2015-06-03 11:54:24,586 [ 441716] WARN - ution.rmi.RemoteProcessSupport - at org.apache.maven.wagon.providers.file.FileWagon.resolveDestinationPath(FileWagon.java:206)
I was facing the same error and fixed it like that:
Open settings by pressing Ctrl+Alt+S and navigate to Build, Execution, Deployment | Build Tools | Maven | Importing
Check JDK for Importer and change the exact version of JDK (example : 1.8.0.250) installed on your machine from the drop-down.
After doing the same it prompts for verification and after that, the maven will be automatically updated and the project will run.
In my case, I did the same thing as the JDK which is used in the machine is different when the project is imported from a repository. These things happen when we uninstall the IDE and JDK and install the IDE and different version of JDK, the IDE automatically fetch the project which is available in the machine as before but it can not change the imported JDK.
I fixed this by changing my local Maven 3.3.9 to Idea Bundle Maven3.
Clicking on Reload All Maven Projects helped me in this scenario.
File -> Invalid Cache
might also be helpful in a scenario where IntelliJ seems to tangle up itself.
In case you are running InteliJ in WSL with X-Server (e.g. VcXsrv), a solution may be to
close InteliJ
restart the server
open Intelij
and it will be working.
I was getting this error and I fixed this error in IntelliJ by following steps:
1] close all running application(if any)
2] reimport/reload pom.xml (right-click on pom.xml -> select maven option->reimport/reload project)
3] then run your application(i.e. main file)
by following this I did not needed to delete the .m2 folder manually
I fixed this problem by removing .lastUpdated files coming from transfer error in ~/.m2
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
In my case, I have maven runner and importer set to use Project JDK, but I managed to solve this problem by changing JDK from OpenJDK to Liberica JDK (same Java version) and it magically started working.
So for anyone with similar problem, try to change JDK to different implementation.
For 3 days now, I have been trying to install glassfish 4.1 on eclipse Luna version 4.4.1. I first installed the plugin from eclipse marketplace then added it in my runtime using jdk 8. I also made jdk my default since eclipse default uses jre. I have to point out that I have been been using glassfish on netbeans and tomcat on eclipse but I decided to play around with glassfish on eclipse. Every information I got on the internet didn't fix my issue.
Below is the error I got in the console. Right now, this is driving me nuts so I have decided to come to you for direction.
Thanks
Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
at org.apache.felix.framework.Felix.init(Felix.java:645)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Run Eclipse or any other IDE you use in Administrator mode.
Works for me.
I think your comment deserves to be posted as the main answer but I have been trying to mark your comment as answer but I wash't able to. So I decided to post post your comment here and then back it up with my own experience.
Answer by unwichtich:
I guess this is a similar problem. The cause may be that you have installed Glassfish in c:\Program Files. You can try to move your Glassfish installation to a directory where your normal user account has full access rights but you then have to change the path to the Glassfish installation in Eclipse.
My own experience:
Turns out that all the problems I had with the glassfish server (including exit code 1 error) was because glassfish could not handle folder names with spaces in it. So I moved the glassfish-4.1 folder from C:\Program File\glassfish-4.1.. path to C:\ glassfish-4.1.. It wiped all my tears away. This is really important in eclipse and netbeans IDEs (if you are installing the netbeans that does not come with a glassfish bundled zip).
I had the same problem and fixed it by installing Glassfish under C:\ instead of C:\Program Files. Try that.
use JDk 7 instead of JDK 8 am also faced the same issue i just changed to jdk7 its working now.
Tried to upgrade jenkins today. It doesn't start anymore.
Even if i try to remove its directory, it recreates it cleanly but then crashes with following log.
[#|2013-04-24T07:24:49.849+0200|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=106;_ThreadName=Thread-2;|jenkins was successfully deployed in 3,800 milliseconds.|#]
[#|2013-04-24T07:24:50.100+0200|INFO|glassfish3.1.2|jenkins.InitReactorRunner|_ThreadID=152;_ThreadName=Thread-2;|Listed all plugins|#]
[#|2013-04-24T07:24:50.100+0200|SEVERE|glassfish3.1.2|jenkins.InitReactorRunner|_ThreadID=152;_ThreadName=Thread-2;|Failed Loading plugins
java.lang.NullPointerException
at hudson.PluginManager$2$1.run(PluginManager.java:324)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
|#]
[#|2013-04-24T07:24:50.102+0200|SEVERE|glassfish3.1.2|hudson.WebAppMain|_ThreadID=143;_ThreadName=Thread-2;|Failed to initialize Jenkins
org.jvnet.hudson.reactor.ReactorException: java.lang.NullPointerException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:899)
at jenkins.model.Jenkins.<init>(Jenkins.java:801)
at hudson.model.Hudson.<init>(Hudson.java:81)
at hudson.model.Hudson.<init>(Hudson.java:77)
at hudson.WebAppMain$2.run(WebAppMain.java:214)
Caused by: java.lang.NullPointerException
at hudson.PluginManager$2$1.run(PluginManager.java:324)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
|#]
Jenkins 1.512 on Glassfish 3.1.2.2
EDIT: version 1.421 works. Version 1.422 fails. This is consistent, even after wiping jenkins directory.
Found this, and I had 2 virtual servers:
https://gist.github.com/andrewg4153/3693577
If you have a Glassfish domain with multiple virtual servers, you will
be tempted to select them all when you deploy the Jenkins CI web
application. This is a bad thing to do, as the Jenkins core code
contains a singleton class:
http://sorcerer.jenkins-ci.org/source-view.html?jenkins/model/Jenkins.js#678
When you do this, you'll get the following in your logs:
java.lang.IllegalStateException: second instance at
jenkins.model.Jenkins.(Jenkins.java:744) at
hudson.model.Hudson.(Hudson.java:81) at
hudson.model.Hudson.(Hudson.java:77) at
hudson.WebAppMain$2.run(WebAppMain.java:217) Just deploy to one of the
virtual servers, and everything will be okay.
I deployed on 1 of them and it now works!
Well, I guess it's the bug to fix...
According to the stack trace you provided: Perhaps there is some missing plug-in Task Scanner Plugin or its dependency that is breaking your Jenkins instance?
Caused by: java.lang.NullPointerException
at hudson.PluginManager$2$1.run(PluginManager.java:324)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
Jenkins version 1.422 had a booting issue. 1.423 was supposed to fix it. My suggestion would be to clean install 1.423 and see if that solves the issue. If it does, try upgrading from there.