RE: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)

2014-12-16 Thread Steve Huston
I have a feeling you're right... will be here waiting ;-)

> -Original Message-
> From: Chris Whelan [mailto:chris.whe...@systemsandsoftware.net]
> Sent: Tuesday, December 16, 2014 6:04 PM
> To: 
> Subject: Re: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)
> 
> Thanks for your quick reply Steve.  We are proceeding with xlc as you
> suggested.  I have a feeling though it being aix and all, I will be posting 
> again
> shortly...
> 
> Regards,
> 
> -Chris
> 
> > On Dec 16, 2014, at 4:17 PM, Steve Huston 
> wrote:
> >
> > Hi Chris,
> >
> > I don't have any insight into the gcc error. However, I've spent many years
> working on AIX with C++. I've had my share of long and unfruitful nights
> dealing with gcc. IBM has people involved with gcc and it still seems to have
> never-ending problems for some reason.
> >
> > For my 2 cents, I recommend biting the bullet and going with xlC++.
> >
> > FWIW,
> > -Steve Huston
> >
> > From: Chris Whelan [mailto:chris.whe...@systemsandsoftware.net]
> > Sent: Tuesday, December 16, 2014 3:54 PM
> > To: users@qpid.apache.org
> > Subject: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)
> >
> > Hello,
> >
> > We have been struggling mightily to get qpid to compile on aix 6.1 with gcc.
> We have tried both 4.8.2 and 4.8.3 and the error we have run into is:
> >
> > /home/dbapi/enquesta_5_0/qpid-cpp-
> 0.30/src/qpid/sys/posix/PosixPoller.
> > cpp:796:2: internal compiler error: in
> > function_and_variable_visibility, at ipa.c:868 }}  ^ libbacktrace
> > could not find executable to open Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See  for instructions.
> > make: 1254-004 The error code from the last command is 1.
> >
> > This appears to be a problem with gcc itself rather than qpid code,
> > but since we are utilizing the latest version of the gcc compiler I
> > could find for aix and it still does not work, any help in providing a
> > workaround would be greatly appreciated.  My coworker was able to
> > identify the problematic lines.  Two of the errors appear to be
> > related to the use of the PollerHandleDeletionManager (Line 701 and
> > 712) and  Event (Line 729)
> >
> > PollerHandleDeletionManager.destroyThreadState();  (2 occurrences)
> > Event event = impl->eventStream.next(timeout);  (1 occurrence)
> >
> > When he commented out those lines (and additional affected code in the
> case of the Event line), the compilation of PosixPoller.cpp succeeded.  We
> surmised that it has something to do with gcc handling of namespaces, but
> could not come up with a way to get around this issue.  We are planning on
> trying IBM's xlc compiler, but we have invested a lot of time in this already
> and would like to avoid xlc licensing costs if possible.
> >
> > Thanks in advance,
> >
> > Regards,
> >
> > Chris Whelan
> >
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org For additional
> commands, e-mail: users-h...@qpid.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



Re: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)

2014-12-16 Thread Chris Whelan
Thanks for your quick reply Steve.  We are proceeding with xlc as you 
suggested.  I have a feeling though it being aix and all, I will be posting 
again shortly...

Regards,

-Chris

> On Dec 16, 2014, at 4:17 PM, Steve Huston  wrote:
> 
> Hi Chris,
> 
> I don't have any insight into the gcc error. However, I've spent many years 
> working on AIX with C++. I've had my share of long and unfruitful nights 
> dealing with gcc. IBM has people involved with gcc and it still seems to have 
> never-ending problems for some reason.
> 
> For my 2 cents, I recommend biting the bullet and going with xlC++.
> 
> FWIW,
> -Steve Huston
> 
> From: Chris Whelan [mailto:chris.whe...@systemsandsoftware.net]
> Sent: Tuesday, December 16, 2014 3:54 PM
> To: users@qpid.apache.org
> Subject: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)
> 
> Hello,
> 
> We have been struggling mightily to get qpid to compile on aix 6.1 with gcc.  
> We have tried both 4.8.2 and 4.8.3 and the error we have run into is:
> 
> /home/dbapi/enquesta_5_0/qpid-cpp-0.30/src/qpid/sys/posix/PosixPoller.cpp:796:2:
>  internal compiler error: in function_and_variable_visibility, at ipa.c:868
> }}
>  ^
> libbacktrace could not find executable to open
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
> make: 1254-004 The error code from the last command is 1.
> 
> This appears to be a problem with gcc itself rather than qpid code, but since 
> we are utilizing the latest version of the gcc compiler I could find for aix 
> and it still does not work, any help in providing a workaround would be 
> greatly appreciated.  My coworker was able to identify the problematic lines. 
>  Two of the errors appear to be related to the use of the 
> PollerHandleDeletionManager (Line 701 and 712) and  Event (Line 729)
> 
> PollerHandleDeletionManager.destroyThreadState();  (2 occurrences)
> Event event = impl->eventStream.next(timeout);  (1 occurrence)
> 
> When he commented out those lines (and additional affected code in the case 
> of the Event line), the compilation of PosixPoller.cpp succeeded.  We 
> surmised that it has something to do with gcc handling of namespaces, but 
> could not come up with a way to get around this issue.  We are planning on 
> trying IBM's xlc compiler, but we have invested a lot of time in this already 
> and would like to avoid xlc licensing costs if possible.
> 
> Thanks in advance,
> 
> Regards,
> 
> Chris Whelan
> 

-
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org



RE: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)

2014-12-16 Thread Steve Huston
Hi Chris,

I don't have any insight into the gcc error. However, I've spent many years 
working on AIX with C++. I've had my share of long and unfruitful nights 
dealing with gcc. IBM has people involved with gcc and it still seems to have 
never-ending problems for some reason.

For my 2 cents, I recommend biting the bullet and going with xlC++.

FWIW,
-Steve Huston

From: Chris Whelan [mailto:chris.whe...@systemsandsoftware.net]
Sent: Tuesday, December 16, 2014 3:54 PM
To: users@qpid.apache.org
Subject: Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)

Hello,

We have been struggling mightily to get qpid to compile on aix 6.1 with gcc.  
We have tried both 4.8.2 and 4.8.3 and the error we have run into is:

/home/dbapi/enquesta_5_0/qpid-cpp-0.30/src/qpid/sys/posix/PosixPoller.cpp:796:2:
 internal compiler error: in function_and_variable_visibility, at ipa.c:868
}}
  ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make: 1254-004 The error code from the last command is 1.

This appears to be a problem with gcc itself rather than qpid code, but since 
we are utilizing the latest version of the gcc compiler I could find for aix 
and it still does not work, any help in providing a workaround would be greatly 
appreciated.  My coworker was able to identify the problematic lines.  Two of 
the errors appear to be related to the use of the PollerHandleDeletionManager 
(Line 701 and 712) and  Event (Line 729)

PollerHandleDeletionManager.destroyThreadState();  (2 occurrences)
Event event = impl->eventStream.next(timeout);  (1 occurrence)

When he commented out those lines (and additional affected code in the case of 
the Event line), the compilation of PosixPoller.cpp succeeded.  We surmised 
that it has something to do with gcc handling of namespaces, but could not come 
up with a way to get around this issue.  We are planning on trying IBM's xlc 
compiler, but we have invested a lot of time in this already and would like to 
avoid xlc licensing costs if possible.

Thanks in advance,

Regards,

Chris Whelan



Compiling qpid on aix 6.1 with gcc 4.8.2 (or gcc 4.8.3)

2014-12-16 Thread Chris Whelan
Hello,

We have been struggling mightily to get qpid to compile on aix 6.1 with gcc.  
We have tried both 4.8.2 and 4.8.3 and the error we have run into is:

/home/dbapi/enquesta_5_0/qpid-cpp-0.30/src/qpid/sys/posix/PosixPoller.cpp:796:2:
 internal compiler error: in function_and_variable_visibility, at ipa.c:868
}}
  ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make: 1254-004 The error code from the last command is 1.

This appears to be a problem with gcc itself rather than qpid code, but since 
we are utilizing the latest version of the gcc compiler I could find for aix 
and it still does not work, any help in providing a workaround would be greatly 
appreciated.  My coworker was able to identify the problematic lines.  Two of 
the errors appear to be related to the use of the PollerHandleDeletionManager 
(Line 701 and 712) and  Event (Line 729)

PollerHandleDeletionManager.destroyThreadState();  (2 occurrences)
Event event = impl->eventStream.next(timeout);  (1 occurrence)

When he commented out those lines (and additional affected code in the case of 
the Event line), the compilation of PosixPoller.cpp succeeded.  We surmised 
that it has something to do with gcc handling of namespaces, but could not come 
up with a way to get around this issue.  We are planning on trying IBM's xlc 
compiler, but we have invested a lot of time in this already and would like to 
avoid xlc licensing costs if possible.

Thanks in advance,

Regards,

Chris Whelan

/*
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *
 */

#include "qpid/sys/Poller.h"
#include "qpid/sys/IOHandle.h"
#include "qpid/sys/Mutex.h"
#include "qpid/sys/AtomicCount.h"
#include "qpid/sys/DeletionManager.h"
#include "qpid/sys/posix/check.h"
#include "qpid/sys/posix/PrivatePosix.h"
#include "qpid/log/Statement.h"
#include "qpid/sys/Condition.h"

#include 
#include 
#include 

#include 
#include 
#include 
#include 

/*
 *
 * This is a qpid::sys::Poller implementation for Posix systems.
 *
 * This module follows the structure of the Linux EpollPoller as closely as 
possible
 * to simplify maintainability.  Noteworthy differences:
 *
 * The Linux epoll_xxx() calls present one event at a time to multiple callers 
whereas poll()
 * returns one or more events to a single caller.  The EventStream class layers 
a
 * "one event per call" view of the poll() result to multiple threads.
 *
 * The HandleSet is the master set of in-use PollerHandles.  The EventStream
 * maintains a snapshot copy taken just before the call to poll() that remains 
static
 * until all flagged events have been processed.
 *
 * There is an additional window where the PollerHandlePrivate class may 
survive the
 * parent PollerHandle destructor, i.e. between snapshots.
 *
 * Safe interrupting of the Poller is implemented using the "self-pipe trick".
 *
 */

namespace qpid {
namespace sys {

// Deletion manager to handle deferring deletion of PollerHandles to when they 
definitely aren't being used
DeletionManager PollerHandleDeletionManager;

//  Instantiate (and define) class static for DeletionManager
template <>
DeletionManager::AllThreadsStatuses 
DeletionManager::allThreadsStatuses(0);

class PollerHandlePrivate {
friend class Poller;
friend class PollerPrivate;
friend class PollerHandle;
friend class HandleSet;

enum FDStat {
ABSENT,
MONITORED,
INACTIVE,
HUNGUP,
MONITORED_HUNGUP,
INTERRUPTED,
INTERRUPTED_HUNGUP,
DELETED
};

short events;
const IOHandle* ioHandle;
PollerHandle* pollerHandle;
FDStat stat;
Mutex lock;

PollerHandlePrivate(const IOHandle* h, PollerHandle* p) :
  events(0),
  ioHandle(h),
  pollerHandle(p),
  stat(ABSENT) {
}

int fd() const {
return ioHandle->fd;
}

bool isActive() const {
return stat == MONITORED || stat == MONITORED_HUNGUP;
}

void setActive() {
stat = (stat == HUNGUP || stat == INTERRUPTED_HUNGUP)
? MONITORED_HUNGUP
: MONITORED;
}

bool isInactive() const {
return sta

Re: Cannot connect to RabbitMQ 3.3.5 using qpid-client-0.30

2014-12-16 Thread Nathan Kunkee

On 12/16/2014 10:59 AM, Wayna Runa wrote:

Hi there,

I have modified the "Hello.java" sample of qpid-client-0.30 JMS client to
connect to RabbitMQ v3.3.5, but this does not work.

My JNDI config (hello.properties) is:

---.---
java.naming.factory.initial =
org.apache.qpid.jndi.PropertiesFileInitialContextFactory
 RabbitMQ v3.3.5
connectionfactory.myRabbitMQConnectionFactory1 = amqp://admin:xxx@clientid
/DES_DEV?brokerlist='tcp://10.105.135.53:5672'
connectionfactory.myRabbitMQConnectionFactory2 = amqp://admin:xxx@clientid
/?brokerlist='tcp://10.105.135.53:5672'
queue.myJNDIRabbitMQQueue1 = q.test1
queue.myJNDIRabbitMQQueue2 = q.test2
---.---

And my updated Hello.java is:

---.---
import java.io.InputStream;
import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class Hello {

 public Hello() {
 }

 public static void main(String[] args) {
 Hello hello = new Hello();
 hello.runTest();
 }

 private void runTest()  {
 try (InputStream resourceAsStream =
this.getClass().getResourceAsStream("hello.properties")) {
 System.setProperty("qpid.amqp.version", "0-91");
 Properties properties = new Properties();
 properties.load(resourceAsStream);
 Context context = new InitialContext(properties);

 ConnectionFactory connectionFactory = (ConnectionFactory)
context.lookup("myRabbitMQConnectionFactory1");
 //ConnectionFactory connectionFactory = (ConnectionFactory)
context.lookup("myRabbitMQConnectionFactory2");
 Connection connection = connectionFactory.createConnection();
 connection.start();
 Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);

 Queue queue = (Queue) context.lookup("myJNDIRabbitMQQueue1");
 //Queue queue = (Queue) context.lookup("myJNDIRabbitMQQueue2");
 MessageProducer messageProducer = session.createProducer(queue);
 TextMessage message = session.createTextMessage("Hello world
!!");
 messageProducer.send(message);

 System.out.println(message.getText());
 connection.close();
 context.close();
 } catch (Exception exp) {
 exp.printStackTrace();
 }
 }
}
---.---


If I use (with VIRTUAL HOST):

connectionfactory.myRabbitMQConnectionFactory1 = amqp://admin:xxx@
*clientid/DES_DEV*?brokerlist='tcp://10.105.135.53:5672'

I have this error:

---.---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
javax.jms.JMSException: Error creating connection: Exception thrown against
AMQConnection:
Host: 10.105.135.53
Port: 5672
Virtual Host: DES_DEV
Client ID: clientid
Active session count: 0: org.apache.qpid.AMQDisconnectedException:
Connection could not be established: Connection reset


Do the RabbitMQ logs say why the connection was dropped? While 
troubleshooting this, you'll probably want a window open to tail their 
logs. Qpid (implicitly) assumes that virtual hosts have a leading 
forward slash, while RabbitMQ does not. I had to specifically create my 
virtual hosts with a forward slash on RabbitMQ.


Hope that helps,
Nathan


 at
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:128)
 at info.intix.rabbitmq.samples.Hello.runTest(Hello.java:39)
 at info.intix.rabbitmq.samples.Hello.main(Hello.java:21)
Caused by: org.apache.qpid.AMQConnectionFailureException: Exception thrown
against AMQConnection:
Host: 10.105.135.53
Port: 5672
Virtual Host: DES_DEV
Client ID: clientid
Active session count: 0: org.apache.qpid.AMQDisconnectedException:
Connection could not be established: Connection reset
 at org.apache.qpid.client.AMQConnection.(AMQConnection.java:503)
 at
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:124)
 ... 2 more
Caused by: org.apache.qpid.AMQException: Woken up due to class
javax.jms.JMSException
 at
org.apache.qpid.client.util.BlockingWaiter.block(BlockingWaiter.java:195)
 at org.apache.qpid.client.state.StateWaiter.await(StateWaiter.java:114)
 at org.apache.qpid.client.state.StateWaiter.await(StateWaiter.java:91)
 at org.apache.qpid.client.*AMQConnectionDelegate_8_0*
.makeBrokerConnection(AMQConnectionDelegate_8_0.java:142)
 at
org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.jav

Cannot connect to RabbitMQ 3.3.5 using qpid-client-0.30

2014-12-16 Thread Wayna Runa
Hi there,

I have modified the "Hello.java" sample of qpid-client-0.30 JMS client to
connect to RabbitMQ v3.3.5, but this does not work.

My JNDI config (hello.properties) is:

---.---
java.naming.factory.initial =
org.apache.qpid.jndi.PropertiesFileInitialContextFactory
 RabbitMQ v3.3.5
connectionfactory.myRabbitMQConnectionFactory1 = amqp://admin:xxx@clientid
/DES_DEV?brokerlist='tcp://10.105.135.53:5672'
connectionfactory.myRabbitMQConnectionFactory2 = amqp://admin:xxx@clientid
/?brokerlist='tcp://10.105.135.53:5672'
queue.myJNDIRabbitMQQueue1 = q.test1
queue.myJNDIRabbitMQQueue2 = q.test2
---.---

And my updated Hello.java is:

---.---
import java.io.InputStream;
import java.util.Properties;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class Hello {

public Hello() {
}

public static void main(String[] args) {
Hello hello = new Hello();
hello.runTest();
}

private void runTest()  {
try (InputStream resourceAsStream =
this.getClass().getResourceAsStream("hello.properties")) {
System.setProperty("qpid.amqp.version", "0-91");
Properties properties = new Properties();
properties.load(resourceAsStream);
Context context = new InitialContext(properties);

ConnectionFactory connectionFactory = (ConnectionFactory)
context.lookup("myRabbitMQConnectionFactory1");
//ConnectionFactory connectionFactory = (ConnectionFactory)
context.lookup("myRabbitMQConnectionFactory2");
Connection connection = connectionFactory.createConnection();
connection.start();
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);

Queue queue = (Queue) context.lookup("myJNDIRabbitMQQueue1");
//Queue queue = (Queue) context.lookup("myJNDIRabbitMQQueue2");
MessageProducer messageProducer = session.createProducer(queue);
TextMessage message = session.createTextMessage("Hello world
!!");
messageProducer.send(message);

System.out.println(message.getText());
connection.close();
context.close();
} catch (Exception exp) {
exp.printStackTrace();
}
}
}
---.---


If I use (with VIRTUAL HOST):

connectionfactory.myRabbitMQConnectionFactory1 = amqp://admin:xxx@
*clientid/DES_DEV*?brokerlist='tcp://10.105.135.53:5672'

I have this error:

---.---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
javax.jms.JMSException: Error creating connection: Exception thrown against
AMQConnection:
Host: 10.105.135.53
Port: 5672
Virtual Host: DES_DEV
Client ID: clientid
Active session count: 0: org.apache.qpid.AMQDisconnectedException:
Connection could not be established: Connection reset
at
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:128)
at info.intix.rabbitmq.samples.Hello.runTest(Hello.java:39)
at info.intix.rabbitmq.samples.Hello.main(Hello.java:21)
Caused by: org.apache.qpid.AMQConnectionFailureException: Exception thrown
against AMQConnection:
Host: 10.105.135.53
Port: 5672
Virtual Host: DES_DEV
Client ID: clientid
Active session count: 0: org.apache.qpid.AMQDisconnectedException:
Connection could not be established: Connection reset
at org.apache.qpid.client.AMQConnection.(AMQConnection.java:503)
at
org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:124)
... 2 more
Caused by: org.apache.qpid.AMQException: Woken up due to class
javax.jms.JMSException
at
org.apache.qpid.client.util.BlockingWaiter.block(BlockingWaiter.java:195)
at org.apache.qpid.client.state.StateWaiter.await(StateWaiter.java:114)
at org.apache.qpid.client.state.StateWaiter.await(StateWaiter.java:91)
at org.apache.qpid.client.*AMQConnectionDelegate_8_0*
.makeBrokerConnection(AMQConnectionDelegate_8_0.java:142)
at
org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:647)
at org.apache.qpid.client.AMQConnection.(AMQConnection.java:429)
... 3 more
Caused by: javax.jms.JMSException: Exception thrown against AMQConnection:
Host: 10.105.135.53
Port: 5672
Virtual Host: DES_DEV
Client ID: clientid
Active session count: 0: org.apache.qpid.AMQDisconnectedException:
Connection could not be established: Connection reset
at
org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.ja