You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by SamuelT <sa...@hotmail.com> on 2011/08/09 17:09:28 UTC

Print output

Hi,
I'm starting to learn about karaf so I'm trying to execute some basic
examples. I've created a 'helloworld' bundle and deployed it, the bundle is
active but i can't see the 'hello world' output. I restarted the bundle but
nothing happens, can someone help me? why is that happening?

Sorry for such a fool question, but I don't have any idea of what to do...

Thanks in advance.

Samuel

--
View this message in context: http://karaf.922171.n3.nabble.com/Print-output-tp3239275p3239275.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Print output

Posted by Glen Mazza <gm...@talend.com>.
Hi Samuel,

Most of the open-source Talend Integration Factory (Camel) and Talend 
Service Factory (CXF) examples have deployment options on their 
Karaf-based OSGi containers, which (among other things) will output text 
to the Karaf console.  Look under User Documentation and Examples at the 
very bottom here: http://www.talend.com/download.php#IF.  I have a video 
of one of TSF's REST examples which has console output:
http://www.jroller.com/gmazza/entry/video_tsf_jaxrs_advanced_example

HTH,
Glen


On 8/9/2011 11:09 AM, SamuelT wrote:
> Hi,
> I'm starting to learn about karaf so I'm trying to execute some basic
> examples. I've created a 'helloworld' bundle and deployed it, the bundle is
> active but i can't see the 'hello world' output. I restarted the bundle but
> nothing happens, can someone help me? why is that happening?
>
> Sorry for such a fool question, but I don't have any idea of what to do...
>
> Thanks in advance.
>
> Samuel
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Print-output-tp3239275p3239275.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
Glen Mazza
Software Engineer, Talend (http://www.talend.com)
blog: http://www.jroller.com/gmazza



Re: Print output

Posted by SamuelT <sa...@hotmail.com>.
I think I found the problem, my helloworld bundle had a dependency on
spring-osgi-extender and others, so I've deployed the JARs and it's printing
now...

Thanks everybody for the help...

Samuel

--
View this message in context: http://karaf.922171.n3.nabble.com/Print-output-tp3239275p3246261.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Print output

Posted by SamuelT <sa...@hotmail.com>.
I've created the example based on another example I saw, I don't know what is
a blueprint, but my project doesn't have an activator, it has a class with
one method that prints "Hello World" on the console. I don't have a great
knowledge about that, but it seems to me that is used the spring framework,
in the example has a "bundle-context.xml" with a bean like that:

	<bean id="HelloWorld" class="helloworld.HelloWorld"
		init-method="helloWorld">
	</bean>

Could this be the problem? 

I Don't know if I said something wrong or nonsense, I've started learning
about OSGi just a few days ago, so if is something wrong please correct
me...

By the way, thanks for your help ;]

Samuel

--
View this message in context: http://karaf.922171.n3.nabble.com/Print-output-tp3239275p3242486.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Print output

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Samuel,

Could you provide some information about your bundle ?

Do you have an Activator to start your bundle ?
Do you use blueprint in place of an Activator ?

Where do you perform the System.out.println() ?

Thanks,
Regards
JB

On 08/09/2011 05:09 PM, SamuelT wrote:
> Hi,
> I'm starting to learn about karaf so I'm trying to execute some basic
> examples. I've created a 'helloworld' bundle and deployed it, the bundle is
> active but i can't see the 'hello world' output. I restarted the bundle but
> nothing happens, can someone help me? why is that happening?
>
> Sorry for such a fool question, but I don't have any idea of what to do...
>
> Thanks in advance.
>
> Samuel
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Print-output-tp3239275p3239275.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com