This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 237531 - IllegalAccessError: tried to access method org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(Lorg/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule;)V from clas
Summary: IllegalAccessError: tried to access method org.netbeans.modules.glassfish.eec...
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 248192 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-10-23 09:42 UTC by jonathanvilalopez
Modified: 2015-05-04 12:51 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 204450


Attachments
stacktrace (1.64 KB, text/plain)
2013-10-23 09:42 UTC, jonathanvilalopez
Details
stacktrace (1.64 KB, text/plain)
2013-11-12 06:36 UTC, Exceptions Reporter
Details
Project files (488.82 KB, application/zip)
2013-12-13 12:55 UTC, jonathanvilalopez
Details
Messages log (80.67 KB, text/x-log)
2013-12-13 12:59 UTC, jonathanvilalopez
Details
user directory with log file (55.56 KB, application/x-gzip)
2013-12-17 13:10 UTC, ekkew
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jonathanvilalopez 2013-10-23 09:42:09 UTC
Build: NetBeans IDE 7.4 (Build 201310111528)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15
OS: Linux

User Comments:
yeradis: does not open projects

jonathanvilalopez: Trying to open a Web project. In a new ( not config imported ) installation of Netbeans 7.4

GUEST: Open Project

yeradis: Opening projects

yeradis: Adding new projects group

yeradis: just created a new java project app




Stacktrace: 
java.lang.IllegalAccessError: tried to access method org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(Lorg/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule;)V from class org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl
   at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.<init>(ModuleConfigurationImpl.java:104)
   at org.netbeans.modules.j2ee.sun.ide.j2ee.ModConFactory.create(ModConFactory.java:63)
   at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:805)
   at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:784)
   at org.openide.util.Mutex.readAccess(Mutex.java:295)
   at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getModuleConfiguration(ConfigSupportImpl.java:784)
Comment 1 jonathanvilalopez 2013-10-23 09:42:11 UTC
Created attachment 141460 [details]
stacktrace
Comment 2 Exceptions Reporter 2013-11-12 06:36:18 UTC
Created attachment 142078 [details]
stacktrace

open project
Comment 3 jonathanvilalopez 2013-12-13 12:35:32 UTC
Today a project crashed the same way. It was working until today, but a simple Git pull execution caused the issue. 
I have reviewed all files setting them back to previous working version.....the same result.
The solution has been removing the /home/[user]/.netbeans/7.4 folder and then the project opens as expected.
Comment 4 Geertjan Wielenga 2013-12-13 12:47:59 UTC
Can you attach a project that can be used to reproduce the problem? Or steps? Or a log file when the problem happens again?
Comment 5 jonathanvilalopez 2013-12-13 12:55:33 UTC
Created attachment 143149 [details]
Project files

POM Project and 1 one model "Tripadvisor". This module is what causes the error.

But, I think the problem is in the user/.netbeans/7.4 folder. Tell me which files do you want me to attach from there.
Comment 6 jonathanvilalopez 2013-12-13 12:57:54 UTC
Stacktrace

java.lang.IllegalAccessError: tried to access method org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(Lorg/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule;)V from class org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl
	at org.netbeans.modules.j2ee.sun.ide.j2ee.ModuleConfigurationImpl.<init>(ModuleConfigurationImpl.java:104)
	at org.netbeans.modules.j2ee.sun.ide.j2ee.ModConFactory.create(ModConFactory.java:63)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:805)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:784)
	at org.openide.util.Mutex.readAccess(Mutex.java:295)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getModuleConfiguration(ConfigSupportImpl.java:784)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.ensureConfigurationReady(ConfigSupportImpl.java:242)
	at org.netbeans.modules.maven.j2ee.utils.MavenProjectSupport.setServer(MavenProjectSupport.java:175)
	at org.netbeans.modules.maven.j2ee.utils.MavenProjectSupport.assignServer(MavenProjectSupport.java:158)
	at org.netbeans.modules.maven.j2ee.utils.MavenProjectSupport.changeServer(MavenProjectSupport.java:118)
	at org.netbeans.modules.maven.j2ee.ProjectHookImpl.projectOpened(ProjectHookImpl.java:97)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
	at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:248)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:85)
[catch] at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1230)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1311)
	at org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:793)
	at org.netbeans.modules.project.ui.OpenProjectList$5.run(OpenProjectList.java:660)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Comment 7 jonathanvilalopez 2013-12-13 12:59:35 UTC
Created attachment 143150 [details]
Messages log

Just after the error.
Comment 8 Geertjan Wielenga 2013-12-13 13:06:06 UTC
Can you give more info about the project itself? Or attach the project?
Comment 9 Geertjan Wielenga 2013-12-13 13:19:46 UTC
Or next time the project happens, zip up your userdir, and attach it to this issue. (Or do a diff yourself between your old userdir and a fresh userdir, to identify the problematic file.)
Comment 10 Geertjan Wielenga 2013-12-13 13:22:17 UTC
OK, opened the project, no problem in opening it. Is that all I need to do? Or, please, steps to reproduce, steps look like this:

1.

2.

3.
Comment 11 jonathanvilalopez 2013-12-13 14:49:40 UTC
If you like I can attach the .netbeans/7.4 folder, but it weighs 27 Mb.
Comment 12 Geertjan Wielenga 2013-12-17 11:30:32 UTC
OK, the project you attached opened without any problem at all.

So, here's how we're going to fix this problem:

1. Start NetBeans IDE 7.4 with a fresh user directory. In other words DELETE the user directory and restart NetBeans IDE.

2. When the problem occurs again, immediately upload the log file here, as well as a ZIP that contains your complete user directory.
Comment 13 Geertjan Wielenga 2013-12-17 11:30:53 UTC
Adding myself to the cc.
Comment 14 jonathanvilalopez 2013-12-17 11:47:29 UTC
If I clean the user directory it works well.

The problem is in my user directory, that time to time it corrupts or something.

Some time ago I get this exact erro ( and I filed this issue ) , and I removed the user directory...all gone well, until now.

I have opened the same projects with NB 7.3 and Intellij Idea. Doing this may crash the NB 7.4 user directory ?
Comment 15 Geertjan Wielenga 2013-12-17 11:54:43 UTC
When the problem occurs again, immediately upload the log file here, as well as a ZIP that contains your complete user directory.
Comment 16 ekkew 2013-12-17 12:56:18 UTC
I have delete the user directories and the problem is still the same. I have to use GF 2.x (on my computer 2.1.1) and if I add this Application server to NB 7.4 with all plugins updated the bug still occurs. 

One remark: The project window can not be closed by click "finish".
Comment 17 Geertjan Wielenga 2013-12-17 12:58:34 UTC
When the problem occurs again, immediately upload the log file here, as well as a ZIP that contains your complete user directory.
Comment 18 ekkew 2013-12-17 13:10:01 UTC
Created attachment 143246 [details]
user directory with log file
Comment 19 Geertjan Wielenga 2013-12-17 13:14:30 UTC
The log file shows nothing about GlassFish 2.2.1. Instead, I see this:

INFO [glassfish]: Created GlassFish Server 4 instance with name GlassFish Server 4.0
WARNING [org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryTypeProvider]: Wrong Classpath entry file:/Applications/NetBeans/glassfish-4.0/mq/lib/jaxm-api.jar in Library: Java-EE-GlassFish-v3-Prelude


Seems like something is pretty messed up with your GlassFish installation. I recommend uninstalling all your GlassFish installations and only installing the one you're actually going to use. Then register that one in NetBeans IDE.
Comment 21 jonathanvilalopez 2013-12-17 15:02:11 UTC
Where Netbeans stores the Server to run for a maven web project ?
Comment 22 Geertjan Wielenga 2013-12-17 15:18:11 UTC
Search for "Tomcat" or "Glassfish" or whatever the server name is, in your project. It took me 2 seconds to find -- nb-configuration.xml.
Comment 23 jonathanvilalopez 2013-12-17 15:23:29 UTC
I did that before adding the comment.

This is the content of my nb-configuration.xml. As you can see there is no information about glassfish, tomcat....


<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
    <!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
    <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
        <!--
Properties that influence various parts of the IDE, especially code formatting and the like. 
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
        <!--        <org-netbeans-modules-css-prep.sass_2e_compiler_2e_options/>
        <org-netbeans-modules-css-prep.less_2e_mappings>/less:/css</org-netbeans-modules-css-prep.less_2e_mappings>
        <org-netbeans-modules-css-prep.less_2e_enabled>false</org-netbeans-modules-css-prep.less_2e_enabled>
        <org-netbeans-modules-css-prep.sass_2e_mappings>/scss:/css</org-netbeans-modules-css-prep.sass_2e_mappings>
        <org-netbeans-modules-css-prep.sass_2e_enabled>false</org-netbeans-modules-css-prep.sass_2e_enabled>
        <org-netbeans-modules-css-prep.less_2e_compiler_2e_options/>
        <org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder>js/libs</org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder>
        <org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
	-->
        <org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
    </properties>
</project-shared-configuration>
Comment 24 Geertjan Wielenga 2013-12-17 15:29:04 UTC
Because you haven't yet assigned a server to any of your projects.

Also, looking at your user directory, it is clearly from sometime last week, I think Thursday the 12th of December. That's why it's so large.

Please do the following:

1. Close down NetBeans IDE.
2. Make sure that you really did close NetBeans IDE. Maybe also just kill all Java processes (pkill).
3. Now delete the user directory. I.e., go to '.netbeans' and delete the '7.4' folder that you find there, i.e., the same one you zipped up and attached to this issue.
4. Make sure you actually deleted the user directory.
5. Restart NetBeans IDE. You will be asked if some other user directory should be imported (if you have another user directory). Do NOT import any user directory.

Then, when the problem happens again after doing the above, upload the user directory here again.
Comment 25 Petr Hejl 2015-04-27 11:00:56 UTC
This is likely caused by an incompatible API change.
Comment 26 Petr Hejl 2015-05-04 10:30:11 UTC
For some reason all the users reporting the issue have ancient version of the plugin installed:
org.netbeans.modules.j2ee.sun.appsrv81/1 [1.11.0.1 1 201002152000]
Comment 27 Petr Hejl 2015-05-04 11:18:53 UTC
The plugin supporting the GFv1 and GFv2 is not available anywhere. At least it looks like that. Can anybody confirm that this is actually some old nbm isntalled from elsewhere?
Comment 28 Petr Hejl 2015-05-04 11:24:48 UTC
I guess it is coming from here: http://stackoverflow.com/questions/16419034/glassfish-v2-in-netbeans-7-2
Comment 29 Petr Hejl 2015-05-04 11:39:49 UTC
I don't remember why the GFv2 support has been removed: http://hg.netbeans.org/web-main/rev/34013300120d

Petre, do you remember any details?
Comment 30 Petr Jiricka 2015-05-04 12:28:48 UTC
I believe the team did not have the bandwidth to maintain the GFv2 plugin.
Comment 31 Petr Hejl 2015-05-04 12:51:51 UTC
*** Bug 248192 has been marked as a duplicate of this bug. ***