Here is the config file Regards, Ramesh K Bobba Sr. Software Engineer Transera Communications Inc. 10101 N. DeAnza Blvd., Suite 100 Cupertino, CA 95014 (w)408.873.1984x108 (f)408.873.7412 (c)510.579.0001
-----Original Message----- From: Ramesh Bobba [mailto:[EMAIL PROTECTED] Sent: Friday, June 09, 2006 7:40 AM To: activemq-users@geronimo.apache.org Subject: RE: Broker hangs on addConnector I tried getHostName, getHostAddress to generate the URL but still got the same problem. I also tried it on multiple machines. Then, I tried to invoke it thru spring by doing: BrokerService broker = BrokerFactory.createBroker(new URI("xbean:activemq.xml")); broker.start(); Now I get the following exception, any ideas why?: Error while initializing. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService' defined in class path resource [activemq.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/net/ServerSocketFactory java.lang.NoClassDefFoundError: javax/net/ServerSocketFactory at org.apache.activemq.transport.tcp.TcpTransportFactory.createServerSocket Factory(TcpTransportFactory.java:122) at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTranspor tFactory.java:51) at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.jav a:108) at org.apache.activemq.broker.TransportConnector.createTransportServer(Tran sportConnector.java:237) at org.apache.activemq.broker.TransportConnector.getServer(TransportConnect or.java:110) at org.apache.activemq.broker.TransportConnector.asManagedConnector(Transpo rtConnector.java:90) at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerS ervice.java:1084) at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerServic e.java:1052) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:364) at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBro kerService.java:43) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1058) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac tory.createBean(AbstractAutowireCapableBeanFactory.java:363) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab stractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.pre InstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(A bstractApplicationContext.java:318) at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(Cl assPathXmlApplicationContext.java:158) at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(Cl assPathXmlApplicationContext.java:48) at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFac tory.java:40) at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java :56) Regards, Ramesh K Bobba Sr. Software Engineer Transera Communications Inc. 10101 N. DeAnza Blvd., Suite 100 Cupertino, CA 95014 (w)408.873.1984x108 (f)408.873.7412 (c)510.579.0001 -----Original Message----- From: James Strachan [mailto:[EMAIL PROTECTED] Sent: Thursday, June 08, 2006 11:16 PM To: activemq-users@geronimo.apache.org Subject: Re: Broker hangs on addConnector This sounds really strange - maybe 'localhost' can't be used on your machine due to its network configuration; maybe try using an API address or another port? On 6/9/06, Ramesh Bobba <[EMAIL PROTECTED]> wrote: > Ok folks, > > I even tried the basic invocation: > > BrokerService broker = new BrokerService(); > Broker.addConnector("tcp://localhost:9998"); > > broker.start(); > > Even this hangs under linux!!! > > Regards, > > Ramesh K Bobba > Sr. Software Engineer > Transera Communications Inc. > 10101 N. DeAnza Blvd., Suite 100 > Cupertino, CA 95014 > (w)408.873.1984x108 > (f)408.873.7412 > (c)510.579.0001 > > -----Original Message----- > From: Ramesh Bobba [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 08, 2006 2:16 PM > To: activemq-users@geronimo.apache.org > Subject: RE: Broker hangs on addConnector > > I have left it in this state for about 2 hrs. Its still hung. There is > no CPU activity. > > Regards, > > Ramesh K Bobba > Sr. Software Engineer > Transera Communications Inc. > 10101 N. DeAnza Blvd., Suite 100 > Cupertino, CA 95014 > (w)408.873.1984x108 > (f)408.873.7412 > (c)510.579.0001 > > -----Original Message----- > From: Ramesh Bobba [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 08, 2006 2:04 PM > To: activemq-users@geronimo.apache.org > Subject: RE: Broker hangs on addConnector > > I am using 4.0 RC2 > > Regards, > > Ramesh K Bobba > Sr. Software Engineer > Transera Communications Inc. > 10101 N. DeAnza Blvd., Suite 100 > Cupertino, CA 95014 > (w)408.873.1984x108 > (f)408.873.7412 > (c)510.579.0001 > > -----Original Message----- > From: James Strachan [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 08, 2006 11:36 AM > To: activemq-users@geronimo.apache.org > Subject: Re: Broker hangs on addConnector > > Which version are you using? There was a bug a few months ago that > addConnector() would sometimes try start the broker's persistence > engine which would cause a full recovery to start. > > On 6/8/06, Ramesh Bobba <[EMAIL PROTECTED]> wrote: > > Hi, > > > > > > > > I am trying to run an embedded broker in my code that runs under > tomcat. > > I do the following and it runs fine in windows but hangs at startup at > > addConnector on linux. Anything I am doing wrong? > > > > > > > > broker.setDataDirectory(new File("/opt/data")); > > > > broker.setDeleteAllMessagesOnStartup(true); > > > > broker.setPersistent(true); > > > > > > > > broker.addConnector("tcp://localhost:9988"); > > > > broker.setBrokerName("testbroker"); > > > > broker.start(); > > > > > > > > It is never getting out of the addConnector call. > > > > > > > > Regards, > > > > > > > > Ramesh K Bobba > > > > Sr. Software Engineer > > > > <http://www.transerainc.com/> > > > > 10101 N. DeAnza Blvd., Suite 100 > > > > Cupertino, CA 95014 > > > > (w)408.873.1984x108 > > > > (f)408.873.7412 > > > > (c)510.579.0001 > > > > > > > > > > > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > -- James ------- http://radio.weblogs.com/0112098/
<!-- START SNIPPET: xbean --> <beans xmlns="http://activemq.org/config/1.0"> <broker useJmx="true"> <!-- Use the following to set the broker memory limit (in bytes) <memoryManager> <usageManager id="memory-manager" limit="1048576"/> </memoryManager> --> <!-- Use the following to configure how ActiveMQ is exposed in JMX <managementContext> <managementContext connectorPort="1099" jmxDomainName="org.apache.activemq"/> </managementContext> --> <!-- In ActiveMQ 4, you can setup destination policies --> <!--destinationPolicy> <policyMap><policyEntries> <policyEntry topic="FOO.>"> <dispatchPolicy> <strictOrderDispatchPolicy /> </dispatchPolicy> <subscriptionRecoveryPolicy> <lastImageSubscriptionRecoveryPolicy /> </subscriptionRecoveryPolicy> </policyEntry> </policyEntries></policyMap> </destinationPolicy--> <persistenceAdapter> <journaledJDBC journalLogFiles="5" dataDirectory="/opt/cdx-server/xera-data"/> <!-- To use a different datasource, use th following syntax : --> <!-- <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data" dataSource="#postgres-ds"/> --> </persistenceAdapter> <transportConnectors> <!--transportConnector name="default" uri="tcp://localhost:9989" discoveryUri="multicast://default"/--> <transportConnector name="default" uri="tcp://localhost:9989"/> </transportConnectors> <!--networkConnectors--> <!-- by default just auto discover the other brokers --> <!--networkConnector name="default" uri="multicast://default"/--> <!-- <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)" failover="true"/> --> <!--/networkConnectors--> </broker> <!-- This xbean configuration file supports all the standard spring xml configuration options --> <!-- Postgres DataSource Sample Setup --> <!-- <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource"> <property name="serverName" value="localhost"/> <property name="databaseName" value="activemq"/> <property name="portNumber" value="0"/> <property name="user" value="activemq"/> <property name="password" value="activemq"/> <property name="dataSourceName" value="postgres"/> <property name="initialConnections" value="1"/> <property name="maxConnections" value="10"/> </bean> --> <!-- MySql DataSource Sample Setup --> <!-- <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/> <property name="username" value="activemq"/> <property name="password" value="activemq"/> <property name="poolPreparedStatements" value="true"/> </bean> --> <!-- Embedded Derby DataSource Sample Setup --> <!-- <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource"> <property name="databaseName" value="derbydb"/> <property name="createDatabase" value="create"/> </bean> --> </beans> <!-- END SNIPPET: xbean -->