Issue
I am new to netbeans and glassfish. When I try to run the sample on mac this is what I get. Any clue? The server is up. I could write my own project, but suddenly I cannot run it again. Tried installing netbeans again.
ant -f /Users/*/NetBeansProjects/myproject -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=/Users/*/NetBeansProjects/myproject run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
Created dir: /Users/*/NetBeansProjects/myproject/build/web/WEB-INF/classes
Created dir: /Users/*/NetBeansProjects/myproject/build/web/META-INF
Copying 1 file to /Users/*/NetBeansProjects/myproject/build/web/META-INF
Copying 1 file to /Users/*/NetBeansProjects/myproject/build/web
library-inclusion-in-archive:
library-inclusion-in-manifest:
Created dir: /Users/*/NetBeansProjects/myproject/build/empty
Created dir: /Users/*/NetBeansProjects/myproject/build/generated-sources/ap-source-output
compile:
compile-jsps:
Starting GlassFish Server 4.1.1
GlassFish Server 4.1.1 is running.
In-place deployment at /Users/*/NetBeansProjects/myproject/build/web
GlassFish Server 4.1.1, deploy, null, false
/Users/*/NetBeansProjects/myproject/nbproject/build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 29 seconds)
And my glassfish server output has only Info and Warnings:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
objc[94836]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java (0x10b1284c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10b1f04e0). One of the two will be used. Which one is undefined.
Listening for transport dt_socket at address: 9009
Launching GlassFish on Felix platform
Nov 15, 2017 10:05:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Nov 15, 2017 10:05:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Nov 15, 2017 10:05:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry because it is not an absolute URI.
Nov 15, 2017 10:05:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNING: Can not start bundle file:/Applications/NetBeans/glassfish-4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@4b9e955f in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Applications/NetBeans/glassfish-4.1.1/glassfish
#!## LogManagerService.postConstruct : templateDir=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/logging.properties
Info: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1)
Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info: Authorization Service has successfully initialized.
Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info: Grizzly Framework 2.3.23 started in: 51ms - bound to [/0.0.0.0:8080]
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:8181]
Warning: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:4848]
Info: Grizzly Framework 2.3.23 started in: 3ms - bound to [/0.0.0.0:3700]
Info: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (34,470ms), startup services(1,693ms), total(36,163ms)
Info: JTS5014: Recoverable JTS instance, serverId = [100]
Info: HV000001: Hibernate Validator 5.1.2.Final
Info: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:7676]
Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@7be71476 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@5c1f6d57.
Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://172.31.135.143:8686/jndi/rmi://172.31.135.143:8686/jmxrmi
Solution
This usually happen to Mac OS Sierra because sites which uses system proxy settings are blocked.
open your network preferences > Select your wifi > Advanced > proxies tab > check Auto proxy Discovery, Automatic Proxy configuration, web proxy(http)
Now, go to your Netbeans preferences > General > select use system proxy> reload > test connection > then it should have a green check mark next to it if connection successful.
Finally, go to Clean & build your Applications in netbeans and run
Answered By - Karen
Answer Checked By - Terry (JavaFixing Volunteer)