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 193747 - ServiceLoader is incompatible with profiling - the compile process doesn't move over the META-INF.services file
Summary: ServiceLoader is incompatible with profiling - the compile process doesn't mo...
Status: RESOLVED WORKSFORME
Alias: None
Product: profiler
Classification: Unclassified
Component: Engine (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-22 18:59 UTC by Salamander
Modified: 2011-01-07 13:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample project (18.35 KB, application/octet-stream)
2011-01-07 13:30 UTC, J Bachorik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salamander 2010-12-22 18:59:55 UTC
The 1.6 java.util.ServiceLoader class depends on a file in META-INF.services that lists the implementing service classes.  This is not compatible with profiling, 

Without manual copy of the folder and file:
Exception in thread "main" java.lang.IllegalArgumentException: No such service:ABCDEFG
        at xyz.MyRegistry.get(MyRegistry.java:27)
	
With manually copying the folder over to the build folder:
Exception in thread "main" java.util.ServiceConfigurationError: xyz.MyAbstractService: Provider xyz.HIJKSvc not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:214)
        at java.util.ServiceLoader.access$400(ServiceLoader.java:164)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)



Product Version = NetBeans IDE Dev (Build 201012150001)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) Client VM 17.1-b03
Comment 1 J Bachorik 2011-01-07 13:27:51 UTC
Checked in the current dev build using the attached sample project and everything works as expected.
In case you can reproduce it on the latest builds provide, please, more detailed information about the type of project you are trying to profile and the IDE messages.log file (you can get it eg. by invoking "View/IDE Log" menu)
Comment 2 J Bachorik 2011-01-07 13:30:09 UTC
Created attachment 104788 [details]
Sample project