Yep, The problem is bootclasspath. For whatever reason, the bootclasspath I am setting is causing this problem. Although, the same bootclasspath setting seem to work fine with other applications. Does ActiveMQ reset/change the classpath or bootclasspath?
Regards, Ramesh K Bobba Sr. Software Engineer Transera Communications Inc. 20823 Stevens Creek Blvd., Suite 300 Cupertino, CA 95014 (w)408.873.1984x108 (f)408.873.7412 (c)510.579.0001 -----Original Message----- From: James Strachan [mailto:[EMAIL PROTECTED] Sent: Fri 6/9/2006 7:15 PM To: [email protected] Subject: Re: Broker hangs on addConnector if ServerSocketFactory can't be found there's something seriously screwy with your classpath. You are on JDK 1.4 or later right? On 6/9/06, Ramesh Bobba <[EMAIL PROTECTED]> wrote: > 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: [email protected] > 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: [email protected] > > 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: [email protected] > > 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: [email protected] > > 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/ > -- James ------- http://radio.weblogs.com/0112098/
