You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Alex Soto <al...@envieta.com> on 2016/06/01 19:03:03 UTC

SCR, Akka, and maven-bundle-plugin

With Karaf version 4.0.4.   I want to use Declarative Services, so I add this to my POM:

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<configuration>
					<instructions>
						<_dsannotations>*</_dsannotations>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
	</build>

Now, adding  @Component annotation to one of my classes:

import org.osgi.service.component.annotations.Component;
import akka.actor.UntypedActor;

@Component
public class MyClass extends UntypedActor {


When I build the project,  Maven goes  into an infinite loop.  CPU level is 100%.
If I remove the "extends UntypedActor” it does not happen.


Best regards,
Alex soto



Re: SCR, Akka, and maven-bundle-plugin

Posted by Alex Soto <al...@envieta.com>.
Yes, it is a Scala class.  Added ticket:  https://github.com/bndtools/bnd/issues/1483 <https://github.com/bndtools/bnd/issues/1483>
Thanks for the help.

Best regards,
Alex soto



> On Jun 1, 2016, at 3:15 PM, David Jencks <da...@yahoo.com> wrote:
> 
> I’m pretty sure this is a bnd problem with the byte code analysis of the superclass.  Can you file  a bnd issue at https://github.com/bndtools/bnd/issues <https://github.com/bndtools/bnd/issues> ?
> 
> If I understand correctly the superclass is a scala class?  in which case it might not be readily available, so if you can figure out a way to write a self contained test or at least give instructions on finding the scala class that would be a big help.
> 
> thanks
> david jencks
> 
>> On Jun 1, 2016, at 12:03 PM, Alex Soto <alex.soto@envieta.com <ma...@envieta.com>> wrote:
>> 
>> With Karaf version 4.0.4.   I want to use Declarative Services, so I add this to my POM:
>> 
>> 	<build>
>> 		<plugins>
>> 			<plugin>
>> 				<groupId>org.apache.felix</groupId>
>> 				<artifactId>maven-bundle-plugin</artifactId>
>> 				<configuration>
>> 					<instructions>
>> 						<_dsannotations>*</_dsannotations>
>> 					</instructions>
>> 				</configuration>
>> 			</plugin>
>> 		</plugins>
>> 	</build>
>> 
>> Now, adding  @Component annotation to one of my classes:
>> 
>> import org.osgi.service.component.annotations.Component;
>> import akka.actor.UntypedActor;
>> 
>> @Component
>> public class MyClass extends UntypedActor {
>> 
>> 
>> When I build the project,  Maven goes  into an infinite loop.  CPU level is 100%.
>> If I remove the "extends UntypedActor” it does not happen.
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
> 


Re: SCR, Akka, and maven-bundle-plugin

Posted by David Jencks <da...@yahoo.com>.
I’m pretty sure this is a bnd problem with the byte code analysis of the superclass.  Can you file  a bnd issue at https://github.com/bndtools/bnd/issues ?

If I understand correctly the superclass is a scala class?  in which case it might not be readily available, so if you can figure out a way to write a self contained test or at least give instructions on finding the scala class that would be a big help.

thanks
david jencks

> On Jun 1, 2016, at 12:03 PM, Alex Soto <al...@envieta.com> wrote:
> 
> With Karaf version 4.0.4.   I want to use Declarative Services, so I add this to my POM:
> 
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.felix</groupId>
> 				<artifactId>maven-bundle-plugin</artifactId>
> 				<configuration>
> 					<instructions>
> 						<_dsannotations>*</_dsannotations>
> 					</instructions>
> 				</configuration>
> 			</plugin>
> 		</plugins>
> 	</build>
> 
> Now, adding  @Component annotation to one of my classes:
> 
> import org.osgi.service.component.annotations.Component;
> import akka.actor.UntypedActor;
> 
> @Component
> public class MyClass extends UntypedActor {
> 
> 
> When I build the project,  Maven goes  into an infinite loop.  CPU level is 100%.
> If I remove the "extends UntypedActor” it does not happen.
> 
> 
> Best regards,
> Alex soto
> 
>