[Clustering/JBoss] - Re: Session Replication - Concurrency Problems?
by davewebb
Mr Stansberry,
We're using sticky sessions, we understand how to configure them and as far as I know they are working correctly, but we are still seeing the "Possible concurrency problem" message."
To elaborate a little on our configuration, we use jBoss4.0.5GA with Apache 2.2.4 on the front end using mod_proxy_ajp for load balancing.
There are actually 2 issues we are seeing:
1) The "Possible Concurrency Problem" message. We are using REPL_ASYNC and REPEATABLE_READ in the tc5 cluster setup. I should note that we used the same setup in our last environment which was 4.0.2 and everything worked fine.
2) Although we have mod_proxy_ajp setup to use sticky sessions, it doesnt appear to be doing that, hence the discovery of #1 above b/c we get NPEs accessing session attributes as mod_proxy distributes requests across multiple JBoss instances and the session attributes arent being replicated properly.
I think a solution to either of these 2 problems helps out everyone, although I recognize #2 is probably not within the scope of this thread. I think regardless of StickySession (which I fully understand), there is an issue with Session replication.
Hope this helps and we appreciate your time and attention to this forum. Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044486#4044486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044486
19 years, 1 month
[JBoss Seam] - Re: Seam Mail on port other than 25
by damianharvey
Thanks. I'll do a few more tests.
This is the debug log from my Seam App:
| 17:39:34,635 INFO [MailSession] Creating JavaMail Session (mysmtpserver:587)
| 17:39:34,641 INFO [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea
| 17:39:34,641 INFO [MailSession] connected to mail server
| 17:39:34,666 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
| 17:39:34,668 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
| 17:39:34,668 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
| 17:39:34,668 INFO [STDOUT] DEBUG SMTP: trying to connect to host mysmtpserver", port 587, isSSL false
| 17:39:35,046 INFO [STDOUT] 220 spunkymail-a14.g.dreamhost.com ESMTP
| 17:39:35,046 INFO [STDOUT] DEBUG SMTP: connected to host "mysmtpserver", port: 587
| 17:39:35,047 INFO [STDOUT] EHLO myhostname.local
| 17:39:35,222 INFO [STDOUT] 250-spunkymail-a14.g.dreamhost.com
| 250-PIPELINING
| 250-SIZE 40960000
| 250-ETRN
| 250-STARTTLS
| 250-AUTH LOGIN PLAIN
| 250-AUTH=LOGIN PLAIN
| 250 8BITMIME
| 17:39:35,222 INFO [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
| 17:39:35,222 INFO [STDOUT] DEBUG SMTP: Found extension "SIZE", arg "40960000"
| 17:39:35,222 INFO [STDOUT] DEBUG SMTP: Found extension "ETRN", arg ""
| 17:39:35,222 INFO [STDOUT] DEBUG SMTP: Found extension "STARTTLS", arg ""
| 17:39:35,223 INFO [STDOUT] DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
| 17:39:35,223 INFO [STDOUT] DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
| 17:39:35,223 INFO [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
| 17:39:35,223 INFO [STDOUT] STARTTLS
| 17:39:35,401 INFO [STDOUT] 220 Ready to start TLS
| 17:39:35,402 INFO [STDOUT] EHLO myhostname.local
| 17:39:35,595 ERROR [PasswordReset] Exception while sending Password reset email: Can't send command to SMTP host
|
And this is the debug log from my test harness using the same config:
| DEBUG: JavaMail version 1.4ea
| DEBUG: java.io.FileNotFoundException: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/javamail.providers (No such file or directory)
| DEBUG: !anyLoaded
| DEBUG: not loading resource: /META-INF/javamail.providers
| DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
| DEBUG: Tables of loaded providers
| DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
| DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
| DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
| DEBUG: !anyLoaded
| DEBUG: not loading resource: /META-INF/javamail.address.map
| DEBUG: java.io.FileNotFoundException: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/javamail.address.map (No such file or directory)
| DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
| DEBUG SMTP: useEhlo true, useAuth false
| DEBUG SMTP: trying to connect to host "mysmtpserver", port 587, isSSL false
| 220 spunkymail-a2.g.dreamhost.com ESMTP
| DEBUG SMTP: connected to host "mysmtpserver", port: 587
|
| EHLO myhostname.local
| 250-spunkymail-a2.g.dreamhost.com
| 250-PIPELINING
| 250-SIZE 40960000
| 250-ETRN
| 250-STARTTLS
| 250-AUTH PLAIN LOGIN
| 250-AUTH=PLAIN LOGIN
| 250 8BITMIME
| DEBUG SMTP: Found extension "PIPELINING", arg ""
| DEBUG SMTP: Found extension "SIZE", arg "40960000"
| DEBUG SMTP: Found extension "ETRN", arg ""
| DEBUG SMTP: Found extension "STARTTLS", arg ""
| DEBUG SMTP: Found extension "AUTH", arg "PLAIN LOGIN"
| DEBUG SMTP: Found extension "AUTH=PLAIN", arg "LOGIN"
| DEBUG SMTP: Found extension "8BITMIME", arg ""
| DEBUG SMTP: use8bit false
| MAIL FROM:<test@mysmtpserver>
| 250 Ok
| RCPT TO:<test(a)myemail.com>
| 250 Ok
| DEBUG SMTP: Verified Addresses
| DEBUG SMTP: test@mysmtpserver
| DATA
| 354 End data with <CR><LF>.<CR><LF>
| To: test(a)myemail.com
| Message-ID: <14732323.01178728958895.JavaMail.test@mysmtpserver>
| Subject: Testing javamail plain
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
|
| This is a test at Wed May 09 17:42:37 BST 2007
| .
| 250 Ok: queued as 4DB0E87CAF
| QUIT
| 221 Bye
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044485#4044485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044485
19 years, 1 month
[Security & JAAS/JBoss] - using Java 6 Kerberos provider for http client connections
by Arvoreen
So I have a web app that does not define ANY authentication requirements (legacy app, handles authentication/authorization internally).
This application is also making client http connections to other resources and it needs to do so using the integrated Java 6 kerberos login provider, so that it can connect via NTLM and/or SPNEGGO to Windows pages.
However, when I first make the client connection attempt, I get
| org.jboss.security.auth.spi.UsersRolesLoginModule Failed to load users/passwords/role files
| java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
| at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
| at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
| at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
| at sun.security.jgss.GSSUtil.login(GSSUtil.java:246)
| at sun.security.jgss.krb5.Krb5Util.getTicket(Krb5Util.java:136)
| at sun.security.jgss.krb5.Krb5InitCredential$1.run(Krb5InitCredential.java:331)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.security.jgss.krb5.Krb5InitCredential.getTgt(Krb5InitCredential.java:328)
| at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:128)
| at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:106)
| at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:172)
| at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:209)
| at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:195)
| at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
| at sun.security.jgss.spnego.SpNegoContext.GSS_initSecContext(SpNegoContext.java:846)
| at sun.security.jgss.spnego.SpNegoContext.initSecContext(SpNegoContext.java:304)
| at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:230)
| at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
| at sun.net.www.protocol.http.NegotiatorImpl.init(NegotiatorImpl.java:86)
| at sun.net.www.protocol.http.NegotiatorImpl.<init>(NegotiatorImpl.java:95)
| 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 sun.net.www.protocol.http.Negotiator.getSupported(NegotiateAuthentication.java:265)
| at sun.net.www.protocol.http.NegotiateAuthentication.isSupported(NegotiateAuthentication.java:106)
| at sun.net.www.protocol.http.AuthenticationHeader.parse(AuthenticationHeader.java:170)
| at sun.net.www.protocol.http.AuthenticationHeader.<init>(AuthenticationHeader.java:119)
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1070)
| at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
|
So I tried to setup an auth policy that points directly to the KRB5 modules in the login-config.xml
| <!-- KRB5 Policy -->
| <application-policy name="krb5">
| <authentication>
| <login-module code="com.sun.security.auth.module.Krb5LoginModule" flag="required">
| <module-option name="storeKey">true</module-option>
| <module-option name="keyTab">/etc/eonkeytab</module-option>
| <module-option name="doNotPrompt">true</module-option>
| <module-option name="useKeyTab">true</module-option>
| <module-option name="realm">AMS.GBLXINT.COM</module-option>
| <module-option name="principal">HTTP/dlktzt79.ams.gblxint.com(a)AMS.GBLXINT.COM</module-option>
| <module-option name="useTicketCache">true</module-option>
| <module-option name="debug">true</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
and added the following to the jboss-web.xml
| <security-domain>java:/jaas/krb5</security-domain>
|
No luck whatsoever...same errors occuring.
Anyone have any pointers?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044480#4044480
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044480
19 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - Problrms getting Datasource connection whith DAO and EJB
by cdmunoz
Inside the same project I'm using both EJB 3.0 (with configuration in persistence.xml) and DAO with JDBC. I don't have problems accessing objects with EJB beacuse they are on a particular module, but I can't access any object with JDBC.
I got configured my oracle-xa-ds.xml as follow:
<xa-datasource>
<jndi-name>fmarketdb</jndi-name> . . . for EJB and
<xa-datasource>
<jndi-name>it</jndi-name> . . . for JDBC.
Jboss Application Server (jboss-4.0.3_SP1) inits the datasource without problems.
My jboss-web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/it</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/it</jndi-name>
</resource-ref>
</jboss-web>
My web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/it</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/it</jndi-name>
</resource-ref>
</jboss-web>
My Java source (jdk1.5.0_08):
protected Connection getConnection() throws Exception {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/it");
Connection conn = ds.getConnection();
conn.setAutoCommit(false);
return conn;
}
When I try to access an object through JDBC, I got the next error:
java.lang.NullPointerException at com.ceiba.corporativo.root.bo.BussinessLogicAbs.getConnection(BussinessLogicAbs.java:57)
and this because envCtx.lookup("jdbc/it") returns null and I don't understand why? Those are independent modules.
Can somebody help me please?
Does affect EJB configuration inside Jboss?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044478#4044478
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044478
19 years, 1 month
[JNDI/Naming/Network] - NullPointerException getting Datasource connection
by cdmunoz
Inside the same project I'm using both EJB 3.0 (with configuration in persistence.xml) and DAO with JDBC. I don't have problems accessing objects with EJB beacuse they are on a particular module, but I can't access any object with JDBC.
I got configured my oracle-xa-ds.xml as follow:
<xa-datasource>
<jndi-name>fmarketdb</jndi-name> . . . for EJB and
<xa-datasource>
<jndi-name>it</jndi-name> . . . for JDBC.
Jboss Application Server (jboss-4.0.3_SP1) inits the datasource without problems.
My jboss-web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/it</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/it</jndi-name>
</resource-ref>
</jboss-web>
My web.xml:
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/it</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/it</jndi-name>
</resource-ref>
</jboss-web>
My Java source (jdk1.5.0_08):
protected Connection getConnection() throws Exception {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/it");
Connection conn = ds.getConnection();
conn.setAutoCommit(false);
return conn;
}
When I try to access an object through JDBC, I got the next error:
java.lang.NullPointerException at com.ceiba.corporativo.root.bo.BussinessLogicAbs.getConnection(BussinessLogicAbs.java:57)
and this because envCtx.lookup("jdbc/it") returns null and I don't understand why? Those are independent modules.
Can somebody help me please?
Does affect EJB configuration inside Jboss?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044477#4044477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044477
19 years, 1 month