Classpath

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Classpath

johnquinley
I've been looking for the canonical way to extend the grails classpath. I am needing to add a set of 3rd party libraries and configuration files. Any information would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

johnquinley
So, there is not way to do this? Or is this a stupid newbie question. If there is no way to do this, is there a place I can place my 3rd party libraries and configuration files so that they will be included automatically in the classpath?

johnquinley wrote
I've been looking for the canonical way to extend the grails classpath. I am needing to add a set of 3rd party libraries and configuration files. Any information would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Jonathan Carlson
In reply to this post by johnquinley
Did you try the <project_home>/lib folder?

- Jonathan



>>> [hidden email] 2006-04-21 11:50:49 AM >>>

So, there is not way to do this? Or is this a stupid newbie question.
If
there is no way to do this, is there a place I can place my 3rd party
libraries and configuration files so that they will be included
automatically in the classpath?


johnquinley wrote:
>
> I've been looking for the canonical way to extend the grails
classpath. I
> am needing to add a set of 3rd party libraries and configuration
files.
> Any information would be greatly appreciated.
>
--
View this message in context:
http://www.nabble.com/Classpath-t1484528.html#a4030099 
Sent from the grails - user forum at Nabble.com.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

graemer
As jonathan said you can add jars to the lib folder and put
configuration files in the web-app/WEB-INF/classes directory if thats
appropriate

Graeme

On 4/21/06, Jonathan Carlson <[hidden email]> wrote:

> Did you try the <project_home>/lib folder?
>
> - Jonathan
>
>
>
> >>> [hidden email] 2006-04-21 11:50:49 AM >>>
>
> So, there is not way to do this? Or is this a stupid newbie question.
> If
> there is no way to do this, is there a place I can place my 3rd party
> libraries and configuration files so that they will be included
> automatically in the classpath?
>
>
> johnquinley wrote:
> >
> > I've been looking for the canonical way to extend the grails
> classpath. I
> > am needing to add a set of 3rd party libraries and configuration
> files.
> > Any information would be greatly appreciated.
> >
> --
> View this message in context:
> http://www.nabble.com/Classpath-t1484528.html#a4030099
> Sent from the grails - user forum at Nabble.com.
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> Katun Corporation -- www.katun.com
> _____________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Pietro Maggi
> On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > Did you try the <project_home>/lib folder?
> >
I used this method for jdbc jar library without any problem.

Best regards
Pietro
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Jonathan Carlson
In reply to this post by johnquinley
Did you use the regular ApplicationDataSource, or did you try the groovy
way to get a connection?  I tried putting a getSqlAccess() method like
this in my DataService and it couldn't find the Driver:

class DataService {

  //@Property ApplicationDataSource applicationDataSource (This didn't
work either!)
 
  def getSqlAccess() {
    return groovy.sql.Sql.newInstance(
     "jdbc:oracle:thin:mydb",
     "userid", "pw",
     "oracle.jdbc.driver.OracleDriver");
  }

}



>>> [hidden email] 2006-04-21 2:43:53 PM >>>
> On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > Did you try the <project_home>/lib folder?
> >
I used this method for jdbc jar library without any problem.

Best regards
Pietro

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

graemer
On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> Did you use the regular ApplicationDataSource, or did you try the groovy
> way to get a connection?  I tried putting a getSqlAccess() method like
> this in my DataService and it couldn't find the Driver:
>
> class DataService {
>
>   //@Property ApplicationDataSource applicationDataSource (This didn't
> work either!)

did you try?:

@Property javax.sql.DataSource dataSource

Graeme

>
>   def getSqlAccess() {
>     return groovy.sql.Sql.newInstance(
>      "jdbc:oracle:thin:mydb",
>      "userid", "pw",
>      "oracle.jdbc.driver.OracleDriver");
>   }
>
> }
>
>
>
> >>> [hidden email] 2006-04-21 2:43:53 PM >>>
> > On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > > Did you try the <project_home>/lib folder?
> > >
> I used this method for jdbc jar library without any problem.
>
> Best regards
> Pietro
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> Katun Corporation -- www.katun.com
> _____________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Jonathan Carlson
In reply to this post by johnquinley
Graeme wrote:
> did you try?:
> @Property javax.sql.DataSource dataSource

Thanks!  I was so close, yet so far.  Do you mind if I add this to
http://grails.org/Services page?


>>> [hidden email] 2006-04-21 4:22:49 PM >>>
On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> Did you use the regular ApplicationDataSource, or did you try the
groovy
> way to get a connection?  I tried putting a getSqlAccess() method
like
> this in my DataService and it couldn't find the Driver:
>
> class DataService {
>
>   //@Property ApplicationDataSource applicationDataSource (This
didn't
> work either!)

did you try?:

@Property javax.sql.DataSource dataSource

Graeme

>
>   def getSqlAccess() {
>     return groovy.sql.Sql.newInstance(
>      "jdbc:oracle:thin:mydb",
>      "userid", "pw",
>      "oracle.jdbc.driver.OracleDriver");
>   }
>
> }
>
>
>
> >>> [hidden email] 2006-04-21 2:43:53 PM >>>
> > On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > > Did you try the <project_home>/lib folder?
> > >
> I used this method for jdbc jar library without any problem.
>
> Best regards
> Pietro
>
>
______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security
System.
> For more information please visit http://www.messagelabs.com/email 
>
______________________________________________________________________
>
>
______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
notify
> the system manager.
>
> Katun Corporation -- www.katun.com
>
_____________________________________________________________________
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Jonathan Carlson
In reply to this post by johnquinley
The edit page is spinning on me so, if I remember, I'll add it on
Monday.

>>> [hidden email] 2006-04-21 4:32:50 PM >>>
Graeme wrote:
> did you try?:
> @Property javax.sql.DataSource dataSource

Thanks!  I was so close, yet so far.  Do you mind if I add this to
http://grails.org/Services page?


>>> [hidden email] 2006-04-21 4:22:49 PM >>>
On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> Did you use the regular ApplicationDataSource, or did you try the
groovy
> way to get a connection?  I tried putting a getSqlAccess() method
like
> this in my DataService and it couldn't find the Driver:
>
> class DataService {
>
>   //@Property ApplicationDataSource applicationDataSource (This
didn't
> work either!)

did you try?:

@Property javax.sql.DataSource dataSource

Graeme

>
>   def getSqlAccess() {
>     return groovy.sql.Sql.newInstance(
>      "jdbc:oracle:thin:mydb",
>      "userid", "pw",
>      "oracle.jdbc.driver.OracleDriver");
>   }
>
> }
>
>
>
> >>> [hidden email] 2006-04-21 2:43:53 PM >>>
> > On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > > Did you try the <project_home>/lib folder?
> > >
> I used this method for jdbc jar library without any problem.
>
> Best regards
> Pietro
>
>
______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security
System.
> For more information please visit http://www.messagelabs.com/email 
>
______________________________________________________________________
>
>
______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
notify
> the system manager.
>
> Katun Corporation -- www.katun.com
>
_____________________________________________________________________
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

johnquinley
In reply to this post by Jonathan Carlson
Thanks for the tip. This worked like a charm.

- John Quinley


Jonathan Carlson wrote
Did you try the <project_home>/lib folder?

- Jonathan



>>> john@quinley.org 2006-04-21 11:50:49 AM >>>

So, there is not way to do this? Or is this a stupid newbie question.
If
there is no way to do this, is there a place I can place my 3rd party
libraries and configuration files so that they will be included
automatically in the classpath?


johnquinley wrote:
>
> I've been looking for the canonical way to extend the grails
classpath. I
> am needing to add a set of 3rd party libraries and configuration
files.
> Any information would be greatly appreciated.
>
--
View this message in context:
http://www.nabble.com/Classpath-t1484528.html#a4030099 
Sent from the grails - user forum at Nabble.com.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Pietro Maggi
In reply to this post by Jonathan Carlson
nothing fancy, I just updated the groovy ApplicationDataSource to
point to the new driver and db and it worked like a charm from
HyperSonicDB to Posgressql.

ciao
Pietro

2006/4/21, Jonathan Carlson <[hidden email]>:

> Did you use the regular ApplicationDataSource, or did you try the groovy
> way to get a connection?  I tried putting a getSqlAccess() method like
> this in my DataService and it couldn't find the Driver:
>
> class DataService {
>
>   //@Property ApplicationDataSource applicationDataSource (This didn't
> work either!)
>
>   def getSqlAccess() {
>     return groovy.sql.Sql.newInstance(
>      "jdbc:oracle:thin:mydb",
>      "userid", "pw",
>      "oracle.jdbc.driver.OracleDriver");
>   }
>
> }
>
>
>
> >>> [hidden email] 2006-04-21 2:43:53 PM >>>
> > On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > > Did you try the <project_home>/lib folder?
> > >
> I used this method for jdbc jar library without any problem.
>
> Best regards
> Pietro
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> Katun Corporation -- www.katun.com
> _____________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Re: Classpath

Jonathan Carlson
In reply to this post by johnquinley
Where is it best to put this hint about using javax.sql.DataSource
instead of ApplicationDatasource  to inject the DataSource into a
Service?  My proxy or something isn't letting me edit the Services page
so I'd appreciate it if someone else could add it.

I want to make Grails as easy to use by documenting things to help
others avoid the same mistakes I've made.

:-)


>>> [hidden email] 2006-04-21 4:40:37 PM >>>
The edit page is spinning on me so, if I remember, I'll add it on
Monday.

>>> [hidden email] 2006-04-21 4:32:50 PM >>>
Graeme wrote:
> did you try?:
> @Property javax.sql.DataSource dataSource

Thanks!  I was so close, yet so far.  Do you mind if I add this to
http://grails.org/Services page?


>>> [hidden email] 2006-04-21 4:22:49 PM >>>
On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> Did you use the regular ApplicationDataSource, or did you try the
groovy
> way to get a connection?  I tried putting a getSqlAccess() method
like
> this in my DataService and it couldn't find the Driver:
>
> class DataService {
>
>   //@Property ApplicationDataSource applicationDataSource (This
didn't
> work either!)

did you try?:

@Property javax.sql.DataSource dataSource

Graeme

>
>   def getSqlAccess() {
>     return groovy.sql.Sql.newInstance(
>      "jdbc:oracle:thin:mydb",
>      "userid", "pw",
>      "oracle.jdbc.driver.OracleDriver");
>   }
>
> }
>
>
>
> >>> [hidden email] 2006-04-21 2:43:53 PM >>>
> > On 4/21/06, Jonathan Carlson <[hidden email]> wrote:
> > > Did you try the <project_home>/lib folder?
> > >
> I used this method for jdbc jar library without any problem.
>
> Best regards
> Pietro
>
>
______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security
System.
> For more information please visit http://www.messagelabs.com/email 
>
______________________________________________________________________
>
>
______________________________________________________________________
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please
notify
> the system manager.
>
> Katun Corporation -- www.katun.com
>
_____________________________________________________________________
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

Katun Corporation -- www.katun.com
_____________________________________________________________________