[Messaging, JMS & JBossMQ] - org.jboss.mq.SpyJMSException: Cannot send a message to the J
by pascallambert
We've got the following error after running our apps for a day doing load testing with the JMS server.
My suspicion is that the server got loaded (we're using PostgreSQL to store the message on the same server) and was to busy to respond the request.
But the funny thing is that we never got onException() been invoke from the topic connection.
Any idea why?
JBOSS AS 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339) on Windows 2000.
2007-Feb-15 00:36:39 ERROR: Unable to publish global notification
org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; - nested throwable: (java.net.SocketTimeoutException: Read timed out)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:78)
at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:63)
at org.jboss.mq.Connection.sendToServer(Connection.java:922)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:924)
at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:272)
at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:219)
at org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:67)
at
com.wmx.messaging.publishers.DataPublisher.publishMessage(DataPublisher.java:60)
(i've skip the whole stack trace ........)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2133)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2316)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2383)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2455)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2604)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:317)
... 1 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017295#4017295
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017295
19Â years, 2Â months
[JBoss Portal] - Erro when try to login
by works
I do what you talk for me, but when i login this message was showed:
java.io.IOException: No properties file: users.properties or defaults: defaultUs
ers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:313)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
sLoginModule.java:186)
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
lesLoginModule.java:200)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
esLoginModule.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecur
ityManager.java:601)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecur
ityManager.java:535)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
nager.java:344)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBos
sSecurityMgrRealm.java:491)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Bas
icAuthenticator.java:180)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:490)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
19:34:12,511 ERROR [DBAuthentication] Failed to load users/passwords/role f
iles
java.io.IOException: No properties file: users.properties or defaults: defaultUs
ers.properties found
at org.jboss.security.auth.spi.Util.loadProperties(Util.java:313)
at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRole
sLoginModule.java:186)
at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRo
lesLoginModule.java:200)
at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRol
esLoginModule.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:1
86)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:6
80)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecur
ityManager.java:601)
at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecur
ityManager.java:535)
at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityMa
nager.java:344)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBos
sSecurityMgrRealm.java:491)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Bas
icAuthenticator.java:180)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:490)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
kerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
19:34:18,714 ERROR [DBAuthentication] Failed to load users/passwords/role f
iles
java.io.IOException: No properties file: users.properties or defaults: defaultUs
ers.properties found
----------------------------------------------------------------------------------
This is my class
package com.digithobrasil.ogma.authentication;
public class DBAuthentication extends UsersLoginModule {
/**
* Nome do usuário
*/
private String user;
public Log LOG;
/**
* Construtor padrão
*
* @throws IOException
*
*/
public DBAuthentication() throws IOException {
DBUtil.initializeDataSource();
LOG = LogFactory.getLog(this.getClass());
}
/**
* @see org.jboss.security.auth.spi.UsernamePasswordLoginModule#getUsernameAndPassword()
*/
protected String[] getUsernameAndPassword() throws LoginException {
// O método getUsernameAndPassword(), retorna um vetor com o nome do
// usuario e a sua senha
// da seguinte maneira [0]-nome do usuario [1]-senha
String[] userAndPassword = super.getUsernameAndPassword();
this.user = userAndPassword[0];
return userAndPassword;
}
/**
*
* @see org.jboss.security.auth.spi.UsernamePasswordLoginModule#validatePassword(java.lang.String,
* java.lang.String)
*/
public boolean validatePassword(String arg0, String arg1) {
// arg0 é a senha do usuário
// arg1 é uma senha esperada
boolean result = false;
try {
result = dbValidatePassword(this.user, arg0);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
/**
* Valida o password
*
* @return boolean
* @throws Exception
*/
private boolean dbValidatePassword(String login, String password)
throws Exception {
boolean result = false;
LOG.info("Ogma:ValidatePassword");
LOG
.info("Ogma:ValidatePassword login: " + login + " senha:"
+ password);
String md5Password = DBUtil.buildMd5(password);
List<Map<String, Object>> list = DBUtil.executeQuery(
DBQueries.userRoleQuery, login, md5Password);
if (list != null) {
result = true;
}
LOG.info("Ogma:ValidatePassword authorized:" + result);
return result;
}
/**
* @return the user
*/
public String getUser() {
return user;
}
/**
* @param user
* the user to set
*/
public void setUser(String user) {
this.user = user;
}
}
THANKS A LOT
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017276#4017276
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017276
19Â years, 2Â months
[Remoting] - Re: Exceptions in calls and callbacks
by login4jbr
Thank you very much for the reply, I really appreciate the help.
I think my original post wasn't clear (sorry about my poor english), I'll try to put this as correctly as possible.
When you do a remote call or callback, a number of problems may happen.
The invoke() and invokeOneWay() methods declare that throw a Throwable, but Throwable is a very general interface (I'm confused because I have readed somewhere that throwing or catching a Throwable is a bad practice, anyway let's continue with the main point).
The programmer that uses these methods needs to know what kind of things may be thrown and the originating reasons.
I know that you can search in google for a certain type of exception to learn about its meaning, but that's not the problem here. The problem is that there is no documentation (at least I don't have found it) about the things that can be thrown by the remote invocations.
The same applies for the callbacks:When you do a callback, a CallbackHandleException can arise, which wraps the real Throwable, but I don't know what kind of things may come in there.
Is important to know what will be thrown in the following situations:
- When the call were going from the emisor to the receptor.
- When the call made it to the receptor but some problem occurred during processing.
- When the call were returning from the receptor to the emisor.
Think in the following scenario:
1. You have a client-server application.
2. The server have a variable X with value 5.
3. The client does a remote call to the server and tells him "please increment X by one"
4. The server increase the value and now X == 6
5. The remote call returns
6. The client tells the user: "dear user, now the value of X is 6"
Now imagine that the remote call throws a Throwable...
How can you determinate what happened?
Did the request get to the server?
Was the value of X increased?
The problem occurred during the call return?
Well, I hope my explanation was correct and clear.
Big thanks to all people.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4017275#4017275
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4017275
19Â years, 2Â months