[JBossWS] - Re: How to import relative schemas?
by oskar.carlstedt
I posted i Jira issue about this [url]http://jira.jboss.org/jira/browse/JBWS-1798[url].
*******************************************
I deploy an ear file in JBoss5 that contains a war and a jar fil. The jar file contains a SLSB and the war file contains the web service (implemented as a Provider[SOAPMessage]). The war file has the following file structure in the the WEB-INF/wsdl folder:
| WEB-INF/wsdl
| my-service.wsdl
| /imported
| /my-service
| /1.0-SNAPSHOT
| my-service.xsd
| /common
| /1.0-SNAPSHOT
| common.xsd
|
the wsdl file has a schema import like
<xsd:import schemaLocation="imported/my-service/1.0-SNAPSHOT/my-service.xsd" .../>
the my-service.xsd imports the common.xsd file with the following import statement
<xsd:import schemaLocation="../../common/1.0-SNAPSHOT/common.xsd" .../>
Having this configuration will put JBoss into trouble. The error message sent is telling med that parent paths are not allowed, and pointing out to use getParent() instead. So I setting the schemaLocation attribute to getParent()/getParent()/.... will point out another path, but it is completely wrong.
*******************************************
Best
/Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080051#4080051
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080051
18Â years, 7Â months
[JBoss Messaging] - JBoss Messaging database backend deadlock
by boniek
2007-08-31 17:14:40,393 WARN [org.jboss.messaging.core.impl.JDBCPersistenceManager] SQLException caught, SQLState 40001 code:1213- assuming deadlock detected, try:1
| com.mysql.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
| at com.mysql.jdbc.SQLError.createSQLException(Unknown Source)
| at com.mysql.jdbc.MysqlIO.checkErrorPacket(Unknown Source)
| at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
| at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
| at com.mysql.jdbc.Connection.execSQL(Unknown Source)
| at com.mysql.jdbc.PreparedStatement.executeInternal(Unknown Source)
| at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
| at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
| at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
| at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager$1HandleBeforeCommit2PCRunner.doTransaction(JDBCPersistenceManager.java:1464)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager$JDBCTxRunner.execute(JDBCPersistenceManager.java:2418)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager$JDBCTxRunner.executeWithRetry(JDBCPersistenceManager.java:2440)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager.handleBeforeCommit2PC(JDBCPersistenceManager.java:1479)
| at org.jboss.messaging.core.impl.JDBCPersistenceManager$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:2380)
| at org.jboss.messaging.core.impl.tx.Transaction.commit(Transaction.java:208)
| at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:467)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:101)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:195)
| at sun.reflect.GeneratedMethodAccessor850.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.invokeNext(ConnectionAdvised$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
| at org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:82)
| at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:144)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
| at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
| at org.jboss.remoting.Client.invoke(Client.java:1550)
| at org.jboss.remoting.Client.invoke(Client.java:530)
| at org.jboss.remoting.Client.invoke(Client.java:518)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:186)
| at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:157)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction$aop(ClientConnectionDelegate.java:221)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate$sendTransaction_N3268650789275322226.invokeNext(ClientConnectionDelegate$sendTransaction_N3268650789275322226.java)
| at org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
| at org.jboss.jms.tx.ResourceManager.sendTransactionXA(ResourceManager.java:637)
| at org.jboss.jms.tx.ResourceManager.commit(ResourceManager.java:393)
| at org.jboss.jms.tx.MessagingXAResource.commit(MessagingXAResource.java:238)
| at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelCommit(XAResourceRecord.java:487)
| at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:3107)
| at com.arjuna.ats.arjuna.coordinator.BasicAction.doCommit(BasicAction.java:3022)
| at com.arjuna.ats.arjuna.coordinator.BasicAction.phase2Commit(BasicAction.java:2126)
| at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1819)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
| at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1382)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
| at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessage(ClientConsumer.java:157)
| at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:801)
| at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect14.invoke(SessionAspect14.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
| at org.jboss.jms.client.delegate.ClientSessionDelegate$run_N8003352271541955702.invokeNext(ClientSessionDelegate$run_N8003352271541955702.java)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
| at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
| at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
| at java.lang.Thread.run(Thread.java:619)
| 2007-08-31 17:14:40,437 WARN [org.jboss.messaging.core.impl.JDBCPersistenceManager] Trying again after a pause
| 2007-08-31 17:14:40,580 WARN [org.jboss.messaging.core.impl.JDBCPersistenceManager] Update worked after retry
Surprising because the traffic to the database is small.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080048#4080048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080048
18Â years, 7Â months
[Messaging, JMS & JBossMQ] - Re: Unable to get Connection to send a message on the testQu
by jbosspatni
Also attached is the helper class
package com.dummy.util;
import java.util.ArrayList;
import java.util.Enumeration;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.InitialContext;
import org.jboss.example.jms.common.Util;
public class MessageUtility {
private ConnectionFactory cf = null;
public void drain(String queueName) throws Exception
{
System.out.println("Inside Message Utility:drain");
InitialContext ic = new InitialContext();
Queue queue = (Queue)ic.lookup(queueName);
ic.close();
System.out.println("Message Utility: Found teh queue");
Session session = null;
Connection conn = null;
try
{
conn = getConnection();
session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(queue);
System.out.println("Inside Message Utility:Created Consumer");
Message m = null;
do
{
m = consumer.receive(1L);
}
while(m != null);
}
finally
{
if (conn != null)
{
closeConnection(conn);
}
}
}
public void send(String txt, String queueName) throws Exception
{
InitialContext ic = new InitialContext();
System.out.println("Inside Message Utility:send QueueName :"+ queueName);
if (!Util.doesDestinationExist(queueName,ic))
{
System.out.println("Destination " + queueName + " does not exist, deploying it");
Util.deployQueue(queueName,ic);
}
Queue queue = (Queue)ic.lookup(queueName);
System.out.println("Inside Message Utility:send");
ic.close();
Session session = null;
Connection conn = null;
try
{
System.out.println("Inside Message Utility:send: Before getting connection");
conn = getConnection();
System.out.println("Inside Message Utility:send:After getting connection");
session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
System.out.println("Inside Message Utility:send:session" + session);
MessageProducer producer = session.createProducer(queue);
TextMessage tm = session.createTextMessage(txt);
System.out.println("Inside Message Utility:send:producer is "+ producer);
producer.send(tm);
System.out.println("message " + txt + " sent to " + queueName);
}
finally
{
if (conn != null)
{
closeConnection(conn);
}
}
}
public int browse(String queueName) throws Exception
{
InitialContext ic = new InitialContext();
Queue queue = (Queue)ic.lookup(queueName);
ic.close();
System.out.println("Inside Message Utility:browse");
Session session = null;
Connection conn = null;
try
{
conn = getConnection();
session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser browser = session.createBrowser(queue);
ArrayList list = new ArrayList();
for(Enumeration e = browser.getEnumeration(); e.hasMoreElements(); )
{
list.add(e.nextElement());
}
return list.size();
}
finally
{
if (conn != null)
{
closeConnection(conn);
}
}
}
public String receive(String queueName) throws Exception
{
InitialContext ic = new InitialContext();
Queue queue = (Queue)ic.lookup(queueName);
ic.close();
System.out.println("Inside Message Utility:receive");
Session session = null;
Connection conn = null;
try
{
conn = getConnection();
session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(queue);
System.out.println("blocking to receive message from queue " + queueName + " ...");
TextMessage tm = (TextMessage)consumer.receive(5000);
if (tm == null)
{
throw new Exception("No message!");
}
System.out.println("Message " + tm.getText() + " received");
return tm.getText();
}
finally
{
if (conn != null)
{
closeConnection(conn);
}
}
}
public Connection getConnection() throws Exception
{
Connection connection = null;
System.out.println("Inside Message Utility:send.getConnection:cf"+cf);
try
{
InitialContext ic = new InitialContext();
System.out.println("Inside Message Utility:send.getConnection:ic"+ic);
//cf = (ConnectionFactory)ic.lookup("java:JmsXA");
//cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
cf = (ConnectionFactory)ic.lookup("java:/ConnectionFactory");
System.out.println("Inside Message Utility:send.getConnection:create connection");
connection = cf.createConnection();
System.out.println("Inside Message Utility:send.getConnection:before connection start:conn is"+ connection);
connection.start();
ic.close();
}
catch(Exception e )
{
e.printStackTrace();
if(connection != null)
{
closeConnection(connection);
}
System.out.println("Failed to get connection...exception is " + e);
throw e;
}
return connection;
}
public void closeConnection(Connection con) throws Exception
{
try
{
con.close();
}
catch(JMSException jmse)
{
System.out.println("Could not close connection " + con +" exception was " + jmse);
throw jmse;
}
}
public void initiate()
{
try
{
InitialContext ic = new InitialContext();
//cf = (ConnectionFactory)ic.lookup("java:/JmsXA");
cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
ic.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Please help in fixing this issue
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080047#4080047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080047
18Â years, 7Â months
[Messaging, JMS & JBossMQ] - Unable to get Connection to send a message on the testQueue
by jbosspatni
Hi,
I am using JBOSS AS 4.2 GA and JBoss Messaging 1.3 GA.I have created an CRUD application with Seam and database is MySQL.From the entity bean created I am trying to send a message to testQueue on the server.The code from the Stateless session bean messaging example is moved to a utility java class.
So I am getting teh following exception when i try to send te message to teh queue looks like its able to create a connection but fails on connection.start
:08,042 INFO [STDOUT] Hibernate: insert into dummy.ticket_master (faultid, faulttype, faultdesc, faultpriority, faultlocation, deviceid, engineer, ticketpriority, ticketstatus, ticketresolution, approvalcomments, ticketid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
20:22:08,042 INFO [STDOUT] The Quename is /queue/testQueue
20:22:08,042 INFO [STDOUT] Inside Message Utility:send QueueName :/queue/testQueue
20:22:08,042 INFO [STDOUT] Inside Message Utility:send
20:22:08,042 INFO [STDOUT] Inside Message Utility:send: Before getting connection
20:22:08,042 INFO [STDOUT] Inside Message Utility:send.getConnection:cfJBossConnectionFactory->ConnectionFactoryDelegate[1, SID=0]
20:22:08,042 INFO [STDOUT] Inside Message Utility:send.getConnection:icjavax.naming.InitialContext@e6728c
20:22:08,042 INFO [STDOUT] Inside Message Utility:send.getConnection:create connection
20:22:08,058 INFO [STDOUT] Inside Message Utility:send.getConnection:before connection start:conn isJBossConnection->ConnectionDelegate[20254712, ID=4, SID=0]
20:22:08,074 ERROR [STDERR] java.lang.NullPointerException
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:86)
20:22:08,074 ERROR [STDERR] at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientConnectionDelegate$start_N8025343665958530775.invokeNext(ClientConnectionDelegate$start_N8025343665958530775.java)
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
20:22:08,074 ERROR [STDERR] at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientConnectionDelegate$start_N8025343665958530775.invokeNext(ClientConnectionDelegate$start_N8025343665958530775.java)
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientConnectionDelegate.start(ClientConnectionDelegate.java)
20:22:08,074 ERROR [STDERR] at org.jboss.jms.client.JBossConnection.start(JBossConnection.java:121)
20:22:08,074 ERROR [STDERR] at com.dummy.util.MessageUtility.getConnection(MessageUtility.java:178)
20:22:08,074 ERROR [STDERR] at com.dummy.util.MessageUtility.send(MessageUtility.java:73)
20:22:08,074 ERROR [STDERR] at com.dummy.entity.TicketMasterHome.sendMessage(TicketMasterHome.java:69)
20:22:08,074 ERROR [STDERR] at com.dummy.entity.TicketMasterHome.persist(TicketMasterHome.java:47)
20:22:08,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:22:08,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:22:08,074 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:22:08,074 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:43)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.util.Work.workInTransaction(Work.java:39)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
20:22:08,074 ERROR [STDERR] at com.dummy.entity.TicketMasterHome_$$_javassist_30.persist(TicketMasterHome_$$_javassist_30.java)
20:22:08,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:22:08,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:22:08,074 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:22:08,074 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
20:22:08,074 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:325)
20:22:08,074 ERROR [STDERR] at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:338)
20:22:08,074 ERROR [STDERR] at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
20:22:08,074 ERROR [STDERR] at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
20:22:08,074 ERROR [STDERR] at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
20:22:08,074 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
20:22:08,074 ERROR [STDERR] at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
20:22:08,074 ERROR [STDERR] at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
20:22:08,074 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:383)
20:22:08,074 ERROR [STDERR] at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
20:22:08,074 ERROR [STDERR] at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
20:22:08,074 ERROR [STDERR] at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
20:22:08,074 ERROR [STDERR] at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
20:22:08,074 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
20:22:08,074 ERROR [STDERR] at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
20:22:08,074 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:22:08,074 ERROR [STDERR] at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
20:22:08,074 ERROR [STDERR] at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:22:08,074 ERROR [STDERR] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:22:08,074 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
20:22:08,074 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
20:22:08,074 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
20:22:08,074 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
20:22:08,074 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
20:22:08,074 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
20:22:08,074 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
20:22:08,074 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
20:22:08,074 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
20:22:08,074 INFO [STDOUT] Exception in persisting and send message java.lang.NullPointerException
20:22:10,932 INFO [STDOUT] Hibernate: select ticketmast0_.ticketid as ticketid19_, ticketmast0_.faultid as faultid19_, ticketmast0_.faulttype as faulttype19_, ticketmast0_.faultdesc as faultdesc19_, ticketmast0_.faultpriority as faultpri5_19_, ticketmast0_.faultlocation as faultloc6_19_, ticketmast0_.deviceid as deviceid19_, ticketmast0_.engineer as engineer19_, ticketmast0_.ticketpriority as ticketpr9_19_, ticketmast0_.ticketstatus as tickets10_19_, ticketmast0_.ticketresolution as ticketr11_19_, ticketmast0_.approvalcomments as approva12_19_ from dummy.ticket_master ticketmast0_ limit ?
20:22:11,338 INFO [STDOUT] Hibernate: select count(*) as col_0_0_ from dummy.ticket_master ticketmast0_
The Code for the entity bean and teh helper class are as follows
package com.dummy.entity;
import javax.naming.InitialContext;
import org.jboss.example.jms.common.ExampleSupport;
import org.jboss.example.jms.queue.QueueExample;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;
import com.dummy.util.MessageUtility;
@Name("ticketMasterHome")
public class TicketMasterHome extends EntityHome {
public void setTicketMasterTicketid(Integer id) {
setId(id);
}
public Integer getTicketMasterTicketid() {
return (Integer) getId();
}
@Override
protected TicketMaster createInstance() {
TicketMaster ticketMaster = new TicketMaster();
return ticketMaster;
}
public void wire() {
}
public boolean isWired() {
return true;
}
public TicketMaster getDefinedInstance() {
return isIdDefined() ? getInstance() : null;
}
@Override
public String persist(){
String retValue="";
try
{
retValue = super.persist();
//QueueExample.main(null);
sendMessage();
}
catch(Exception ex)
{
System.out.println("Exception in persisting and send message "+ex);
}
return retValue;
}
public void sendMessage() throws Exception{
InitialContext ic = new InitialContext();
MessageUtility bean = new MessageUtility();
// StatelessSessionExampleHome home =
// (StatelessSessionExampleHome)ic.lookup("ejb/StatelessSessionExample");
//
// StatelessSessionExample bean = home.create();
//
String queueName = "/queue/"+ ExampleSupport.DEFAULT_QUEUE_NAME;
String text = "Hello!";
System.out.println("The Quename is " + queueName);
//bean.drain(queueName);
bean.initiate();
bean.send("Helloooo", queueName);
System.out.println("The " + text + " message was successfully sent to the " + queueName + " queue");
int num = bean.browse(queueName);
System.out.println("Queue browse result: " + num);
String result = bean.receive(queueName);
System.out.println("Received " + result);
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080045#4080045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080045
18Â years, 7Â months