comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* java static factory method vs. constructor - object reuse - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9c44eab569d8444
* Is it possible to alter Ant properties after they've been initialized? - 1 messages, 
1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b49e18141bedfe87
* JTable Column names - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61028e9a560138b1
* Java implementation of crypt() wanted! - 6 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d4b7c65f13df2a
* Beginner Advice Sought - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b96a0a430a102e22
* link between Applet en Javascript - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/32b00be5c1796d03
* How to set Http Request Header? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b191146c7bfc3a03
* Verify .java matches .class - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f0f3cde9fea4611c
* Help user in "Categorize" items. - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd114b8e4aa4a0fd
* Question about access and visibility - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47b97d0f661b9d8e
* Fast TIFF reading library - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62560e8e5fe54c9e
* writeObject and readObject problem - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a
* how can i simulate my pc as http server by writing java code to send the http 
response by socketstream to some pc in the internet?! - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d2d914791c738e87
* Problem with a simple CMP bean while working on JBoss - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c8fb2455973de436
* DefaultTableModel - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/174bf6b71c2dc266
* HttpsURLConnection problem:Server redirected too many times - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39620507d2d4fe6a
  
==========================================================================
TOPIC: java static factory method vs. constructor - object reuse
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9c44eab569d8444
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 1:27 am
From: [EMAIL PROTECTED] (javaguy44) 

Hi,

I'm just picked up Bloch's Effective Java and had a question about the
reuse of objects when using a static factory method.

Take the following:

class Foo
{
  private Foo() {}

  public static Foo getInstance() {
    return new Foo()
  }
}

How is an object of Foo being reused?  All I see is that every time
static getInstance is called, it returns a new Foo object.  What am I
not seeing?  Am I missing something underneath the hood that the JVM
is checking?

One more question - can only immutable class objects be reused?

Thanks,
Javaguy




==========================================================================
TOPIC: Is it possible to alter Ant properties after they've been initialized?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b49e18141bedfe87
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 4:32 am
From: baltrunas <[EMAIL PROTECTED]> 

I had simple problem: to write "buildAll" task which would use same 
build.xml with different properties.

In project there is defined <property name="series_code" value="Series30" />

   <target name="buildAll">
      <antcall target="build" inheritall="false">
           <param name="series_code" value="Series30"/>
       </antcall>
       <antcall target="build" inheritall="false">
           <param name="series_code" value="Series40"/>
       </antcall>
   </target>

I should mention that there must be set inheritall="false". In other way 
there will be used earlier defined property.

maybe this will be useful for someone.

--
Linas




==========================================================================
TOPIC: JTable Column names
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61028e9a560138b1
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 1:33 am
From: Paul Lutus <[EMAIL PROTECTED]> 

Babu Kalakrishnan wrote:

/ ...

> One caveat here :
> 
> The OP needs to also remember that "colNum" here would refer to the
> column number in the View - not the model. So if the user reorders the
> columns by dragging on the headers, you might end up assigning the
> header value to the wrong column if you aren't careful. (This can of
> course happen only if the above code is executed at some later phase
> after the table has been shown).
> 
> A more robust approach would be to modify the first line to :
> 
> TableColumn column =
> table.getColumnModel().getColumn(table.convertColumnIndexToView(colNum));
> 
> where "colNum" now refers to the model rather than the view.

Thank you, an excellent follow-up.

-- 
Paul Lutus
http://www.arachnoid.com





==========================================================================
TOPIC: Java implementation of crypt() wanted!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d4b7c65f13df2a
==========================================================================

== 1 of 6 ==
Date:   Tues,   Sep 21 2004 1:39 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Tue, 21 Sep 2004 10:42:56 +0200, Jacob wrote:

> Earlier I'd *first* go to c.l.j.p with a Java question and if not
> successful (unlikely) I'd Google (or AltaVista as it used to be
> called :-) for an answer. These days I would actually much rather
> use Google as some of the replies I get in this NG would spoil my
> day.

Excellent!  I can see my efforts are not being wasted then.
Thanks for the encouragement.

This a not a help-desk Jacob, it is a discussion form.
If you are not prepared to do your own research before
you post, expect to be ridiculed.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 2 of 6 ==
Date:   Tues,   Sep 21 2004 2:01 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Tue, 21 Sep 2004 00:35:39 -0700, Mark Marcus wrote:

> But guess what?  change it to "crypt java" and you get a bunch of
> irrelevant links.  

Which is why I did not post that search. (Like D'uuhh!)

>..You're a better guesser than I am.  Andrew's post
> didn't even suggest that--his post was "I searched for crypt and got
> 8000+ hits, now go find that needle."

Did you examine *any* of those 8,130 links?
For the slow, here is that search again..
<http://google.com/search?q=unix+crypt+java+%22source+code%22>

The *top* link is labelled "Java Implementations of Unix Crypt"
There are 4 Java implementations and one Javascipt(?!)
implementation on that page alone.

To put a long story short.  In situations like this
I go to google and try a few search strings, then I 
check that something useful to the OP appears on the 
*first* page before posting.

Further, I provided that information to the OP
(with the hint to use search engines for quick and
easy answers) less than ten minutes after they posted.

Various people have 'suggested' to me that "if you
can't be nice* just don't post, mmmkay?".  That is 
not going to happen, but if you want to hear me 'nice', 
post to c.l.j.help, that is where I am at my most 
understanding (and patient).  

* In their rather twisted version of 'nice', in any case.

Post to c.l.j.programmer once you are over that niceness
and want in-depth discussions on arcane aspects of Java 
design and coding, but do your own damn research first.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 6 ==
Date:   Tues,   Sep 21 2004 2:24 am
From: Jacob <[EMAIL PROTECTED]> 

Andrew Thompson wrote:

>>Earlier I'd *first* go to c.l.j.p with a Java question and if not
>>successful (unlikely) I'd Google (or AltaVista as it used to be
>>called :-) for an answer. These days I would actually much rather
>>use Google as some of the replies I get in this NG would spoil my
>>day.
> 
> 
> Excellent!  I can see my efforts are not being wasted then.
> Thanks for the encouragement.

Just be aware that you (and your fellows) might throw
the baby out with the bath water.




== 4 of 6 ==
Date:   Tues,   Sep 21 2004 1:19 am
From: "Chris Uppal" <[EMAIL PROTECTED]> 

Mark Marcus wrote:

> Bah!  I put in your search string exactly as you said.  The first 100
> hits are totally irrelevant.

Trying:

    java crypt algorithm

shows that the search is too broad, so refining it in the most obvious way:

    java unix crypt algorithm

turns up, as #1:

    Java Implementations of Unix Crypt
    This page contains links to Java implementations of Unix Crypt.
    www.dynamic.net.au/christos/crypt/

which looks promising.  Other possibilites also occur in the top ten.

Not difficult, I think.

    -- chris





== 5 of 6 ==
Date:   Tues,   Sep 21 2004 2:12 am
From: "Chris Uppal" <[EMAIL PROTECTED]> 

Mark Marcus wrote:

> Gawd! He said he got 8,130 hits!
> How in hell could that be construed as being helpful?!

The question, is "helpful to whom ?".  Leaving aside the point that the OP
would find it useful to learn to use Google, and similar resources,
effectively.  I don't think Andrew's focus is entirely on the value to the
poster; there is also the value to this community (and yes, there is a
community here, albeit somewhat enfeebled these days) of discouraging the
constant flow of petty noise.

Whether that "mission" is achievable (even partially), or whether Andrew or
anyone else has the right to undertake it, are different questions (to which I
think the answers are "probably not" and "yes" respectively -- ymmv).  But the
value to the OP is not the only, nor -- in this case -- the most important
question here.

Remember: this is /not a helpdesk/.   We are /not/ here specifically to help
(though we often do).

    -- chris






== 6 of 6 ==
Date:   Tues,   Sep 21 2004 2:29 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Tue, 21 Sep 2004 10:12:46 +0100, Chris Uppal wrote:
(snip)
> ...I don't think Andrew's focus is entirely on the value to the
> poster; there is also the value to this community 

Thank you Chris.  I have been waiting for someone in this 
conversation to mention that aspect of the equation.

(snip)
> Whether that "mission" is achievable (even partially), or whether Andrew or
> anyone else has the right to undertake it, are different questions (to which I
> think the answers are "probably not" and "yes" respectively -- ymmv). 

I do not see this as 'a war that can be won', I see it is
simply 'a necessary act of community mindedness that must
constantly be stressed, so that a group does not become 
inundated in dross'.  Mind you, 'a war that can be won',
is a lot catchier.   ;-)

[ And whether I have the right is irrelavent to me.  I make my 
rights by what I do.  Others can exercise *their* rights by
plonking me if they so wish. ]

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Beginner Advice Sought
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b96a0a430a102e22
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 2:02 am
From: TechBookReport <[EMAIL PROTECTED]> 

Joe Beck wrote:
> "TechBookReport" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>jbeck wrote:
>>
>>>Looking for recommendations as to the top two or three books to use to
> 
> begin
> 
>>>learning Java.
>>>
>>>Also, recommendations for compilers?
>>>
>>>
>>
>>For books take a look at:
>>
>>Objects First With BlueJ
>>Head First Java
>>Deitel and Deitel
>>
>>If you are already familiar with C++ or other object oriented language
>>then take a look at Bruce Eckel's Thinking In Java.
>>
>>All of these are reviewed here at TechBookReport --
>>http://www.techbookreport.com/JavaIndex.html
>>
>>And don't forget Sun's online tutorial - which is easily downloaded.
>>
>>Pan
> 
> 
> 
> Thanks for the recommendations!  Will look into them further.  I had looked
> around Suns site (as I stated to the other poster) and saw the online
> tutorial...but was after something that I didn't have to tie up the phone
> line to use (the one I saw didn't lend it'self to easy downloading for
> offline use).  Will hunt around on their site a bit more.
> 
> Again, I appreciate the help!
> 
> Joe
> 
> 

To download the tutorial: 
http://java.sun.com/docs/books/tutorial/information/download.html

Good luck

Pan
=====================================================
TechBookReport: http://www.techbookreport.com/JavaIndex.html




==========================================================================
TOPIC: link between Applet en Javascript
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/32b00be5c1796d03
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 21 2004 1:41 am
From: "Phildes" <[EMAIL PROTECTED]> 

Hello

In my applet, I would like to run a Javascript method.
How my applet could reconize the HTML page and the components of this page.

Thank you

Phildes





== 2 of 2 ==
Date:   Tues,   Sep 21 2004 2:15 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Tue, 21 Sep 2004 10:41:33 +0200, Phildes wrote:

> In my applet, I would like to run a Javascript method.
> How my applet could reconize the HTML page and the components of this page.

Try here for JS/Java interaction tips.
<http://www.rgagnon.com/howto.html>
Listed under 'JavaScript' | 'Interaction with Java'

HTH

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: How to set Http Request Header?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b191146c7bfc3a03
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 12:57 am
From: "Chris Uppal" <[EMAIL PROTECTED]> 

Mark Marcus wrote:

> Microsoft IE no longer accepts user:[EMAIL PROTECTED] formats anymore (as a
> default).  A user has to use REGEDIT to allow this format.  It's yet
> another example of how Microsoft doesn't know how to fix code, so they
> break standards.

While I'm no more impressed than anyone by MS's dismal record of security holes
badly patched with security hacks, you are being overly harsh here.  MS's
standards-breaking error was that they accepted the user:pw@ notation in the
first place, not that they later removed it.

If you check RFC2616, section 3.2.2 you'll find that it does /not/ allow the @
notation in an HTTP URL, specifically it gives the grammar as:

       http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

It references RFC2396 (which does mention the @ syntax, but that's a much more
general document than RFC2616) for the meaning of 'host', 'port' etc.  If it
were intended to allow the @ syntax, then it would use different terms from
RFC2396; and might read:

       http_URL = "http:" "//" server [ abs_path [ "?" query ]]

where (from 2396):

    server        = [ [ userinfo "@" ] hostport ]
    hostport      = host [ ":" port ]

Incidentally, even RFC2396 discourages the use of "userinfo" as a
<name>:<password> pair.  Quote:

    Some URL schemes use the format "user:password" in the userinfo
    field. This practice is NOT RECOMMENDED, because the passing of
    authentication information in clear text (such as URI) has proven to
    be a security risk in almost every case where it has been used.

    -- chris






==========================================================================
TOPIC: Verify .java matches .class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f0f3cde9fea4611c
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 2:19 am
From: [EMAIL PROTECTED] (David Davidson) 

The question though is how do you verify that the class file is the
same, it may have the same file size, but how do I know that the
internal logic is the same? I wondered if there is any kind of Java
byte code comparer, I've tried decompiling the class that I've
compiled and decompiling the class I'm comparing it to, but the
results of the decompilation don't seem consistent.




==========================================================================
TOPIC: Help user in "Categorize" items.
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd114b8e4aa4a0fd
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 2:30 am
From: [EMAIL PROTECTED] (Javauser) 

Hi there
I'm searching some java project (db and frontend) that has this
feature:
it can help user in categorizing the item he wants.

Ebays offers this process when a seller wants to sell something.
Ebay system display some high level categories like "book |car and
bycicle|audio video"..than ,if user select the first category, system
display a low level of categories like "books for children|yellow
book|noir"..... etc etc.
the system than goes lower with more specific categories.

i don't know if there's some project that manage a process like that.

any hints will be appreciated..

thanks in advance
Michele




==========================================================================
TOPIC: Question about access and visibility
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47b97d0f661b9d8e
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 21 2004 2:35 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Mark wrote:
> Class Alpha is an abstract base class with package level visibiltiy
> and a protected method:  protectedMethodAlpha
> 
> Class Gamma is a concrete class which inherits from Alpha and
> overrides (actually defines) the protected method.  It is contained
> within the same directory as Alpha
> 
> Class Delta is a concrete class which inherits from class Gamma and is
> in a different package and has public visibility.
> 
> Should class Delta be able to override protectedMethodAlpha?

Since it's a subclass of Alpha, why not?



== 2 of 2 ==
Date:   Tues,   Sep 21 2004 3:18 am
From: Jacob <[EMAIL PROTECTED]> 

Mark wrote:

> Class Alpha is an abstract base class with package level visibiltiy
> and a protected method:  protectedMethodAlpha
> 
> Class Gamma is a concrete class which inherits from Alpha and
> overrides (actually defines) the protected method.  It is contained
> within the same directory as Alpha
> 
> Class Delta is a concrete class which inherits from class Gamma and is
> in a different package and has public visibility.
> 
> Should class Delta be able to override protectedMethodAlpha?

Yes.

In the discussion, Alpha and Gammas relation to Alpha
is irrelevant. For Delta the interface of Gamma is the
only thing that matters.

Gamma must be public for Delta to extend it from outside
its package. Then Delta can override all of Gammas public
and protected members (including protectedMethodAlpha).






==========================================================================
TOPIC: Fast TIFF reading library
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/62560e8e5fe54c9e
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 2:44 am
From: "Niels Dybdahl" <[EMAIL PROTECTED]> 

Which TIFF reading library do you recommend ?
I need a fast library to read large TIFF files.

Thanks in advance
Niels Dybdahl






==========================================================================
TOPIC: writeObject and readObject problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 21 2004 2:47 am
From: "juicy" <[EMAIL PROTECTED]> 

i very blur with the use of writeObject and readObject, 

here's the client,
if (b.getLabel() == "write") {
try{
oos.writeObject((Object)event);}//event is button pressed event
oos.flush();
System.out.println("write event");
catch(Exception e){}

if(b.getLabel() == "Read"){
 Event get=(Event)iis.readObject();
iis.close();
System.out.println("read event");

and here's the server 

try{
 ois = new ObjectInputStream(socket.getInputStream());
 oos = new ObjectOutputStream(socket.getOutputStream());}

i try to send the button pressed event, the writeObject is ok but the
readObject is blocked. Is the event can't be sent like this? I am just
learning to do that. At server, i need do a function to forward the object
or not?




== 2 of 2 ==
Date:   Tues,   Sep 21 2004 3:36 am
From: Gordon Beaton <[EMAIL PROTECTED]> 

On Tue, 21 Sep 2004 05:47:27 -0400, juicy wrote:
> i try to send the button pressed event, the writeObject is ok but
> the readObject is blocked. Is the event can't be sent like this? I
> am just learning to do that.

readObject() will block until the server actually writes an object to
the stream for the client to read. Has it written an object?

> At server, i need do a function to forward the object or not?

You have created two *independent* object streams, one from the client
to the server, and one from the server to the client:

           client                      server
stream 1:  ObjectOutputStream   -->    ObjectInputStream
stream 2:  ObjectInputStream    <--    ObjectOutputStream

Stream 1 and stream 2 are not connected to each other! If the client
writes an object to the server, that object is *not* automatically
sent back to the client. Is that what you are trying to do?

When the client writes an object to his ObjectOutputStream, the server
can read it from his ObjectInputStream. If the server writes an object
to his ObjectOutputStream, the client can read it from his
ObjectInputStream.

Note: it is a good idea to always create the ObjectOutputStream before
the ObjectInputStream (you did not do this in your server).

/gordon

-- 
[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e




==========================================================================
TOPIC: how can i simulate my pc as http server by writing java code to send the http 
response by socketstream to some pc in the internet?!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d2d914791c738e87
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 2:52 am
From: [EMAIL PROTECTED] (mike) 

regards:

    I write java code to simulate my machine as a HTTP server,when client

    connect to my HTTP server,my HTTP server replied client a xhtml file.

    I use MS IE browser to test,MS IE test OK to read the xhtml file.

    But when I use nokia 6600 to browse the file,nokia 6600 cannot browse

    the xhtml file.why?.......Is something wrong with my idea?

 
    any constructive suggestion is welcome


thank you




==========================================================================
TOPIC: Problem with a simple CMP bean while working on JBoss
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c8fb2455973de436
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 3:22 am
From: [EMAIL PROTECTED] (Subra) 

Problem with a simple CMP bean while working on JBoss

CLIENT :   EmployeeSalInsertClient.java
CMP Jar: emp
------------------------------------------------
Database : MS SQL SERVER
Table Name is : emp
Column names:
eno  -  int
ename - varchar(30)
esal   -  float
 
It is a simple ejb.........
 able to insert the records into the database.............
 unable to find records..................
 
 The error is given below

 C:\javajava -classpath
 
.;D:\jboss-3.2.4\server\default\lib\jboss-j2ee.jar;D:\jboss-3.2.4\serv
 
er\default\lib\jbossall-client.jar;D:\jboss-3.2.4\server\default\lib\jnet.jar;
 EmployeeSalInsertClient
 Exception in thread "main" javax.ejb.FinderException: Unknown query: 
public
 abstract emp.Employee 
emp.EmployeeHome.findByPrimaryKey(java.lang.Integer)
 throws java.rmi.RemoteException,javax.ejb.FinderException
 at
 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.jav
 a:245)
  at
 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
  at
 org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown 
Source)
  at
 
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:
 135)
  at
 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96)
  at
 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
  at
 
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
  at
 org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
  at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
  at $Proxy0.findByPrimaryKey(Unknown Source)
  at
 EmployeeSalInsertClient.main(EmployeeSalInssimertClient.java:34)




==========================================================================
TOPIC: DefaultTableModel
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/174bf6b71c2dc266
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 3:24 am
From: Nigel Wade <[EMAIL PROTECTED]> 

Cyril Dex wrote:

> Hi all
> 
> I have a JTable which uses a customised DefaultTableModel called
> TableModel. TableModel extends DefaultTableModel.

Dubious naming since there is a TableModel already in javax.swing.table.

> 
> Now the ResultViewer.java class that I have is supposed to display the
> names of files and their properties in 3 columns. The ResultViewer is
> supposed to update after every 20 secs. The problem is that when an
> update occurs, an ArrayIndexOutOfBoundsException occurs. I think that
> the array references a null pointer in the vector when its updating.
> The update occurs by 1st clearing the existing table then updating it.
> I think when the update occrus here it references null. Its more of a
> logical error.
> 
> public void clearTable () {
>     for (int row = (table.getRowCount() -1) ; row >= 0; row--) {
>         ((DefaultTableModel) table.getModel()).removeRow(row);       
>       } 
>   }

It's something in the code you are not showing us. If you run this code for
a JTable with a DefaultTableModel it doesn't throw any Exceptions.

BTW, what's wrong with DefaultTableModel.setRowCount(0) ?

-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
            University of Leicester, Leicester, LE1 7RH, UK 
E-mail :    [EMAIL PROTECTED] 
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555




==========================================================================
TOPIC: HttpsURLConnection problem:Server redirected too many times
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39620507d2d4fe6a
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 21 2004 3:39 am
From: [EMAIL PROTECTED] (Lukasz) 

Dzien dobry

Mam nastepujacy kod w Javie, powinien on suzyc do polaczenie sie ze
strona action przez https i
przeslanie loginu i hasla, niestety po uruchomieniu dostaje komunikat 
java.net.ProtocolException: Server redirected too many times (20)
. Nie wiem dla czego sie tak dzieje, moze zrobilem cos zle. Czy zna
ktos moze przycznye wystapienia tego bledu
i wie jak go usunac ? Dzieki za wszelka pomoc




import java.net.*;
import java.io.*;
import javax.net.ssl.*;
import java.security.*;
import com.sun.net.ssl.HttpsURLConnection;


public class sklep {
        
 public static void main(String[] args){
                                
 int port=443;
 String host="i-serwis.action.pl";
                
 try{
                                        
        
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
        SSLSocketFactory factory=(SSLSocketFactory)SSLSocketFactory.getDefault();
                                                                                       
                          
        URL u = new URL("https://i-serwis.action.pl/login.php";);
        HttpsURLConnection https = (HttpsURLConnection)
u.openConnection();
        https.setSSLSocketFactory(factory);
        https.setRequestMethod("POST");
        https.setRequestProperty(
"Content-Type","application/x-www-form-urlencoded" );
        https.setDoOutput(true);
        https.setDoInput(true);
        OutputStreamWriter out =new OutputStreamWriter(new
BufferedOutputStream(https.getOutputStream()),"8859_2");
                
        String query =  "customerid="  + URLEncoder.encode("") + "&";
        query += "username=" + URLEncoder.encode("user")  + "&";
        query += "userpasswd="       + URLEncoder.encode("haslo");
        out.write(query, 0, query.length());
        out.flush();
        out.close();                                    

          https.disconnect();
 
                        
                                        }
                                    catch (IOException e){
                                                System.err.println("Blad:"+e);
                                        }
                        
                        }
                        
        }



=======================================================================

You received this message because you are subscribed to the
Google Groups "comp.lang.java.programmer".  

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to