Exception with 2.10.BETA3 need to know version of netty used
geoharp May 12, 2010 3:27 PMI get the following exception:
So my question is what version of netty are you using in 2.1.0.BETA3
Caused by: java.lang.NoSuchMethodError: org.jboss.netty.buffer.ChannelBuffer.writeByte(I)V
at org.hornetq.core.buffers.impl.ChannelBufferWrapper.writeByte(ChannelBufferWrapper.java:552) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.core.message.impl.MessageImpl.createBody(MessageImpl.java:928) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.core.message.impl.MessageImpl.<init>(MessageImpl.java:136) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.core.server.impl.ServerMessageImpl.<init>(ServerMessageImpl.java:79) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.core.server.management.impl.ManagementServiceImpl.sendNotification(ManagementServiceImpl.java:696) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.integration.transports.netty.NettyAcceptor.start(NettyAcceptor.java:405) [hornetq-transports-2.1.0.BETA1.jar:na]
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:224) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:315) [hornetq-core-2.1.0.BETA3.jar:na]
at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:233) [hornetq-jms-2.1.0.BETA3.jar:na]
at com.navteq.traffic.patterns.common.spring.hornetq.HornetQServerFactoryBean.getObject(HornetQServerFactoryBean.java:65) [traffic-patterns-common-2.0.1.7-SNAPSHOT.jar:na]
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) [spring-2.5.6.jar:2.5.6]
How i instantiate the factory:
FileConfiguration configuration = new FileConfiguration();
configuration.setConfigurationUrl( "HornetQConfiguration.xml" );
configuration.setPersistenceEnabled( false );
configuration.setSecurityEnabled( false );
configuration.setConnectionTTLOverride( Long.MAX_VALUE );
configuration.start();
hornetQServer = new HornetQServerImpl( configuration );
jmsServerManager = new JMSServerManagerImpl( hornetQServer );
jmsServerManager.setContext( null );
jmsServerManager.start();
hornetQServer.start();
if ( ! jmsServerManager.createTopic( true, discoveryTopic.getTopicName(), discoveryTopic.getTopicName() ) )
{
throw new IllegalStateException( "Failed to make topic " + discoveryTopic.getTopicName() );
}
if ( ! jmsServerManager.createTopic( true, communicationTopic.getTopicName(), communicationTopic.getTopicName() ) )
{
throw new IllegalStateException( "Failed to make topic " + communicationTopic.getTopicName() );
}
In case you want my configuration:
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
<clustered>true</clustered>
<!-- Connectors -->
<connectors>
<connector name="netty-connector">
<factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
<param key="host" value="10.8.231.247"/>
<param key="port" value="5446"/>
<param key="use-nio" value="true"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="10.8.231.247"/>
<param key="port" value="5445"/>
<param key="use-nio" value="true"/>
</acceptor>
<!-- acceptor name="invm-acceptor">
<factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
</acceptor -->
</acceptors>
<!-- Clustering configuration -->
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<broadcast-period>100</broadcast-period>
<connector-ref connector-name="netty-connector"/>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="my-discovery-group">
<group-address>231.7.7.7</group-address>
<group-port>9877</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>true</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="my-discovery-group"/>
</cluster-connection>
</cluster-connections>
<!-- Other config -->
<address-settings>
<address-setting match="jms.#">
<redistribution-delay>0</redistribution-delay>
<dead-letter-address>jms.queue.deadLetterQueue</dead-letter-address>
<max-delivery-attempts>3</max-delivery-attempts>
<redelivery-delay>5000</redelivery-delay>
<last-value-queue>true</last-value-queue>
<address-full-policy>PAGE</address-full-policy>
</address-setting>
</address-settings>
<!-- security-settings>
<security-setting match="jms.queue.exampleQueue">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createTempQueue" roles="guest"/>
<permission type="deleteTempQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings -->
</configuration>