Newbie Question

View: New views
11 Messages — Rating Filter:   Alert me  

Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I have searched the forum, but no one seems to be having this basic a problem.

I have installed jets3t 0.70 yesterday and need advice on where next to proceed.
I have a valid amazon s3 account, made a simple bucket and an object within it,
created a servlet to do basic testing with, and can't
seem to get past the AWSCredentials stage. That is, I use my access key and secret
receive no complaints on the

        AWSCredentials awsCredentials =
        new AWSCredentials(awsAccessKey, awsSecretKey);

statement, but when I try to get the bucket listing, I receive no errors. Nothing seems to happen.
The println statements seem to be ignored after the credential stage.

  S3Service s3Service = new RestS3Service(awsCredentials);
  S3Bucket[] buckets = s3Service.listAllBuckets();

  System.out.println("The buckets length is :" + buckets.length);
  String bucketName = buckets[0].getName();
  System.out.println("First bucket name is :" + bucketName);
  System.out.println("The buckets are " + buckets.toString());

It is within a try catch, where the exception I am trying to catch is S3ServiceException.
It doesn't throw any errors, just doesn't seem to proceed.
Any help as to what to look at or try next would be appreciated.

Thanks,
Doug


Re: Newbie Question

by James Murty-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Doug,

Is the code you included running within a servlet? If so, the System.out statements could end up in a log file or they could simply be thrown away, it depends very much on how the servlet container works.

I would recommend replacing the System.out.println methods with a command that will definitely write some output to a log file. The appropriate commands can vary depending on the servlet engine.

Also, initially it is probably worth removing the try/catch altogether so that any exceptions within the servlet's code cause an error page to be displayed. If you catch exceptions but your debug messages are not logged anywhere, it will be hard to tell if there is a problem in your code.

Hope this helps,
James

 
On Fri, Feb 6, 2009 at 5:00 AM, doughenderson <dhenderson@...> wrote:

Hello,

I have searched the forum, but no one seems to be having this basic a
problem.

I have installed jets3t 0.70 yesterday and need advice on where next to
proceed.
I have a valid amazon s3 account, made a simple bucket and an object within
it,
created a servlet to do basic testing with, and can't
seem to get past the AWSCredentials stage. That is, I use my access key and
secret
receive no complaints on the

       AWSCredentials awsCredentials =
       new AWSCredentials(awsAccessKey, awsSecretKey);

statement, but when I try to get the bucket listing, I receive no errors.
Nothing seems to happen.
The println statements seem to be ignored after the credential stage.

 S3Service s3Service = new RestS3Service(awsCredentials);
 S3Bucket[] buckets = s3Service.listAllBuckets();

 System.out.println("The buckets length is :" + buckets.length);
 String bucketName = buckets[0].getName();
 System.out.println("First bucket name is :" + bucketName);
 System.out.println("The buckets are " + buckets.toString());

It is within a try catch, where the exception I am trying to catch is
S3ServiceException.
It doesn't throw any errors, just doesn't seem to proceed.
Any help as to what to look at or try next would be appreciated.

Thanks,
Doug


--
View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello James,

Thanks for the quick response.
I work in an ATG environment website
and I was working from within a servlet
in a JSP page. This way I could just
refresh the JSP page and it would do the
appropriate calls for testing S3 fun, etc.

Since I was camping out in the logfiles
the System.out.println statements
were going there. The first puzzler was
that the first three println results:

Made it to the service routine
Made it past the credentials!
Made it past the RestS3Service request!

showed progress (yeah!).
Then it ended silently with no
println's past the attempt to
get a bucket object.
That is, the  lines

        S3Bucket[] myBuckets = s3Service.listAllBuckets();
        System.out.println("Made it past the bucket request!");

didn't give me a println. I would have assumed
if things were happy in the environment println's would
continue, and if not happy, no println's at all until I figured
out what I was doing wrong. But to do three and then
stop with no errors registering anywhere is stumping me.
If I don't trap with the catch

                                } catch (S3ServiceException e) {
                                        System.out.println("Caught S3 service exception!");
                                }


my system bombs on the compile, telling me about
the unhandled S3ServiceException. That's why I did
the try catch.

I am about ready to get down and dirty and start
looking at the conversation with tcpdump to see
what's happening, but that is, well, down and dirty.
Higher level preferred.

Thanks for responding,

Doug







James Murty-2 wrote:
Hi Doug,

Is the code you included running within a servlet? If so, the System.out
statements could end up in a log file or they could simply be thrown away,
it depends very much on how the servlet container works.

I would recommend replacing the System.out.println methods with a command
that will definitely write some output to a log file. The appropriate
commands can vary depending on the servlet engine.

Also, initially it is probably worth removing the try/catch altogether so
that any exceptions within the servlet's code cause an error page to be
displayed. If you catch exceptions but your debug messages are not logged
anywhere, it will be hard to tell if there is a problem in your code.

Hope this helps,
James


On Fri, Feb 6, 2009 at 5:00 AM, doughenderson <dhenderson@extensis.com>wrote:

>
> Hello,
>
> I have searched the forum, but no one seems to be having this basic a
> problem.
>
> I have installed jets3t 0.70 yesterday and need advice on where next to
> proceed.
> I have a valid amazon s3 account, made a simple bucket and an object within
> it,
> created a servlet to do basic testing with, and can't
> seem to get past the AWSCredentials stage. That is, I use my access key and
> secret
> receive no complaints on the
>
>        AWSCredentials awsCredentials =
>        new AWSCredentials(awsAccessKey, awsSecretKey);
>
> statement, but when I try to get the bucket listing, I receive no errors.
> Nothing seems to happen.
> The println statements seem to be ignored after the credential stage.
>
>  S3Service s3Service = new RestS3Service(awsCredentials);
>  S3Bucket[] buckets = s3Service.listAllBuckets();
>
>  System.out.println("The buckets length is :" + buckets.length);
>  String bucketName = buckets[0].getName();
>  System.out.println("First bucket name is :" + bucketName);
>  System.out.println("The buckets are " + buckets.toString());
>
> It is within a try catch, where the exception I am trying to catch is
> S3ServiceException.
> It doesn't throw any errors, just doesn't seem to proceed.
> Any help as to what to look at or try next would be appreciated.
>
> Thanks,
> Doug
>
>
> --
> View this message in context:
> http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
> Sent from the JetS3t Development mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
> For additional commands, e-mail: dev-help@jets3t.dev.java.net
>
>

Re: Newbie Question

by James Murty-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm, that is odd.

As a next step, you should look into the logging settings available  
for JetS3t. The library comes with a log4j.properties file which is a  
good starting point, you can tweak this to log low-level HTTP events  
and data without needing to resort to tcpdump.



On 06/02/2009, at 10:43 AM, doughenderson <dhenderson@...>  
wrote:

>
> Hello James,
>
> Thanks for the quick response.
> I work in an ATG environment website
> and I was working from within a servlet
> in a JSP page. This way I could just
> refresh the JSP page and it would do the
> appropriate calls for testing S3 fun, etc.
>
> Since I was camping out in the logfiles
> the System.out.println statements
> were going there. The first puzzler was
> that the first three println results:
>
> Made it to the service routine
> Made it past the credentials!
> Made it past the RestS3Service request!
>
> showed progress (yeah!).
> Then it ended silently with no
> println's past the attempt to
> get a bucket object.
> That is, the  lines
>
>        S3Bucket[] myBuckets = s3Service.listAllBuckets();
>        System.out.println("Made it past the bucket request!");
>
> didn't give me a println. I would have assumed
> if things were happy in the environment println's would
> continue, and if not happy, no println's at all until I figured
> out what I was doing wrong. But to do three and then
> stop with no errors registering anywhere is stumping me.
> If I don't trap with the catch
>
>                                } catch (S3ServiceException e) {
>                                        System.out.println("Caught S3
> service exception!");
>                                }
>
>
> my system bombs on the compile, telling me about
> the unhandled S3ServiceException. That's why I did
> the try catch.
>
> I am about ready to get down and dirty and start
> looking at the conversation with tcpdump to see
> what's happening, but that is, well, down and dirty.
> Higher level preferred.
>
> Thanks for responding,
>
> Doug
>
>
>
>
>
>
>
>
> James Murty-2 wrote:
>>
>> Hi Doug,
>>
>> Is the code you included running within a servlet? If so, the  
>> System.out
>> statements could end up in a log file or they could simply be  
>> thrown away,
>> it depends very much on how the servlet container works.
>>
>> I would recommend replacing the System.out.println methods with a  
>> command
>> that will definitely write some output to a log file. The appropriate
>> commands can vary depending on the servlet engine.
>>
>> Also, initially it is probably worth removing the try/catch  
>> altogether so
>> that any exceptions within the servlet's code cause an error page  
>> to be
>> displayed. If you catch exceptions but your debug messages are not  
>> logged
>> anywhere, it will be hard to tell if there is a problem in your code.
>>
>> Hope this helps,
>> James
>>
>>
>> On Fri, Feb 6, 2009 at 5:00 AM, doughenderson
>> <dhenderson@...>wrote:
>>
>>>
>>> Hello,
>>>
>>> I have searched the forum, but no one seems to be having this  
>>> basic a
>>> problem.
>>>
>>> I have installed jets3t 0.70 yesterday and need advice on where  
>>> next to
>>> proceed.
>>> I have a valid amazon s3 account, made a simple bucket and an object
>>> within
>>> it,
>>> created a servlet to do basic testing with, and can't
>>> seem to get past the AWSCredentials stage. That is, I use my  
>>> access key
>>> and
>>> secret
>>> receive no complaints on the
>>>
>>>       AWSCredentials awsCredentials =
>>>       new AWSCredentials(awsAccessKey, awsSecretKey);
>>>
>>> statement, but when I try to get the bucket listing, I receive no  
>>> errors.
>>> Nothing seems to happen.
>>> The println statements seem to be ignored after the credential  
>>> stage.
>>>
>>> S3Service s3Service = new RestS3Service(awsCredentials);
>>> S3Bucket[] buckets = s3Service.listAllBuckets();
>>>
>>> System.out.println("The buckets length is :" + buckets.length);
>>> String bucketName = buckets[0].getName();
>>> System.out.println("First bucket name is :" + bucketName);
>>> System.out.println("The buckets are " + buckets.toString());
>>>
>>> It is within a try catch, where the exception I am trying to catch  
>>> is
>>> S3ServiceException.
>>> It doesn't throw any errors, just doesn't seem to proceed.
>>> Any help as to what to look at or try next would be appreciated.
>>>
>>> Thanks,
>>> Doug
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
>>> Sent from the JetS3t Development mailing list archive at Nabble.com.
>>>
>>>
>>> ---
>>> ------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@...
>>> For additional commands, e-mail: dev-help@...
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21863785.html
> Sent from the JetS3t Development mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Parent Message unknown Re: Newbie Question

by Jonathan Cobb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2 things to do -

1 catch throwable and log it - maybe you're getting a runtime exception or error

2 killall -QUIT java (or whatever procnmame atg uses) this will print a full thread stack trace to stderr (not stdout)


On Feb 5, 2009, at 5:05 PM, James Murty <james@...> wrote:

Hmm, that is odd.

As a next step, you should look into the logging settings available for JetS3t. The library comes with a log4j.properties file which is a good starting point, you can tweak this to log low-level HTTP events and data without needing to resort to tcpdump.



On 06/02/2009, at 10:43 AM, doughenderson <dhenderson@...> wrote:


Hello James,

Thanks for the quick response.
I work in an ATG environment website
and I was working from within a servlet
in a JSP page. This way I could just
refresh the JSP page and it would do the
appropriate calls for testing S3 fun, etc.

Since I was camping out in the logfiles
the System.out.println statements
were going there. The first puzzler was
that the first three println results:

Made it to the service routine
Made it past the credentials!
Made it past the RestS3Service request!

showed progress (yeah!).
Then it ended silently with no
println's past the attempt to
get a bucket object.
That is, the  lines

      S3Bucket[] myBuckets = s3Service.listAllBuckets();
      System.out.println("Made it past the bucket request!");

didn't give me a println. I would have assumed
if things were happy in the environment println's would
continue, and if not happy, no println's at all until I figured
out what I was doing wrong. But to do three and then
stop with no errors registering anywhere is stumping me.
If I don't trap with the catch

                              } catch (S3ServiceException e) {
                                      System.out.println("Caught S3
service exception!");
                              }


my system bombs on the compile, telling me about
the unhandled S3ServiceException. That's why I did
the try catch.

I am about ready to get down and dirty and start
looking at the conversation with tcpdump to see
what's happening, but that is, well, down and dirty.
Higher level preferred.

Thanks for responding,

Doug








James Murty-2 wrote:

Hi Doug,

Is the code you included running within a servlet? If so, the System.out
statements could end up in a log file or they could simply be thrown away,
it depends very much on how the servlet container works.

I would recommend replacing the System.out.println methods with a command
that will definitely write some output to a log file. The appropriate
commands can vary depending on the servlet engine.

Also, initially it is probably worth removing the try/catch altogether so
that any exceptions within the servlet's code cause an error page to be
displayed. If you catch exceptions but your debug messages are not logged
anywhere, it will be hard to tell if there is a problem in your code.

Hope this helps,
James


On Fri, Feb 6, 2009 at 5:00 AM, doughenderson
<dhenderson@...>wrote:


Hello,

I have searched the forum, but no one seems to be having this basic a
problem.

I have installed jets3t 0.70 yesterday and need advice on where next to
proceed.
I have a valid amazon s3 account, made a simple bucket and an object
within
it,
created a servlet to do basic testing with, and can't
seem to get past the AWSCredentials stage. That is, I use my access key
and
secret
receive no complaints on the

     AWSCredentials awsCredentials =
     new AWSCredentials(awsAccessKey, awsSecretKey);

statement, but when I try to get the bucket listing, I receive no errors.
Nothing seems to happen.
The println statements seem to be ignored after the credential stage.

S3Service s3Service = new RestS3Service(awsCredentials);
S3Bucket[] buckets = s3Service.listAllBuckets();

System.out.println("The buckets length is :" + buckets.length);
String bucketName = buckets[0].getName();
System.out.println("First bucket name is :" + bucketName);
System.out.println("The buckets are " + buckets.toString());

It is within a try catch, where the exception I am trying to catch is
S3ServiceException.
It doesn't throw any errors, just doesn't seem to proceed.
Any help as to what to look at or try next would be appreciated.

Thanks,
Doug


--
View this message in context:
http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...





--
View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21863785.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...




     


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jonathan,

Thanks for the suggestions. I will give them
a try. I loathe pulling out the packet sniffer
when a log file has the answers.

Doug

Jonathan Cobb wrote:
2 things to do -

1 catch throwable and log it - maybe you're getting a runtime exception or error

2 killall -QUIT java (or whatever procnmame atg uses) this will print a full thread stack trace to stderr (not stdout)


On Feb 5, 2009, at 5:05 PM, James Murty <james@misterm.org> wrote:

Hmm, that is odd.

As a next step, you should look into the logging settings available for JetS3t. The library comes with a log4j.properties file which is a good starting point, you can tweak this to log low-level HTTP events and data without needing to resort to tcpdump.



On 06/02/2009, at 10:43 AM, doughenderson <dhenderson@extensis.com> wrote:


Hello James,

Thanks for the quick response.
I work in an ATG environment website
and I was working from within a servlet
in a JSP page. This way I could just
refresh the JSP page and it would do the
appropriate calls for testing S3 fun, etc.

Since I was camping out in the logfiles
the System.out.println statements
were going there. The first puzzler was
that the first three println results:

Made it to the service routine
Made it past the credentials!
Made it past the RestS3Service request!

showed progress (yeah!).
Then it ended silently with no
println's past the attempt to
get a bucket object.
That is, the  lines

      S3Bucket[] myBuckets = s3Service.listAllBuckets();
      System.out.println("Made it past the bucket request!");

didn't give me a println. I would have assumed
if things were happy in the environment println's would
continue, and if not happy, no println's at all until I figured
out what I was doing wrong. But to do three and then
stop with no errors registering anywhere is stumping me.
If I don't trap with the catch

                              } catch (S3ServiceException e) {
                                      System.out.println("Caught S3
service exception!");
                              }


my system bombs on the compile, telling me about
the unhandled S3ServiceException. That's why I did
the try catch.

I am about ready to get down and dirty and start
looking at the conversation with tcpdump to see
what's happening, but that is, well, down and dirty.
Higher level preferred.

Thanks for responding,

Doug








James Murty-2 wrote:

Hi Doug,

Is the code you included running within a servlet? If so, the System.out
statements could end up in a log file or they could simply be thrown away,
it depends very much on how the servlet container works.

I would recommend replacing the System.out.println methods with a command
that will definitely write some output to a log file. The appropriate
commands can vary depending on the servlet engine.

Also, initially it is probably worth removing the try/catch altogether so
that any exceptions within the servlet's code cause an error page to be
displayed. If you catch exceptions but your debug messages are not logged
anywhere, it will be hard to tell if there is a problem in your code.

Hope this helps,
James


On Fri, Feb 6, 2009 at 5:00 AM, doughenderson
<dhenderson@extensis.com>wrote:


Hello,

I have searched the forum, but no one seems to be having this basic a
problem.

I have installed jets3t 0.70 yesterday and need advice on where next to
proceed.
I have a valid amazon s3 account, made a simple bucket and an object
within
it,
created a servlet to do basic testing with, and can't
seem to get past the AWSCredentials stage. That is, I use my access key
and
secret
receive no complaints on the

     AWSCredentials awsCredentials =
     new AWSCredentials(awsAccessKey, awsSecretKey);

statement, but when I try to get the bucket listing, I receive no errors.
Nothing seems to happen.
The println statements seem to be ignored after the credential stage.

S3Service s3Service = new RestS3Service(awsCredentials);
S3Bucket[] buckets = s3Service.listAllBuckets();

System.out.println("The buckets length is :" + buckets.length);
String bucketName = buckets[0].getName();
System.out.println("First bucket name is :" + bucketName);
System.out.println("The buckets are " + buckets.toString());

It is within a try catch, where the exception I am trying to catch is
S3ServiceException.
It doesn't throw any errors, just doesn't seem to proceed.
Any help as to what to look at or try next would be appreciated.

Thanks,
Doug


--
View this message in context:
http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net





--
View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21863785.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net




     


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net

Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks James,

I will try the logging properties
suggestions. It seems the ATG
system also uses log4j; perhaps
they are interfering with each
other. I appreciate your help.

Doug

James Murty-3 wrote:
Hmm, that is odd.

As a next step, you should look into the logging settings available  
for JetS3t. The library comes with a log4j.properties file which is a  
good starting point, you can tweak this to log low-level HTTP events  
and data without needing to resort to tcpdump.



On 06/02/2009, at 10:43 AM, doughenderson <dhenderson@extensis.com>  
wrote:

>
> Hello James,
>
> Thanks for the quick response.
> I work in an ATG environment website
> and I was working from within a servlet
> in a JSP page. This way I could just
> refresh the JSP page and it would do the
> appropriate calls for testing S3 fun, etc.
>
> Since I was camping out in the logfiles
> the System.out.println statements
> were going there. The first puzzler was
> that the first three println results:
>
> Made it to the service routine
> Made it past the credentials!
> Made it past the RestS3Service request!
>
> showed progress (yeah!).
> Then it ended silently with no
> println's past the attempt to
> get a bucket object.
> That is, the  lines
>
>        S3Bucket[] myBuckets = s3Service.listAllBuckets();
>        System.out.println("Made it past the bucket request!");
>
> didn't give me a println. I would have assumed
> if things were happy in the environment println's would
> continue, and if not happy, no println's at all until I figured
> out what I was doing wrong. But to do three and then
> stop with no errors registering anywhere is stumping me.
> If I don't trap with the catch
>
>                                } catch (S3ServiceException e) {
>                                        System.out.println("Caught S3
> service exception!");
>                                }
>
>
> my system bombs on the compile, telling me about
> the unhandled S3ServiceException. That's why I did
> the try catch.
>
> I am about ready to get down and dirty and start
> looking at the conversation with tcpdump to see
> what's happening, but that is, well, down and dirty.
> Higher level preferred.
>
> Thanks for responding,
>
> Doug
>
>
>
>
>
>
>
>
> James Murty-2 wrote:
>>
>> Hi Doug,
>>
>> Is the code you included running within a servlet? If so, the  
>> System.out
>> statements could end up in a log file or they could simply be  
>> thrown away,
>> it depends very much on how the servlet container works.
>>
>> I would recommend replacing the System.out.println methods with a  
>> command
>> that will definitely write some output to a log file. The appropriate
>> commands can vary depending on the servlet engine.
>>
>> Also, initially it is probably worth removing the try/catch  
>> altogether so
>> that any exceptions within the servlet's code cause an error page  
>> to be
>> displayed. If you catch exceptions but your debug messages are not  
>> logged
>> anywhere, it will be hard to tell if there is a problem in your code.
>>
>> Hope this helps,
>> James
>>
>>
>> On Fri, Feb 6, 2009 at 5:00 AM, doughenderson
>> <dhenderson@extensis.com>wrote:
>>
>>>
>>> Hello,
>>>
>>> I have searched the forum, but no one seems to be having this  
>>> basic a
>>> problem.
>>>
>>> I have installed jets3t 0.70 yesterday and need advice on where  
>>> next to
>>> proceed.
>>> I have a valid amazon s3 account, made a simple bucket and an object
>>> within
>>> it,
>>> created a servlet to do basic testing with, and can't
>>> seem to get past the AWSCredentials stage. That is, I use my  
>>> access key
>>> and
>>> secret
>>> receive no complaints on the
>>>
>>>       AWSCredentials awsCredentials =
>>>       new AWSCredentials(awsAccessKey, awsSecretKey);
>>>
>>> statement, but when I try to get the bucket listing, I receive no  
>>> errors.
>>> Nothing seems to happen.
>>> The println statements seem to be ignored after the credential  
>>> stage.
>>>
>>> S3Service s3Service = new RestS3Service(awsCredentials);
>>> S3Bucket[] buckets = s3Service.listAllBuckets();
>>>
>>> System.out.println("The buckets length is :" + buckets.length);
>>> String bucketName = buckets[0].getName();
>>> System.out.println("First bucket name is :" + bucketName);
>>> System.out.println("The buckets are " + buckets.toString());
>>>
>>> It is within a try catch, where the exception I am trying to catch  
>>> is
>>> S3ServiceException.
>>> It doesn't throw any errors, just doesn't seem to proceed.
>>> Any help as to what to look at or try next would be appreciated.
>>>
>>> Thanks,
>>> Doug
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
>>> Sent from the JetS3t Development mailing list archive at Nabble.com.
>>>
>>>
>>> ---
>>> ------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
>>> For additional commands, e-mail: dev-help@jets3t.dev.java.net
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21863785.html
> Sent from the JetS3t Development mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
> For additional commands, e-mail: dev-help@jets3t.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net

Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jonathan,

I turned both the logging up (per James suggestion) and your
catch the throwable suggestion. Both seems to help isolate the
trouble. I get the message:

Caught throwable here :java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException

so apparently although I have included the jar for
commons-codec-1.3.jar
the definition for the DecoderException must live elsewhere.
The hunt continues. Thanks for the throwable trick, it will
serve me into the future debugging.

Doug

Jonathan Cobb wrote:
2 things to do -

1 catch throwable and log it - maybe you're getting a runtime exception or error

2 killall -QUIT java (or whatever procnmame atg uses) this will print a full thread stack trace to stderr (not stdout)


On Feb 5, 2009, at 5:05 PM, James Murty <james@misterm.org> wrote:

Hmm, that is odd.

As a next step, you should look into the logging settings available for JetS3t. The library comes with a log4j.properties file which is a good starting point, you can tweak this to log low-level HTTP events and data without needing to resort to tcpdump.



On 06/02/2009, at 10:43 AM, doughenderson <dhenderson@extensis.com> wrote:


Hello James,

Thanks for the quick response.
I work in an ATG environment website
and I was working from within a servlet
in a JSP page. This way I could just
refresh the JSP page and it would do the
appropriate calls for testing S3 fun, etc.

Since I was camping out in the logfiles
the System.out.println statements
were going there. The first puzzler was
that the first three println results:

Made it to the service routine
Made it past the credentials!
Made it past the RestS3Service request!

showed progress (yeah!).
Then it ended silently with no
println's past the attempt to
get a bucket object.
That is, the  lines

      S3Bucket[] myBuckets = s3Service.listAllBuckets();
      System.out.println("Made it past the bucket request!");

didn't give me a println. I would have assumed
if things were happy in the environment println's would
continue, and if not happy, no println's at all until I figured
out what I was doing wrong. But to do three and then
stop with no errors registering anywhere is stumping me.
If I don't trap with the catch

                              } catch (S3ServiceException e) {
                                      System.out.println("Caught S3
service exception!");
                              }


my system bombs on the compile, telling me about
the unhandled S3ServiceException. That's why I did
the try catch.

I am about ready to get down and dirty and start
looking at the conversation with tcpdump to see
what's happening, but that is, well, down and dirty.
Higher level preferred.

Thanks for responding,

Doug








James Murty-2 wrote:

Hi Doug,

Is the code you included running within a servlet? If so, the System.out
statements could end up in a log file or they could simply be thrown away,
it depends very much on how the servlet container works.

I would recommend replacing the System.out.println methods with a command
that will definitely write some output to a log file. The appropriate
commands can vary depending on the servlet engine.

Also, initially it is probably worth removing the try/catch altogether so
that any exceptions within the servlet's code cause an error page to be
displayed. If you catch exceptions but your debug messages are not logged
anywhere, it will be hard to tell if there is a problem in your code.

Hope this helps,
James


On Fri, Feb 6, 2009 at 5:00 AM, doughenderson
<dhenderson@extensis.com>wrote:


Hello,

I have searched the forum, but no one seems to be having this basic a
problem.

I have installed jets3t 0.70 yesterday and need advice on where next to
proceed.
I have a valid amazon s3 account, made a simple bucket and an object
within
it,
created a servlet to do basic testing with, and can't
seem to get past the AWSCredentials stage. That is, I use my access key
and
secret
receive no complaints on the

     AWSCredentials awsCredentials =
     new AWSCredentials(awsAccessKey, awsSecretKey);

statement, but when I try to get the bucket listing, I receive no errors.
Nothing seems to happen.
The println statements seem to be ignored after the credential stage.

S3Service s3Service = new RestS3Service(awsCredentials);
S3Bucket[] buckets = s3Service.listAllBuckets();

System.out.println("The buckets length is :" + buckets.length);
String bucketName = buckets[0].getName();
System.out.println("First bucket name is :" + bucketName);
System.out.println("The buckets are " + buckets.toString());

It is within a try catch, where the exception I am trying to catch is
S3ServiceException.
It doesn't throw any errors, just doesn't seem to proceed.
Any help as to what to look at or try next would be appreciated.

Thanks,
Doug


--
View this message in context:
http://www.nabble.com/Newbie-Question-tp21857482p21857482.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net





--
View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21863785.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net




     


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@jets3t.dev.java.net
For additional commands, e-mail: dev-help@jets3t.dev.java.net

Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Things have progressed since my missing codec jar was accounted for.
I seem to be at the place where I am asking for bucket lists and now I am
being stopped by some certificate trouble.

From my end, I looked up the Amazon s3 certs which seem to be from
Verisign:

Verisign Class 3 Secure Server CA
Verisign Class 3 Public Primary Certification Authority - G3

I have added these to my keystore and restarted the server but the error is
puzzling me:

Feb 6, 2009 12:01:15 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLHandshakeException) caught when processing request: sun.security.validator.ValidatorException: No trusted certificate found

Perhaps it is still a configuration issue on my part, but I am not quite sure  where to look next
for this interesting bit. Any help pointing to where I might try next would be appreciated.

Doug



Re: Newbie Question

by James Murty-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It sounds like the Verisign certificates aren't installed in the keystore your server is using. The server's keystore may be different from the default Java keystore.

You can work-around the SSL issue by configuring JetS3t to use the HTTP protocol instead of HTTPS: the documentation for the jets3t.properties file outlines how to do this.

James


On Sat, Feb 7, 2009 at 7:21 AM, doughenderson <dhenderson@...> wrote:

Things have progressed since my missing codec jar was accounted for.
I seem to be at the place where I am asking for bucket lists and now I am
being stopped by some certificate trouble.

From my end, I looked up the Amazon s3 certs which seem to be from
Verisign:

Verisign Class 3 Secure Server CA
Verisign Class 3 Public Primary Certification Authority - G3

I have added these to my keystore and restarted the server but the error is
puzzling me:

Feb 6, 2009 12:01:15 PM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: I/O exception (javax.net.ssl.SSLHandshakeException) caught when
processing request: sun.security.validator.ValidatorException: No trusted
certificate found

Perhaps it is still a configuration issue on my part, but I am not quite
sure  where to look next
for this interesting bit. Any help pointing to where I might try next would
be appreciated.

Doug



--
View this message in context: http://www.nabble.com/Newbie-Question-tp21857482p21879966.html
Sent from the JetS3t Development mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



Re: Newbie Question

by doughenderson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

James,

Ah, of course. I have handed the https to Apache to work with, not ATG.
I did what you suggested, it worked! Then I changed the configuration to
work with Serverina and a secure override of Apache. Also worked!
The issue I have to fix is how Apache is working with secure certs and
once I get that fixed, I will be ready to start some development.
I do appreciate your help on this. Although not an expert, I can summarize
how to use S3 with ATG droplets or servlets now.

Doug