Netbeans не развертывается автоматически на GlassFish (на Mac) - PullRequest
0 голосов
/ 14 сентября 2018

Я пытаюсь запустить Java Web / Web Application от Netbeans (Версия 8.2). Проект собирается без каких-либо ошибок компиляции. Но он не развертывается на сервере GlassFish (версия 4.1.1) автоматически. Вместо этого он дает следующий вывод.

ant -f /Users/kusal/Documents/CS/Projects/IG/IG/IG -Dnb.internal.action.name=run -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=/Users/kusal/Documents/CS/Projects/IG/IG/IG run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
/Users/kusal/Documents/CS/Projects/IG/IG/IG/nbproject/build-impl.xml:874: The following error occurred while executing this line:
/Users/kusal/Documents/CS/Projects/IG/IG/IG/nbproject/build-impl.xml:296: 
Cancelled by user.
BUILD FAILED (total time: 7 seconds)

В окне процесса Java DB регистрируется следующее:

Fri Sep 14 17:37:30 IST 2018 : Security manager installed using the Basic server security policy.
Fri Sep 14 17:37:48 IST 2018 : Apache Derby Network Server - 10.10.2.0 - (1582446) started and ready to accept connections on port 1527

В журнале IDE Netbeans:

WARNING [org.openide.util.WeakListenerImpl]: Can't remove java.beans.PropertyChangeListener using method org.netbeans.modules.editor.NbEditorDocument.removePropertyChangeListener from org.netbeans.modules.editor.NbEditorDocument@44580632, mimeType='text/x-jsp', kitClass=null, length=4725, version=1, file=org.netbeans.modules.web.core.jsploader.JspDataObject@b43e807[/Users/kusal/Documents/CS/Projects/IG/IG/IG/web/Pages/ig_accounts_home.jsp@565558d6:75a3ce02]
Even though the source level of /Users/kusal/Documents/CS/Projects/IG/IG/IG/web:/Users/kusal/Documents/CS/Projects/IG/IG/IG/src/java is set to: 1.8, java.lang.AssertionError cannot be found on the bootclasspath: /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise/modules/ext/javaee7-endorsed/javax.annotation-api.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise/modules/ext/javaee7-endorsed/javax.xml.soap-api.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise/modules/ext/javaee7-endorsed/jaxb-api-osgi.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise/modules/ext/javaee7-endorsed/jaxws-api.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise/modules/ext/javaee7-endorsed/jsr181-api.jar
Changing source level to 1.3
SEVERE [org.openide.util.Exceptions]
An error occurred during parsing of '/Users/kusal/Documents/CS/Projects/IG/IG/IG/web/Pages/ig_register_student.jsp'. Please report a bug against java/source and attach dump file '/Users/kusal/Library/Application Support/NetBeans/8.2/var/log/ig_register_student_1.dump'.
An error occurred during parsing of '/Users/kusal/Documents/CS/Projects/IG/IG/IG/web/Pages/ig_register_student.jsp'. Please report a bug against java/source and attach dump file '/Users/kusal/Library/Application Support/NetBeans/8.2/var/log/ig_register_student_1.dump'.
Caused: java.lang.NullPointerException
    at com.sun.tools.javac.comp.Check.checkImportedPackagesObservable(Check.java:3679)
    at com.sun.tools.javac.comp.TypeEnter.finishImports(TypeEnter.java:235)
    at com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:220)
    at com.sun.tools.javac.code.Symbol.complete(Symbol.java:591)
    at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1106)
    at com.sun.tools.javac.comp.Enter.complete(Enter.java:728)
    at org.netbeans.lib.nbjavac.services.NBJavadocEnter.main(NBJavadocEnter.java:84)
    at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1008)
    at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:369)
    at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:311)
    at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:630)
    at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:496)
    at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:163)
    at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:631)
    at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:262)
    at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:798)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:304)
    at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:725)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:686)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
ALL [null]: An error occurred during parsing of '/Users/kusal/Documents/CS/Projects/IG/IG/IG/web/Pages/ig_register_student.jsp'. Please report a bug against java/source and attach dump file '/Users/kusal/Library/Application Support/NetBeans/8.2/var/log/ig_register_student_1.dump'.
SEVERE [null]: Last record repeated again.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: org.netbeans.modules.csl.hints.GsfHintsProvider@581d81c5 : class org.netbeans.modules.csl.hints.GsfHintsProvider ignored cancel for 67 ms.
INFO [org.netbeans.modules.csl.editor.semantic.MarkOccurrencesHighlighter]: MarkOccurencesHighlighter: Cannot get document!
INFO [glassfish]: Storing GlassFish Server 4.1.1 atributes
WARNING [org.netbeans.modules.java.j2seplatform.platformdefinition.J2SEPlatformImpl]: No sun.boot.class.path property in platform JDK 10 (Default), broken platform?
WARNING [org.openide.util.WeakListenerImpl]: Can't remove java.beans.PropertyChangeListener using method org.netbeans.modules.editor.NbEditorDocument.removePropertyChangeListener from org.netbeans.modules.editor.NbEditorDocument@6fee39de, mimeType='text/x-jsp', kitClass=null, length=10969, version=1, file=org.netbeans.modules.web.core.jsploader.JspDataObject@45fbaed7[/Users/kusal/Documents/CS/Projects/IG/IG/IG/web/Pages/ig_register_student.jsp@93230df3:5a6d4831]

Однако файл war можно вручную развернуть на сервере и запустить без проблем.

1 Ответ

0 голосов
/ 14 сентября 2018

Происходит, если ранее развернутое приложение уже существует на сервере GlassFish.Попробуйте следующее.

  1. Остановите свой сервер / домен
  2. очистите домен [x] / autodeploy / folder
  3. очистите домен [x] / osgi-cache/ folder
  4. перезагрузите сервер / домен и посмотрите, работает ли ваше развертывание.
...