activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: ActiveMQ 5.0.0 --- Could not locate data file data-topic-data-1
Date Mon, 05 May 2008 15:00:32 GMT
This is a known bug in 5.0 - please try the 5.1 release candidate - http://people.apache.org/~chirino/staging-repos/activemq-5.1.0-RC6/org/apache/activemq/apache-activemq/5.1.0/

cheers,

Rob

On 5 May 2008, at 15:48, DavidS4 wrote:

>
> I am developing a notification system that writes to ActiveMQ.  It  
> seems to
> work great, for a while.  I pushed about 250,000 messages to the  
> topic,
> reading them on the subscriber all the while.  We then stopped  
> generating
> the messages.  When we started again, I got the following error:
>
> javax.jms.JMSException: java.lang.RuntimeException:
> org.apache.activemq.kaha.RuntimeStoreException: java.io.IOException:  
> Could
> not locate data file data-topic-data-1
>
> What does this mean?  What caused it?  I also noticed a very large  
> number of
> open sockets from my producer machine to my ActiveMQ queue machine.   
> Would
> this be related?  I had assumed that a single socket would exist  
> between
> them, but this was not the case.  If it helps, here is the code I am  
> using:
>
> 	/**
> 	 * Send an event to the local singleton instance
> 	 *
> 	 * @param event event to send to the topic
> 	 * @throws JMSException
> 	 */
> 	private void sendEventNotification(JMSNotificationEvent event)
> 	{
> 		try
> 		{
> 			TextMessage message = session.createTextMessage(event.toString());
> 			producer.send(message);
> 		}
> 		catch (JMSException jmsx)
> 		{
> 			// we catch the first one in case the JMS server was brought down  
> then
> back up
> 			logger.debug("JMSTopicManager: Send failed, refreshing JMS  
> connection.
> Error was: " + jmsx);
> 			try
> 			{
> 			    refreshJMSConnection();
> 			    TextMessage message =  
> session.createTextMessage(event.toString());
>
> 				producer.send(message);
> 				this.increment(event);
> 			}
> 			catch (JMSException jmsx2)
> 			{
> 				logger.error("JMSTopicManager: " + jmsx2);
> 			}
> 		}
> 		catch (Exception err)
> 		{
> 			logger.error("JMSTopicManager: " + err);
> 		}
> 	}
>
> And
>
> 	private void refreshJMSConnection() throws JMSException
> 	{
> 		ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(user, passwd, url);
> 		connection = connectionFactory.createConnection();
> 		connection.start();
>
> 		// Create the session
> 		session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
> 		destination = session.createTopic(JMSTopicManager.TOPIC_SUBJECT);
>
> 		// Create the producer.
> 		producer = session.createProducer(destination);
> 		producer.setDeliveryMode(DeliveryMode.PERSISTENT);
> 		if ( timeToLive > 0 )
> 		{
> 			producer.setTimeToLive(timeToLive);
> 		}
> 		
> 		// set to true to indicate that the connection was established
> successfully
> 	    initialized = true;
> 	}
> -- 
> View this message in context: http://www.nabble.com/ActiveMQ-5.0.0-----Could-not-locate-data-file-data-topic-data-1-tp17063347s2354p17063347.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message