Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

classload set problem #3515

Open
jerseyrobot opened this issue Mar 9, 2017 · 4 comments
Open

classload set problem #3515

jerseyrobot opened this issue Mar 9, 2017 · 4 comments

Comments

@jerseyrobot
Copy link
Contributor

final ResourceConfig rc = new ResourceConfig().packages("com.xxx");

the ResourceConfig site set the state classloader.
this.state.setClassLoader(classLoader);
but it actually use ContextClassLoader.

Affected Versions

[2.25.1]

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
Reported by liyang_Janney

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
@pavelbucek said:
workaround would be registering PackageNamesScanner explicitly:

ClassLoader loader = null; // ... 
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.registerFinder(new PackageNamesScanner(loader, new String[]{"package"}, true));

@jerseyrobot
Copy link
Contributor Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JERSEY-3243

@jerseyrobot
Copy link
Contributor Author

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant