This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.

Amit Babu

Greenhorn
+ Follow
since Dec 09, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Amit Babu

Swift is a good car....but Santro beats it!!!
I did do lot of comparing before I settled for Santro.
19 years ago

Originally posted by Jesper de Jong:
Simply create a java.util.Random object and write a loop to have it generate some random numbers (integers), and cast them to characters. For example:



This is eaxctly what I had in mind.
Glad to know that this could be a good algorithm.
19 years ago
What sort of algorithm can be used for random password generation? I do not want a very complex algorithm. A simple but effective approach would be highly appreciated.
[ December 13, 2005: Message edited by: Amit Babu ]
19 years ago
Thanks!!
I have deleted my duplicate thread from the intermediate forum.
Now wondering what could be the problem??
19 years ago
I understan dabout cross-posting, initially I thought it was Tomcat problem, but later I realzied that it was a diffferent problem altogether. Hence posted in another forum --

This is what I see in status, it does show JVm version correctly --

Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture
Apache Tomcat/5.0.28 1.5.0_01-b08 Sun Microsystems Inc. Windows XP 5.1 x86


So what could be the problem???
19 years ago

Originally posted by Ben Souther:
What does this line of code look like?
at com.xyz.core.Contract.cAssert(Contract.java:56)





There is no problem with the code, it has been working for more than 2 years now. Moreover, the problem is with "assert" itself. If i change code here, error shofts to another place where assert has been used. Somehow my JVM itself is having problems with "assert". I use Java 5 and that's the only JVM on machine, moreover it just worked couple of days ago!!!

See another post here --
https://coderanch.com/forums/

Any clues why would this happen???

TIA,
- Amit
19 years ago
I am using Java 5, and JAVA_HOME has been set properly, I wonder what could be the problem??? Interestingly even some ANT targets running Java fail with similar problems so I think Java itself is having problems with assert (I did try to use -ea) in the code. What can I do now???
19 years ago
Suddenly I am having a very weird problem with Tomcat, and it was working a couple of days ago. I have used "assert" in my code liberally, and it compiles just fine with ANT. And it did work fine in Apache Tomcat till recently -- however, now for some weird reason Tomcat fails with Internal Server Error and this is wat I get in logs -- suggesting that asertiosn are for some reason are creating problems. What could be the reason??? How can I fix this problem???

java.lang.Error: Unresolved compilation problems:
assert cannot be resolved to a type
Duplicate local variable condition

at com.xyz.core.Contract.cAssert(Contract.java:56)
at com.xyz.core.Trace.<init>(Trace.java:218)
at com.xyz.core.Trace.<init>(Trace.java:203)
at com.xyz.core.Application.<clinit>(Application.java:229)
at com.xyz.core.Configuration.getSystemConfiguration(Configuration.java:554)
at com.xyz.core.Configuration.getSystemConfiguration(Configuration.java:562)
at com.xyz.core.Configuration.loadSystemConfiguration(Configuration.java:293)
at com.xyz.util.At.<init>(At.java:331)
at com.xyz.util.At.buildInstance(At.java:322)
at com.xyz.util.At.getInstance(At.java:315)
at com.xyzsoftware.edith.servlet.AtInitializerServlet.init(AtInitializerServlet.java:98)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

TIA,
- Amit
19 years ago