reset password
Author Message
Honglin Xia
Posts: 9
Posted 14:39 Oct 03, 2010 |

Hello Professor Sun and CS520 classmates,  I have below issues need some help, thank you very much!   Honglin Xia

 

C:\Development\workspace\csns\psql csns

Password:   -------------------------------------> Q#1:    I have to key in the pw each time, how to avoid this?

psql (8.4.4)

Tpye “help” for help

csns=> \i \db\csns-create.sql  ---------------->Q#2:  I should use \db\csns-create.sql instead of /db/csns-create.sql on Window XP, is it right?

db: Permission denied  ------------------------> Q# 3:  I guess this might because I have used the wrong username & pw during "add a new SVN Repository".   I should use "account information on the CS3 server's usename and pw" right?.  If this is the reason, how to change the username and pw? I tried to delete "csns" project and delete "SVN repository";  reset SVN repository, but, this time I did not see username and pw setup dialogue window.

 


Q#4:   the first time I forget to "uncheck Generate Deployment Descriptor, then click Finish.", then I delete the project "csns" and "SVN repository" and restart the whole process. I am not sure if this will cause more problems.

 

Q#5:  at the csns -->build.properties code screen: 

Do I have to change the "Information about the database" to my own info as below?

db.username=Honglin

db.password= *****



cysun
Posts: 2935
Posted 15:08 Oct 03, 2010 |

1. Edit the pg_hba.conf file under the data folder in the PostgreSQL folder. There should be a line in the file that looks like

host    all         all         127.0.0.1/32          md5

Change md5 to trust - this will allow anybody to connect to any database on the local machine without having to enter the password.

2. It should be

csns=> \i db/csns-create.sql

First of all, it's still forward slash (/), not \. Java and PostgreSQL (and cross-platform software in general) take / as the path separator and convert it internally to \ if necessary. \ is usually used as the escape character in programming languages, so if you want to use it, you usually need to use double back slashes, e.g. db\\csns-create.sql.

Secondly, the parameter to the \i command is the path to the script file. Because the current directory is C:\Development\workspace\csns, the path to the script should be db/csns-create.sql.

3. Caused by wrong path in 2.

4. If you started over, it should be fine.

5. Yes.

Honglin Xia
Posts: 9
Posted 16:01 Oct 03, 2010 |

Thank you professor Sun! My  question 1 to 5 have all been solved according to your instruction.

********

I have a new question: Q#6: 

When I run csns project on server, I got a 500 message. (I used to have "csns webpage" display here before, but I do not know what I have changed to caused this 500 issue this time.)  Please help.

 


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet csns threw exception
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Unknown Source)

root cause

cysun
Posts: 2935
Posted 16:23 Oct 03, 2010 |
Honglin Xia wrote:

Thank you professor Sun! My  question 1 to 5 have all been solved according to your instruction.

********

I have a new question: Q#6: 

...

The error message doesn't say much so it's hard to tell what's wrong. Try the following:

  • Make sure the Ant builder is set correctly
  • Exit Eclipse
  • Delete the csns-*.xml files under WEB-INF
  • Delete all files under build/classes
  • Start Eclipse
  • Refresh the project then run it again

If this doesn't fix the problem, bring your laptop to my office hours tomorrow.