[JBoss Messaging] - Message won't deliver on a new queue
by Noa Drach
Noa Drach [http://community.jboss.org/people/newway] created the discussion
"Message won't deliver on a new queue"
To view the discussion, visit: http://community.jboss.org/message/574541#574541
--------------------------------------------------------------
I have JBOSS 4.2.3.GA with messaging 1.4.5.GA. java 6
I created a new queue and the message that is sent from the producer doesn't reach my MDB instead I get this error:
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jboss.ejb3.EJBContainer.construct(EJBContainer.java:517)
at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:66)
at org.jboss.ejb3.StrictMaxPool.get(StrictMaxPool.java:141)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
at $Proxy204.onMessage(Unknown Source)
at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
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.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:237)
at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:756)
at java.lang.Thread.run(Thread.java:619)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
* If I replace the queue I'm using to an exiting queue in my system than the massage is delivered without any problem.
* I thought that the problem might come from the fact that the producer is an MDB that is restricted using @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "1"), so:* I removed the restriction from the producer - no change
* I added the restriction to the receiver - no change
* I don't think there is an issue with the queue creation, since 2 queues were added and function just fine.
my suspicion is that there is something wrong with the recieving MDB definition, but I don't know what to look for.
any suggestions?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574541#574541]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Messaging] - Redelivery problem when using MessageSelectors
by Toby Morris
Toby Morris [http://community.jboss.org/people/theamazingtoby] created the discussion
"Redelivery problem when using MessageSelectors"
To view the discussion, visit: http://community.jboss.org/message/573875#573875
--------------------------------------------------------------
We’ve come across a scenario where messages are being set for redelivery when we don’t believe they should be.
Our setup:
- Multiple consumers, using message selectors, set to watch the queue in turns. One will wait for the next message. Once that consumer either finds a message or times out waiting, it releases a synchronized method allowing another consumer to get the next message. This continues until the server is shut down.
- Multiple producers writing to the queue whenever they need to.
- JMS queue with a redelivery time set to 5 minutes.
What we’re seeing is if a consumer connects to the queue while there are messages waiting, some to all of those messages will get set to redeliver. If a message enters the queue while a consumer is waiting, it will process it as normal.
Unit testing has been performed to replicate this condition. If we set multiple consumers (two in this case) to watch the queue even constantly, and release messages in a controlled manner, we can get a redelivered message everytime.
We found three things that seem to be required for this situation to occur:
1. The queue has to have a redelivery time greater than -1. If the time is -1, the problem doesn’t occur.
2. The consumer must use a message selector. Without a selector, we don’t see the problem.
I can post our unit test code and more information, if requested.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573875#573875]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Tools] - Exclude source dir from deployment in EJB module?
by arjan tijms
arjan tijms [http://community.jboss.org/people/atijms] created the discussion
"Exclude source dir from deployment in EJB module?"
To view the discussion, visit: http://community.jboss.org/message/574482#574482
--------------------------------------------------------------
I'm using Eclipse 3.6.1 with JBoss tools 3.2 beta 1. In my EAR project I have an EJB and a web module. My EJB module has multiple java source directories. I'm trying to prevent one of those from ending up in the deployment.
To do this, I went to [EJB module] -> project -> properties -> Deployment Assembly.
I removed the source directory in question here and cleaned, rebuild, redeployed etc everything. However, the content of this particular source directory keeps ending up in the deployment.
I checked the .settings/org.eclipse.wst.common.component file in the EJB module, and the source folder I don't want to deploy is really gone:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="foo_main_ejb">
<wb-resource deploy-path="/" source-path="/src"/>
<wb-resource deploy-path="/" source-path="/resources"/>
<property name="java-output-path"/>
</wb-module>
</project-modules>
Is this file simply ignored or do I need to do something else?
Thanks in advance!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574482#574482]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[jBPM] - Re: JBPM5 integration with oracle
by Anand Prakash
Anand Prakash [http://community.jboss.org/people/anandintouch] created the discussion
"Re: JBPM5 integration with oracle"
To view the discussion, visit: http://community.jboss.org/message/574400#574400
--------------------------------------------------------------
Tried one more change to solve this issue,but still same exception- I tried updating persistence.xml file in "jbpm-human-task-5.0-SNAPSHOT.jar" file
under jbpm-human-task\src\main\resources\META-INF folder for Oracle related url,dialect,driver etc. under jbpm-gwt-console-server.war deployed in jboss.So basically I modified following things for Oracle DB configuration:-
1. Modified hibernate.cfg.xml,persistence.xml and testDS1-ds under (C:\Anand\jbpm5\jbpm-installer\db) folder path
2. Also I modified persistence.xml of jbpm-human-task-5.0-SNAPSHOT.jar file under "bpm-gwt-console-server.war" file deployed in jboss as mentioned above.
But I get same issue as mentioned in my last post related to "Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update".
Let me know if you get chance to fix this.
Thanks,
Anand
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574400#574400]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[JBoss Web Services] - RichFaces ExtendedDataTable not setting the Selection attribute
by david hickman
david hickman [http://community.jboss.org/people/david-brighton] created the discussion
"RichFaces ExtendedDataTable not setting the Selection attribute"
To view the discussion, visit: http://community.jboss.org/message/574386#574386
--------------------------------------------------------------
Hi
I am using Richfaces richfaces-ui-3.3.3.Final with jojarra-2.0.3 Core JSF and Jave 1.6 running in tomcat 6.0.29.
I am populating the extendedDataTable using the data model shown below but when I select an entry, the backing bean method is being called but the selection variable is being set but with no keys, any help would be appreciated:
// snippet from jsp
<r:simpleTogglePanel>
<f:facet name="header">
<h:outputText value="User Search Results"/>
</f:facet>
<a:outputPanel id="userSearchResultsPanel" >
<r:extendedDataTable id="userTable"
height="200px"
value="#{userBean.dataModel}"
var="user"
selectionMode="single"
selection="#{userBean.searchSelection}">
<r:column sortOrder="ASCENDING" >
<f:facet name="header">
<h:outputText value="User Name" />
</f:facet>
<h:outputText value="#{user.userName}" />
</r:column>
<r:column sortOrder="ASCENDING" >
<f:facet name="header">
<h:outputText value="First Name" />
</f:facet>
<h:outputText value="#{user.firstName}" />
</r:column>
<r:column sortOrder="ASCENDING" >
<f:facet name="header">
<h:outputText value="Surname" />
</f:facet>
<h:outputText value="#{user.surName}" />
</r:column>
<r:column sortOrder="ASCENDING">
<f:facet name="header">
<h:outputText value="Cost Center" />
</f:facet>
<h:outputText value="#{user.costCenter}" />
</r:column>
<a:support event="onselectionchange"
reRender="userDetailPanel"
action="#{userBean.identifySelectedUser}" />
</r:extendedDataTable>
<r:spacer height="10px" />
</a:outputPanel>
</r:simpleTogglePanel>
// Data Provider
package util;
import java.util.*;
import vo.User;
import org.apache.log4j.Logger;
import org.richfaces.model.DataProvider;
public class UserTableDataProvider implements DataProvider{
private Logger log = Logger.getLogger( "UserTableDataProvider: " );
private Map<UUID, UIUser> dataTable;
private List<UIUser> dataList;
public UserTableDataProvider( List<User> users ) {
dataTable = new HashMap<UUID,UIUser>();
dataList = new ArrayList<UIUser>( users.size());
for ( User user : users ) {
UIUser uiUser = new UIUser( user );
dataTable.put( uiUser.getId(), uiUser);
dataList.add( uiUser );
}
}
/**
*
*/
public Object getItemByKey( Object key ) {
return dataTable.get(( String)key );
}
/**
*
*/
public List getItemsByRange( int start, int end ) {
return dataList.subList( start, end );
}
/**
*
*/
public Object getKey( Object user ) {
return ((UIUser)user).getId();
}
/**
*
*/
public int getRowCount() {
return dataList.size();
}
}
// Backing Bean
package beans;
import org.apache.log4j.*;
import org.richfaces.model.selection.SimpleSelection;
import org.richfaces.model.ExtendedTableDataModel;
import util.UserTableDataProvider;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.List;
import java.util.Iterator;
import exception.UserException;
import exception.BaseRuntimeException;
import vo.User;
import service.UserService;
public class UserBean extends BaseBean {
private Logger log = Logger.getLogger( "UserBean: " );
//////////////////////////////////////////////////////////
// Injected properties
//////////////////////////////////////////////////////////
private UserService userService;
//////////////////////////////////////////////////////////
// Private static data
//////////////////////////////////////////////////////////
private final static String COST_CENTER = "CC";
private final static String SURNAME = "SN";
private final static String USERNAME = "UN";
//////////////////////////////////////////////////////////
// Private member variables
//////////////////////////////////////////////////////////
// basic attributes
private String userName;
private String password;
private String userType;
private String email;
private String firstName;
private String surname;
private String costCenter;
private HashMap userTypes;
private String active;
private List<User> users;
// search attributes
private String searchType;
private String searchCriteria;
private SimpleSelection searchSelection;
private ExtendedTableDataModel dataModel;
// default bean constructor
public UserBean() {
users = new ArrayList<User>();
}
//////////////////////////////////////////////
// Bean property accessor methods
//////////////////////////////////////////////
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
public String getCostCenter() {
return costCenter;
}
public void setCostCenter(String costCenter) {
this.costCenter = costCenter;
}
public HashMap getUserTypes() {
return userTypes;
}
public void setUserTypes(HashMap userTypes) {
this.userTypes = userTypes;
}
public String getActive() {
return active;
}
public void setActive(String active) {
this.active = active;
}
public String getSearchType() {
return searchType;
}
public void setSearchType(String searchType) {
this.searchType = searchType;
}
public String getSearchCriteria() {
return searchCriteria;
}
public void setSearchCriteria(String searchCriteria) {
this.searchCriteria = searchCriteria;
}
public SimpleSelection getSearchSelection() {
return searchSelection;
}
public void setSearchSelection(SimpleSelection searchSelection) {
log.info("UserBean.setSearchSelection");
this.searchSelection = searchSelection;
}
public ExtendedTableDataModel getDataModel() {
dataModel = new ExtendedTableDataModel( new UserTableDataProvider( users ));
return dataModel;
}
public void setDataModel(ExtendedTableDataModel dataModel) {
this.dataModel = dataModel;
}
//////////////////////////////////////////////////////////
// User Service methods
//////////////////////////////////////////////////////////
public void userSearch() {
String status = validateSearchCriteria();
users = new ArrayList();
try {
if ( searchType.equals(COST_CENTER )) {
users = userService.getUsersByCostCenter( searchCriteria);
}
else if ( searchType.equals(SURNAME )) {
users = userService.getUsersBySurname( searchCriteria );
}
else if ( searchType.equals(USERNAME)) {
users.add( userService.getUser( searchCriteria ));
}
}
catch ( UserException ue ) {
if ( searchType.equals(COST_CENTER )) {
addErrorMessage("userSearch", "Failed to retrieve users for Cost Center " + searchCriteria );
}
else if ( searchType.equals(SURNAME )) {
addErrorMessage("userSearch", "Failed to retrieve users for Surname " + searchCriteria );
}
else if ( searchType.equals(USERNAME)) {
addErrorMessage("userSearch", "Failed to retrieve users for Username " + searchCriteria );
}
}
}
// identify selected user
public void identifySelectedUser() {
if ( searchSelection != null ) {
log.info("Selection: " + searchSelection.size() );
Iterator iterator = searchSelection.getKeys();
while ( iterator.hasNext() ) {
Object key = iterator.next();
}
}
}
// User Detail
public void userDetail() {
}
//////////////////////////////////////////////////////////
// IOC methods
//////////////////////////////////////////////////////////
public void setUserService( UserService userService ) {
this.userService = userService;
}
//////////////////////////////////////////////////////////
// Private methods
//////////////////////////////////////////////////////////
// searchCriteria
private String validateSearchCriteria() {
String status = "ok";
if ( !validString(searchType) ) {
addErrorMessage("userSearch","Search Type is required");
status = "error";
}
if ( !validString(searchCriteria) ) {
addErrorMessage("userSearch","Search Criteria is required");
status = "error";
}
return status;
}
// Bean data
private String validateData( ) {
String status = "ok";
if ( userName == null || userName.equals("")) {
addErrorMessage("userSearch", "User Name is required");
status = "error";
}
if ( !validString(password) ) {
addErrorMessage("userSearch", "Password is required");
status = "error";
}
if ( !validString(firstName) ) {
addErrorMessage("userSearch", "First Name is required");
status = "error";
}
if ( !validString(surname) ) {
addErrorMessage("userSearch", "Surname is required");
status = "error";
}
if ( !validString(email)) {
addErrorMessage("userSearch", "Email is required");
status = "error";
}
if ( !validString(costCenter )) {
addErrorMessage("userSearch", "Cost Center is required");
status = "error";
}
return status;
}
// validString
private boolean validString( String str ) {
if ( str == null || str.equals("" ))
return false;
return true;
}
}
// UI User class
package util;
import vo.User;
import java.util.UUID;
/**
*
* This class encapsulates a standard USER object but
* also includes a UUID for use by UI objects ed.ExtendedDataTable
*
* @author davidhickman
*
*/
public class UIUser extends User {
/////////////////////////////////////////////////////
// Private data
/////////////////////////////////////////////////////
private UUID id;
public UIUser( User user ) {
this.setUserName(user.getUserName());
this.setPassword(user.getPassword());
this.setUserType(user.getUserType());
this.setEmail(user.getEmail());
this.setFirstName(user.getFirstName());
this.setSurName(user.getSurName());
this.setCostCenter(user.getCostCenter());
this.setActive(user.getActive());
this.id = UUID.randomUUID();
}
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574386#574386]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months