A question concerning Tauberian theory Let $D(s) = \sum_{n=1}^\infty a_n n^{-s}$ be a Dirichlet series with $a_n ≥ 0$ and abscissa of convergence $\sigma_a = 1$. Further, we assume that $D(s)$ is holomorphic in each point $\Re(s) = 1$ except a pole of order $k > 0$ in $s = 1$ and that $D(s)$ possesses a meromorphic continuation on some half-plane $\Re(s) > 1 - \epsilon_0$ with some $\epsilon_0 > 0$. 
My question is, whether under the above assumptions we can already say that
$$ \sum_{n ≤ x} a_n = xP(\log x) + o(x)$$
with some polynomial $P$ with degree $k-1$. Unfortunately I am not able to exclude other poles in the strip $1 > \Re(s) > 1 - \epsilon_0$.
In the simple case $k=1$ the question follows by the Wiener-Ikehara theorem, since then we have $\sum_{n ≤ x} a_n \sim Cx$ with $C = \mathrm{res}_{s=1}D(s)$.
Thank you!
 A: The answer is no, even if we assume there are no other poles than $1$ in $\sigma > 1- \epsilon_0$. I give an example below with $\epsilon_0=1$. This is a variant of an example given by Karamata in $1952$.
Let $b_n = 1 + \cos(\log^2(n)) \geq 0$ and consider $B(s) = \sum_{n \geq 1} b_n n^{-s}$. Let us write
$$
\sum_{n \leq x} b_n =  \int_{1}^x (1+\cos(\log^2(t))) dt + R(x)
$$
where $R(x) = O(\log^2(x))$. Then for $\sigma >1$ we have
$$
B(s) = \int_{1}^{+ \infty}(1+ \cos(\log^2(t)) )t^{-s}dt + s \int_{1}^{+ \infty} R(t) t^{-s-1} dt.
$$
The last integral extends holomorphically to $\sigma >0$. The first integral is equal to 
$$
\frac{1}{s-1} + \frac{1}{2} I_+(s) + \frac{1}{2} I_-(s)
$$
where 
$$
I_{\pm}(s) = \int_{0}^{+ \infty} \exp{((1-s)u \pm i u^2)} dt.
$$
Using contour integration one can move the integration line to $u \mapsto e^{\pm \frac{i \pi}{4}}u$, and this yields 
$$
I_{\pm}(s) =  e^{\pm \frac{i \pi}{4}} \int_{0}^{+ \infty} \exp{((1-s)u e^{\pm \frac{i \pi}{4}} - u^2)} dt.
$$
Thus $I_+$ and $I_-$ are entire functions.
Let us now choose $a_n = b_n \log(n) \geq 0$ so that $D(s) = - B'(s)$ is meromorphic on $\sigma >0$, with a unique pole at $s=1$ of order $2$. One checks that
$$
\sum_{n \leq x} a_n = x \log(x) + x \left( \frac{1}{2} \sin(\log^2(x))-1 \right) +O(\frac{x}{\log x})
$$
Remark : The error term in Delange's theorem can be improved provided growth assumptions (on a strip) are made on $D(s)$.
