Hy Hardy,
yeah debug trace is on for org.hibernate and org.apache.activemq. But I cannot find something useful. Here is some output.
Code:
[DEBUG] [2009-12-08 15:37:32,196] [main] org.hibernate.jdbc.ConnectionManager | transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[DEBUG] [2009-12-08 15:37:32,196] [main] org.hibernate.event.def.AbstractFlushingEventListener | processing flush-time cascades
[DEBUG] [2009-12-08 15:37:32,196] [main] org.hibernate.event.def.AbstractFlushingEventListener | dirty checking collections
[DEBUG] [2009-12-08 15:37:32,197] [main] org.hibernate.event.def.AbstractFlushingEventListener | Flushed: 0 insertions, 0 updates, 0 deletions to 9 objects
[DEBUG] [2009-12-08 15:37:32,197] [main] org.hibernate.event.def.AbstractFlushingEventListener | Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
[DEBUG] [2009-12-08 15:37:32,197] [main] org.hibernate.pretty.Printer | listing entities:
[DEBUG] [2009-12-08 15:37:32,199] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=1, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=left_top, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,199] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=7, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=right_top, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,200] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=8, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=right_middle, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,200] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=2, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=left_middle, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,200] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=3, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=left_bottom, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,200] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=5, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=center_middle, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,202] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=4, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=center_top, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,203] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=6, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=center_bottom, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,203] [main] org.hibernate.pretty.Printer | de.tempodome.adserver.core.creative.Placement{id=9, creationDate=2009-11-30 15:18:54, height=200, description=null, width=200, name=right_bottom, modificationDate=2009-11-30 15:18:54}
[DEBUG] [2009-12-08 15:37:32,203] [main] org.hibernate.jdbc.ConnectionManager | releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
[DEBUG] [2009-12-08 15:37:32,203] [main] org.hibernate.jdbc.ConnectionManager | transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[INFO] [2009-12-08 15:37:32,204] [main] de.tempodome.adserver.webapp.InitDatabaseListener | Finished Initialization of Database
08.12.2009 15:37:32 org.apache.activemq.broker.BrokerService getBroker
INFO: ActiveMQ null JMS Message Broker (localhost) is starting
08.12.2009 15:37:32 org.apache.activemq.broker.BrokerService getBroker
INFO: For help or more information please see: http://activemq.apache.org/
08.12.2009 15:37:32 org.apache.activemq.store.amq.AMQPersistenceAdapter start
INFO: AMQStore starting using directory: /Users/simjac/10-Projekte/AdServer/Servers/Tomcat v6.0 Server at localhost-config/jms/data/localhost
08.12.2009 15:37:32 org.apache.activemq.kaha.impl.KahaStore initialize
INFO: Kaha Store using data directory /Users/simjac/10-Projekte/AdServer/Servers/Tomcat v6.0 Server at localhost-config/jms/data/localhost/kr-store/state
08.12.2009 15:37:32 org.apache.activemq.store.amq.AMQPersistenceAdapter start
INFO: Active data files: [1]
08.12.2009 15:37:32 org.apache.activemq.broker.BrokerService start
INFO: Using Persistence Adapter: AMQPersistenceAdapter(/Users/simjac/10-Projekte/AdServer/Servers/Tomcat v6.0 Server at localhost-config/jms/data/localhost)
08.12.2009 15:37:33 org.apache.activemq.kaha.impl.KahaStore initialize
INFO: Kaha Store using data directory /Users/simjac/10-Projekte/AdServer/Servers/Tomcat v6.0 Server at localhost-config/jms/data/localhost/kr-store/data
08.12.2009 15:37:33 org.apache.activemq.broker.jmx.ManagementContext$1 run
INFO: JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
08.12.2009 15:37:33 org.apache.activemq.transport.TransportServerThreadSupport doStart
INFO: Listening for connections at: tcp://Macsuppe.local:61616
08.12.2009 15:37:33 org.apache.activemq.broker.TransportConnector start
INFO: Connector tcp://Macsuppe.local:61616 Started
08.12.2009 15:37:33 org.apache.activemq.broker.BrokerService start
INFO: ActiveMQ JMS Message Broker (localhost, ID:Macsuppe.local-54524-1260283052842-0:0) started
08.12.2009 15:37:33 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'springweb'
[Deprecated] Xalan: org.apache.xpath.CachedXPathAPI
08.12.2009 15:37:35 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
[DEBUG] [2009-12-08 15:37:35,759] [http-8080-1] org.hibernate.impl.SessionImpl | opened session at timestamp: 12602830557
08.12.2009 15:37:35 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
08.12.2009 15:37:35 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/34 config=null
08.12.2009 15:37:35 org.apache.catalina.startup.Catalina start
INFO: Server startup in 12968 ms
For me, it seems, that activeMQ stores the data inside the given folder. I found there a lot of files, which contains classnames of entities, that I want to index.
My way to hide the NullPointerExceptions from the post above:
In the subclass of AbstractJMSHibernateSearchController (in relation to
https://www.hibernate.org/421.html) I set the subclass as messageListener to the javax.jms.Session. If I do not so, I will get a NullPointerException, because the code to set the MessageListener to the consumer will be access the messageListener of the Session.
This is what I mean:
Code:
public void connect()
{
Context initCtx;
try
{
initCtx = new InitialContext();
// Look up for connection factory & create connection, session
ConnectionFactory connectionFactory = (ConnectionFactory) initCtx.lookup("java:comp/env/jms/ConnectionFactory");
Connection connection = connectionFactory.createConnection();
connection.start();
javax.jms.Session session = connection.createSession(true, 0);
//HERE I HAVE SET THE SUBCLASS OF AbstractJMSHibernateSearchController TO THE javax.jms.Session
session.setMessageListener(this);
// Look up for destination and set listner
Queue queue = (Queue) initCtx.lookup("java:comp/env/queue/hibernatesearch");
MessageConsumer consumer = session.createConsumer(queue);
//HERE THE NULLPOINTEREXCEPTION WILL BE THROWN IF NO MESSAGELISTENER IS DEFINED TO THE SESSION!
consumer.setMessageListener(this);
}
catch (NamingException e)
{
// Logger.getLogger(getClass()).error("" , e);
throw new TechnicalException(e);
}
catch (JMSException e)
{
// Logger.getLogger(getClass()).error("" , e);
throw new TechnicalException(e);
}
}
This method will be executed by a startup Listener (also described in 412.html), which will start the broker and then call the "connect" function.
I now see:
Sometimes and not often this Exception will be thrown:
Code:
08.12.2009 15:47:33 org.apache.activemq.ActiveMQConnection onAsyncException
WARNUNG: Async exception with no exception listener: java.io.EOFException
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:192)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
at java.lang.Thread.run(Thread.java:637)
Maybe there is a relation. Maybe not.
I use java 6 and tomcat 6.
Thanks,
Simon