You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by patchworker <br...@patchworking.de> on 2008/04/26 23:24:32 UTC

pure container running endlessly

Hello,

I just want to have a container what doesn't stop after it just has started.
In the moment it stops after I started it without pressing a key or doing
something. What the heck is a ShutdownHook?

-----------
mvn -e jbi:embeddedServicemix
-----------

Cheers!
Daniel


here the servicemix.xml and interesting parts of the log:

-----------
<beans xmlns="http://xbean.org/schemas/spring/1.0"
	xmlns:sm="http://servicemix.apache.org/config/1.0"
	xmlns:iq="http://lemonjuice.de/iq/servicemix/">
	
	<!-- the JBI container -->
	<sm:container id="jbi" rootDir="./target/data/smx"
		useMBeanServer="true" createMBeanServer="true" flowName="seda"
		autoEnlistInTransaction="true">
	</sm:container>

</beans>
-----------

-----------
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jbi'.
(...)
[INFO] [jbi:embeddedServicemix]
(...)
[main           ] INFO  JBIContainer ServiceMix 3.2.1 JBI Container
(ServiceMix) is starting
[main           ] WARN  ClientFactory Cound not start ClientFactory:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an  applet parameter, or in an
application resource file:  java.naming.factory.initial
[INFO] BUILD SUCCESSFUL

[ix ShutdownHook] INFO  ileSystemXmlApplicationContext - Closing
org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e8a0cd:
display name
[org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e
8a0cd]; startup date [Sat Apr 26 22:56:59 CEST 2008]; root of context
hierarchy

-----------

-- 
View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16917660.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: pure container running endlessly

Posted by Guillaume Nodet <gn...@gmail.com>.
What is the content of your zip ?
It needs to be a JBI artifact, so the jbi descriptor is a requirement
for components, shared libraries and service assemblies.
It is not required for service units, but service units must be
wrapped in service assemblies.

On Tue, Apr 29, 2008 at 12:46 AM, Daniel_Bruessler
<br...@patchworking.de> wrote:
>
>  Hello,
>
>
>
>  gnodet wrote:
>  >
>  > You should have something more explicit in the console or the log file,
>  > like a stack trace exception or something like that.
>  >
>
>  today I started all with
>  -------
>  bin/hotdeploy
>  -------
>
>  with just having this in the hotdeploy-folder: bean, jms, lwcontainer,
>  shared, truezip
>
>  When SM has started, not just these, all components got loaded (why?) and
>  then when ready I added just the iqtestcontainer-3.2.1-src.zip
>
>  the error-message is "Unable to find jbi descriptor" - but I think I don't
>  need a jbi.xml, do I?
>
>  --------
>  INFO  | Timer-5    | AutoDeploymentService    |
>  ramework.AutoDeploymentService  646 | Directory: hotdeploy: Archive changed:
>  processing iqtestcontainer-3.2.1-src.zip ...
>
>  WARN  | Timer-5    | AutoDeploymentService    |
>  ramework.AutoDeploymentService  650 | Directory: hotdeploy: Automatic
>  install of
>  C:\Programme\ApacheServiceMix321\hotdeploy\iqtestcontainer-3.2.1-src.zip
>  failed
>  javax.jbi.management.DeploymentException: <?xml version="1.0"
>  encoding="UTF-8"?>
>  <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>  version="1.0">
>  <jbi-task-result>
>  <frmwk-task-result>
>  <frmwk-task-result-details>
>  <task-result-details>
>  <task-id>deploy</task-id>
>  <task-result>FAILED</task-result>
>  <message-type>ERROR</message-type>
>  <task-status-msg>
>  <msg-loc-info>
>  <loc-token/>
>  <loc-message>Unable to find jbi descriptor:
>  C:\Programme\ApacheServiceMix321\hotdeploy\iqtestcontainer-3.2.1-src.zip</loc-message>
>  </msg-loc-info>
>  </task-status-msg>
>  </task-result-details>
>  </frmwk-task-result-details>
>  </frmwk-task-result>
>  </jbi-task-result>
>  </jbi-task>
>
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService.failure(AutoDeploymentService.java:384)
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService.failure(AutoDeploymentService.java:370)
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:234)
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
>         at
>  org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
>  --------
>  --
>  View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16945970.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: pure container running endlessly

Posted by Daniel_Bruessler <br...@patchworking.de>.
Hello,


gnodet wrote:
> 
> You should have something more explicit in the console or the log file,
> like a stack trace exception or something like that.
> 

today I started all with
-------
bin/hotdeploy
-------

with just having this in the hotdeploy-folder: bean, jms, lwcontainer,
shared, truezip

When SM has started, not just these, all components got loaded (why?) and
then when ready I added just the iqtestcontainer-3.2.1-src.zip 

the error-message is "Unable to find jbi descriptor" - but I think I don't
need a jbi.xml, do I?

--------
INFO  | Timer-5    | AutoDeploymentService    |
ramework.AutoDeploymentService  646 | Directory: hotdeploy: Archive changed:
processing iqtestcontainer-3.2.1-src.zip ...

WARN  | Timer-5    | AutoDeploymentService    |
ramework.AutoDeploymentService  650 | Directory: hotdeploy: Automatic
install of
C:\Programme\ApacheServiceMix321\hotdeploy\iqtestcontainer-3.2.1-src.zip
failed
javax.jbi.management.DeploymentException: <?xml version="1.0"
encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to find jbi descriptor:
C:\Programme\ApacheServiceMix321\hotdeploy\iqtestcontainer-3.2.1-src.zip</loc-message>
</msg-loc-info>
</task-status-msg>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
</jbi-task-result>
</jbi-task>

	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.failure(AutoDeploymentService.java:384)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.failure(AutoDeploymentService.java:370)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:234)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
	at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
--------
-- 
View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16945970.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: pure container running endlessly

Posted by Guillaume Nodet <gn...@gmail.com>.
What is the reason for this failure ?
You should have something more explicit in the console or the log file
, like a stack trace exception or something like that.

On Mon, Apr 28, 2008 at 11:06 AM, Daniel_Bruessler
<br...@patchworking.de> wrote:
>
>  Hello Guillaume,
>
>  I tried to put the maven-generated jar into the hotdeploy-folder ans started
>  the whole with bin/servicemix.
>
>  I get the message "hotdeploy/iqtestcontainer-3.2.1.jar failed". Shall I
>  empty the hotdeploy-folder and add give the servicemix-xml as parameter?
>
>
>
>  gnodet wrote:
>  >
>  > Can you just start ServiceMix using bin/servicemix instead ?
>  >>  mvn -e jbi:embeddedServicemix
>  >
>
>  --
>  View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16932985.html
>
>
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: pure container running endlessly

Posted by Daniel_Bruessler <br...@patchworking.de>.
Hello Guillaume,

I tried to put the maven-generated jar into the hotdeploy-folder ans started
the whole with bin/servicemix.

I get the message "hotdeploy/iqtestcontainer-3.2.1.jar failed". Shall I
empty the hotdeploy-folder and add give the servicemix-xml as parameter?


gnodet wrote:
> 
> Can you just start ServiceMix using bin/servicemix instead ?
>>  mvn -e jbi:embeddedServicemix
> 

-- 
View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16932985.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: pure container running endlessly

Posted by Guillaume Nodet <gn...@gmail.com>.
I think this is a regression caused by some changes we made in the
shutdown mechanism.
Can you just start ServiceMix using bin/servicemix instead ?

On Sat, Apr 26, 2008 at 11:24 PM, patchworker <br...@patchworking.de> wrote:
>
>  Hello,
>
>  I just want to have a container what doesn't stop after it just has started.
>  In the moment it stops after I started it without pressing a key or doing
>  something. What the heck is a ShutdownHook?
>
>  -----------
>  mvn -e jbi:embeddedServicemix
>  -----------
>
>  Cheers!
>  Daniel
>
>
>  here the servicemix.xml and interesting parts of the log:
>
>  -----------
>  <beans xmlns="http://xbean.org/schemas/spring/1.0"
>         xmlns:sm="http://servicemix.apache.org/config/1.0"
>         xmlns:iq="http://lemonjuice.de/iq/servicemix/">
>
>         <!-- the JBI container -->
>         <sm:container id="jbi" rootDir="./target/data/smx"
>                 useMBeanServer="true" createMBeanServer="true" flowName="seda"
>                 autoEnlistInTransaction="true">
>         </sm:container>
>
>  </beans>
>  -----------
>
>  -----------
>  [INFO] Scanning for projects...
>  [INFO] Searching repository for plugin with prefix: 'jbi'.
>  (...)
>  [INFO] [jbi:embeddedServicemix]
>  (...)
>  [main           ] INFO  JBIContainer ServiceMix 3.2.1 JBI Container
>  (ServiceMix) is starting
>  [main           ] WARN  ClientFactory Cound not start ClientFactory:
>  javax.naming.NoInitialContextException: Need to specify class name in
>  environment or system property, or as an  applet parameter, or in an
>  application resource file:  java.naming.factory.initial
>  [INFO] BUILD SUCCESSFUL
>
>  [ix ShutdownHook] INFO  ileSystemXmlApplicationContext - Closing
>  org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e8a0cd:
>  display name
>  [org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e
>  8a0cd]; startup date [Sat Apr 26 22:56:59 CEST 2008]; root of context
>  hierarchy
>
>  -----------
>
>  --
>  View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16917660.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: pure container running endlessly

Posted by Daniel_Bruessler <br...@patchworking.de>.
Hello bruce,

sorry I needed a while to find the answers. Thanks for giving me
understanding about it!

Yes, this is the only content for servicemix.xml
Is there a way to call getRuntime().removeShutdownHook(hook) in a spring
bean ? Reason is: I'd like to learn using ServiceMix and need a fast
deploy-method. With maven it's very fast to see the result of changes. Or is
there another fast way?

I didn't change conf/jndi.properties - Question is if maven knows about
this, because JNDI is starting for port 1099. In the pom.xml I have for the
maven-assembly-plugin the default with default-content in it:
-------
                        <configuration>
                            <descriptors>
                               
<descriptor>src/main/assembly/src.xml</descriptor>
                            </descriptors>
                        </configuration>
-------

[main           ] INFO  JBIContainer
 ServiceMix 3.2.1 JBI Container (ServiceMix) is starting
[main           ] INFO  JBIContainer

[main           ] INFO  ConnectorServerFactoryBean - JMX connector server
started: javax.management.remote.rmi.RMIConnectorServer@1a631c2
[main           ] INFO  ConnectorServerFactoryBean - JMX connector available
at: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi

[main           ] INFO  ComponentMBeanImpl Initializing component:
#SubscriptionManager#
[main           ] INFO  DeploymentService - Restoring service assemblies
[main           ] WARN  ClientFactory - Cound not start ClientFactory:
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter,
 or in an application resource file:  java.naming.factory.initial
[main           ] INFO  JBIContainer ServiceMix JBI Container (ServiceMix)
started
 


bsnyder wrote:
> A shutdown hook is an unstarted thread that waits for an event to shut
> down the JVM.
> http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)
> 
> Are there are other configuration files you're using?
> 
> Is there more logging available?
> 
> Bruce

-- 
View this message in context: http://www.nabble.com/pure-container-running-endlessly-tp16917660p16935539.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: pure container running endlessly

Posted by Bruce Snyder <br...@gmail.com>.
On Sat, Apr 26, 2008 at 3:24 PM, patchworker <br...@patchworking.de> wrote:
>
>  Hello,
>
>  I just want to have a container what doesn't stop after it just has started.
>  In the moment it stops after I started it without pressing a key or doing
>  something. What the heck is a ShutdownHook?


A shutdown hook is an unstarted thread that waits for an event to shut
down the JVM. See the Javadocs for it here:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

>  here the servicemix.xml and interesting parts of the log:
>
>  -----------
>  <beans xmlns="http://xbean.org/schemas/spring/1.0"
>         xmlns:sm="http://servicemix.apache.org/config/1.0"
>         xmlns:iq="http://lemonjuice.de/iq/servicemix/">
>
>         <!-- the JBI container -->
>         <sm:container id="jbi" rootDir="./target/data/smx"
>                 useMBeanServer="true" createMBeanServer="true" flowName="seda"
>                 autoEnlistInTransaction="true">
>         </sm:container>
>
>  </beans>

Is the above configuration the only content of the servicemix.xml
file? Are there are other configuration files you're using? The
standalone ServiceMix has many more configuration files in the conf/
directory.

>  [INFO] Scanning for projects...
>  [INFO] Searching repository for plugin with prefix: 'jbi'.
>  (...)
>  [INFO] [jbi:embeddedServicemix]
>  (...)
>  [main           ] INFO  JBIContainer ServiceMix 3.2.1 JBI Container
>  (ServiceMix) is starting
>  [main           ] WARN  ClientFactory Cound not start ClientFactory:
>  javax.naming.NoInitialContextException: Need to specify class name in
>  environment or system property, or as an  applet parameter, or in an
>  application resource file:  java.naming.factory.initial
>  [INFO] BUILD SUCCESSFUL

The exception above is usually innocuous unless you need to use JNDI.
Do you have the jndi.properties file in the classpath?

>  [ix ShutdownHook] INFO  ileSystemXmlApplicationContext - Closing
>  org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e8a0cd:
>  display name
>  [org.apache.xbean.spring.context.FileSystemXmlApplicationContext@e
>  8a0cd]; startup date [Sat Apr 26 22:56:59 CEST 2008]; root of context
>  hierarchy

There's not enough detail to determine why ServiceMix is shutting
down. Is there more logging available?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/