| |
| |
| |
|
Page: 1 2 3
Comments:
<0> hallo cal. <1> hi ya <1> back in az now <2> nice <1> not really but anyway, tis what it is <0> calchas: how long was the flight? <1> 11 and 3 hrs <0> horrible :| <3> sanjcika <4> when doing a thread dump there are line numbers ***ociated with cl***es in an external jar <4> does that mean the jar is a debug build and has source? <1> not necessarily source <4> is there a way to ***ociate those line numbers with something useful for debuggin? <0> korbin: yes, for those with access to the source code. <4> ic <1> sorry was on phoen, flights were as bad as usual, but that us good they can be very bad
<1> korbin, are you trying to debug libraries or the code that uses them <1> if debugging the libraries you need the source (some how) <1> if not it's not usually an issue <4> calchas: sorry was away as well :D <4> the external jar is actually an oracle jdbc driver <4> i did a thread dump and where i think the thread got stuck was in the driver <4> it has some line numbers ***ociated with it so was just wondering if i could debug it somehow <5> what's the first line of the last "caused by" block? <5> if you have a line number, instead of (unknown source) written, it means you have the sources, I would be surprise you have the oracle`s jdbc driver sources <4> at oracle.sql.LnxLibThin.lnxfpr(LnxLibThin.java:1898) <4> that's where the thread was at the point of the snapshot <5> sometimes it's good to search for that exact line on the web <5> hum, it gave me no result <5> and what's the exception? <4> no exceptions ... this came from a thread dump <5> oh, and you get a infinite loop or something? <5> I'm sorry I was not paying attention until a minute ago <4> yeah that's what it looks like <5> and you reach the same point, same line, each time you do the thread stack dump? <6> I have a question. How do I choose which platform to implement a Java server on? ( I do not know much - have read a little - just wanting to know where to get started with this and what considerations I have. ) <4> only two thread dumps were taken ... about a few seconds apart ... but they're in the same place <4> more dumps would have been more conclusive but unfortunatey these were taken by a customer <6> I ask because I want to change from ASP.NET to a Java way of doing things. NetBeans seem so easy compared to ASP.NET. <5> korbin : I remember that when your code throws in another thread than the main one, you may not see the stack trace or the exception, I'm just trying to remember <5> http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/ <5> some interesting infos there <1> kinematix the (unknown source) vs (line number) does not suggest you can or can't see the source code, it determines whether the byte code has debug information <4> kinematix: thx ... that's actually where i figured out how to do the stack trace :D <1> that a library is where the error is detected is not that useful unless the library has an error, in this cas what was the last line in the trace where your code is indicated\ <5> korbin: yeah, but read the last part <1> that is often the first and best place to look <5> calchas: yes that's right for the sources, but you usually don't have debug info without the sources <1> Iaepetus what do you mean by java server ? <1> kinematix actually there is a strong tendancey for byte code to have the debug info <1> bbiab <5> calchas: I believe you, I just rarely suffer from bugs from third party libraries <6> calchas - SOmething like Websphere. <6> JSP I suppose <1> that is web spere that uses java, java is a langauage and not served as such <1> JSP can be implemented on any decent O/s (including windows) <1> the standard is tomcat <1> as a jsp container <1> you should ensure you have a decent grasp of J2SE before servlets then jsp <1> and throw in jdbc before servlets, but it is very simple <6> calchas: I suppose the correct question would have been. What platform should I run Java servlets on? And what considerations do I need to make in decising what platform to use. <6> calchas: Thanks, learning. I was very imprecise. <6> And wrong to boot. <5> iaepetus: same as usual, cost, risk, maintenance cost, etc <1> who are your customers ? <5> else there are success stories on all platforms, depends on the administrator I guess <6> kinematix: I was thinking about scaling considerations as a primary consideration. <1> orion has a good rep for scaling <5> iaepetus: I'm not really qualified to answer this question and I'm not sure you will find a clear answer, that's too low level for me ;) <1> increased as it is the core of the oracle stuff <1> asking gently in #java on efnet may get you more info from ppl who have done the same <6> kinematix - I am a complete begineer with Java. I did write a few simple apps. Nothing at all fancy. But I was impressed with Java Beans. In fact very impressed. <1> and you are asking about servlet and or jsp containers (servers) <1> java beans are a flop, but the component idea is carried through to java server beans <1> bbiab, got to do mail before 6 <6> calchas - hmmmm ... I supposed I was impressed too easily.
<5> EJB3 spec is good <5> nothing compared to ejb2 <5> are we talking of entity beans? <6> Yes <5> if you're starting, learn from the new spec, I wouldn't develop anything based on ejb2, too invasive, too complicated, not efficient <6> I was very impressed by an initial foray using them. Granted it was a very simple project. <6> This is partly a result of dissatisfaction with ASP.NET. <6> I need a way to develope web enabled applications more easily. <6> I need to learn far more. <7> Hey, can I update a file? <5> opening a RandomAccess stream to it, getting the channel and manipilating its data to finally write it back ? <7> I have a file name that I call with PrintWriter to get a PrintWriter Object lets say pw. Then I open a Scanner object for the file. I try to store all the data into an array and copy it back <7> let me past some code <5> you need a reader and a writer <5> or a read-write channel <7> http://javafaq.mine.nu/lookup?20&wb=true <7> Ya <7> I have a writer(PrintWriter) and a reader(Scanner) <7> that is just the method <7> So what is going on, that I am not understanding <5> first I see you call sc.hasNext() until it returns false,, than you call sc.nextLine() without reseting it in any way <7> ok, I need two objects <5> dont count the line <5> oh well you count the line to initialize your array? <5> you could use an array list <5> dynamic memory allocation (Resizes the array automatically) <7> ya, or a collection <7> wait, I care about the order <7> but still. <7> any other problems besides needing two objects if I choice do it like that <5> you should simply do something line .. List lines = new ArrayList(); while( sc.hasNext() ) { lines.add( sc.nextLine() ); ... } <5> than you wouldn<t need 2 instances of the scanner <1> back\ <1> an ArrayList maintains order unless you delete and insert explicitly to and from the list <1> kinematix is giving you good advice, listen, think read before rejecting it <7> ok <7> I am adding it to have an array list now <7> Does just calling PrintWriter erase all content in the file anyway? <7> Cause that could be a problem if it did that <1> no <1> the FileWriter does that if you choose to <1> you can read the api docs to see the options in the construction of the FileWriter or other file level object <7> check this <7> http://javafaq.mine.nu/lookup?21&wb=true <7> Sure it is cute and everything, but still the same error <1> why (please phrase questions in english before thrusting code at ppl) <1> what error do you have? <7> Ok, I call this method many times, and all I get in the output file is the last line called, not all the lines. <7> So it is just putting in lines from the args, and ever updating the file, but erasing all the older data <1> ghow do you Know you successfully call the method, have you used debug statements to check ? <7> yes <7> I call the method, for sure, plus If I run the program I and check the output file, and then check it again, the data has changed <1> that code won't even compile <1> please make a test case <7> ok <1> do you create the file on every call <1> what is first ? <7> I guess so, since I have the create file in my method, and I call the method <7> What do you mean "what is first" <7> http://javafaq.mine.nu/lookup?22&wb=true <- now has the full method <7> but not a junit testcase or something, was that what you were talking about <1> you have a variable called first, what is it ? <1> test case is simple, compilable codse showing only the area of interest <1> that is just a method <1> what is first ? <7> o sorry, first = args[0] from main(String[] args) <1> a String <7> yep <1> not yep, oh sorry of course it is I should have said grrrrrr <1> I'm trying to help you here if you continue to makr this a puzzel I'll stop <7> ok, I am sorry <7> what is wrong? <7> first is a string
Return to
#java or Go to some related
logs:
#linux save your dignity my man #linux #chatzone #skype #c #linux YkYsYtO vlad suge cucu What 1963 Joseph L Mankiewicz film cost 28 million Dollars ?
|
|