~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>Are you talking from personal experience?

Yeah, kind of. :-P

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>The Java platform supports a simple, deterministic scheduling
>algorithm called fixed-priority scheduling

Any official links? AFAIK, the JVM specification makes no such claim and leaves the details entirely to the implementation. I personally would be rather cautious in accepting anything which isn't stated in the official docs/ vm specification.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>that some couple getting married

Agree; marriage is surely a crazy thing! :-)

sknake commented: agreed +7
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

With the configuration given, I don't think there should be any problems with using IDE's like Netbeans or Eclipse. Are you using Windows as your primary OS? That might explain a lot of things. :-)

If your OS ends up eating a lot of memory by running a lot of background processes and applications, there is little point in expecting Eclipse or Netbeans to run blazing fast. Try the Windows forum of Daniweb in case the find that the problem is really the OS and not Eclipse/Netbeans. ;-)

As far as a lightweight IDE is concerned, try using jEdit.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>I'm having a problem adding the sockets correctly to the list because
>its passing the thread to the list by value...

In Java, object references are passed by value or in simple terms, Java has pass by reference when it comes to objects. Posting a bit of code to highlight your problem would be a good idea.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>any help to understand how/why the above works would be much
>appreciated.

The problem you are facing could be very well because of a broken library implementation.

From what I can make out of the stacktrace, the implementation blows up when trying to convert the value of your object field i.e. ID to a primitive. Also given that it *works* when you add a zero to the ID field, I guess that there is some kind of implicit coercion taking place which makes the entire comparison *work* somehow.

Again, this is all guesswork and would be best answered on the forum for that given third party library. You can try printing out the value of "tmpID" in the second case; what does it give? NaN? Does printing out the value "dbObject.ID" cause the same stackoverflow issue?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>It's such an angry color, don't you think?
More like passionate methinks. ;-)

>Congrats ~s.o.s~
Thanks. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thank you all; I really appreciate the trust Daniweb members have placed in me. Looking forward to a better Daniweb with your help and support. :-)

Oh and btw, the green color doesn't look that good; would have preferred something dark like black with red outline. ;-)

nav33n commented: Congrats dude! +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>oh oh i just did that cuz eclipse wants me to for some reason.

If your class implements Serializable, you ought to provide it a unique identifier; the java compiler raises a warning if you don't do so. By using @SuppressWarnings("Serial") you basically suppress that warning; not a good thing IMO.

>http://rapidshare.com/files/25998727...er_Creator.rar

Host your project on a real project hosting site like Sourceforge or Freshmeat. These sites give you various features like bug tracker, version control for your code, discussion forum for your project and much more. Also given that you want people to correct your mistakes, making your project open source and hosting it properly seems to be the right choice. Hosting projects on sites like Rapidshare etc. seems like a bad idea.

Best of luck.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>Would Ruby be a good choice?

Yes, given that it's not just another scripting language but a fun language which *has* an enterprise standing. Ruby seems to be living up to its name of a "fun programming language". So IMO, Ruby and Clojure if you are going for dynamic programming languages and Scala[used at Twitter] and Haskell if you are going for a static, strongly typed language. Also, a stack based language like Factor would surely entertain you by changing the way you look at programming.

Also I tend to agree with darkagn that there is no ideal language. Some language might be able to do X sort of things in a small amount of code but require a lot of boiler plate code when doing Y. Like they say, the more tools in your toolbox, the merrier.

>Bestjew has taken this tread in a totally different direction

His post was on topic though and certainly didn't warrant a rep comment like "that guy was just a ****". If you find something annoying or wrong or off-topic, there is always a flag bad post button provided for that, no back seat moderation please. Consider this as your first warning; refer to the forum rules for details.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

AFAICT, code highlighting on Daniweb works by rendering two DIV's, a syntax highlighted DIV which is created at the server side [i.e. no client side code highlights as used by many forums out there] and a normal DIV which contains the plain text version of the code [no style classes for each and every word etc.] wrapped up in PRE tags [to maintain formatting]. For rendering these two DIV's, the plain text version of the submitted code is used as a base.

When you search a term using Daniweb's search feature, which I guess is powered by Google, the search term highlighted piece of code is used as a reference and *not* the plain text version. Hence, clicking the toggle plain text link does what it should; toggle between the highlighted source code and the base source code used for highlighting; which in this case happens to be "search" enabled markup, something like <strong>Excel</strong>.

IMO, this can be fixed by using the plain text version as the base version and when serving a page which is the result of a search query, apply two levels of processing instead of one. The first level would be server side code formatting and the second would be search term related formatting. If this feature is vBulletin default, there is little that can be done by Dani other than reporting it as a bug. But good observation, BTW. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>it successfully got compiled but did run and gave the following
>errors!!!!

This is no longer a problem with your classpath setting which you were initially facing. Since it's an IOException, there might have been a lot of things going wrong here like the database not properly set to listen to connections etc. It would be kinda difficult to come up with a solution for us; do a web search for the given exception "Io exception: Got minus one from a read call" and check out the suggestions given there.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

So, you were expecting a MySQL Driver class in ojdbc14.jar? How about looking for that class in mysql-connector-java.jar file? ;-)

peter_budo commented: Well spotted +22
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Sad to see you leave Mel; hope you would take a good amount of rest and spend some quality time with Miss AD. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>This is getting interesting.

I don't think so. :-)

Post the entire command you are using as it is.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>whats the compiler that i got to use??

You can use any compiler implementation which follows the JVM specification; the Sun JDK is pretty standard and is widely used. Download it here. [JDK Update 14]

>netbeans, bluej??

Those are IDE's and not compilers.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

C:\Test>java -cp .;ojdbc14.jar OracleConnect

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>java OracleConnect(name of my file)

Read my previous reply; just typing the class name won't do; you have to set the classpath.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Specify your classpath using backslashes and not forward slashes. Also, it would be better if you first tried this thing out by creating a new folder test and placing your class file along with the JAR file in that directory.

c:\Test>java -cp your-oracle-jar-name.jar YourClassName
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

@hajjo

Try the Spring download here. Download 2.5.6 which is the current production release for Spring.

Also, give the Spring official documentation a shot along with the myriad of books available on Google Books for preview. It must be enough to get you started.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You might want to look into the Java XML API, W3C DOM API and its implementations like Xerces. The Xerces XML parsing library comes bundled with your Java runtime. A simple Xerces program:

public class Test {

   public static void main(final String[] args) throws Exception {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();      
      DocumentBuilder builder = factory.newDocumentBuilder();
      System.out.println(factory + "\n" + builder);
      InputSource in = new InputSource(new StringReader(
            "<?xml version='1.0'?><root><child value='1'/></root>"));
      // The doc now contains the entire XML hierarchy
      Document doc = builder.parse(in);
   }

}

BTW, if all you need to do is manipulate your XML files in memory, go for a Java specific solution like JDOM.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>is there a way to change the directory its trying to load?

You need to set the classpath when executing your Java class files.

java -cp folder\jar1.jar;folder\jar2.jar YourClass
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>it didnt work

The template I pasted wasn't supposed to solve the problem, it was to aid us/you in getting to the root of the problem. In simple terms, by doing e.printStacktrace(), you get a detailed report of the root cause of the problem. After running your new code, take a look at your output window/console. Do you see anything along the lines of FileNotFoundException?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Since you are gobbling up exceptions, it's difficult to say anything. You should replace your try...catch block with something like:

try {
  //loading code
} catch(Exception e) {
  e.printStackTrace();
}

BTW, I personally feel that you are better off posting questions related to Java3D on the respective forum since you would be interacting with a bunch who have actually used/are using Java3D as opposed to plain old Java programmers like us. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

If memory serves me right, this is a known bug wherein if the dimensions of the image exceed certain pixels, the uploading fails and the upload window goes blank.

Edit: Aha, I think I found the link. Read the sixth paragraph.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Read the Javadocs of the classes ResultSetMetaData and DatabaseMetaData for more details regarding your database/table etc. A simple web search for these classes might give you sample snippets on how to go about using them.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

This thread has gone *way* off-topic. If all you guys want to do is chat about how expensive the standard of living in country XXX create a new thread; this one's dead until some higher-up feels that there is a reason this thread should continue to exist.

Nick Evan commented: agree +23
majestic0110 commented: agree too +4
nav33n commented: How can you delete all the posts with racist remarks/replies but keep this post ? :) -2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>how do u create a 3d model in java?

You normally don't *create* 3D models in Java; you use a 3D modeling tool like Maya[commercial], 3DS Max[commercial] or Blender[free].

This model is then loaded and rendered in your application using a rendering API like JOGL or a game engine like jME. The first approach requires you to write all the file format parsing code and rendering the model polygon by polygon; definitely messy and scary. The second approach is much simpler since it requires you to only create the model and export it in a format supported by your game engine like .3ds, .md5 etc.

That all being said, rendering graphics and games using Java is still slower as compared to the same done using C++; so if you are serious about game development, better mess around with C++/DirectX than with Java. If this is just a hobby project, then game on. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>I was thinking that i would have to store each line in a array and
>just calling it by the number in that array.

Storing the data/lines which won't be used has little meaning; you can just read lines and keep skipping them until you read the line you require [i.e. to get the 3rd line, read and skip the first two]. If the file has a fixed format, e.g. only 20 characters per line and '\n' used as the line separator, you can use the seek method to skip the calculated number of bytes and directly move to the data in consideration.

>how can i print to the end of a text file?

If by `print' you meant `write', you can open the file in append mode. If by `print' you meant display the data, then it shouldn't be a problem considering that you are using a Reader to read your file data.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I tried Collections.sort but i get this error:

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: assignment2009.studentClass cannot be cast to java.lang.Comparable

The arraylist i want to sort (studTranArray) contains a string and an integer.
While the example only shows a string being sorted...
is there a way to select the variable type you want for sorting and the String will follow?

The runtime exception is thrown because the `sort' methods expects the ArrayList elements to implement the Comparable interface i.e. the class should have a method which logically compares students. If you can't change your class definition [for e.g. if your value objects or classes are automatically generated], you can use a variation of the `sort' method which accepts a custom Comparator.

// NULL checks and some other minor details omitted for brevity
class Student implements Comparable<Student> {
   
   private String name;
   
   private int id;
   
   public Student(String name, int id) {
      this.id = id;
      this.name = name;      
   }

   public String getName() {
      return this.name;
   }
   
   public int compareTo(Student student) {
      return this.id - student.id;
   }
   
   @Override
   public String toString() {
      return "{name:" + name + ",id:" + id + "}";
   }
   
}

public class ProxyTest {
   
   public static void main(final String[] args) {
      List<Student> list = new ArrayList<Student>();
      Student student = new Student("tom", 12);
      list.add(student);
      student = new Student("dick", 34);
      list.add(student);
      student = new Student("harry", 0);
      list.add(student);
      student = new Student("a sexy girl", -12);
      list.add(student);
      
      // Use the comparable nature of Student class when sorting i.e. sort by id
      Collections.sort(list); …
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>What kind of problems?

Having an extra forum which would require all the house keeping a forum requires; monitoring threads, handling spam, moving off-topic threads/posts etc. We previously did create forums only to find them filled with spam and little or no activity.

BTW, is there any other reason you would want a separate forum other than the normal 'keeping threads organized' thing?

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>Would it make sense to add a new forum to separate it?

No, seriously. Been there, done that; it causes more problems than solving any.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> a form that requires parameters passed to it once accessed.....so I
> know what the problem is.....I just dont know how to get around it

You can pass those form parameters in the URL [assuming you know what they are]

String url = "http://localhost/MyApp/param1=value1&param2=value2";

But like I previously mentioned, all this is really hackish; you really need to come up with something better than calling your own JSP and mailing its response.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Is that link accessible via the browser? Since a server error has occurred, it might pay off to see the server log for more details.

BTW, I think you are better off using a free reporting tool like Jasper Reports to create reports rather than use the JSP of your very own application. Also, moving all this business code in a separate class which would be called by the servlet would be a wise move.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

To start off, compare the HTML markup generated by both the pages; the page which works and the page which doesn't. What difference can you see?

Another option would be to Firebug, the excellent Javascript debugging utility which can be installed as a Firefox addon, to trace your problem. And since this doesn't work, tracking down the real problem [dereferencing NULL etc.] would be easier with the Error Console of Firefox which would log all the Javascript errors, if any, present in the script.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can use the URLConnection class or the Apache Commons HttpClient library to retrieve the HTML generated by your JSP; pushing it into a StringBuffer/StringBuilder is just a matter of reading the HTTP response stream.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> but i seriously doubt that any of microsoft's myriad of problems
> have to do with void main()

Yeah, it's gotta be the way they think which makes them use void main(). :-)

WaltP commented: They think??? That's news! +21
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

But this thread is off; KTHXBI.

jephthah commented: OIC.... you banned it on post #33. i smell a Masonic conspiracy. +14
ahihihi... commented: :D +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

There are two ways:
- You can either call the getSOAPBody() and getSOAPHeader() methods and manually construct the entire pretty-printed SOAP message
- Use the ByteArrayOutputStream class instance and pass it to the writeTo() method. Retrieve the resulting string using the getString() method or use new String(outputStream.getBytes(), "UTF-8") in case you are using a specific encoding.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

OK, by now we all know who Tom Gunn is, why he has such high rep and how relevant reputation is. The `off-topicness' oozing out from this thread makes it a worthy candidate for closure.

tux4life commented: And such a poetic description :P +17
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Try writeTo method of the SOAPMessage abstract class: message.writeTo(System.out);

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The most simple approach would be to put logging statements in your setter methods of your value objects i.e. Employee, Company, Address etc.

However if all you need to do is log the old and new values i.e. the same thing for each value object, you might consider looking into the AOP support of spring. Posting at the Spring forums might help.

Some other links you might find interesting:
- http://www.developer.com/java/other/article.php/3621276
- http://www.devx.com/Java/Article/39964/1763/page/1

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

What is the output of rst.getString("imagePath") and rst.getString("imgName") ? BTW, you shouldn't store absolute paths in a database table; consider the problems you would face when migrating your application. Use relative paths like:

image-path: shadbaz/mygallery/myfolder/
image-name: Eyes.jpg

and arrange so that your parent folder is stored as a configuration in either your database or your application. Then deleting the file would be simply:

File parent = new File(parentDirectory);
File img = new File(parent, imgPath + imgName);
if(!img.delete()) {
  //log or do something useful
}

You are getting the said output because you try to look for the image in your current working directory which in your case is the Tomcat directory.

Also, since the logic you are executing is a business scenario/use case, consider moving it to a separate class rather than put the same in JSP. Scriptlets are evil.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

>is there anything featuring Furry Hentai Bukkake?

AFAIK, no.

>I'd recommend Canaan as well. From the first two episodes, it's excellent.

I wonder what you liked about it; animation quality? sound? direction?

BTW, I've also started watching "Bakemonogatari" and "Sora no Manimani".

"Bakemonogatari" is one crazy series with an interesting storyline. The animation kinda reminds me of Ef-A tale of memories.

With not many romance-comedies out there, "Sora no Manimani" should definitely be a welcome addition for all the romcom fans out there.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Because I cannot subsequently open a FileReader connected to
> that file.

You might consider using getResourceAsStream() if all you want is to create a FileReader instance.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I fixed that for you.

You shouldn't, really. You just proved his point. :-)

Salem commented: Heh, and jephthah thought that it couldn't be done. +36
tux4life commented: Good one :P +16
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

kthx. give to me pls.

I said you can have it; I never mentioned I would be the one giving you that. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I'm calling shenanigans.

Maybe a time will come in the near future when you would have better things to do than worrying 'bout rep, and yeah, of course calling shenanigans. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> can i have it?
Yes.

jephthah commented: greasing the wheels of change. +13
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Garbage collection happens only when there are exactly zero
> remaining references
Not exactly; circular references are also garbage collected. More specifically, objects are eligible for garbage collection if there exists no reference from a live thread to that object.