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 271496 - Normal (non-maven) project created using dependencies resolved by maven with arquillian testing generates strange errors in netbeans
Summary: Normal (non-maven) project created using dependencies resolved by maven with ...
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-18 08:12 UTC by ferenci84
Modified: 2017-09-18 08:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
working maven project (13.00 KB, application/zip)
2017-09-18 08:12 UTC, ferenci84
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ferenci84 2017-09-18 08:12:42 UTC
Created attachment 165140 [details]
working maven project

I have used a working maven project to create the same in a normal netbeans project to be able to run test using arquillian.
What I have done:
I have resolved the dependencies with maven (see pom.xml)
I have created a blank normal netbeans (ant-based) web-application, imported the dependencies and copied the files to the appropriate folders.
The project consists of 3 important files: Greeter.java, BasicTest.java, arquillian.xml

The error says: Caused by: java.lang.IllegalArgumentException: WEB-INF/classes/org/arquillian/wildfly/example/Greeter.class not found in classloader sun.misc.Launcher$AppClassLoader@5197848c

When I created the project with Greeter.java in the test classes, it worked OK, however when I wanted to do a workaround other strange things happened, for example:

1. When I start from the above structure and copy back the Greeter.java to the tests, it shows the same message, although creating this project structure from scratch did work well.

2. When I created links (on linux system) from the maven project (I have done this in my real project) creating the working structure, although the BasicTest.java has run OK, when I created a new test file, it didn't recognize, even if the code was the same as BasicTest.java. I then experimented with this error by creating a blank project and copying static (not linked) files, and it worked with simple JUnit tests, and after I imported the libraries, for the first test, however then I again couldn't add anymore tests, it simply ignored them.

I have attached the maven project. The netbeans project is too big, I uploaded it to aws:
https://s3-eu-west-1.amazonaws.com/ferenci84/ArquillianTest.zip