You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Kjerrumgaard (JIRA)" <ji...@apache.org> on 2009/06/01 20:12:50 UTC

[jira] Created: (AMQ-2278) Unable to recevie BlobMessages from VmWare machine

Unable to recevie BlobMessages from VmWare machine
--------------------------------------------------

                 Key: AMQ-2278
                 URL: https://issues.apache.org/activemq/browse/AMQ-2278
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.2.0
         Environment: ActiveMQ 5.2.0 with Jetty 6.1.18 embedded, running on SuSE Linux 9.1 (i586), using jdk 1.6.0_13 
            Reporter: David Kjerrumgaard


I have set up a small test client which sends files as ActiveMQ BlobMessages from any client machine to the ActiveMQ host machine (with Jetty embedded). Depending upon the platform of the CLIENT application I get the following errors in the activeMQ server log when attempting to send files to the fileserver application which comes with activeMQ:

java.lang.IndexOutOfBoundsException: -58850
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:209)
at org.mortbay.io.nio.DirectNIOBuffer.peek(DirectNIOBuffer.java:97)
at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:305)
at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:448)
at org.mortbay.jetty.HttpParser.reset(HttpParser.java:948)
at org.mortbay.jetty.HttpConnection.destroy(HttpConnection.java:151)
at org.mortbay.jetty.AbstractConnector.connectionClosed(AbstractConnector.java:954)
at org.mortbay.jetty.nio.SelectChannelConnector.access$100(SelectChannelConnector.java:64)
at org.mortbay.jetty.nio.SelectChannelConnector$1.endPointClosed(SelectChannelConnector.java:92)
at org.mortbay.io.nio.SelectChannelEndPoint.doUpdateKey(SelectChannelEndPoint.java:396)
at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:368)
at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:190)
at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java:124)
at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:706)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

The function which sends the BlobMessages is as follows:

private void sendFile(String fileName) throws JMSException, IOException {
		
		System.out.println("Sending " + fileName + " to blob.test.queue" );
		
                // connection url is      "tcp://localhost:61616?jms.blobTransferPolicy.defaultUploadUrl=http://localhost.hdplus.com:8161/fileserver/"
		ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection();
		connection.setCopyMessageOnSend(false);
               connection.start();
        
        ActiveMQSession session = (ActiveMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = session.createQueue("blob.test.queue"); 
               
        File temp = File.createTempFile( FilenameUtils.getName(fileName), FilenameUtils.getExtension(fileName) );
        temp.deleteOnExit();
        FileUtils.copyFile(new File(fileName), temp );
        
        BlobMessage msg = session.createBlobMessage( temp );
        MessageProducer producer = session.createProducer(destination); 
        producer.send( msg );
        
        producer.close();
        session.close();
        connection.close();
        
        System.out.println("Published file " + fileName + " to " + destination.toString() );
	}


I have also opened a ticket on the Jetty JIRA : (JETTY-1031) IndexOutOfBoundsException in fileserver application

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-2278) Unable to recevie BlobMessages from VmWare machine

Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder updated AMQ-2278:
------------------------------

    Fix Version/s: 5.5.0
                       (was: 5.4.1)

> Unable to recevie BlobMessages from VmWare machine
> --------------------------------------------------
>
>                 Key: AMQ-2278
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2278
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2.0 with Jetty 6.1.18 embedded, running on SuSE Linux 9.1 (i586), using jdk 1.6.0_13 
>            Reporter: David Kjerrumgaard
>             Fix For: 5.5.0
>
>
> I have set up a small test client which sends files as ActiveMQ BlobMessages from any client machine to the ActiveMQ host machine (with Jetty embedded). Depending upon the platform of the CLIENT application I get the following errors in the activeMQ server log when attempting to send files to the fileserver application which comes with activeMQ:
> java.lang.IndexOutOfBoundsException: -58850
> at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:209)
> at org.mortbay.io.nio.DirectNIOBuffer.peek(DirectNIOBuffer.java:97)
> at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:305)
> at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:448)
> at org.mortbay.jetty.HttpParser.reset(HttpParser.java:948)
> at org.mortbay.jetty.HttpConnection.destroy(HttpConnection.java:151)
> at org.mortbay.jetty.AbstractConnector.connectionClosed(AbstractConnector.java:954)
> at org.mortbay.jetty.nio.SelectChannelConnector.access$100(SelectChannelConnector.java:64)
> at org.mortbay.jetty.nio.SelectChannelConnector$1.endPointClosed(SelectChannelConnector.java:92)
> at org.mortbay.io.nio.SelectChannelEndPoint.doUpdateKey(SelectChannelEndPoint.java:396)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:368)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:190)
> at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java:124)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:706)
> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
> The function which sends the BlobMessages is as follows:
> private void sendFile(String fileName) throws JMSException, IOException {
> 		
> 		System.out.println("Sending " + fileName + " to blob.test.queue" );
> 		
>                 // connection url is      "tcp://localhost:61616?jms.blobTransferPolicy.defaultUploadUrl=http://localhost.hdplus.com:8161/fileserver/"
> 		ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection();
> 		connection.setCopyMessageOnSend(false);
>                connection.start();
>         
>         ActiveMQSession session = (ActiveMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
>         Destination destination = session.createQueue("blob.test.queue"); 
>                
>         File temp = File.createTempFile( FilenameUtils.getName(fileName), FilenameUtils.getExtension(fileName) );
>         temp.deleteOnExit();
>         FileUtils.copyFile(new File(fileName), temp );
>         
>         BlobMessage msg = session.createBlobMessage( temp );
>         MessageProducer producer = session.createProducer(destination); 
>         producer.send( msg );
>         
>         producer.close();
>         session.close();
>         connection.close();
>         
>         System.out.println("Published file " + fileName + " to " + destination.toString() );
> 	}
> I have also opened a ticket on the Jetty JIRA : (JETTY-1031) IndexOutOfBoundsException in fileserver application

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQ-2278) Unable to recevie BlobMessages from VmWare machine

Posted by "SuoNayi Wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59931#action_59931 ] 

SuoNayi Wang commented on AMQ-2278:
-----------------------------------

I encountered the same question too.
My environments are the following:

1) ActiveMQ 5.2.0 with Jetty 6.1.9 embedded,running on Linux server1  2.6.18-8.10AX #1 SMP Tue Aug 14 04:52:29 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux, using jdk 1.5.18
java.lang.IllegalArgumentException ...org.mortbay.io.nio.NIOBuffer.poke(NIOBuffer.java:142)

2) ActiveMQ 5.2.0 with Jetty 6.1.24 embedded,running on Linux server1  2.6.18-8.10AX #1 SMP Tue Aug 14 04:52:29 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux, using jdk 1.5.22

3)ActiveMQ 5.2.0 with Jetty 6.1.24 embedded,running on Linux server1  2.6.18-8.10AX #1 SMP Tue Aug 14 04:52:29 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux, using jdk 6u20
java.lang.IndexOutOfBoundsException ...at org.mortbay.io.nio.DirectNIOBuffer.peek(DirectNIOBuffer.java:97)

the exception is different  and the final result is the same.



> Unable to recevie BlobMessages from VmWare machine
> --------------------------------------------------
>
>                 Key: AMQ-2278
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2278
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ 5.2.0 with Jetty 6.1.18 embedded, running on SuSE Linux 9.1 (i586), using jdk 1.6.0_13 
>            Reporter: David Kjerrumgaard
>
> I have set up a small test client which sends files as ActiveMQ BlobMessages from any client machine to the ActiveMQ host machine (with Jetty embedded). Depending upon the platform of the CLIENT application I get the following errors in the activeMQ server log when attempting to send files to the fileserver application which comes with activeMQ:
> java.lang.IndexOutOfBoundsException: -58850
> at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:209)
> at org.mortbay.io.nio.DirectNIOBuffer.peek(DirectNIOBuffer.java:97)
> at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:305)
> at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:448)
> at org.mortbay.jetty.HttpParser.reset(HttpParser.java:948)
> at org.mortbay.jetty.HttpConnection.destroy(HttpConnection.java:151)
> at org.mortbay.jetty.AbstractConnector.connectionClosed(AbstractConnector.java:954)
> at org.mortbay.jetty.nio.SelectChannelConnector.access$100(SelectChannelConnector.java:64)
> at org.mortbay.jetty.nio.SelectChannelConnector$1.endPointClosed(SelectChannelConnector.java:92)
> at org.mortbay.io.nio.SelectChannelEndPoint.doUpdateKey(SelectChannelEndPoint.java:396)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java:368)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:190)
> at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java:124)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:706)
> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
> The function which sends the BlobMessages is as follows:
> private void sendFile(String fileName) throws JMSException, IOException {
> 		
> 		System.out.println("Sending " + fileName + " to blob.test.queue" );
> 		
>                 // connection url is      "tcp://localhost:61616?jms.blobTransferPolicy.defaultUploadUrl=http://localhost.hdplus.com:8161/fileserver/"
> 		ActiveMQConnection connection = (ActiveMQConnection) factory.createConnection();
> 		connection.setCopyMessageOnSend(false);
>                connection.start();
>         
>         ActiveMQSession session = (ActiveMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
>         Destination destination = session.createQueue("blob.test.queue"); 
>                
>         File temp = File.createTempFile( FilenameUtils.getName(fileName), FilenameUtils.getExtension(fileName) );
>         temp.deleteOnExit();
>         FileUtils.copyFile(new File(fileName), temp );
>         
>         BlobMessage msg = session.createBlobMessage( temp );
>         MessageProducer producer = session.createProducer(destination); 
>         producer.send( msg );
>         
>         producer.close();
>         session.close();
>         connection.close();
>         
>         System.out.println("Published file " + fileName + " to " + destination.toString() );
> 	}
> I have also opened a ticket on the Jetty JIRA : (JETTY-1031) IndexOutOfBoundsException in fileserver application

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.