Re: [tomcat 6.0.35]- propert loadin

2013-02-10 Thread vicky007aggarwal
Thanks Andre & Tim for your comments,so for this peculiar behavior  that means 
there is no reason that y it worked when placing the properties file in 
/bin

Thanks,


On Feb 11, 2013, at 2:57 AM, André Warnier  wrote:

> Tim Watts wrote:
>> On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
>>> Hi All,
>>>  My application need a "resource/properties" file to exist in the
>>> CLASSPATH, for this i placed my resource file in /bin
>>> folder & it was working fine.
>>> But since yesterday my application reporting the error that properties
>>> file doesnt exist in classpath/path
>>> In order to fix then i created the lib folder in my  &
>>> placed my "properties/resourc"e file over there, which eventually
>>> fixed my application CLASSPATH issue.
>>> But the thing which makes me wonder that how my application was able
>>> to access the properties file earlier when i placed it
>>> /bin  location
>>> & what makes it to stop now.
>>> Kindly suggest what all can be the scenarios/prossible use case for
>>> this,  TOmcat version - 6.0.35  Thanks
>> The only reasonable explanation is that you angered the Supreme Tomcat
>> God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
>> to suffer fools for long, she removed it and made you do penance by
>> putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
>> Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!
> But let this be a warning, as She does not always act so benignly when one 
> Jerry-rigs one's classpath.
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: unwanted tcp6 protocol in tribes listener socket;

2013-02-10 Thread Vince Stewart
much appreciation for your help on this Tim,

Actually you can learn so much more when things are not working because you
come up with all possible reasons why they don't work and research widely.
I started off totally naive about sockets, IPv4/6, and Ubuntu firewalls and
have experienced quite a learning curve. In the end the problem would have
been trivial to most but not to someone coming from my start point.

The problem was that my home machine (behind a dsl modem) did not have an
IP entered in the '/etc/hosts' file; the socket on the home machine needed
to announce itself as 192.168.1.x but instead was one of two machines
addressed by 127.0.1.1 meaning the dsl could not resolve the address and
initial 'hand shake' failed. The whole process of getting tribes to
communicate remote-peer-to-peer took almost a week which made it so
gratifying to finally get it running.

thanks again,

On Mon, Feb 4, 2013 at 6:40 PM, Tim Watts  wrote:

> On Mon, 2013-02-04 at 17:51 +1300, Vince Stewart wrote:
> > Hi Tim,
> > thanks so much for your reply
> > netstat -t -l  yields that includes:
> > Active Internet connections (only servers)
> > Proto Recv-Q  Send-QLocal Address   Foreign
> > Address State
> > tcp6   0  0  myComputerName:4000
> > [::]:*LISTEN
> > netstat -atn | grep -P ":4000\W"  yields (without any headings line)
> > tcp6   0  0  127.0.1.1:4000
> > :::*  LISTEN
> >
> > re But why would you want that limitation?
> > My first aim was to send a single message from home to my VPS or vice
> > versa. When I did not succeed I have been fishing for reasons and the
> first
> > thing that struck me was that Ubuntu was reporting tpc6 but NioReceiver
> > object "clusterReceiver" had a "bind" property of type Inet4Address and
> an
> > address of 2130706689 (127.0.0.1).
> >
> > Possibly though, this is a normal IPv6 connection and I should treat it
> > accordingly. I'll give that ago tomorrow morning and keep CATALINA_OPTS
> in
> > mind as well.
> >
>
> Yes, I believe this is normal.  Looks like your system is using
> "IPv4-mapped addresses" which allows interoperability between IPv4&6
> hosts without needing two IP stacks on the IPv6 host.
>
> > Many thanks for your help.
> >
> >
> >
> >
> > On Mon, Feb 4, 2013 at 4:06 PM, Tim Watts  wrote:
> >
> > > On Mon, 2013-02-04 at 14:39 +1300, Vince Stewart wrote:
> > > > Using Tomcat 7.0.35 embedded in Java standalone application. Java SE
> > > 1.7.0.
> > > > Ubuntu 12.04
> > > >
> > > > Hi All,
> > > >
> > > > I have an experimental class below. The aim is just to open a
> listening
> > > > port on port 4000 in the "localhost" address.
> > > > When this has run, the address for the listener is "127.0.0.1" in
> other
> > > > words an IPv4 address.
> > > > However the SocksSocketImpl object representing the real socket
> continues
> > > > to display the* useV4* property as *false*
> > > > and my Ubuntu system displays the listening socket as "tpc6".
> > > >
> > > Listening only for tcp6?  What does
> > > netstat -atn | grep -P ":4000\W"
> > > show?
> > >
> > > Perhaps what you want is to set the java.net.preferIPv4Stack system
> > > property in CATALINA_OPTS?  Description here:
> > >
> > >
> http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
> > >
> > > But why would you want that limitation?
> > >
> > >
> > > > I suspect there is some configuration issue somewhere and if anyone
> can
> > > > help with this, I would be most grateful.
> > > >
> > > > I have also noted that the java.nio.channels.spi.SelectorProvider
> cannot
> > > > return a Provider from loadProviderFromProperty() or
> > > loadProviderAsService()
> > > > so therefore issues *provider =
> > > > sun.nio.ch.DefaultSelectorProvider.create()*resulting in a
> > > > ServerSocketChannel that is of type
> > > > *sun.nio.ch.ServerSocketChannelImpl*
> > > > and a ServerSocket of type *sun.nio.ch.ServerSocketAdapter*. I'm not
> sure
> > > > that these are intended and may be I need a system property named
> > > > "java.nio.channels.spi.SelectorProvider" to ensure some other
> > > > SelectorProvider and therefore different ServerSocketChannel and
> > > > ServerSocket types.
> > > >
> > > > public class TribalAfiliations{
> > > >  Channel myChannel;
> > > >  private static class MyMemberListener implements
> MembershipListener{...}
> > > >  private static class MyMessageListener implements
> ChannelListener{...}
> > > >
> > > >  TribalAfiliations() throws SocketException{
> > > >  this.myChannel=new GroupChannel();
> > > >  ChannelListener msgListener = new
> TribalAfiliations.MyMessageListener();
> > > >  MembershipListener mbrListener = new
> > > TribalAfiliations.MyMemberListener();
> > > >  myChannel.addMembershipListener(mbrListener);
> > > >  myChannel.addChannelListener(msgListener);
> > > >try{
> > > >
> > > >
> > >
> myChannel.start(Channel.MBR_TX_SEQ|C

Re: [Seriously OT] Help in diagnosing server unresponsiveness

2013-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Terrence,

On 2/9/13 8:01 PM, Terence M. Bandoian wrote:
> On 2/6/2013 9:26 AM, Jeffrey Janner wrote:
>>> IMO, developer performance trumps runtime performance most of
>>> the time.
 So, if you can create a more maintainable system in less time
 by using EJB (or whatever), then you go ahead and do it:
 servers are cheap, while developer time is expensive.
 
 - -chris
>> Chris, I'd like to differ with you on this last point. As someone
>> who's been a developer, support person, and admin, I've got a
>> pretty good perspective on this subject. While servers may be
>> cheap, they will never be cheap enough to overcome poor
>> programming practices. I've worked with systems so poorly
>> designed that we couldn't purchase a system big enough to run the
>> software adequately, once you got above a handful of users. Yes, 
>> it's gotten to the point where systems are much cheaper than they
>> used to be, while developer salaries are only increasing
>> (supposedly), so wasting time on some minor performance
>> improvement may not be cost-effective. However, when you
>> aggregate the time that hundreds of users spend waiting on a
>> response from a poorly designed, unresponsive system, I think
>> you'll find that it trumps the cost of having the developer
>> spending a few extra minutes to "get it right the first time".
> 
> Generalized solutions, I think, include a substantial amount of
> code that isn't required for a given application.  The additional
> code affects performance but with the speed, availability and low
> cost of hardware, people seem to be opting for packaged solutions
> that don't require their programmers to understand the details of
> the implementation.  That seems short-sighted to me.
> 
> As an aside, I wonder if, at some point, the energy costs of
> inefficient code will come into play.  Don't wasted CPU cycles ==
> wasted energy?

There is always a balance between a number of criteria:

1. Cost to run (CPU time)
2. Cost to build (programmer time)
3. Performance
4. Maintainability

IMO, issues #2-#4 trump #1 every time: maintainability is the most
important aspect of software design. If using JPA means that you can
maintain your software more effectively, then it is totally worth the
extra cost of CPU time.

Anyone who has ever worked at an outfit where there is some legacy
code that you can't touch because nobody understands how it works
knows that this is the truth: there is unmaintainable code that
someone wrote in the past and then left/got fired/died/etc. and not
the only options are a) leave the code alone forever in fear that it
will break if you touch it or b) completely re-write the code. If you
have some cowboy who writes thousands of lines of impenetrable JDBC
code, you have a recipe for code rot. Use of Hibernate, JPA, etc. can
significantly alleviate that because - at least for non-abandoned
projects - there are many people always looking at the code, and they
are experts in that code.

The 3000€ per annum is nothing compared to the cost of re-writing all
that legacy code, even if you switch from (e.g.) straight JDBC to
(e.g.) Hibernate or JPA. If you have to pay a consultant to do that,
it's going to cost you an order or two of magnitude more than the cost
of hardware: you can run more hardware for the lifetime of the
software rather than make a big change like that across all your code.

That said, when (or if) you run into performance problems, then you
have to decide whether you need to ditch the framework (perhaps just
for a portion of your code). We ditched O-R mappers for different core
reasons, but maintainability was the primary one: they all required
too many hacks at the time to make it worth it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEYRcYACgkQ9CaO5/Lv0PBpVgCghvN48DZnEs8OUgl1aZJPWaJA
Jq4AniQEI++Gez6es5U+gxCAry+LaflY
=+UJg
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Cannot run Web Services on Tomcat 7 (7.0.34) due to JaxWS libraries

2013-02-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Enrique,

On 2/9/13 5:53 PM, Enrique Vignau wrote:
> We cannot run ws because of the jaxws libraries.

What ws library/API did you build against? What library are you using
for deployment?

> After several days trying different approaches we think the problem
> is we need to add the jaxws libraries and also add the listeners.

You probably need WS libraries if you are using WS: Tomcat does not
come with anything like that.

> We also discovered that the metro version might be affecting.

??!

> We tried adding the jaxws libraries but no results.

Which web service libraries did you try to add? Where did you add them?

> We tried creating on ws with axis2 with no luck also.

Okay. What did you try? Please be specific.

> We are now trying with tomee to automatically add the libraries,
> but we have not succeded. Any ideas or suggestions?

Again, you need to be more clear about both your requirements and what
you have already tried.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEYQk0ACgkQ9CaO5/Lv0PA7kQCghFKOP+fMEQmt+1qKJQjuQZsq
VlwAn3oCd078VVLiDsOZCuYtaJDQNiJJ
=87/p
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [tomcat 6.0.35]- propert loadin

2013-02-10 Thread André Warnier

Tim Watts wrote:

On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
 
Hi All,
 
 
My application need a "resource/properties" file to exist in the

CLASSPATH, for this i placed my resource file in /bin
folder & it was working fine.
 
But since yesterday my application reporting the error that properties

file doesnt exist in classpath/path
 
In order to fix then i created the lib folder in my  &

placed my "properties/resourc"e file over there, which eventually
fixed my application CLASSPATH issue.
 
But the thing which makes me wonder that how my application was able

to access the properties file earlier when i placed it
/bin  location
& what makes it to stop now.
 
Kindly suggest what all can be the scenarios/prossible use case for
this, 
 
TOmcat version - 6.0.35 
 
Thanks


The only reasonable explanation is that you angered the Supreme Tomcat
God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
to suffer fools for long, she removed it and made you do penance by
putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!

But let this be a warning, as She does not always act so benignly when one Jerry-rigs 
one's classpath.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [tomcat 6.0.35]- propert loadin

2013-02-10 Thread Tim Watts
On Sun, 2013-02-10 at 18:51 +0800, vicky wrote:
>  
> Hi All,
>  
>  
> My application need a "resource/properties" file to exist in the
> CLASSPATH, for this i placed my resource file in /bin
> folder & it was working fine.
>  
> But since yesterday my application reporting the error that properties
> file doesnt exist in classpath/path
>  
> In order to fix then i created the lib folder in my  &
> placed my "properties/resourc"e file over there, which eventually
> fixed my application CLASSPATH issue.
>  
> But the thing which makes me wonder that how my application was able
> to access the properties file earlier when i placed it
> /bin  location
> & what makes it to stop now.
>  
> Kindly suggest what all can be the scenarios/prossible use case for
> this, 
>  
> TOmcat version - 6.0.35 
>  
> Thanks

The only reasonable explanation is that you angered the Supreme Tomcat
God by putting your resource in {CATALINA_BASE}/bin.  Being indisposed
to suffer fools for long, she removed it and made you do penance by
putting it in a Sanctioned location such as {CATALINA_BASE}/lib.  Be
Glad O Sister!  The Tomcat God is Merciful and Smiles down upon you!




signature.asc
Description: This is a digitally signed message part


[tomcat 6.0.35]- propert loadin

2013-02-10 Thread vicky
 
Hi All,
 
 
My application need a "resource/properties" file to exist in the CLASSPATH, for 
this i placed my resource file in /bin folder & it was working 
fine.
 
But since yesterday my application reporting the error that properties file 
doesnt exist in classpath/path
 
In order to fix then i created the lib folder in my  & placed my 
"properties/resourc"e file over there, which eventually fixed my application 
CLASSPATH issue.
 
But the thing which makes me wonder that how my application was able to access 
the properties file earlier when i placed it /bin  location
& what makes it to stop now.
 
Kindly suggest what all can be the scenarios/prossible use case for this, 
 
TOmcat version - 6.0.35 
 
Thanks