In the servicemix/conf/log4j.xml, replace all INFO/WARN by DEBUG.
Could you try to change your component with
public void init(ComponentContext context) throws JBIException {
log.error("@@@@@@@@@ Enter init method");
try {
super.init(context);
log.error("@@@@@@@@@ Activating endpoint: " + getService() + " / " +
getEndpoint());
context.activateEndpoint(service, endpoint);
log.error("@@@@@@@@@ Endpoint activated");
} catch(Exception e) {
log.error("@@@@@@@ error is " +e.toString(), e);
throw new JBIException(e);
}
log.error("@@@@@@@@@ Leave init method");
}
This should fail because the endpoint should have already been activated
when calling super.init(context) , but ...
Then post the full log.
Also, which version / snapshot of servicemix you use ?
Guillaume
On 5/17/06, mqaiserm <[EMAIL PROTECTED]> wrote:
New code is following but still getting error :
public class MessageReceiverImpl extends ComponentSupport implements
MessageExchangeListener,MessageReceiver{
// log
private Log log =LogFactory.getLog(MessageReceiverImpl.class);
// sourcetransformer to transform message from exchange
private SourceTransformer sourceTransformer = new SourceTransformer();
public Log getLog() {
return log;
}
public void setLog(Log log) {
this.log = log;
}
public SourceTransformer getSourceTransformer() {
return sourceTransformer;
}
public void init(ComponentContext context) {
try {
super.init(context);
} catch(Exception e) {
log.error("@@@@@@@ error is " +e.toString());
}
log.error("@@@@@@@@@ In init method");
}
public void setSourceTransformer(SourceTransformer sourceTransformer)
{
this.sourceTransformer = sourceTransformer;
}
/**
* This method will get the Asynchronous messages from exchange,
will transform into Java Bean and then
* call another class method to store into db.
* @return void
* @param args MessageExchange exchange to get messages
*/
public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
// getting the incoming message from exchange
NormalizedMessage message = exchange.getMessage("in");
if (message == null) {
log.warn("Received null message from exchange: " + exchange);
}
else {
log.info("Exchange: " + exchange + " received IN
message
: " + message);
try {
// getting the messaging content from message in xml
format
String xml =
sourceTransformer.toString(message.getContent());
// using the custom utility class to transform xml
into
java object
//Message messageBean =
XMLBeanUtil.getMessageObjectFromXML(xml);
// saving that java object into database by using the
hibernate
//MessagesDAOImpl instance = new MessagesDAOImpl();
//instance.saveMessage(messageBean);
log.error(xml);
}
catch (TransformerException e) {
log.error("Failed to turn message body into text: "+ e,
e);
}
catch(Exception e) {
log.error("Failed to turn message body intotext: " +
e,
e);
}
}
// done with exchange
done(exchange);
}
}
can you please also tell me how I can on debug level in servicemix
--
View this message in context:
http://www.nabble.com/error-in-endpoint-generation-t1630736.html#a4434604
Sent from the ServiceMix - User forum at Nabble.com.
--
Cheers,
Guillaume Nodet