MyEclipse: import com.sun.jersey.spi.resource.Singleton

ynaeht - Apr 19, 2011 - 04:11 AM
Post subject: import com.sun.jersey.spi.resource.Singleton
I am using MyEclipse version 9.0. I was following the tutorial trying to create CustomersResource class, but "import com.sun.jersey.spi.resource.Singleton" cannot be resolved. Should this be included in MyEclipse or do I have to download it and add to the library?

Thanks,
Ynaeht
support-swapna - Apr 19, 2011 - 06:17 AM
Post subject: RE: import com.sun.jersey.spi.resource.Singleton
ynaeht,

In the tutorial Section 4.2 Creating CustomersResource Class screenshot 2, you need to select 'Singleton' for Lifecycle.

The import will automatically be added basing on the Lifecycle selected and you do not need to explicitly download it and add to the library.

I followed the steps in the tutorial to the tee and could run the example without any issues. I suggest you give it a try again.

let me know how this works for you.
ynaeht - Apr 19, 2011 - 03:58 PM
Post subject:
"Singleton" was selected. But I was using Java EE6. After switching the Java Compiler under the Properties to 1.5, that resolved the issue.

Thanks,
ynaeht
support-swapna - Apr 20, 2011 - 08:04 AM
Post subject:
ynaeht,

Glad that you are all set.
Do let us know if you have any other issues.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits