You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Davis <dr...@gmail.com> on 2016/08/16 18:44:22 UTC

Set up postgresql on tomcat7

Hello,
Im working on getting java servlets to run on my instance of Ububtu with
tomcat7.

I write my applications in Eclipse.. when i run my apps localhost i see
everything just fine.

When i export my WAR files i check the includ source files.

I deploy the WAR file through tomcat manager.

I can see the java classes which i use to insert records into my postgresql
database. However,  there is nothing happening.  When i attempt  to run
them, no joy.

I have the postgresql .jar file installed on my headless ubuntu server ,
but no luck.

Aside from the .jar file is there anything else i need to configure?

Any advice is welcome

Andy

Re: Set up postgresql on tomcat7

Posted by "Jason D. Burkert" <ja...@craytek.com>.
On 2016-08-16 2:44 PM, Andrew Davis wrote:
> Hello,
> Im working on getting java servlets to run on my instance of Ububtu with
> tomcat7.
>
> I write my applications in Eclipse.. when i run my apps localhost i see
> everything just fine.
>
> When i export my WAR files i check the includ source files.
>
> I deploy the WAR file through tomcat manager.
>
> I can see the java classes which i use to insert records into my postgresql
> database. However,  there is nothing happening.  When i attempt  to run
> them, no joy.
>
> I have the postgresql .jar file installed on my headless ubuntu server ,
> but no luck.
>
> Aside from the .jar file is there anything else i need to configure?
>
> Any advice is welcome
>
> Andy
>

Andy,

Have you defined a JDBC data source for your connection to postgres?

This may be helpful:
https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html#JDBC_Data_Sources

-Jason

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


Re: Set up postgresql on tomcat7

Posted by "Jason D. Burkert" <ja...@craytek.com>.
On 2016-08-17 5:32 AM, Andrew Davis wrote:
> Thanks.
>
> I can now deploy my servlets and they work ok, but..
>
> I had hoped to just deploy one copy of the postgres jar to my server and
> then be able to consume it inside multiple applications, instead of having
> multiple copies of the jar in multiple apps.

Try placing the postgres JDBC driver in Tomcat's lib directory.
For example: C:\apache-tomcat-7.0.69\lib

Then include your <Resource> defining the JDBC data source in Tomcat's 
context.xml
For example: C:\apache-tomcat-7.0.69\conf\context.xml

     <Resource
         name="jdbc/myPostgresConnection"
         auth="Container"
         type="javax.sql.DataSource"
         driverClassName="org.postgresql.Driver"
         url="jdbc:postgresql://localhost:5432/yourDatabaseName"
         username="postgres"
         password="postgres"
         validationQuery="select 1" />

Attribute driverClassName should reference a JDBC driver class inside 
the postgres jar.
Attribute name is very important and must match the value of 
res-ref-name inside your webapp's web.xml.

For example: C:\apache-tomcat-7.0.69\webapps\yourWebapp\WEB-INF\web.xml

     <resource-ref>
         <description>Requires named JNDI data source defined in 
Tomcat's context.xml</description>
<res-ref-name>jdbc/myPostgresConnection</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
     </resource-ref>

This will allow you to have one copy of the postgres jar deployed in 
Tomcat's lib directory,
and each of your webapps can reference the named connection (i.e. 
jdbc/myPostgresConnection )
within their own web.xml

-Jason


> I've been through the JNDI portion of the docs on Tomcat and found it still
> somewhat confusing.
>
> Andy...
>
> On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>
>> Andrew,
>> this list strips most kinds of attachments, so nobody saw your screenshots
>> or whatever was in them.
>> You need to copy/paste that text right into your message to the list (amd
>> make sure that you send your message as "plain text", not HTML, otherwise
>> it will be unreadable.
>>
>> On 17.08.2016 02:10, Andrew Davis wrote:
>>
>>> Well,
>>> This has not turned out how I wanted it to .
>>>
>>> I have 'a solution' but it isnt what I wanted to do.  I went back and re
>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>> file.
>>>
>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>> coder would do and suspect I am still in the realms of hackery..
>>>
>>> [image: Inline image 1]
>>>
>>> Andy.
>>>
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>> wrote:
>>>
>>> I found the following in my logs..
>>>> from command line in Putty...
>>>>
>>>> cd /var/lib/tomcat7
>>>> tail -f logs/catalina.out
>>>>
>>>> [image: Inline image 1]
>>>>
>>>> I do have the jar file located in the following location on the machine..
>>>>
>>>> /usr/share/tomcat7/lib
>>>>
>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
>>>> this point..
>>>>
>>>> Andy..
>>>>
>>>>
>>>>
>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>>>> wrote:
>>>>
>>>> The best place to start would be to look at tomcat's logs for exceptions
>>>>> or errors.
>>>>>
>>>>>
>>>>>
>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>
>>>>> Hello,
>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>> with
>>>>>> tomcat7.
>>>>>>
>>>>>> I write my applications in Eclipse.. when i run my apps localhost i see
>>>>>> everything just fine.
>>>>>>
>>>>>> When i export my WAR files i check the includ source files.
>>>>>>
>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>
>>>>>> I can see the java classes which i use to insert records into my
>>>>>> postgresql
>>>>>> database. However,  there is nothing happening.  When i attempt  to run
>>>>>> them, no joy.
>>>>>>
>>>>>> I have the postgresql .jar file installed on my headless ubuntu server
>>>>>> ,
>>>>>> but no luck.
>>>>>>
>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>
>>>>>> Any advice is welcome
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>>
>>>>>> --
>>>>> George Sexton
>>>>> *MH Software, Inc.*
>>>>> Voice: 303 438 9585
>>>>> http://www.connectdaily.com
>>>>>
>>>>>
>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>



Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Sorry,
I got confused from yesterday and continued the question on my second
machine without realizing .

I have two machines.  The one I started the question with is:
Machine number 1.
Ubuntu 14.04, Tomcat7 as my web server, I have postgreSQl 9.3 installed as
my dbServer.

java version 1.8.9_91

Machine number 2
RHEL 6, Tomcat6 as web server, postgreSQL 9.3 dbServer.
java version 1.7.0_101

I am focusing my effort on the first machine.  (Ubuntu)..

Andy.




On Wed, Aug 17, 2016 at 12:47 PM, Mark Eggers <its_toasted@yahoo.com.invalid
> wrote:

> Replies at the end:
>
> Andrew:
>
> On 8/17/2016 7:15 AM, Andrew Davis wrote:
> > Its a redhat ..  i don't think tomcat 7 or later will run on this.
> >
> > On Aug 17, 2016 9:14 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
> > wrote:
> >
> >> On 17.08.2016 16:06, Andrew Davis wrote:
> >>
> >>> Thanks for the prompt..
> >>>
> >>> I have been looking at the doc s and have my .jar file for
> >>> postgres in the lib folder.
> >>>
> >>> I do not understand where the <Context> <Resource
> >>> name="jdbc/postgres..."
> >>>
> >>> Is supposed to go.
> >>>
> >>> Im reading at
> >>> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-
> >>> examples-howto.html
> >>>
> >>
> >> If your version is Tomcat 7, then maybe you should look at the
> >> Tomcat 7 documentation, not the v 6 one.
> >>
> >> In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to
> >> a later version ? That might increase your chances of getting help
> >> here.
> >>
> >>
> >>> This author has not had success here...
> >>>
> >>> This doesn't inspire confidence  here,  but that's what the
> >>> documentation shows...
> >>>
> >>>
> >> Sorry, but personally my expertise in these matters is nil, so I
> >> hope someone else here can pick this up now.
> >>
> >> Andy
> >>>
> >>> On Aug 17, 2016 4:43 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
> >>> wrote:
> >>>
> >>> On 17.08.2016 11:32, Andrew Davis wrote:
> >>>
> >>> Thanks.
> >>>>
> >>>> I can now deploy my servlets and they work ok, but..
> >>>>
> >>>> I had hoped to just deploy one copy of the postgres jar to my
> >>>> server and then be able to consume it inside multiple
> >>>> applications, instead of having multiple copies of the jar in
> >>>> multiple apps.
> >>>>
> >>>> I've been through the JNDI portion of the docs on Tomcat and
> >>>> found it still somewhat confusing.
> >>>>
> >>>> Andy...
> >>>>
> >>>>
> >>> I am far from an expert on this kind of thing, but have you
> >>> looked at this :
> >>>
> >>> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
> >>>
> >>>
> >>>
> Maybe that is the missing link in your understanding ?
> >>>
> >>>
> >>>
> >>>
> >>> On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
> >>> wrote:
> >>>>
> >>>> Andrew,
> >>>>
> >>>>> this list strips most kinds of attachments, so nobody saw
> >>>>> your screenshots or whatever was in them. You need to
> >>>>> copy/paste that text right into your message to the list
> >>>>> (amd make sure that you send your message as "plain text",
> >>>>> not HTML, otherwise it will be unreadable.
> >>>>>
> >>>>> On 17.08.2016 02:10, Andrew Davis wrote:
> >>>>>
> >>>>> Well,
> >>>>>
> >>>>>> This has not turned out how I wanted it to .
> >>>>>>
> >>>>>> I have 'a solution' but it isnt what I wanted to do.  I
> >>>>>> went back and re added the .jar file to the 'WEB-INF'
> >>>>>> folder and then deployed a new WAR file.
> >>>>>>
> >>>>>> Now things work just 'fine' BUT I suspect that this is not
> >>>>>> what a real coder would do and suspect I am still in the
> >>>>>> realms of hackery..
> >>>>>>
> >>>>>> [image: Inline image 1]
> >>>>>>
> >>>>>> Andy.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis
> >>>>>> <dr...@gmail.com> wrote:
> >>>>>>
> >>>>>> I found the following in my logs..
> >>>>>>
> >>>>>>
> >>>>>>> from command line in Putty...
> >>>>>>>
> >>>>>>> cd /var/lib/tomcat7 tail -f logs/catalina.out
> >>>>>>>
> >>>>>>> [image: Inline image 1]
> >>>>>>>
> >>>>>>> I do have the jar file located in the following location
> >>>>>>> on the machine..
> >>>>>>>
> >>>>>>> /usr/share/tomcat7/lib
> >>>>>>>
> >>>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
> >>>>>>>
> >>>>>>>
> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
> >>>>>>> at this point..
> >>>>>>>
> >>>>>>> Andy..
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <
> >>>>>>> georges@mhsoftware.com> wrote:
> >>>>>>>
> >>>>>>> The best place to start would be to look at tomcat's logs
> >>>>>>> for exceptions
> >>>>>>>
> >>>>>>> or errors.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
> >>>>>>>>
> >>>>>>>> Hello,
> >>>>>>>>
> >>>>>>>> Im working on getting java servlets to run on my
> >>>>>>>> instance of Ububtu
> >>>>>>>>> with tomcat7.
> >>>>>>>>>
> >>>>>>>>> I write my applications in Eclipse.. when i run my
> >>>>>>>>> apps localhost i see everything just fine.
> >>>>>>>>>
> >>>>>>>>> When i export my WAR files i check the includ source
> >>>>>>>>> files.
> >>>>>>>>>
> >>>>>>>>> I deploy the WAR file through tomcat manager.
> >>>>>>>>>
> >>>>>>>>> I can see the java classes which i use to insert
> >>>>>>>>> records into my postgresql database. However,  there
> >>>>>>>>> is nothing happening.  When i attempt  to run them,
> >>>>>>>>> no joy.
> >>>>>>>>>
> >>>>>>>>> I have the postgresql .jar file installed on my
> >>>>>>>>> headless ubuntu server , but no luck.
> >>>>>>>>>
> >>>>>>>>> Aside from the .jar file is there anything else i
> >>>>>>>>> need to configure?
> >>>>>>>>>
> >>>>>>>>> Any advice is welcome
> >>>>>>>>>
> >>>>>>>>> Andy
>
> AD: Its a redhat ..  i don't think tomcat 7 or later will run on this.
>
> From your first message, I thought that this was Ubuntu? Please note
> that different Linux distributions package Tomcat differently.
>
> AD: I have the postgresql.jar file installed on my headless ubuntu
> server, but no luck.
>
> According to what I just searched for, I believe you can install Tomcat
> 7 via apt-get (depending on your Ubuntu version). Tomcat 8 also appears
> to be available via apt-get - again depending on your Ubuntu version.
>
> If you're running a RedHat 6 variant, it appears that Tomcat 6 is what's
> available.
>
> If you're running a RedHat 7 variant, it appears that Tomcat 7 is what's
> available.
>
> Please note that I install Tomcat manually for all of my systems, the
> above is just a result of searches. YMMV.
>
> AD: I have been looking at the docs and have my .jar file for postgres
> in the lib folder.
>
> Are you sure that you're placing it in the correct directory?
>
> From memory, RedHat - derived distributions set things up so that you
> can run multiple Tomcats (see RUNNING.txt in the standard distribution).
> Sometimes this means placing the JDBC jars in not-quite-so-obvious places.
>
> That being said, if you place the JDBC jars in the base Tomcat library
> directory, all running Tomcats (if you're running more than one) should
> pick it up.
>
> In your log, you should have two lines near the top:
>
> INFO: CATALINA_BASE: (some directory path)
> INFO: CATALINA_HOME: (some directory path)
>
> If you could, please grab those lines and paste the text (not an image)
> into your reply.
>
> The libs directory is (should be) a subdirectory of at least
> CATALINA_HOME. If you're running multiple Tomcats, their could be a libs
> directory as a subdirectory of CATALINA_BASE.
>
> The next thing to be concerned with is permissions. Tomcat runs as a
> non-privileged user (usually tomcat). Make sure that the JDBC jar file
> can be read by the user running Tomcat. Typically, this is done by
> changing the group and user ownership to the ones used by the Tomcat
> process, and NOT by making the JDBC jar world-accessible.
>
> Please do an ls -l in the directory where all of the JARS are, and paste
> the results in as text in your reply.
>
> Once all of that is sorted, we can poke around some more.
>
> . . . just my two cents
> /mde/
>
>

Re: Set up postgresql on tomcat7

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Replies at the end:

Andrew:

On 8/17/2016 7:15 AM, Andrew Davis wrote:
> Its a redhat ..  i don't think tomcat 7 or later will run on this.
> 
> On Aug 17, 2016 9:14 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
> wrote:
> 
>> On 17.08.2016 16:06, Andrew Davis wrote:
>> 
>>> Thanks for the prompt..
>>> 
>>> I have been looking at the doc s and have my .jar file for
>>> postgres in the lib folder.
>>> 
>>> I do not understand where the <Context> <Resource
>>> name="jdbc/postgres..."
>>> 
>>> Is supposed to go.
>>> 
>>> Im reading at 
>>> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource- 
>>> examples-howto.html
>>> 
>> 
>> If your version is Tomcat 7, then maybe you should look at the
>> Tomcat 7 documentation, not the v 6 one.
>> 
>> In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to
>> a later version ? That might increase your chances of getting help
>> here.
>> 
>> 
>>> This author has not had success here...
>>> 
>>> This doesn't inspire confidence  here,  but that's what the
>>> documentation shows...
>>> 
>>> 
>> Sorry, but personally my expertise in these matters is nil, so I
>> hope someone else here can pick this up now.
>> 
>> Andy
>>> 
>>> On Aug 17, 2016 4:43 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
>>> wrote:
>>> 
>>> On 17.08.2016 11:32, Andrew Davis wrote:
>>> 
>>> Thanks.
>>>> 
>>>> I can now deploy my servlets and they work ok, but..
>>>> 
>>>> I had hoped to just deploy one copy of the postgres jar to my
>>>> server and then be able to consume it inside multiple
>>>> applications, instead of having multiple copies of the jar in
>>>> multiple apps.
>>>> 
>>>> I've been through the JNDI portion of the docs on Tomcat and
>>>> found it still somewhat confusing.
>>>> 
>>>> Andy...
>>>> 
>>>> 
>>> I am far from an expert on this kind of thing, but have you
>>> looked at this :
>>> 
>>> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
>>>
>>>
>>> 
Maybe that is the missing link in your understanding ?
>>> 
>>> 
>>> 
>>> 
>>> On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com>
>>> wrote:
>>>> 
>>>> Andrew,
>>>> 
>>>>> this list strips most kinds of attachments, so nobody saw
>>>>> your screenshots or whatever was in them. You need to
>>>>> copy/paste that text right into your message to the list 
>>>>> (amd make sure that you send your message as "plain text",
>>>>> not HTML, otherwise it will be unreadable.
>>>>> 
>>>>> On 17.08.2016 02:10, Andrew Davis wrote:
>>>>> 
>>>>> Well,
>>>>> 
>>>>>> This has not turned out how I wanted it to .
>>>>>> 
>>>>>> I have 'a solution' but it isnt what I wanted to do.  I
>>>>>> went back and re added the .jar file to the 'WEB-INF'
>>>>>> folder and then deployed a new WAR file.
>>>>>> 
>>>>>> Now things work just 'fine' BUT I suspect that this is not
>>>>>> what a real coder would do and suspect I am still in the
>>>>>> realms of hackery..
>>>>>> 
>>>>>> [image: Inline image 1]
>>>>>> 
>>>>>> Andy.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis
>>>>>> <dr...@gmail.com> wrote:
>>>>>> 
>>>>>> I found the following in my logs..
>>>>>> 
>>>>>> 
>>>>>>> from command line in Putty...
>>>>>>> 
>>>>>>> cd /var/lib/tomcat7 tail -f logs/catalina.out
>>>>>>> 
>>>>>>> [image: Inline image 1]
>>>>>>> 
>>>>>>> I do have the jar file located in the following location
>>>>>>> on the machine..
>>>>>>> 
>>>>>>> /usr/share/tomcat7/lib
>>>>>>> 
>>>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>>>>>
>>>>>>> 
o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>>>>> at this point..
>>>>>>> 
>>>>>>> Andy..
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton < 
>>>>>>> georges@mhsoftware.com> wrote:
>>>>>>> 
>>>>>>> The best place to start would be to look at tomcat's logs
>>>>>>> for exceptions
>>>>>>> 
>>>>>>> or errors.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>>>> 
>>>>>>>> Hello,
>>>>>>>> 
>>>>>>>> Im working on getting java servlets to run on my
>>>>>>>> instance of Ububtu
>>>>>>>>> with tomcat7.
>>>>>>>>> 
>>>>>>>>> I write my applications in Eclipse.. when i run my
>>>>>>>>> apps localhost i see everything just fine.
>>>>>>>>> 
>>>>>>>>> When i export my WAR files i check the includ source
>>>>>>>>> files.
>>>>>>>>> 
>>>>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>>>> 
>>>>>>>>> I can see the java classes which i use to insert
>>>>>>>>> records into my postgresql database. However,  there
>>>>>>>>> is nothing happening.  When i attempt  to run them,
>>>>>>>>> no joy.
>>>>>>>>> 
>>>>>>>>> I have the postgresql .jar file installed on my
>>>>>>>>> headless ubuntu server , but no luck.
>>>>>>>>> 
>>>>>>>>> Aside from the .jar file is there anything else i
>>>>>>>>> need to configure?
>>>>>>>>> 
>>>>>>>>> Any advice is welcome
>>>>>>>>> 
>>>>>>>>> Andy

AD: Its a redhat ..  i don't think tomcat 7 or later will run on this.

From your first message, I thought that this was Ubuntu? Please note
that different Linux distributions package Tomcat differently.

AD: I have the postgresql.jar file installed on my headless ubuntu
server, but no luck.

According to what I just searched for, I believe you can install Tomcat
7 via apt-get (depending on your Ubuntu version). Tomcat 8 also appears
to be available via apt-get - again depending on your Ubuntu version.

If you're running a RedHat 6 variant, it appears that Tomcat 6 is what's
available.

If you're running a RedHat 7 variant, it appears that Tomcat 7 is what's
available.

Please note that I install Tomcat manually for all of my systems, the
above is just a result of searches. YMMV.

AD: I have been looking at the docs and have my .jar file for postgres
in the lib folder.

Are you sure that you're placing it in the correct directory?

From memory, RedHat - derived distributions set things up so that you
can run multiple Tomcats (see RUNNING.txt in the standard distribution).
Sometimes this means placing the JDBC jars in not-quite-so-obvious places.

That being said, if you place the JDBC jars in the base Tomcat library
directory, all running Tomcats (if you're running more than one) should
pick it up.

In your log, you should have two lines near the top:

INFO: CATALINA_BASE: (some directory path)
INFO: CATALINA_HOME: (some directory path)

If you could, please grab those lines and paste the text (not an image)
into your reply.

The libs directory is (should be) a subdirectory of at least
CATALINA_HOME. If you're running multiple Tomcats, their could be a libs
directory as a subdirectory of CATALINA_BASE.

The next thing to be concerned with is permissions. Tomcat runs as a
non-privileged user (usually tomcat). Make sure that the JDBC jar file
can be read by the user running Tomcat. Typically, this is done by
changing the group and user ownership to the ones used by the Tomcat
process, and NOT by making the JDBC jar world-accessible.

Please do an ls -l in the directory where all of the JARS are, and paste
the results in as text in your reply.

Once all of that is sorted, we can poke around some more.

. . . just my two cents
/mde/


Re: Set up postgresql on tomcat7

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
With apologies for top-posting,

I believe that this is now getting a bit confusing, in terms of Java and Tomcat versions, 
and in terms of where you want to run this on.
I suggest that you start by looking at which highest version of Java you can install on 
your target machine, and then look at the corresponding highest Tomcat version you can 
install. If your target machine is the Ubuntu one, then use "apt-cache search java" and 
"apt-cache search tomcat" to find these out.
Then refer to : http://tomcat.apache.org/whichversion.html
to see which versions to install (the higher the better), and do it.
Then maybe start a new thread, indicating clearly
- the chosen OS
- the chosen java
- the chosen Tomcat version x.y.z
and re-state your latest questions.

I saw one response in the current thread (by Jason D. Burket) which seemed quite specific 
and detailed. So once you have done the above installation (and before writing again to 
the list), why don't you give that one a try, and come back and report your success or 
failure. And if it fails, paste the corresponding Tomcat log messages.


On 17.08.2016 22:53, Andr� Warnier (tomcat) wrote:
> On 17.08.2016 16:15, Andrew Davis wrote:
>> Its a redhat ..  i don't think tomcat 7 or later will run on this.
>
> Why shouldn't it ? As long as there is a java for it, Tomcat will run on it.
> Check out : http://tomcat.apache.org/whichversion.html
> But there is a contraduction then between the subject of the mails you have been posting,
> and the version/documentation which you are using.
> And I know that this does not answer your questions.
> I was just trying to point out that the closer you are to the current latest released
> version, the more likely you are to find more people to help you on this list.
>
>>
>> On Aug 17, 2016 9:14 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>
>>> On 17.08.2016 16:06, Andrew Davis wrote:
>>>
>>>> Thanks for the prompt..
>>>>
>>>> I have been looking at the doc s and have my .jar file for postgres in the
>>>> lib folder.
>>>>
>>>> I do not understand where the <Context>
>>>> <Resource name="jdbc/postgres..."
>>>>
>>>> Is supposed to go.
>>>>
>>>> Im reading at
>>>> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-
>>>> examples-howto.html
>>>>
>>>
>>> If your version is Tomcat 7, then maybe you should look at the Tomcat 7
>>> documentation, not the v 6 one.
>>>
>>> In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to a
>>> later version ? That might increase your chances of getting help here.
>>>
>>>
>>>> This author has not had success here...
>>>>
>>>> This doesn't inspire confidence  here,  but that's what the documentation
>>>> shows...
>>>>
>>>>
>>> Sorry, but personally my expertise in these matters is nil, so I hope
>>> someone else here can pick this up now.
>>>
>>> Andy
>>>>
>>>> On Aug 17, 2016 4:43 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>>>
>>>> On 17.08.2016 11:32, Andrew Davis wrote:
>>>>
>>>> Thanks.
>>>>>
>>>>> I can now deploy my servlets and they work ok, but..
>>>>>
>>>>> I had hoped to just deploy one copy of the postgres jar to my server and
>>>>> then be able to consume it inside multiple applications, instead of
>>>>> having
>>>>> multiple copies of the jar in multiple apps.
>>>>>
>>>>> I've been through the JNDI portion of the docs on Tomcat and found it
>>>>> still
>>>>> somewhat confusing.
>>>>>
>>>>> Andy...
>>>>>
>>>>>
>>>> I am far from an expert on this kind of thing, but have you looked at
>>>> this :
>>>>
>>>> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
>>>>
>>>> Maybe that is the missing link in your understanding ?
>>>>
>>>>
>>>>
>>>>
>>>> On Aug 17, 2016 4:06 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>>>>
>>>>> Andrew,
>>>>>
>>>>>> this list strips most kinds of attachments, so nobody saw your
>>>>>> screenshots
>>>>>> or whatever was in them.
>>>>>> You need to copy/paste that text right into your message to the list
>>>>>> (amd
>>>>>> make sure that you send your message as "plain text", not HTML,
>>>>>> otherwise
>>>>>> it will be unreadable.
>>>>>>
>>>>>> On 17.08.2016 02:10, Andrew Davis wrote:
>>>>>>
>>>>>> Well,
>>>>>>
>>>>>>> This has not turned out how I wanted it to .
>>>>>>>
>>>>>>> I have 'a solution' but it isnt what I wanted to do.  I went back and
>>>>>>> re
>>>>>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>>>>>> file.
>>>>>>>
>>>>>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>>>>>> coder would do and suspect I am still in the realms of hackery..
>>>>>>>
>>>>>>> [image: Inline image 1]
>>>>>>>
>>>>>>> Andy.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> I found the following in my logs..
>>>>>>>
>>>>>>>
>>>>>>>> from command line in Putty...
>>>>>>>>
>>>>>>>> cd /var/lib/tomcat7
>>>>>>>> tail -f logs/catalina.out
>>>>>>>>
>>>>>>>> [image: Inline image 1]
>>>>>>>>
>>>>>>>> I do have the jar file located in the following location on the
>>>>>>>> machine..
>>>>>>>>
>>>>>>>> /usr/share/tomcat7/lib
>>>>>>>>
>>>>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>>>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>>>>>> at
>>>>>>>> this point..
>>>>>>>>
>>>>>>>> Andy..
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <
>>>>>>>> georges@mhsoftware.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> The best place to start would be to look at tomcat's logs for
>>>>>>>> exceptions
>>>>>>>>
>>>>>>>> or errors.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>>>>>> with
>>>>>>>>>> tomcat7.
>>>>>>>>>>
>>>>>>>>>> I write my applications in Eclipse.. when i run my apps localhost i
>>>>>>>>>> see
>>>>>>>>>> everything just fine.
>>>>>>>>>>
>>>>>>>>>> When i export my WAR files i check the includ source files.
>>>>>>>>>>
>>>>>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>>>>>
>>>>>>>>>> I can see the java classes which i use to insert records into my
>>>>>>>>>> postgresql
>>>>>>>>>> database. However,  there is nothing happening.  When i attempt  to
>>>>>>>>>> run
>>>>>>>>>> them, no joy.
>>>>>>>>>>
>>>>>>>>>> I have the postgresql .jar file installed on my headless ubuntu
>>>>>>>>>> server
>>>>>>>>>> ,
>>>>>>>>>> but no luck.
>>>>>>>>>>
>>>>>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>>>>>
>>>>>>>>>> Any advice is welcome
>>>>>>>>>>
>>>>>>>>>> Andy
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> George Sexton
>>>>>>>>> *MH Software, Inc.*
>>>>>>>>> Voice: 303 438 9585
>>>>>>>>> http://www.connectdaily.com
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Re: Set up postgresql on tomcat7

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 17.08.2016 16:15, Andrew Davis wrote:
> Its a redhat ..  i don't think tomcat 7 or later will run on this.

Why shouldn't it ? As long as there is a java for it, Tomcat will run on it.
Check out : http://tomcat.apache.org/whichversion.html
But there is a contraduction then between the subject of the mails you have been posting, 
and the version/documentation which you are using.
And I know that this does not answer your questions.
I was just trying to point out that the closer you are to the current latest released 
version, the more likely you are to find more people to help you on this list.

>
> On Aug 17, 2016 9:14 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>
>> On 17.08.2016 16:06, Andrew Davis wrote:
>>
>>> Thanks for the prompt..
>>>
>>> I have been looking at the doc s and have my .jar file for postgres in the
>>> lib folder.
>>>
>>> I do not understand where the <Context>
>>> <Resource name="jdbc/postgres..."
>>>
>>> Is supposed to go.
>>>
>>> Im reading at
>>> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-
>>> examples-howto.html
>>>
>>
>> If your version is Tomcat 7, then maybe you should look at the Tomcat 7
>> documentation, not the v 6 one.
>>
>> In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to a
>> later version ? That might increase your chances of getting help here.
>>
>>
>>> This author has not had success here...
>>>
>>> This doesn't inspire confidence  here,  but that's what the documentation
>>> shows...
>>>
>>>
>> Sorry, but personally my expertise in these matters is nil, so I hope
>> someone else here can pick this up now.
>>
>> Andy
>>>
>>> On Aug 17, 2016 4:43 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>>
>>> On 17.08.2016 11:32, Andrew Davis wrote:
>>>
>>> Thanks.
>>>>
>>>> I can now deploy my servlets and they work ok, but..
>>>>
>>>> I had hoped to just deploy one copy of the postgres jar to my server and
>>>> then be able to consume it inside multiple applications, instead of
>>>> having
>>>> multiple copies of the jar in multiple apps.
>>>>
>>>> I've been through the JNDI portion of the docs on Tomcat and found it
>>>> still
>>>> somewhat confusing.
>>>>
>>>> Andy...
>>>>
>>>>
>>> I am far from an expert on this kind of thing, but have you looked at
>>> this :
>>>
>>> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
>>>
>>> Maybe that is the missing link in your understanding ?
>>>
>>>
>>>
>>>
>>> On Aug 17, 2016 4:06 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>>>
>>>> Andrew,
>>>>
>>>>> this list strips most kinds of attachments, so nobody saw your
>>>>> screenshots
>>>>> or whatever was in them.
>>>>> You need to copy/paste that text right into your message to the list
>>>>> (amd
>>>>> make sure that you send your message as "plain text", not HTML,
>>>>> otherwise
>>>>> it will be unreadable.
>>>>>
>>>>> On 17.08.2016 02:10, Andrew Davis wrote:
>>>>>
>>>>> Well,
>>>>>
>>>>>> This has not turned out how I wanted it to .
>>>>>>
>>>>>> I have 'a solution' but it isnt what I wanted to do.  I went back and
>>>>>> re
>>>>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>>>>> file.
>>>>>>
>>>>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>>>>> coder would do and suspect I am still in the realms of hackery..
>>>>>>
>>>>>> [image: Inline image 1]
>>>>>>
>>>>>> Andy.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> I found the following in my logs..
>>>>>>
>>>>>>
>>>>>>> from command line in Putty...
>>>>>>>
>>>>>>> cd /var/lib/tomcat7
>>>>>>> tail -f logs/catalina.out
>>>>>>>
>>>>>>> [image: Inline image 1]
>>>>>>>
>>>>>>> I do have the jar file located in the following location on the
>>>>>>> machine..
>>>>>>>
>>>>>>> /usr/share/tomcat7/lib
>>>>>>>
>>>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>>>>> at
>>>>>>> this point..
>>>>>>>
>>>>>>> Andy..
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <
>>>>>>> georges@mhsoftware.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> The best place to start would be to look at tomcat's logs for
>>>>>>> exceptions
>>>>>>>
>>>>>>> or errors.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>>>>> with
>>>>>>>>> tomcat7.
>>>>>>>>>
>>>>>>>>> I write my applications in Eclipse.. when i run my apps localhost i
>>>>>>>>> see
>>>>>>>>> everything just fine.
>>>>>>>>>
>>>>>>>>> When i export my WAR files i check the includ source files.
>>>>>>>>>
>>>>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>>>>
>>>>>>>>> I can see the java classes which i use to insert records into my
>>>>>>>>> postgresql
>>>>>>>>> database. However,  there is nothing happening.  When i attempt  to
>>>>>>>>> run
>>>>>>>>> them, no joy.
>>>>>>>>>
>>>>>>>>> I have the postgresql .jar file installed on my headless ubuntu
>>>>>>>>> server
>>>>>>>>> ,
>>>>>>>>> but no luck.
>>>>>>>>>
>>>>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>>>>
>>>>>>>>> Any advice is welcome
>>>>>>>>>
>>>>>>>>> Andy
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> George Sexton
>>>>>>>> *MH Software, Inc.*
>>>>>>>> Voice: 303 438 9585
>>>>>>>> http://www.connectdaily.com
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>


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


Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Thanks.. sorry bout the top-post.

Andy

On Wed, Aug 17, 2016 at 10:31 AM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Andrew Davis [mailto:drsockmonkee@gmail.com]
> > Subject: Re: Set up postgresql on tomcat7
>
> > Its a redhat ..  i don't think tomcat 7 or later will run on this.
>
> Stop top posting; read the rules here:
> http://tomcat.apache.org/lists.html#tomcat-users
>
> The distributor of your OS is completely irrelevant.  What's important is
> the version of the JVM you have installed.  Look at this page to see what
> version of Tomcat will run with your JVM:
> http://tomcat.apache.org/whichversion.html
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Set up postgresql on tomcat7

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew Davis [mailto:drsockmonkee@gmail.com] 
> Subject: Re: Set up postgresql on tomcat7

> Its a redhat ..  i don't think tomcat 7 or later will run on this.

Stop top posting; read the rules here:
http://tomcat.apache.org/lists.html#tomcat-users

The distributor of your OS is completely irrelevant.  What's important is the version of the JVM you have installed.  Look at this page to see what version of Tomcat will run with your JVM:
http://tomcat.apache.org/whichversion.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Its a redhat ..  i don't think tomcat 7 or later will run on this.

On Aug 17, 2016 9:14 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:

> On 17.08.2016 16:06, Andrew Davis wrote:
>
>> Thanks for the prompt..
>>
>> I have been looking at the doc s and have my .jar file for postgres in the
>> lib folder.
>>
>> I do not understand where the <Context>
>> <Resource name="jdbc/postgres..."
>>
>> Is supposed to go.
>>
>> Im reading at
>> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-
>> examples-howto.html
>>
>
> If your version is Tomcat 7, then maybe you should look at the Tomcat 7
> documentation, not the v 6 one.
>
> In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to a
> later version ? That might increase your chances of getting help here.
>
>
>> This author has not had success here...
>>
>> This doesn't inspire confidence  here,  but that's what the documentation
>> shows...
>>
>>
> Sorry, but personally my expertise in these matters is nil, so I hope
> someone else here can pick this up now.
>
> Andy
>>
>> On Aug 17, 2016 4:43 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>
>> On 17.08.2016 11:32, Andrew Davis wrote:
>>
>> Thanks.
>>>
>>> I can now deploy my servlets and they work ok, but..
>>>
>>> I had hoped to just deploy one copy of the postgres jar to my server and
>>> then be able to consume it inside multiple applications, instead of
>>> having
>>> multiple copies of the jar in multiple apps.
>>>
>>> I've been through the JNDI portion of the docs on Tomcat and found it
>>> still
>>> somewhat confusing.
>>>
>>> Andy...
>>>
>>>
>> I am far from an expert on this kind of thing, but have you looked at
>> this :
>>
>> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
>>
>> Maybe that is the missing link in your understanding ?
>>
>>
>>
>>
>> On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>>
>>> Andrew,
>>>
>>>> this list strips most kinds of attachments, so nobody saw your
>>>> screenshots
>>>> or whatever was in them.
>>>> You need to copy/paste that text right into your message to the list
>>>> (amd
>>>> make sure that you send your message as "plain text", not HTML,
>>>> otherwise
>>>> it will be unreadable.
>>>>
>>>> On 17.08.2016 02:10, Andrew Davis wrote:
>>>>
>>>> Well,
>>>>
>>>>> This has not turned out how I wanted it to .
>>>>>
>>>>> I have 'a solution' but it isnt what I wanted to do.  I went back and
>>>>> re
>>>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>>>> file.
>>>>>
>>>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>>>> coder would do and suspect I am still in the realms of hackery..
>>>>>
>>>>> [image: Inline image 1]
>>>>>
>>>>> Andy.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> I found the following in my logs..
>>>>>
>>>>>
>>>>>> from command line in Putty...
>>>>>>
>>>>>> cd /var/lib/tomcat7
>>>>>> tail -f logs/catalina.out
>>>>>>
>>>>>> [image: Inline image 1]
>>>>>>
>>>>>> I do have the jar file located in the following location on the
>>>>>> machine..
>>>>>>
>>>>>> /usr/share/tomcat7/lib
>>>>>>
>>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>>>> at
>>>>>> this point..
>>>>>>
>>>>>> Andy..
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <
>>>>>> georges@mhsoftware.com>
>>>>>> wrote:
>>>>>>
>>>>>> The best place to start would be to look at tomcat's logs for
>>>>>> exceptions
>>>>>>
>>>>>> or errors.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>>>> with
>>>>>>>> tomcat7.
>>>>>>>>
>>>>>>>> I write my applications in Eclipse.. when i run my apps localhost i
>>>>>>>> see
>>>>>>>> everything just fine.
>>>>>>>>
>>>>>>>> When i export my WAR files i check the includ source files.
>>>>>>>>
>>>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>>>
>>>>>>>> I can see the java classes which i use to insert records into my
>>>>>>>> postgresql
>>>>>>>> database. However,  there is nothing happening.  When i attempt  to
>>>>>>>> run
>>>>>>>> them, no joy.
>>>>>>>>
>>>>>>>> I have the postgresql .jar file installed on my headless ubuntu
>>>>>>>> server
>>>>>>>> ,
>>>>>>>> but no luck.
>>>>>>>>
>>>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>>>
>>>>>>>> Any advice is welcome
>>>>>>>>
>>>>>>>> Andy
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> George Sexton
>>>>>>> *MH Software, Inc.*
>>>>>>> Voice: 303 438 9585
>>>>>>> http://www.connectdaily.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Set up postgresql on tomcat7

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 17.08.2016 16:06, Andrew Davis wrote:
> Thanks for the prompt..
>
> I have been looking at the doc s and have my .jar file for postgres in the
> lib folder.
>
> I do not understand where the <Context>
> <Resource name="jdbc/postgres..."
>
> Is supposed to go.
>
> Im reading at
> https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

If your version is Tomcat 7, then maybe you should look at the Tomcat 7 documentation, not 
the v 6 one.

In any case, even Tomcat 7 is somewhat old now.  Can you upgrade to a later version ? That 
might increase your chances of getting help here.

>
> This author has not had success here...
>
> This doesn't inspire confidence  here,  but that's what the documentation
> shows...
>

Sorry, but personally my expertise in these matters is nil, so I hope someone else here 
can pick this up now.

> Andy
>
> On Aug 17, 2016 4:43 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>
> On 17.08.2016 11:32, Andrew Davis wrote:
>
>> Thanks.
>>
>> I can now deploy my servlets and they work ok, but..
>>
>> I had hoped to just deploy one copy of the postgres jar to my server and
>> then be able to consume it inside multiple applications, instead of having
>> multiple copies of the jar in multiple apps.
>>
>> I've been through the JNDI portion of the docs on Tomcat and found it still
>> somewhat confusing.
>>
>> Andy...
>>
>
> I am far from an expert on this kind of thing, but have you looked at this :
>
> http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html
>
> Maybe that is the missing link in your understanding ?
>
>
>
>
>> On Aug 17, 2016 4:06 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>>
>> Andrew,
>>> this list strips most kinds of attachments, so nobody saw your screenshots
>>> or whatever was in them.
>>> You need to copy/paste that text right into your message to the list (amd
>>> make sure that you send your message as "plain text", not HTML, otherwise
>>> it will be unreadable.
>>>
>>> On 17.08.2016 02:10, Andrew Davis wrote:
>>>
>>> Well,
>>>> This has not turned out how I wanted it to .
>>>>
>>>> I have 'a solution' but it isnt what I wanted to do.  I went back and re
>>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>>> file.
>>>>
>>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>>> coder would do and suspect I am still in the realms of hackery..
>>>>
>>>> [image: Inline image 1]
>>>>
>>>> Andy.
>>>>
>>>>
>>>>
>>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>>> wrote:
>>>>
>>>> I found the following in my logs..
>>>>
>>>>>
>>>>> from command line in Putty...
>>>>>
>>>>> cd /var/lib/tomcat7
>>>>> tail -f logs/catalina.out
>>>>>
>>>>> [image: Inline image 1]
>>>>>
>>>>> I do have the jar file located in the following location on the
>>>>> machine..
>>>>>
>>>>> /usr/share/tomcat7/lib
>>>>>
>>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>>> at
>>>>> this point..
>>>>>
>>>>> Andy..
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>>>>> wrote:
>>>>>
>>>>> The best place to start would be to look at tomcat's logs for exceptions
>>>>>
>>>>>> or errors.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>>> with
>>>>>>> tomcat7.
>>>>>>>
>>>>>>> I write my applications in Eclipse.. when i run my apps localhost i
>>>>>>> see
>>>>>>> everything just fine.
>>>>>>>
>>>>>>> When i export my WAR files i check the includ source files.
>>>>>>>
>>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>>
>>>>>>> I can see the java classes which i use to insert records into my
>>>>>>> postgresql
>>>>>>> database. However,  there is nothing happening.  When i attempt  to
>>>>>>> run
>>>>>>> them, no joy.
>>>>>>>
>>>>>>> I have the postgresql .jar file installed on my headless ubuntu server
>>>>>>> ,
>>>>>>> but no luck.
>>>>>>>
>>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>>
>>>>>>> Any advice is welcome
>>>>>>>
>>>>>>> Andy
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>> George Sexton
>>>>>> *MH Software, Inc.*
>>>>>> Voice: 303 438 9585
>>>>>> http://www.connectdaily.com
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Thanks for the prompt..

I have been looking at the doc s and have my .jar file for postgres in the
lib folder.

I do not understand where the <Context>
<Resource name="jdbc/postgres..."

Is supposed to go.

Im reading at
https://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

This author has not had success here...

This doesn't inspire confidence  here,  but that's what the documentation
shows...

Andy

On Aug 17, 2016 4:43 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:

On 17.08.2016 11:32, Andrew Davis wrote:

> Thanks.
>
> I can now deploy my servlets and they work ok, but..
>
> I had hoped to just deploy one copy of the postgres jar to my server and
> then be able to consume it inside multiple applications, instead of having
> multiple copies of the jar in multiple apps.
>
> I've been through the JNDI portion of the docs on Tomcat and found it still
> somewhat confusing.
>
> Andy...
>

I am far from an expert on this kind of thing, but have you looked at this :

http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html

Maybe that is the missing link in your understanding ?




> On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>
> Andrew,
>> this list strips most kinds of attachments, so nobody saw your screenshots
>> or whatever was in them.
>> You need to copy/paste that text right into your message to the list (amd
>> make sure that you send your message as "plain text", not HTML, otherwise
>> it will be unreadable.
>>
>> On 17.08.2016 02:10, Andrew Davis wrote:
>>
>> Well,
>>> This has not turned out how I wanted it to .
>>>
>>> I have 'a solution' but it isnt what I wanted to do.  I went back and re
>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>> file.
>>>
>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>> coder would do and suspect I am still in the realms of hackery..
>>>
>>> [image: Inline image 1]
>>>
>>> Andy.
>>>
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>> wrote:
>>>
>>> I found the following in my logs..
>>>
>>>>
>>>> from command line in Putty...
>>>>
>>>> cd /var/lib/tomcat7
>>>> tail -f logs/catalina.out
>>>>
>>>> [image: Inline image 1]
>>>>
>>>> I do have the jar file located in the following location on the
>>>> machine..
>>>>
>>>> /usr/share/tomcat7/lib
>>>>
>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is..
>>>> at
>>>> this point..
>>>>
>>>> Andy..
>>>>
>>>>
>>>>
>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>>>> wrote:
>>>>
>>>> The best place to start would be to look at tomcat's logs for exceptions
>>>>
>>>>> or errors.
>>>>>
>>>>>
>>>>>
>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>> with
>>>>>> tomcat7.
>>>>>>
>>>>>> I write my applications in Eclipse.. when i run my apps localhost i
>>>>>> see
>>>>>> everything just fine.
>>>>>>
>>>>>> When i export my WAR files i check the includ source files.
>>>>>>
>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>
>>>>>> I can see the java classes which i use to insert records into my
>>>>>> postgresql
>>>>>> database. However,  there is nothing happening.  When i attempt  to
>>>>>> run
>>>>>> them, no joy.
>>>>>>
>>>>>> I have the postgresql .jar file installed on my headless ubuntu server
>>>>>> ,
>>>>>> but no luck.
>>>>>>
>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>
>>>>>> Any advice is welcome
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>> George Sexton
>>>>> *MH Software, Inc.*
>>>>> Voice: 303 438 9585
>>>>> http://www.connectdaily.com
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>

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

Re: Set up postgresql on tomcat7

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 17.08.2016 11:32, Andrew Davis wrote:
> Thanks.
>
> I can now deploy my servlets and they work ok, but..
>
> I had hoped to just deploy one copy of the postgres jar to my server and
> then be able to consume it inside multiple applications, instead of having
> multiple copies of the jar in multiple apps.
>
> I've been through the JNDI portion of the docs on Tomcat and found it still
> somewhat confusing.
>
> Andy...

I am far from an expert on this kind of thing, but have you looked at this :

http://tomcat.apache.org/tomcat-8.0-doc/config/globalresources.html

Maybe that is the missing link in your understanding ?


>
> On Aug 17, 2016 4:06 AM, "Andr� Warnier (tomcat)" <aw...@ice-sa.com> wrote:
>
>> Andrew,
>> this list strips most kinds of attachments, so nobody saw your screenshots
>> or whatever was in them.
>> You need to copy/paste that text right into your message to the list (amd
>> make sure that you send your message as "plain text", not HTML, otherwise
>> it will be unreadable.
>>
>> On 17.08.2016 02:10, Andrew Davis wrote:
>>
>>> Well,
>>> This has not turned out how I wanted it to .
>>>
>>> I have 'a solution' but it isnt what I wanted to do.  I went back and re
>>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>>> file.
>>>
>>> Now things work just 'fine' BUT I suspect that this is not what a real
>>> coder would do and suspect I am still in the realms of hackery..
>>>
>>> [image: Inline image 1]
>>>
>>> Andy.
>>>
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>>> wrote:
>>>
>>> I found the following in my logs..
>>>>
>>>> from command line in Putty...
>>>>
>>>> cd /var/lib/tomcat7
>>>> tail -f logs/catalina.out
>>>>
>>>> [image: Inline image 1]
>>>>
>>>> I do have the jar file located in the following location on the machine..
>>>>
>>>> /usr/share/tomcat7/lib
>>>>
>>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
>>>> this point..
>>>>
>>>> Andy..
>>>>
>>>>
>>>>
>>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>>>> wrote:
>>>>
>>>> The best place to start would be to look at tomcat's logs for exceptions
>>>>> or errors.
>>>>>
>>>>>
>>>>>
>>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>>
>>>>> Hello,
>>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>>> with
>>>>>> tomcat7.
>>>>>>
>>>>>> I write my applications in Eclipse.. when i run my apps localhost i see
>>>>>> everything just fine.
>>>>>>
>>>>>> When i export my WAR files i check the includ source files.
>>>>>>
>>>>>> I deploy the WAR file through tomcat manager.
>>>>>>
>>>>>> I can see the java classes which i use to insert records into my
>>>>>> postgresql
>>>>>> database. However,  there is nothing happening.  When i attempt  to run
>>>>>> them, no joy.
>>>>>>
>>>>>> I have the postgresql .jar file installed on my headless ubuntu server
>>>>>> ,
>>>>>> but no luck.
>>>>>>
>>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>>
>>>>>> Any advice is welcome
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>>
>>>>>> --
>>>>> George Sexton
>>>>> *MH Software, Inc.*
>>>>> Voice: 303 438 9585
>>>>> http://www.connectdaily.com
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>


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


Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Thanks.

I can now deploy my servlets and they work ok, but..

I had hoped to just deploy one copy of the postgres jar to my server and
then be able to consume it inside multiple applications, instead of having
multiple copies of the jar in multiple apps.

I've been through the JNDI portion of the docs on Tomcat and found it still
somewhat confusing.

Andy...

On Aug 17, 2016 4:06 AM, "André Warnier (tomcat)" <aw...@ice-sa.com> wrote:

> Andrew,
> this list strips most kinds of attachments, so nobody saw your screenshots
> or whatever was in them.
> You need to copy/paste that text right into your message to the list (amd
> make sure that you send your message as "plain text", not HTML, otherwise
> it will be unreadable.
>
> On 17.08.2016 02:10, Andrew Davis wrote:
>
>> Well,
>> This has not turned out how I wanted it to .
>>
>> I have 'a solution' but it isnt what I wanted to do.  I went back and re
>> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
>> file.
>>
>> Now things work just 'fine' BUT I suspect that this is not what a real
>> coder would do and suspect I am still in the realms of hackery..
>>
>> [image: Inline image 1]
>>
>> Andy.
>>
>>
>>
>> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
>> wrote:
>>
>> I found the following in my logs..
>>>
>>> from command line in Putty...
>>>
>>> cd /var/lib/tomcat7
>>> tail -f logs/catalina.out
>>>
>>> [image: Inline image 1]
>>>
>>> I do have the jar file located in the following location on the machine..
>>>
>>> /usr/share/tomcat7/lib
>>>
>>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
>>> this point..
>>>
>>> Andy..
>>>
>>>
>>>
>>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>>> wrote:
>>>
>>> The best place to start would be to look at tomcat's logs for exceptions
>>>> or errors.
>>>>
>>>>
>>>>
>>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>>
>>>> Hello,
>>>>> Im working on getting java servlets to run on my instance of Ububtu
>>>>> with
>>>>> tomcat7.
>>>>>
>>>>> I write my applications in Eclipse.. when i run my apps localhost i see
>>>>> everything just fine.
>>>>>
>>>>> When i export my WAR files i check the includ source files.
>>>>>
>>>>> I deploy the WAR file through tomcat manager.
>>>>>
>>>>> I can see the java classes which i use to insert records into my
>>>>> postgresql
>>>>> database. However,  there is nothing happening.  When i attempt  to run
>>>>> them, no joy.
>>>>>
>>>>> I have the postgresql .jar file installed on my headless ubuntu server
>>>>> ,
>>>>> but no luck.
>>>>>
>>>>> Aside from the .jar file is there anything else i need to configure?
>>>>>
>>>>> Any advice is welcome
>>>>>
>>>>> Andy
>>>>>
>>>>>
>>>>> --
>>>> George Sexton
>>>> *MH Software, Inc.*
>>>> Voice: 303 438 9585
>>>> http://www.connectdaily.com
>>>>
>>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Set up postgresql on tomcat7

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
Andrew,
this list strips most kinds of attachments, so nobody saw your screenshots or whatever was 
in them.
You need to copy/paste that text right into your message to the list (amd make sure that 
you send your message as "plain text", not HTML, otherwise it will be unreadable.

On 17.08.2016 02:10, Andrew Davis wrote:
> Well,
> This has not turned out how I wanted it to .
>
> I have 'a solution' but it isnt what I wanted to do.  I went back and re
> added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
> file.
>
> Now things work just 'fine' BUT I suspect that this is not what a real
> coder would do and suspect I am still in the realms of hackery..
>
> [image: Inline image 1]
>
> Andy.
>
>
>
> On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
> wrote:
>
>> I found the following in my logs..
>>
>> from command line in Putty...
>>
>> cd /var/lib/tomcat7
>> tail -f logs/catalina.out
>>
>> [image: Inline image 1]
>>
>> I do have the jar file located in the following location on the machine..
>>
>> /usr/share/tomcat7/lib
>>
>> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
>> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
>> this point..
>>
>> Andy..
>>
>>
>>
>> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
>> wrote:
>>
>>> The best place to start would be to look at tomcat's logs for exceptions
>>> or errors.
>>>
>>>
>>>
>>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>>
>>>> Hello,
>>>> Im working on getting java servlets to run on my instance of Ububtu with
>>>> tomcat7.
>>>>
>>>> I write my applications in Eclipse.. when i run my apps localhost i see
>>>> everything just fine.
>>>>
>>>> When i export my WAR files i check the includ source files.
>>>>
>>>> I deploy the WAR file through tomcat manager.
>>>>
>>>> I can see the java classes which i use to insert records into my
>>>> postgresql
>>>> database. However,  there is nothing happening.  When i attempt  to run
>>>> them, no joy.
>>>>
>>>> I have the postgresql .jar file installed on my headless ubuntu server ,
>>>> but no luck.
>>>>
>>>> Aside from the .jar file is there anything else i need to configure?
>>>>
>>>> Any advice is welcome
>>>>
>>>> Andy
>>>>
>>>>
>>> --
>>> George Sexton
>>> *MH Software, Inc.*
>>> Voice: 303 438 9585
>>> http://www.connectdaily.com
>>>
>>
>>
>


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


Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
Well,
This has not turned out how I wanted it to .

I have 'a solution' but it isnt what I wanted to do.  I went back and re
added the .jar file to the 'WEB-INF' folder and then deployed a new WAR
file.

Now things work just 'fine' BUT I suspect that this is not what a real
coder would do and suspect I am still in the realms of hackery..

[image: Inline image 1]

Andy.



On Tue, Aug 16, 2016 at 6:53 PM, Andrew Davis <dr...@gmail.com>
wrote:

> I found the following in my logs..
>
> from command line in Putty...
>
> cd /var/lib/tomcat7
> tail -f logs/catalina.out
>
> [image: Inline image 1]
>
> I do have the jar file located in the following location on the machine..
>
> /usr/share/tomcat7/lib
>
> https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
> o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
> this point..
>
> Andy..
>
>
>
> On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
> wrote:
>
>> The best place to start would be to look at tomcat's logs for exceptions
>> or errors.
>>
>>
>>
>> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>>
>>> Hello,
>>> Im working on getting java servlets to run on my instance of Ububtu with
>>> tomcat7.
>>>
>>> I write my applications in Eclipse.. when i run my apps localhost i see
>>> everything just fine.
>>>
>>> When i export my WAR files i check the includ source files.
>>>
>>> I deploy the WAR file through tomcat manager.
>>>
>>> I can see the java classes which i use to insert records into my
>>> postgresql
>>> database. However,  there is nothing happening.  When i attempt  to run
>>> them, no joy.
>>>
>>> I have the postgresql .jar file installed on my headless ubuntu server ,
>>> but no luck.
>>>
>>> Aside from the .jar file is there anything else i need to configure?
>>>
>>> Any advice is welcome
>>>
>>> Andy
>>>
>>>
>> --
>> George Sexton
>> *MH Software, Inc.*
>> Voice: 303 438 9585
>> http://www.connectdaily.com
>>
>
>

Re: Set up postgresql on tomcat7

Posted by Andrew Davis <dr...@gmail.com>.
I found the following in my logs..

from command line in Putty...

cd /var/lib/tomcat7
tail -f logs/catalina.out

[image: Inline image 1]

I do have the jar file located in the following location on the machine..

/usr/share/tomcat7/lib

https://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howt
o.html#JDBC_Data_Sources  is confusing to me.  It shouldnt but it is.. at
this point..

Andy..



On Tue, Aug 16, 2016 at 3:01 PM, George Sexton <ge...@mhsoftware.com>
wrote:

> The best place to start would be to look at tomcat's logs for exceptions
> or errors.
>
>
>
> On 8/16/2016 12:44 PM, Andrew Davis wrote:
>
>> Hello,
>> Im working on getting java servlets to run on my instance of Ububtu with
>> tomcat7.
>>
>> I write my applications in Eclipse.. when i run my apps localhost i see
>> everything just fine.
>>
>> When i export my WAR files i check the includ source files.
>>
>> I deploy the WAR file through tomcat manager.
>>
>> I can see the java classes which i use to insert records into my
>> postgresql
>> database. However,  there is nothing happening.  When i attempt  to run
>> them, no joy.
>>
>> I have the postgresql .jar file installed on my headless ubuntu server ,
>> but no luck.
>>
>> Aside from the .jar file is there anything else i need to configure?
>>
>> Any advice is welcome
>>
>> Andy
>>
>>
> --
> George Sexton
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.connectdaily.com
>

Re: Set up postgresql on tomcat7

Posted by George Sexton <ge...@mhsoftware.com>.
The best place to start would be to look at tomcat's logs for exceptions 
or errors.


On 8/16/2016 12:44 PM, Andrew Davis wrote:
> Hello,
> Im working on getting java servlets to run on my instance of Ububtu with
> tomcat7.
>
> I write my applications in Eclipse.. when i run my apps localhost i see
> everything just fine.
>
> When i export my WAR files i check the includ source files.
>
> I deploy the WAR file through tomcat manager.
>
> I can see the java classes which i use to insert records into my postgresql
> database. However,  there is nothing happening.  When i attempt  to run
> them, no joy.
>
> I have the postgresql .jar file installed on my headless ubuntu server ,
> but no luck.
>
> Aside from the .jar file is there anything else i need to configure?
>
> Any advice is welcome
>
> Andy
>

-- 
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.connectdaily.com