Product Support > SPECvirt_sc2013

Errors in dbsrver VM when loaddb_postgres.sh is executed

(1/9) > >>

Miles:
I have put postgresql-9.2-1004.jdbc4.jar in /opt and follow Example VM Setup Guide V1.03 and find some errors as below.

[root@dbserver other_scripts]# ./loaddb_postgres.sh
Script started Wed May 31 15:28:28 CST 2017
sleep 10
Starting Database Load
Loading database with orders_injection_rate = 500
Loading database with numThreads  = 4
Loading Databases ...
INFO : IR supplied : 500
INFO : stepped IR  : 500
java.lang.ClassNotFoundException: org.postgresql.Driver
   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:190)
   at org.spec.jappserver.load.DatabaseConnection.getConnection(DatabaseConnection.java:201)
   at org.spec.jappserver.load.LoadCorp.main(LoadCorp.java:114)
   at org.spec.jappserver.load.LoadAll.main(LoadAll.java:51)
Exception in thread "main" java.lang.RuntimeException: Failed to load Corp domain properlyorg.postgresql.Driver
   at org.spec.jappserver.load.LoadAll.main(LoadAll.java:55)
Ignoring read() errors...
Ignoring read() errors...
Ignoring read() errors...
Launcher: done waiting.
Finished Database Load
Script ended Wed May 31 15:28:38 CST 2017

Does it mean that I miss any package?

abond:
Have you verified that the database is up and accessible?  You could try to connect to it via a standalone client utility like psql. 

AnoopGupta:
Hello Miles,

ClassNotFound exception suggests that the loader is unable to locate the jdbc jar file you have under /opt.

Please check your jdbc jar name and location specified in /opt/SPECjAppServer2004/config/glassfish.env and update it to point to your /opt/postgresql-9.2-1004.jdbc4.jar

If you continue to see this issue, please attach your glassfish.env file, as well as output of the following command:
jar -tvf /opt/postgresql-9.2-1004.jdbc4.jar | grep postgresql | grep Driver

Miles:
Hi abond
I connect to specdb on the DBServer from the AppServer using psql -h specdb -U spec -d specdb:

[root@appserver bin]# psql -h specdb -U spec -d specdb
psql: could not connect to server: Connection refused
   Is the server running on host "specdb" (10.10.1.5) and accepting
   TCP/IP connections on port 5432?

Hi AnoopGupta
I have attached my glassfish.env file.
The result returned by typing the command is as below: 

[root@dbserver Desktop]# jar -tvf /opt/postgresql-9.2-1004-jdbc4.jar | grep postgresql | grep Driver
   769 Fri Nov 01 13:40:46 CST 2013 org/postgresql/Driver$1.class
  2790 Fri Nov 01 13:40:46 CST 2013 org/postgresql/Driver$ConnectThread.class
 15877 Fri Nov 01 13:40:46 CST 2013 org/postgresql/Driver.class
  1093 Fri Nov 01 13:40:52 CST 2013 org/postgresql/util/PSQLDriverVersion.class
[root@dbserver Desktop]#

Thanks for both of your help!

abond:
Hey Miles,

Is this issue still a problem for you? 

If so, can you log into the postgresql database using psql on the dbserver itself?  If so, have you tried disabling the firewall on the dbserver and retrying your psql database connection from the appserver?

Thanks,
Andy

Navigation

[0] Message Index

[#] Next page

Go to full version