[jboss-user] [Clustering/JBoss] - NotSerializableException: javax.servlet.http.Cookie

2008-07-21 Thread bezdomny
I'm getting the following exception when one of my nodes is trying to replicate 
to another. Am I mission a config option? It seems that cookies would be 
Serializable. I've gotten around the type of exception with some of my other 
Objects by making the serializable, but obviously that is impossible in this 
case. 

Has anyone else seen this behaviour? I'm really new to jboss clustering so I 
may be doing something wrong.

Thanks!

B

ERROR [org.jboss.web.tomcat.service.session.JBossCacheService] 
externalizeSession(): exception occurred externalizing session 
SessionBasedClusteredSession[id: PSJByxuaf3ycpL9K9Y1E1g**.node1 
lastAccessedTime: 1216647130202 version: 5 lastOutdated: 0]
java.io.NotSerializableException: javax.servlet.http.Cookie
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.HashMap.writeObject(HashMap.java:1001)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4165649#4165649

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4165649
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: NotSerializableException: javax.servlet.http.Cookie

2008-07-21 Thread bezdomny
Oh and I'm using this as my jboss-web config:
replication-config
replication-triggerSET_AND_NON_PRIMITIVE_GET/replication-trigger
replication-granularitySESSION/replication-granularity
replication-field-batch-modetrue/replication-field-batch-mode
/replication-config

and I have the web application marked as distributable in the web.xml.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4165650#4165650

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4165650
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - SSO config help?

2008-07-14 Thread bezdomny
I'm running blades that run jboss-eap-4.3 with mod_jk load balancing the 
servers. 

I'm using JAAS for authentication and I'd like to be able to authenticate on 
the primary server and have that authentication propagate to the other jboss 
instance if one of the servers goes down and jk moves the user to the other 
server. 
I have configured clustering with TCP and both blades seem to see each other in 
the cluster. 

The issue I'm seeing now is that when I authenticate sucessfully I can do what 
I need to do. When I kill that jboss instance, I'm properly routed to the other 
app server by mod_jk, but I have to re-log into the app. 

Can anyone give me any hints as to how to make this work. 

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4164241#4164241

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4164241
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - viewing logs in web-console?

2007-04-16 Thread bezdomny
Is it possible to view stderr and stdout using the Web-console? I've looked 
through the mgt interface and couldn't find anything promising. Is there a 
logging mbean I don't know about? Any suggestions would be great. I really need 
to have this functionality because of the hoops our ops folks make us go 
through to request the logs. Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4037530#4037530

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037530
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Re: viewing logs in web-console?

2007-04-16 Thread bezdomny
Thanks Peter. My log4j setup has the stderr and stdout going to 
/server/default/logs/server.log, so I have a physical file to catch the logs I 
was just hoping I missed something in web-console that would give me access to 
this file directly. I might look into writing an MBean to do this. Any advice 
on mbean creation would be appreciated.

Thanks.

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4037587#4037587

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4037587
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Tomcat, HTTPD, Servlets JSP] - OWASP StingerFilter and JESSSIONID versus JESSIONIDSSO

2007-04-11 Thread bezdomny
I'm using 4.0.5.GA and I have enabled the 
org.apache.catalina.authenticator.SingleSignOn valve in tomcat/server.xml. I'm 
trying to protect my web apps using the OWASP Stinger servlet filter, 
specifically its cookie validation feature. I'm trying to determine when I will 
get a regular JESSSIONID and when I will get a JESSIONIDSSO? I have noticed 
that I get either a varied points when I enter my web app. My app is only 
accessible via SSL and I have configured the SSO valve to my domain, not just 
the app context. Also, 
Is there an issue with session cookies and IE7?

Thanks!

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4036371#4036371

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4036371
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - 4.05GA javamail problem

2006-10-23 Thread bezdomny
I'm using a base install of 4.05GA and I get the following exception when 
trying to use javamail. I'm using the default service bound to java:/Mail.

java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream

I get the mail session fine, but when I try to create a MimeMessage object like 
so: 
Message m = new MimeMessage(mailSession);

//this also fails:
MimeMessage m = new MimeMessage(mailSession);

I get the exception. Any ideas?

Thanks!!

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3980063#3980063

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3980063
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Re: 4.05GA javamail problem

2006-10-23 Thread bezdomny
Hey Dimitris,
I would if I could, but as soon as the MimeMessage(mailSession) constructor is 
called and InvocationTargetException is thrown, then I see the 
java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream

Here is my method:

public void sendMessage() {

try {
Session mailSession =  null;

try { 
Context ctx = new InitialContext();
Object objref = ctx.lookup(java:/Mail);
mailSession = (Session) 
PortableRemoteObject.narrow(objref, Session.class); 
} catch (NamingException e) {

System.out.println(e);
e.printStackTrace();
}

MimeMessage msg = new MimeMessage(mailSession);

msg.setSubject(subject);
msg.setSentDate(new Date());
msg.setFrom();
msg.setRecipients(Message.RecipientType.TO, 
getAddresses());
msg.setText(mailMessage); 

Transport.send(msg);

}
catch (MessagingException e) {
logger.log(Level.SEVERE, messaging error: , e);
} 
}

Bob



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3980094#3980094

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3980094
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Re: 4.05GA javamail problem

2006-10-23 Thread bezdomny
Yep That was it. I'm using a third party jar that has some of the old sun/* 
classes included. When I removed that, my problem was solved. Thanks for the 
help.

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3980151#3980151

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3980151
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: newbie please help: using the right name?

2006-10-05 Thread bezdomny
Thanks! I got to it eventually the same way.

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976322#3976322

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976322
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Javamail hell with 4.04GA

2006-10-05 Thread bezdomny
Has anyone gotten javamail to work?? I get ClassNotFoundExceptions when I uses 
mime/multipart messages and I get SendFailedExceptions can only send RFC822 
compliant messages when I just use something like the following code:
Session mailSession =  null;
try { 
Context ctx = new InitialContext();
//Context compEnv = (Context) 
ctx.lookup(java:comp/env);  
//mailSession = 
(Session)compEnv.lookup(mail/AppMail);
Object objref = 
ctx.lookup(java:comp/env/mail/AppMail);
mailSession = (Session) 
PortableRemoteObject.narrow(objref, Session.class); 
} catch (NamingException e) {
// TODO Auto-generated catch block
System.out.println(e);
e.printStackTrace();
}

InternetAddress[] address = new 
InternetAddress[to.length];
for(int i = 0; i  to.length; i++)
{
address = new InternetAddress(to);
}

//   Define message
MimeMessage message = new MimeMessage(mailSession);
message.setFrom(new InternetAddress(from));
message.addRecipients(Message.RecipientType.TO,address);
message.setSubject(Hello JavaMail);
message.setText(Welcome to JavaMail);
//I've tried it without this too
message.setHeader(Date,new SimpleDateFormat(EEE, dd 
MMM  HH:mm:ss z).format(new Date(System.currentTimeMillis(;

//   Send message
Transport.send(message);

Someone please enlighten me. I've even tried the new version of javamail with 
no luck. 

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976323#3976323

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976323
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Re: Javamail hell with 4.04GA

2006-10-05 Thread bezdomny
Here is the debug output I'm seeing:

250-STARTTLS
250-8BITMIME
250-DSN
250 OVID
11:17:23,785 INFO  [STDOUT] DEBUG SMTP: Found extension STARTTLS, arg 
11:17:23,785 INFO  [STDOUT] DEBUG SMTP: Found extension 8BITMIME, arg 
11:17:23,785 INFO  [STDOUT] DEBUG SMTP: Found extension DSN, arg 
11:17:23,800 INFO  [STDOUT] DEBUG SMTP: Found extension OVID, arg 
11:17:23,800 INFO  [STDOUT] DEBUG SMTP: Can only send RFC822 msgs
11:17:23,800 INFO  [STDOUT] QUIT

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976326#3976326

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976326
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Installation, Configuration Deployment] - Re: Javamail hell with 4.04GA

2006-10-05 Thread bezdomny
Here is my exception:
MessagingException:
SMTP can only send RFC822 messages

Also, I've tried sending through both windows and linux mail servers with the 
same luck. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976329#3976329

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976329
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Beginners Corner] - javamail help: does it work with 4.04.ga?

2006-10-05 Thread bezdomny
Has anyone gotten javamail to work?? I get ClassNotFoundExceptions when I uses 
mime/multipart messages and I get MessagingExceptions can only send RFC822 
compliant messages when I just use something like the following code: 
Session mailSession = null; 
try { 
Context ctx = new InitialContext(); 
//Context compEnv = (Context) ctx.lookup(java:comp/env); 
//mailSession = (Session)compEnv.lookup(mail/AppMail); 
Object objref = ctx.lookup(java:comp/env/mail/AppMail); 
mailSession = (Session) PortableRemoteObject.narrow(objref, Session.class); 
} catch (NamingException e) { 
// TODO Auto-generated catch block 
System.out.println(e); 
e.printStackTrace(); 
} 

InternetAddress[] address = new InternetAddress[to.length]; 
for(int i = 0; i  to.length; i++) 
{ 
address = new InternetAddress(to ); 
} 

// Define message 
MimeMessage message = new MimeMessage(mailSession); 
message.setFrom(new InternetAddress(from)); 
message.addRecipients(Message.RecipientType.TO,address); 
message.setSubject(Hello JavaMail); 
message.setText(Welcome to JavaMail); 
// Send message 
Transport.send(message); 
 
 
Here is the debug output I'm seeing: 

250-STARTTLS 
250-8BITMIME 
250-DSN 
250 OVID 
11:17:23,785 INFO [STDOUT] DEBUG SMTP: Found extension STARTTLS, arg  
11:17:23,785 INFO [STDOUT] DEBUG SMTP: Found extension 8BITMIME, arg  
11:17:23,785 INFO [STDOUT] DEBUG SMTP: Found extension DSN, arg  
11:17:23,800 INFO [STDOUT] DEBUG SMTP: Found extension OVID, arg  
11:17:23,800 INFO [STDOUT] DEBUG SMTP: Can only send RFC822 msgs 
11:17:23,800 INFO [STDOUT] QUIT 
 
Here is my exception: 
MessagingException: 
SMTP can only send RFC822 messages 

Also, I've tried sending through both windows and linux mail servers with the 
same luck.  

Thanks!

B 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976333#3976333

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976333
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - newbie please help: using the right name?

2006-10-04 Thread bezdomny
This is a really dumb question, but here goes: I'm trying to use javamail and I 
have the following config:
Here is the server output when jboss starts up:

 [org.jboss.mail.MailService] Mail Service bound to java:/AppMail
2006-10-04 12:46:46,065 DEBUG [org.jboss.mail.MailService] Started 
jboss:service=Mail




  
java:/AppMail  

   
  !-- Change to your mail server prototocol --
  
  

  !-- Change to the user who will receive mail  --
  

  !-- Change to the mail server  --
  
   !-- Change to the mail server  --
  
  
 
   
  


Now if you notice I've called the jndi name java:/AppMail. How do I refer to 
this in the code? I always get NameNotFoundException. Here is my code:

Context ctx = null;
   Session mailSession =  null;
try { 
ctx = (Context) new InitialContext().lookup(java:comp/env);

Object objref = ctx.lookup(java:/AppMail);
mailSession = (Session) PortableRemoteObject.narrow(objref, Session.class); 
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace(  }

Am I refering to jndi name in the proper way?
Thanks,
B


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3976144#3976144

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3976144
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - One security domain, two web apps

2006-09-14 Thread bezdomny
I currently have two web apps, Identity and Business. Idenity is currently 
configured to use jaas/jboss with a custom login module and it works great. I 
now have this new app that I want to secure and I want to use Identity security 
domain and login module. I have added the following to the jbos-web.xml in the 
Business app (exact same as in the Identity app jboss-web.xml):

jboss-web
security-domain 
flushOnSessionInvalidation=truejava:/jaas/Identity/security-domain
resource-ref
res-ref-namejdbc/cidb/res-ref-name
jndi-namejava:/jdbc/cidb/jndi-name
/resource-ref

/jboss-web

I have also added the requisite security role/form login stuff in Business 
web.xml. As follows:

security-role
basic client users
role-nameclient/role-name
/security-role

security-role
basic analyst users
role-nameanalyst/role-name
/security-role


security-constraint  
  web-resource-collection 
web-resource-name
  client files
/web-resource-name
url-pattern*.do/url-pattern
  /web-resource-collection
  auth-constraint
  role-nameclient/role-name
   role-nameanalyst/role-name
  /auth-constraint
 /security-constraint



login-config
  auth-methodFORM/auth-method
  realm-nameIdentity/realm-name
  form-login-config
form-login-page/common/start.jsp/form-login-page
form-error-page/common/loginerror.jsp/form-error-page
/form-login-config
  
Now for the question :)
When I hit one of the Business apps struts pages like 
/Business/initSplashPage.do, I get the proper login screen. When I try to 
authenticate, the auth fails and I'm returned to the login screen. Actually my 
login module isn't even being called. I'm assuming that the reason is that my 
custom login module isn't visible in the classpath of the business app since it 
actually lives inside the Identity app. Is this correct? Shouldn't jboss be 
able to call my custom login module from wherever it lives? 

Now for the weird part. When I authenticate as normal in the Identity app, then 
click over to the Business app, it passes my auth info fine and recognises I'm 
logged in, and the app works fine. This isn't such a big deal as my clients 
will always go through the Identity app to the business app, but I don't know 
why it won't work just authenticaing in the biz app. 
Any ideas?
Thanks!
B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3971656#3971656

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3971656
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Tomcat, HTTPD, Servlets JSP] - bean synchronization question

2006-07-31 Thread bezdomny
I know that the jdk implements synchronization is a recursive way, but I need 
to clear up a burning question in my mind. Lets say I have a bean with a 
synchronized public getData() method. This method calls a private method called 
getDataFromDB() that uses the standard DataSource pattern to get data from a db 
to populate instance variables. Since I synchronized getData(), do I also need 
to synchronize getDataFromDB()? The scope of this bean is request when called 
from a jsp. Thanks and sorry for the dumb question.

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3961867#3961867

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3961867
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - Where is the destination url stored?

2006-07-19 Thread bezdomny
I have an issue, similar to others here, where my default page is sometimes my 
login.html page. If this is the case, when I log into the web app, I get the 
400 Invalid direct reference message because to  j_security_check, the 
destination page is also the log in page.  Here is my login-config section of 
web.xml
login-config
  auth-methodFORM/auth-method
  realm-nameblah/realm-name
  form-login-config
form-login-page/common/login.html/form-login-page
form-error-page/common/loginerror.jsp/form-error-page
/form-login-config
  
/login-config 

Where does JBoss store the URL it uses after a successful login? I want to 
check this to see it is set, in the case of someone bookmarking the login.html 
page, and if it is set to the login.html page explicitly. Can anyone help here? 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3959320#3959320

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3959320
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - Re: Where is the destination url stored?

2006-07-19 Thread bezdomny
Also, 
I'm using a custom DatabaseServerLoginModule. Is this best solution to just 
override the behavior and force my loginmodule to only redirect users to one 
place?

Thanks!

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3959323#3959323

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3959323
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - Re: Where is the destination url stored?

2006-07-19 Thread bezdomny
Never mind. I wrote some code to dump all the request attributes and headers 
and found it:
javax.servlet.forward.request_uri
javax.servlet.forward.context_path
javax.servlet.forward.servlet.path

I now see the problem. My site is secured on roles that correspond to 
directories. If the user just bookmarks my login.jsp or login.html page, I 
would have to have a way to know what their role is even if I could alter these 
request attributes. The real solution will be to dump them to an intermediate 
page that makes them click on a link appropriate from their role. Then the 
container should have no problems.




View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3959365#3959365

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3959365
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security JAAS/JBoss] - Re: Apache mod_jk / JBoss SSL question

2006-07-12 Thread bezdomny
Yeah. I was reading in chapter 9 of the JBOG 4.0 book last night. I can fix the 
8443 issue. I was wrong about that yesterday. What about my Apache/mod_rewrite 
approach?

Thanks for responding.

B

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3957367#3957367

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3957367
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user