java.lang.ClassCircularityError

2005-10-05 Thread Jagadeesha T
Hi all,
I am using Tomcat 5.0 with JBoss 3.2.6. In a very rare cases I got the 
error as 
java.lang.ClassCircularityError(myclass). Does anybody know wahy this error is 
coming.
 
Thanks,
Jagadish


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: java.lang.ClassCircularityError

2005-10-05 Thread Jagadeesha T
HI  Andoni, 
Thanks for the reply, It uses association that too unidirectional, I 
have seen the option in sun forum as have you explained to me. I tried to 
compile classes like this for just to get that error. This scenario won't 
compile, It gave me a error saying cycling inheritence.
Do you know any other scenarios which could cause this problem.
 
Thanks,
Jagadish

Andoni [EMAIL PROTECTED] wrote:
Hi Jagadish,

Do you have a drawing of all your inheritance relationships? This error seems 
to be caused by a circular inheritance relationship i.e.:

class ClassOne extends ClassTwo {
...
}

class ClassTwo extends ClassOne {
...
}

Obviously there could be many more than two classes involved so it may be best 
to draw out the class tree. Specially if it is complicated.

Hope that helps.

Andoni.

- Original Message - 
From: Jagadeesha T 
To: tomcat-user@jakarta.apache.org 
Sent: Wednesday, October 05, 2005 9:01 AM
Subject: java.lang.ClassCircularityError


Hi all,
I am using Tomcat 5.0 with JBoss 3.2.6. In a very rare cases I got the error as 
java.lang.ClassCircularityError(myclass). Does anybody know wahy this error is 
coming.

Thanks,
Jagadish


-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. 


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

Re: java.lang.ClassCircularityError

2005-10-05 Thread Jagadeesha T

HI,
  Thanks for the reply, It is being working correctly all these days. Only once 
I got this error.After restarting the server worked fine. Only one time I got 
this error. But I have not done 
as you mentioned. I am very curious to know why is this suddenly came which was 
working all these days and gone after restarted the server.
 
Thanks,
Jagadish 

Leon Rosenberg [EMAIL PROTECTED] wrote:
Just some thoughts...

if you write two classes A and B
B extends A
then compile
then put B into deployment
change B to not extend A and A to extend B, compile A
put A into deployment
Then you'll probably have your runtime circularity.

Try to delete all your class files and recompile your application from scratch.

regards
Leon

On 10/5/05, Jagadeesha T wrote:
 HI Andoni,
 Thanks for the reply, It uses association that too unidirectional, I have 
 seen the option in sun forum as have you explained to me. I tried to compile 
 classes like this for just to get that error. This scenario won't compile, It 
 gave me a error saying cycling inheritence.
 Do you know any other scenarios which could cause this problem.

 Thanks,
 Jagadish

 Andoni wrote:
 Hi Jagadish,

 Do you have a drawing of all your inheritance relationships? This error seems 
 to be caused by a circular inheritance relationship i.e.:

 class ClassOne extends ClassTwo {
 ...
 }

 class ClassTwo extends ClassOne {
 ...
 }

 Obviously there could be many more than two classes involved so it may be 
 best to draw out the class tree. Specially if it is complicated.

 Hope that helps.

 Andoni.

 - Original Message -
 From: Jagadeesha T
 To: tomcat-user@jakarta.apache.org
 Sent: Wednesday, October 05, 2005 9:01 AM
 Subject: java.lang.ClassCircularityError


 Hi all,
 I am using Tomcat 5.0 with JBoss 3.2.6. In a very rare cases I got the error 
 as
 java.lang.ClassCircularityError(myclass). Does anybody know wahy this error 
 is coming.

 Thanks,
 Jagadish


 -
 Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.


 -
 Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

XPowered BY

2005-09-02 Thread Jagadeesha T
HI all,
   I use JBoss 3.2.6 and and Tomcat 5.0. It displays X-PoweredBY version in
Headers file, There is in web.xml to CommonHeadersFileter, InitParams, Even 
after deleting it from web.xml, it display, Is there any way to do that in 
Tomcat 5.0 with JBoss.
 
Thanks,
Jagadeesha T
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

document for upgrade

2005-08-22 Thread Jagadeesha T
HI, 
  Could any body tell me tomcat upgradation document location from 3.x to 4.x 
or 5.x.
 
Regards,
Jagadish
 
 


-
 Start your day with Yahoo! - make it your home page 

Session Security

2005-07-29 Thread Jagadeesha T
Hi All,
Cookie information goes to the server in a clear text I think. I don't 
know it can be 
configured to send as a  cypher text. 
When it goes in the network to browser, If not ssl enabled, 
Cookie;Jsessionid;value can be seen through Ethereal and also copied, If 
anybody tries with that cookie with the url.
It will take the person to directly to that page.How can disable it.
Please could anybody tell me how to avoid it. 
 
Thanks,
Jagadeesha T


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: session management

2005-04-02 Thread Jagadeesha T
Hi, Thanks the reply,
 My requirement is little different.
I want to have many browser instaces (2 or more)to use the same session.
In my first.jsp, on first hit, i will get the session and store it.
Again,if the first jsp is hit for the second time. It should use the
same session. SO, I will not let it allow to create a new one. Instead use the 
one already stored for user.
I have to do like this since the user login is done from a Java 
Applacition(Swing).
If the user wants to go to a browser. User has to click on the button (Swing 
UI) that will launch the 
browser. each click on the button should launch a browser.
I want all those browsers launched for that login to use a shared session 
object.
Could you tell How can I do it.
I tried by setting the cookie at the first.jsp when the second browser 
launch(Coolke which had created at the 
first
hit).
addCookie,
  In one of the middle jsps, there is 
  response.sendRedirect(response.encodeURL(samepage?somename=somevalue))
 Every time,it is failing here, response.sendRedirect();
 //When it is reloaded i have observerd that it is not getting the cookie in 
the headers.
 I don't understand why the browser not sending the cookie. cookie is not 
disabled.
 
Scenario 2.
If all browser uses different session objects. then it works fine.
 
could you tell me is there any way to get this done?
Thanks,
Jagadish


 

Lionel Farbos [EMAIL PROTECTED] wrote:
On Thu, 31 Mar 2005 11:41:55 -0800 (PST)
Jagadeesha T wrote:

 Hi all,
 I want to set session in httpservletresponse object, Is there 
 any way to do it.
 Otherthan response.addCookie(), or 
 response.encodeURL();
 Is there any way to set the Jsession In headers, So that it gets that 
 in the next Jsp by request object, 
 If I use addCookie of response object, It fails if any where encodeURL 
 is used. 
 If i user encodeURL, every JSP needs to updated with that method.
 Please if anybody knows tell the way that can be done. 

You don't have to create yourself the cookie.
You create the HttpSession with HttpServletRequest.getSession() or 
HttpServletRequest.getSession(boolean)
Then, the session is created and the cookie JSESSIONID is added to the 
HttpServletResponse.
So, the next time you'll invoke a servlet or JSP in the same Context (with the 
same browser),
the Cookie JSESSIONID will be attached to your request.

If you have clustered your Tomcat, the JSESSIONID will have a suffix .,
so, if you use the mod_jk to load-balance your tomcat clustered servers, 
your request will be sent to the same tomcat (as the precedent).

Enjoy

 Thanks,
 Jagadeesha T
 
 
 
 -
 Do you Yahoo!?
 Better first dates. More second dates. Yahoo! Personals 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
 Better first dates. More second dates. Yahoo! Personals 

session management

2005-03-31 Thread Jagadeesha T
Hi all,
I want to set session in httpservletresponse object, Is there 
any way to do it.
 Otherthan response.addCookie(), or 
response.encodeURL();
Is there any way to set the Jsession In headers, So that it gets that 
in the next Jsp by request object, 
If I use addCookie of response object, It fails if any where encodeURL 
is used. 
If i user encodeURL, every JSP needs to updated with that method.
Please if anybody knows tell the way that can be done. 
 
Thanks,
Jagadeesha T



-
Do you Yahoo!?
 Better first dates. More second dates. Yahoo! Personals 

Session Handling

2005-03-29 Thread Jagadeesha T
Hi all,
I need to launch a browser from a java application (swing) on the click of the 
button.
Each click should launch a different instance of the browser. However, all 
these instances of the browser should share the same HttpSession (created on 
the launch of the first browser instance).

Currently, have implemented this by setting a cookie in HttpServletResponse 
object.
 
response.addCookie(new Cookie(jsessionid,sessionid)) 
response.sendRedirect(NextPage),
 
 In the above approach, all browser instances share the same session. This 
works fine. 
 However, if the jsp invoked as part of sendRedirect uses response.encodeURL(), 
this approach does not work. When the encoreURL() method is used, the session 
id is not set correctly (a different session id is being set). Not sure how/why 
the session id is different in this case. 
 
 Any idea why?
 Or is there any other way of sharing a session for all the browsers.
  I am using Tomcat version 5.0,
  
 Thanks,
 Jagadeesha T
 
 
 
 
 


-
Do you Yahoo!?
 Yahoo! Mail - Easier than ever with enhanced search. Learn more.

ClassCastException

2005-02-23 Thread Jagadeesha T
Hi,
 There is a ClassCastException when we run the JspC class with the proper 
arguments.
 I have given the detailed exception at the end of this mail,
// In org.apache.jasper.JspC class code
private void initServletContext()
{
try
{
context = new JspCServletContext(new PrintWriter(System.out), new 
URL(file: + uriRoot.replace('\\', '/') + '/'));
tldLocationsCache = new TldLocationsCache(context, true);
}
catch(MalformedURLException me)
{
System.out.println(** + me);
}
rctxt = new JspRuntimeContext(context, this);
jspConfig = new JspConfig(context);
tagPluginManager = new TagPluginManager(context);
}
In this method it creates the object of jspRunTimeContext
rctxt = new JspRuntimeContext(context, this);
// end JspC class code
// In org.apache.jasper.compiler.JspRuntimeContext class 
In constructor of this class,
public JspRuntimeContext(ServletContext context, Options options){
jsps = Collections.synchronizedMap(new HashMap());
thread = null;
threadDone = false;
threadName = JspRuntimeContext;
System.setErr(new SystemLogHandler(System.err));
this.context = context;
this.options = options;
// The below line causing the exception to be thrown 
parentClassLoader = 
(URLClassLoader)Thread.currentThread().getContextClassLoader();
if(parentClassLoader == null)
parentClassLoader = (URLClassLoader)getClass().getClassLoader();
if(log.isDebugEnabled())
if(parentClassLoader != null)

log.debug(Localizer.getMessage(jsp.message.parent_class_loader_is, 
parentClassLoader.toString()));
else

log.debug(Localizer.getMessage(jsp.message.parent_class_loader_is, none));
initClassPath();
if(context instanceof JspCServletContext)
return;
if(System.getSecurityManager() != null)
 ...
 ..}
// Here it is expecting the current thread class loader to be of type 
URLClassLoader,
 which is not,it is set with the AntClassLoader2..
 Hence throwing the exception
parentClassLoader = 
(URLClassLoader)Thread.currentThread().getContextClassLoader();
/// end of org.apache.jasper.compiler.JspRuntimeContext class 
The reason is the current thread class loader has set in JspC after 
JspRuntimeContext() object 
creation call, 
setting of current thread class loader to URLClassLoader is done in the below 
given method in JspC class
private void initClassLoader(JspCompilationContext clctxt) method
// Begin JspC class
Thread.currentThread().setContextClassLoader(loader);
// end JspC class 

The class loader, URLClassLoader is set to the current thread after the 
exception is thrown from 
org.apache.jasper.compiler.JspRuntimeContext, if it set before ,then it will 
definitely work.
--- total flow.
from JspC class,
methods flow 
Main() -- execute()--- initServletContext();
initServletContext() In this method creating the below object by calling the 
only one constructor of
org.apache.jasper.compiler.JspRuntimeContext(context, option)
--
in org.apache.jasper.compiler.JspRuntimeContext
org.apache.jasper.compiler.JspRuntimeContext
taking the current thread class loader and expecting to be as URLClassloader,
exception thrown
---
in JspC 
after this flow there is code to set the currentCLassLoader to URLClassLoader,
in initClassLoader(JspCompilationContext clctxt) method
this should be set before the creation of JspRuntimeContext object to avoid 
this exception.
---
It would be great if we have precompilation feature.
I don't know if there is any other alternatives available for this,
I think we could do this. Please let me know if this is 
considered already and have counter this problem.
---

The detailed exception is ...
The line numbers may not correct since i put some System.out.println()..
The code thrrowing the exception is 
JspRuntimeContext costructor 
parentClassLoader = 
(URLClassLoader)Thread.currentThread().getContextClassLoader();


[java] java.lang.ClassCastException
[java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:172)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
[java] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:341)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[java] at 

JspC exception

2005-02-14 Thread Jagadeesha T
Hi,
JspC error while doing PreCompilation,
I 'am using ant 1.6.2 and tomcat 5. When I call jspc from ant it is 
thworing invaid  cast exception.  In JspRunTimeContext class. It is getting the 
current thread classloader  and casting to URL classloader..
 
parentClassLoader = 
(URLClassLoader)Thread.currentThread().getContextClassLoader();
This is because Thread.currentThread().getContextClassLoader() is returning 
AntClassLoader.
which is incompatible with URLClassLoader. Hence thrwoing ClassCastException.
 
The detail exception is, Please don't consider the line number in the below 
stack Trace.
The code thrwoing the exception is above given in bold font of 
org.apache.jasper.compiler.JspRuntimeContext class.
 
 
[java] java.lang.ClassCastException
[java] at 
org.apache.jasper.compiler.JspRuntimeContext.init(JspRuntimeContext.java:46)
[java] at org.apache.jasper.JspC.initServletContext(JspC.java:866)
[java] at org.apache.jasper.JspC.execute(JspC.java:735)
[java] at org.apache.jasper.JspC.main(JspC.java:71)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193)
[java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130)
[java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
[java] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:341)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
 
 
I 'am stuck up in this, This is a class loader issue. It would be a great help 
if anybody has a solution for this. After this exception, there is a code to 
set current thread class loader to URL classLoader in JspC.java.
 
Regards,
Jagga
 
 
 
 


-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'

JSPC problems

2005-02-11 Thread Jagadeesha T
Hi all,
   I 'am trying to do jspPreCompilation, it is thrwing away saying. 
ClassCastExcception.
 
Class java.util.HashMap loaded from parent loader (parentFirst)
Class java.util.Collections loaded from parent loader (parentFirst)
Class java.io.ByteArrayOutputStream loaded from parent loader (parentFirst)
 [java] java.lang.ClassCastException
 [java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:172)
 [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705)
 [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177)
 [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
 [java] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
 [java] at org.apache.tools.ant.Task.perform(Task.java:364)
 [java] at org.apache.tools.ant.Target.execute(Target.java:341)
 [java] at org.apache.tools.ant.Target.performTasks(Target.java:369)
 [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
 [java] at 
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
 [java] at org.apache.tools.ant.Main.runBuild(Main.java:673)
 [java] at org.apache.tools.ant.Main.startAnt(Main.java:188)
 [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
 [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
 [java] Caused by: java.lang.ClassCastException
 [java] at 
org.apache.jasper.compiler.JspRuntimeContext.init(JspRuntimeContext.java:95)
 [java] at org.apache.jasper.JspC.initServletContext(JspC.java:1005)
 [java] at org.apache.jasper.JspC.execute(JspC.java:870)
 [java] at org.apache.jasper.JspC.main(JspC.java:196)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [java] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [java] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:324)
 [java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193)
 [java] at 
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130)
 [java] ... 13 more
 [java] --- Nested Exception ---
 [java] java.lang.ClassCastException
 [java] at org.apache.jasper.compiler.JspRuntimeContext.init
 
 
Please if anybody got this error and got it solved.Please could you help out to 
run precompilation.
 
Regards,
Jagga
 



-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'

jspc classcasst exception: error while casting ANTClassloader to URLclassLoader

2005-02-11 Thread Jagadeesha T


Hi all,

   it is throwing ClassCastexception in JSPRuntimeCOntext class when 
casting ANTClassLoader class to URLCLassLoader. I don't whether it is a bug. or 
configuration problems. 

Regards,

Jagga

 


-
Do you Yahoo!?
 Yahoo! Search presents - Jib Jab's 'Second Term'

Session Objects

2005-02-08 Thread Jagadeesha T
Hi all,
  I' am storing session objects in a SINGLEON class object to keep all 
active sessions. Does it give any problems in clustered enviornment since 
singleton is a static referrence.
 
Regards,
Jagga
 
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: Session Objects

2005-02-08 Thread Jagadeesha T
Thanks for responding.
 
To manage session between an apllication and web servers. Is there any way to 
get that worked in clustered enviornment?
 
Thanks 
Jagga


Dale, Matt [EMAIL PROTECTED] wrote:

Yes it will, this won't work accross a cluster. You need to use the regular 
session manager.

Is there any reason why you put the sessions in a singleton?

Ta
Matt

-Original Message-
From: Jagadeesha T [mailto:[EMAIL PROTECTED]
Sent: 08 February 2005 17:25
To: tomcat-user@jakarta.apache.org
Subject: Session Objects


Hi all,
I' am storing session objects in a SINGLEON class object to keep all active 
sessions. Does it give any problems in clustered enviornment since singleton is 
a static referrence.

Regards,
Jagga



__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
Do you Yahoo!?
 All your favorites on one personal page – Try My Yahoo!