无法将Glassfish v2.1.1服务器添加到NetBeans 7.3.1。 - ClassNotFoundException

时间:2013-06-26 07:25:46

标签: netbeans-7 glassfish-2.x

我从here下载了Glassfish v2.1.1服务器 并遵循这个installation instructions。 另外,我在NetBeans 7.3.1中添加了“Glassfish v1,v2x”插件:org-netbeans-modules-j2ee-sun-appsrv81.nbm。 当我尝试通过NetBeans 7.3.1中的“添加服务器实例”对话框添加GlassFish v2.1.1时,会出现此问题。这是我得到的例外:

java.lang.ClassNotFoundException: org.netbeans.modules.glassfish.eecommon.api.RegisterDatabase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:222)
Caused: java.lang.ClassNotFoundException: org.netbeans.modules.glassfish.eecommon.api.RegisterDatabase starting from ModuleCL@156d4d5[org.netbeans.modules.j2ee.sun.appsrv81] with possible defining loaders [ModuleCL@171098d[org.netbeans.modules.glassfish.eecommon]] and declared parents [ModuleCL@1037517[org.netbeans.modules.project.ant], ModuleCL@481b29[org.openide.loaders], ModuleCL@ed723b[org.netbeans.api.debugger.jpda], org.netbeans.MainImpl$BootClassLoader@1eb1dbd, ModuleCL@188fa1d[org.jdesktop.layout], ModuleCL@c92353[org.openide.awt], ModuleCL@9b3e9e[org.openide.text], ModuleCL@9c4789[org.netbeans.modules.j2ee.sun.ddui], ModuleCL@4b38f9[org.netbeans.modules.j2eeserver], ModuleCL@1dcd634[org.netbeans.api.java.classpath], ...24 more]
    at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
Caused: java.lang.NoClassDefFoundError: org/netbeans/modules/glassfish/eecommon/api/RegisterDatabase
    at org.netbeans.modules.j2ee.sun.ide.j2ee.ui.AddDomainWizardIterator.createIP(AddDomainWizardIterator.java:395)
    at org.netbeans.modules.j2ee.sun.ide.j2ee.ui.AddDomainWizardIterator.createInstance(AddDomainWizardIterator.java:362)
    at org.netbeans.modules.j2ee.sun.ide.j2ee.ui.AddDomainWizardIterator.instantiate(AddDomainWizardIterator.java:301)
    at org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerWizardProvider$InstantiatingIteratorBridge.instantiate(BridgingServerWizardProvider.java:101)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard$AddServerInstanceWizardIterator.instantiate(AddServerInstanceWizard.java:409)
    at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1590)
    at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1531)
    at org.openide.WizardDescriptor.access$2200(WizardDescriptor.java:90)
    at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2171)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)

2 个答案:

答案 0 :(得分:1)

尝试从此处手动安装Netbeans插件:http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/modules/enterprise/org-netbeans-modules-j2ee-sun-appsrv81.nbm

在本地下载该文件,然后从NB:

下载

工具 - 插件 - 已下载 - 添加插件

为我的NB 7.3.1修正了它。

(另见glassfish v2 in Netbeans 7.2

答案 1 :(得分:1)

下载" GlassFish v1,v2.x"的位置插件已经改变。

插件文件: 为org-netbeans模块 - J2EE的太阳appsrv81.nbm 现在可以从以下网址下载: http://updates.netbeans.org/netbeans/updates/7.0/uc/final/certified/modules/extra/org-netbeans-modules-j2ee-sun-appsrv81.nbm

参考: https://community.oracle.com/thread/3904237

手动安装下载的NetBeans插件: 工具 - >插件 - >已下载 - >添加插件