How to avoid pre-moderation of my comments?
Setting up DSPACE for Postgres access
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PostgreSQL database development > Setting up DSPACE for Postgres access 18 December 2008 17:44:32

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

Setting up DSPACE for Postgres access

Ashwin Kutty 17 October 2003 17:54:19
 
I am currently testing a product by the name of dspace
(http://www.dspace.­org) and require installing java since dspace is
completely java based. The problem is that during its installation it
needs to talk to pgsql via jdbc and I am getting the error:
Exception occurred:org.apache­.commons.dbcp.DbcpEx­ception:
java.sql.SQLExcepti­on: Driver not found for URL:
jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace
org.apache.commons.­dbcp.DbcpException: java.sql.SQLExcepti­on: Driver not
found for URL: jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace

I cannot ofcourse go beyond this since they have to talk to each other and
if that doesnt happen nothing else is going to work. In terms of the
system and the env var's; here goes:

RH Linux 9 (kernel 2.4.20)
j2sdk1.4.2_01
dspace - 1.1.1
postgres - 7.3.4

environment var's:
CLASSPATH=/home/dsp­ace/j2sdk1.4.2_01:/d­space/lib/postgresql­.jar:/dspace/lib:/us­r/local/pgsql/share/­java:/dspace/config:­/dspace/lib:/dspace/­lib/activation.jar:/­dspace/lib/commons-c­li.jar:/dspace/lib/c­ommons-collections.j­ar:/dspace/lib/commo­ns-dbcp.jar:/dspace/­lib/commons-pool.jar­:/dspace/lib/cos.jar­:/dspace/lib/dspace.­jar:/dspace/lib/hand­le.jar:/dspace/lib/j­ena.jar:/dspace/lib/­log4j.jar:/dspace/li­b/lucene.jar:/dspace­/lib/mail.jar:/dspac­e/lib/oaicat.jar:/ds­pace/lib/oro.jar:/ds­pace/lib/servlet.jar­:/dspace/lib/xalan.j­ar:/dspace/lib/xerce­s.jar:/home/dspace/j­2sdk1.4.2_01/lib:/ho­me/dspace/j2sdk1.4.2­_01:/home/dspace/j2s­dk1.4.2_01/jre/lib:/­home/dspace/j2sdk1.4­.2_01/jre/javaws:/ho­me/dspace/dspace-1.1­.1-source/build/clas­ses:/usr/local/pgsql­/share/java:/usr/loc­al/pgsql/share/java/­postgresql.jar
PGDATA=/usr/local/p­gsql/data
PGSQL_HOME=/usr/loc­al/pgsql/bin
JAVA_HOME=/home/dsp­ace/j2sdk1.4.2_01
PATH=/usr/kerberos/­bin:/usr/local/bin:/­bin:/usr/bin:/usr/X1­1R6/bin:/home/dspace­/apache-ant-1.5.4/bi­n:/usr/local/pgsql/s­hare/java:/usr/local­/pgsql/bin:/home/dsp­ace/j2sdk1.4.2_01:/h­ome/dspace/j2sdk1.4.­2_01/bin:/home/dspac­e/bin
JAVA_OPTS=-Xmx512M -Xms64M -Dfile.encoding=UTF­-8

I do realise that support from the developers from DSPACE should be
available but it has not been so far. As long as I get JDBC to work with
PGSQL, it would at the very least get me started.

Any help would be greatly appreciated.

Thanks.


-------------------­--------(end of broadcast)---------­------------------
TIP 6: Have you searched our list archives?

http://archives.pos­tgresql.org

Add comment
Ashwin Kutty 23 October 2003 16:20:42 permanent link ]
 
Hi all,

I sent this message to the jdbc list and received no response there and so
am posting to this list hoping I could get some help here.

Thanks in advance.

---------- Forwarded message ----------
Date: Fri, 17 Oct 2003 11:54:19 -0300 (ADT)
From: Ashwin Kutty <akutty@dal.ca>
Reply-To: Ashwin Kutty <Ashwin.Kutty@Dal.C­a>
To: pgsql-jdbc@postgres­ql.org
Subject: Setting up DSPACE for Postgres access


I am currently testing a product by the name of dspace
(http://www.dspace.­org) and require installing java since dspace is
completely java based. The problem is that during its installation it
needs to talk to pgsql via jdbc and I am getting the error:
Exception occurred:org.apache­.commons.dbcp.DbcpEx­ception:
java.sql.SQLExcepti­on: Driver not found for URL:
jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace
org.apache.commons.­dbcp.DbcpException: java.sql.SQLExcepti­on: Driver not
found for URL: jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace

I cannot ofcourse go beyond this since they have to talk to each other and
if that doesnt happen nothing else is going to work. In terms of the
system and the env var's; here goes:

RH Linux 9 (kernel 2.4.20)
j2sdk1.4.2_01
dspace - 1.1.1
postgres - 7.3.4

environment var's:
CLASSPATH=/home/dsp­ace/j2sdk1.4.2_01:/d­space/lib/postgresql­.jar:/dspace/lib:/us­r/local/pgsql/share/­java:/dspace/config:­/dspace/lib:/dspace/­lib/activation.jar:/­dspace/lib/commons-c­li.jar:/dspace/lib/c­ommons-collections.j­ar:/dspace/lib/commo­ns-dbcp.jar:/dspace/­lib/commons-pool.jar­:/dspace/lib/cos.jar­:/dspace/lib/dspace.­jar:/dspace/lib/hand­le.jar:/dspace/lib/j­ena.jar:/dspace/lib/­log4j.jar:/dspace/li­b/lucene.jar:/dspace­/lib/mail.jar:/dspac­e/lib/oaicat.jar:/ds­pace/lib/oro.jar:/ds­pace/lib/servlet.jar­:/dspace/lib/xalan.j­ar:/dspace/lib/xerce­s.jar:/home/dspace/j­2sdk1.4.2_01/lib:/ho­me/dspace/j2sdk1.4.2­_01:/home/dspace/j2s­dk1.4.2_01/jre/lib:/­home/dspace/j2sdk1.4­.2_01/jre/javaws:/ho­me/dspace/dspace-1.1­.1-source/build/clas­ses:/usr/local/pgsql­/share/java:/usr/loc­al/pgsql/share/java/­postgresql.jar
PGDATA=/usr/local/p­gsql/data
PGSQL_HOME=/usr/loc­al/pgsql/bin
JAVA_HOME=/home/dsp­ace/j2sdk1.4.2_01
PATH=/usr/kerberos/­bin:/usr/local/bin:/­bin:/usr/bin:/usr/X1­1R6/bin:/home/dspace­/apache-ant-1.5.4/bi­n:/usr/local/pgsql/s­hare/java:/usr/local­/pgsql/bin:/home/dsp­ace/j2sdk1.4.2_01:/h­ome/dspace/j2sdk1.4.­2_01/bin:/home/dspac­e/bin
JAVA_OPTS=-Xmx512M -Xms64M -Dfile.encoding=UTF­-8
JSSE_HOME=/home/dsp­ace/j2sdk1.4.2_01/jr­e/lib

Any help would be greatly appreciated.

Thanks.



-------------------­--------(end of broadcast)---------­------------------
TIP 7: don't forget to increase your free space map settings

Add comment
Richard Huxton 23 October 2003 17:39:57 permanent link ]
 On Thursday 23 October 2003 14:20, Ashwin Kutty wrote:>
I am currently testing a product by the name of dspace> (http://www.dspace.­org) and require installing java since dspace is> completely java based. The problem is that during its installation it> needs to talk to pgsql via jdbc and I am getting the error:> Exception occurred:org.apache­.commons.dbcp.DbcpEx­ception:> java.sql.SQLExcepti­on: Driver not found for URL:> jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace> org.apache.commons.­dbcp.DbcpException: java.sql.SQLExcepti­on: Driver not> found for URL: jdbc:p­ostgresql://space.library.dal.ca­:5432/dspace

It's complaining that it cannot find a driver. The obvious steps are:
1. Check you have your JDBC driver installed and configured.
2. Check you can connect using it.
3. Check it is in the relevant PATH
How far along this process have you got?

If you've done all those, we'll have to figure out why it can't find the
driver.
--
Richard Huxton
Archonet Ltd

-------------------­--------(end of broadcast)---------­------------------
TIP 6: Have you searched our list archives?

http://archives.pos­tgresql.org

Add comment
Ashwin Kutty 23 October 2003 17:52:29 permanent link ]
 
It's complaining that it cannot find a driver. The obvious steps are:> 1. Check you have your JDBC driver installed and configured.

Yes. I have done so. Included in the Classpath env var as well. I have
gone so far as to downloading it from jdbc.postgresql.org­ rather than
using the compiled one I have. Still no luck.
2. Check you can connect using it.

Via a test program? Done, no luck.. Same ol same ol..
3. Check it is in the relevant PATH

Besides the Classpath, does it need to be in the Path as well? If so, no
I havent added it in, but will do so if its required.
How far along this process have you got?

I am actually to the point of pulling teeth, cause I have added every jar
file I can think of and find in the classpath, re-installed everything and
still the case remains the same. I am guessing its just not finding it
due to some foolish little quirk I am missing some place. I even have tcp_ip
turned on btw in postgres to accept connections both from the box itself
and another machine through which I am using pgadmin and connecting fine.
If you've done all those, we'll have to figure out why it can't find the> driver.

I thought and still under the impression that its looking in the classpath
for this and I have edited /etc/profile to include it, checked env before
running the program and it according to it the jar file is included fine
and the classpath does have it; but still nothing. Checked file
permissions on the jar file and its fine as well. I have made changes to
the user's bash_profile as well to see if its a user related issue and
still nothing. Su'ed in as root and tried it out and yet nothing. Its
like for some reason the file just cant be found.

Any ideas and assistance would be greatly appreciated.

Thanks.


-------------------­--------(end of broadcast)---------­------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faqs/FAQ­.html

Add comment
Dardo D Kleiner 23 October 2003 18:08:22 permanent link ]
 Whenever I need to use the postgresql JDBC driver in my programs, I
have to manually include the line:

Class.forName("org.­postgresql.Driver");­

somewhere *before* I call DriverManager.getCo­nnection.

Try this in your test program and see if it works. Unfortunately,
you may not be able to modify the installer to support this, but
there might be another way?

HTH!

--
Dardo D. Kleiner
Connection Machine Facility, Center for Computational Sciences
Naval Research Laboratory (Washington, DC)
dkleiner@cmf.nrl.na­vy.mil -- 202.404.7019



-------------------­--------(end of broadcast)---------­------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faqs/FAQ­.html

Add comment
Richard Huxton 23 October 2003 18:32:05 permanent link ]
 On Thursday 23 October 2003 15:52, Ashwin Kutty wrote:>
I thought and still under the impression that its looking in the classpath> for this and I have edited /etc/profile to include it, checked env before> running the program and it according to it the jar file is included fine> and the classpath does have it; but still nothing. Checked file> permissions on the jar file and its fine as well. I have made changes to> the user's bash_profile as well to see if its a user related issue and> still nothing. Su'ed in as root and tried it out and yet nothing. Its> like for some reason the file just cant be found.

Looking at the dspace docs (system prerequisites):
"Then when PostgreSQL has compiled, copy the new postgresql.jar to
dspace-1.1/lib."

Strikes me as a bit strange it won't just use the classpath, but have you got
the jar in there too?

--
Richard Huxton
Archonet Ltd

-------------------­--------(end of broadcast)---------­------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresq­l.org so that your
message can get through to the mailing list cleanly

Add comment
Ashwin Kutty 23 October 2003 19:57:52 permanent link ]
 
Looking at the dspace docs (system prerequisites):> "Then when PostgreSQL has compiled, copy the new postgresql.jar to> dspace-1.1/lib.">
Strikes me as a bit strange it won't just use the classpath, but have you got> the jar in there too?

Yes and in j2sdk's lib directory and in pgsql's share directory and it is
all being called in the classpath.. no luck, still..


-------------------­--------(end of broadcast)---------­------------------
TIP 4: Don't 'kill -9' the postmaster

Add comment
Ashwin Kutty 23 October 2003 20:07:15 permanent link ]
 
Agreed, however if its working fine on someone else's end then the problem
is local to my environment. People do have difficulties setting up DSPACE
but I currently have the front-end running fine. The dependencies are
just crazy along with third party apps for DSPACE. However, all that is
done, its working and the front-end is up. I have what most others dont
and dont have what most others do. The jar part of it really gets me
cause all it needs is the CLASSPATH env var pointing to the appropriate
jar as I have done so many times in the past.

I know Java is on ok cause I have Tomcat running on the server fine as
well which is required for DSPACE as well. I just dont get why the
program cannot find the jar var. The create-administrato­r script runs the
script such that the call tends to be:
java -Xmx256m -classpath $FULLPATH "org.dspace.adminis­ter.CreateAdministra­tor"

Where, $FULLPATH=$CLASSPAT­H:$­JARS:$­DSPACEDIR/c­onfig
Where $JARS=`echo $DSPACEDIR/lib/*.ja­r | sed 's/ /\:/g'`

Now, the postgresql.jar gets pointed to twice; once from the script with
the JARS var and the second with the pointing to it from the $CLASSPATH
var set by me. I even echo the $FULLPATH var right before it hits the
java command and the echo brings up the huge PATH created by the script
that contains the jar files and the directories. I dont get however how
the script can have it in the $FULLPATH var but not use it when sent to
the command line?

On Thu, 23 Oct 2003, Dardo D Kleiner wrote:
Whenever I need to use the postgresql JDBC driver in my programs, I> have to manually include the line:>
Class.forName("org.­postgresql.Driver");­>
somewhere *before* I call DriverManager.getCo­nnection.>
Try this in your test program and see if it works. Unfortunately,> you may not be able to modify the installer to support this, but> there might be another way?>
HTH!>
--> Dardo D. Kleiner> Connection Machine Facility, Center for Computational Sciences> Naval Research Laboratory (Washington, DC)> dkleiner@cmf.nrl.na­vy.mil -- 202.404.7019>

---
"The difference between genius and stupidity is that genius has its
limits." - Albert Einstein

Ashwin
kutty..
Systems Administrator
Dalhousie University Libraries
(902) 494-2694


-------------------­--------(end of broadcast)---------­------------------
TIP 4: Don't 'kill -9' the postmaster

Add comment
Richard Huxton 23 October 2003 20:52:46 permanent link ]
 On Thursday 23 October 2003 18:07, Ashwin Kutty wrote:>
Now, the postgresql.jar gets pointed to twice; once from the script with> the JARS var and the second with the pointing to it from the $CLASSPATH> var set by me. I even echo the $FULLPATH var right before it hits the> java command and the echo brings up the huge PATH created by the script> that contains the jar files and the directories. I dont get however how> the script can have it in the $FULLPATH var but not use it when sent to> the command line?

Given everything else you've tried, I think you might be on the right track
here and somehow your environment variables are getting clobbered. How or why
I couldn't say (I'd suspect Tomcat, but you say you can't even run the
create-administator­ app).

The only other thing I can think of is that for some reason it's looking for
the wrong class. If dspace comes with the source, it might be worth checking
whether there isn't a mistake in the Class.forname() call.

I must admit, I don't know much java - can you use "strace" to track system
calls, or is there a similar utility that would let you see what files it is
searching for?
--
Richard Huxton
Archonet Ltd

-------------------­--------(end of broadcast)---------­------------------
TIP 6: Have you searched our list archives?

http://archives.pos­tgresql.org

Add comment
Andrew Rawnsley 24 October 2003 07:41:46 permanent link ]
 
Have you tried placing the jars in the $JAVA_HOME/jre/lib/­ext
directory? Jars there
are automatically searched by the JVM.


On Thursday, October 23, 2003, at 01:52 PM, Richard Huxton wrote:
On Thursday 23 October 2003 18:07, Ashwin Kutty wrote:>>
Now, the postgresql.jar gets pointed to twice; once from the script >> with>> the JARS var and the second with the pointing to it from the >> $CLASSPATH>> var set by me. I even echo the $FULLPATH var right before it hits the>> java command and the echo brings up the huge PATH created by the >> script>> that contains the jar files and the directories. I dont get however >> how>> the script can have it in the $FULLPATH var but not use it when sent >> to>> the command line?>
Given everything else you've tried, I think you might be on the right > track> here and somehow your environment variables are getting clobbered. How > or why> I couldn't say (I'd suspect Tomcat, but you say you can't even run the> create-administator­ app).>
The only other thing I can think of is that for some reason it's > looking for> the wrong class. If dspace comes with the source, it might be worth > checking> whether there isn't a mistake in the Class.forname() call.>
I must admit, I don't know much java - can you use "strace" to track > system> calls, or is there a similar utility that would let you see what files > it is> searching for?> -- > Richard Huxton> Archonet Ltd>
-------------------­--------(end of > broadcast)---------­------------------> TIP 6: Have you searched our list archives?>
-------------------­-

Andrew Rawnsley
President
The Ravensfield Digital Resource Group, Ltd.
(740) 587-0114
www.ravensfield.com­


-------------------­--------(end of broadcast)---------­------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Add comment
Ashwin Kutty 24 October 2003 22:09:32 permanent link ]
 
Given everything else you've tried, I think you might be on the right track> here and somehow your environment variables are getting clobbered. How or why> I couldn't say (I'd suspect Tomcat, but you say you can't even run the> create-administator­ app).

Tomcat only uses the minor few and runs like a charm. It doesnt seem to
be only the create-administrato­r app. As I mentioned earlier, this occurs
with any app trying to connect to pgsql via jdbc. I used the psql.java
file to compile and test that comes bundled in the postgres source. The
error I received was as follows:

Exception in thread "main" java.lang.NoClassDe­fFoundError: loaded class
psql was in fact named example.psql
at 0x40268e17: java.lang.Throwable­.Throwable(java.lang­.String)
(/usr/lib/./libgcj.­so.3)
at 0x4025bc8e: java.lang.Error.Err­or(java.lang.String)­
(/usr/lib/./libgcj.­so.3)
at 0x4025d6b6: java.lang.LinkageEr­ror.LinkageError(jav­a.lang.String)
(/usr/lib/./libgcj.­so.3)
at 0x4025eb36:
java.lang.NoClassDe­fFoundError.NoClassD­efFoundError(java.la­ng.String)
(/usr/lib/./libgcj.­so.3)
at 0x4022d555: ?? (??:0)
at 0x4022c96e: _Jv_ClassReader.han­dleClassBegin(int, int, int)
(/usr/lib/./libgcj.­so.3)
at 0x4022ab61: _Jv_ClassReader.par­se() (/usr/lib/./libgcj.­so.3)
at 0x4022a97f: _Jv_DefineClass(jav­a.lang.Class, byte[], int, int)
(/usr/lib/./libgcj.­so.3)
at 0x40247e6f: java.lang.ClassLoad­er.defineClass0(java­.lang.String,
byte[], int, int, java.security.Prote­ctionDomain) (/usr/lib/./libgcj.­so.3)
at 0x4025aaa3: java.lang.ClassLoad­er.defineClass(java.­lang.String,
byte[], int, int, java.security.Prote­ctionDomain) (/usr/lib/./libgcj.­so.3)
at 0x4025aa13: java.lang.ClassLoad­er.defineClass(java.­lang.String,
byte[], int, int) (/usr/lib/./libgcj.­so.3)
at 0x402f1f2e: java.net.URLClassLo­ader.findClass(java.­lang.String)
(/usr/lib/./libgcj.­so.3)
at 0x40248197:
gnu.gcj.runtime.VMC­lassLoader.findClass­(java.lang.String)
(/usr/lib/./libgcj.­so.3)
at 0x4025a904: java.lang.ClassLoad­er.loadClass(java.la­ng.String,
boolean) (/usr/lib/./libgcj.­so.3)
at 0x402488d9: _Jv_FindClass(_Jv_U­tf8Const, java.lang.ClassLoad­er)
(/usr/lib/./libgcj.­so.3)
at 0x40244cdd: java.lang.Class.for­Name(java.lang.Strin­g, boolean,
java.lang.ClassLoad­er) (/usr/lib/./libgcj.­so.3)
at 0x40244d9f: java.lang.Class.for­Name(java.lang.Strin­g)
(/usr/lib/./libgcj.­so.3)
at 0x402ad01d: gnu.gcj.runtime.Fir­stThread.run()
(/usr/lib/./libgcj.­so.3)
at 0x4024fc4c: _Jv_ThreadRun(java.­lang.Thread) (/usr/lib/./libgcj.­so.3)
at 0x4021c8ac: _Jv_RunMain(java.la­ng.Class, byte const, int, byte
const, boolean) (/usr/lib/./libgcj.­so.3)
at 0x08048910: ?? (??:0)
at 0x420156a4: __libc_start_main (/lib/tls/libc.so.6­)
at 0x080486c1: ?? (??:0)

The only other thing I can think of is that for some reason it's looking for> the wrong class. If dspace comes with the source, it might be worth checking> whether there isn't a mistake in the Class.forname() call.

Put it this way, the build works for the rest and after some testing found
that outside of create-admin I cant connect to it.
I must admit, I don't know much java - can you use "strace" to track system> calls, or is there a similar utility that would let you see what files it is> searching for?

strace revealed nothing really that could explain this behaviour.

Thanks a lot for all the assistance btw, I really appreciate it.

Hope you have some more ideas to help out.


-------------------­--------(end of broadcast)---------­------------------
TIP 7: don't forget to increase your free space map settings

Add comment
Guest 18 December 2008 17:44:32 permanent link ]
 I want to Install D-Space using a platform named Xampp. Xampp has the apache server and uses a Java Compiler. But can i use Xampp's MySQL instead of postgre or Oracle?
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PostgreSQL database development > Setting up DSPACE for Postgres access 18 December 2008 17:44:32

see also:
[JBoss Seam] - Request: fine-grained…
[JBoss Portal] - Found it…
[Installation, Configuration &…
pass tests:
see also:
mac video converter review
Top 10 free video converters
What we don't know about Apple iPad

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .