Fixed dependency error when use in osgi environment