• not able to connect sql server 2005

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #9367  by prashanth
 
Dear Sir

I liked OpenKM very much. Now i m working on this. But i not able to connect openkm to sql server 2005. I am reading wiki/openkm(documentation). but still i not able to connect. In documentation i read generating database script. is it nessaccery to exicute that piece of code?. In my SQLserver portion i did asitis there. I created 2 databases. enabled TCP/IP in configuration manager. In JBoss datasource portion i not found sql server 2005 type mapping portion in standardjbosscmp-jdbc.xml file. I dont no what i am missing. Please give me an solution for my problem.

Thankyou

Regards
Prashanth
 #9388  by prashanth
 
Dear Sir

I downloaded sqljdbc_2.0.1803.100_enu from net. I copied sqljdbc,sqljdbc4 jar files into destination folder as you mentioned in the document. Even though after i run jboss, Finally i getting this error. Please give me an solution for this
Code: Select all
Caused by: java.sql.SQLException: Table not found in statement [/* from CronTab
ct order by ct.id */ select crontab0_.CT_ID as CT1_33_, crontab0_.CT_NAME as CT2
_33_, crontab0_.CT_EXPRESSION as CT3_33_, crontab0_.CT_TYPE as CT4_33_, crontab0
_.CT_FILE_CONTENT as CT5_33_, crontab0_.CT_FILE_NAME as CT6_33_, crontab0_.CT_MA
IL as CT7_33_, crontab0_.CT_ACTIVE as CT8_33_, crontab0_.CT_LAST_BEGIN as CT9_33
_, crontab0_.CT_LAST_END as CT10_33_ from OKM_CRON_TAB crontab0_ order by cronta
b0_.CT_ID]
        at org.hsqldb.jdbc.Util.throwError(Unknown Source)
        at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepar
eStatement(BaseWrapperManagedConnection.java:449)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareS
tatement(BaseWrapperManagedConnection.java:437)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(Wr
appedConnection.java:243)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatch
er.java:505)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatch
er.java:423)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatc
her.java:139)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
        at org.hibernate.loader.Loader.doQuery(Loader.java:673)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2220)
        ... 11 more
Isit nessacery to exicute this piece of code that mentioned in generating database script portion. for comiling this code we need an comiler. I installed jdk,jre also. but still i not able to compile.
Code: Select all
import java.io.File;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
 
public class Test {
  public static void main(String[] args) throws Exception {
    Configuration cfg = new Configuration();
    cfg.configure(new File("/path/to/hibernate.cfg.xml"));
    SchemaExport se = new SchemaExport(cfg);
    se.setOutputFile("/path/to/schema.sql");
    se.setFormat(true);
    se.create(false, false);
  }
}
 #9390  by jllort
 
The java application you post generates the sql script. You must do minimal changes on default generated script, due running on sql Server ( that's the aditional script we put on the wiki ).

Do you've got tables on okm_app ? Have been generated some ? seems the table crontab not exists
 #9413  by jllort
 
Is the property hibernate.hbm2ddl=create in your OpenKM.cfg
Sure you've got some problem with jdbc connection !!!
Delete server.log and take a look at starting must appearing some error explaining what happens, because it's completely sure that OpenKM is not connecting to your DBMS could be several problems, the driver is not copied in lib folder, the url connection or pass are wrong, etc...
Test with some client that your connection data is right, not using SQL Server Studio that obviously can connect to DBMS and is not good for testing if your DBMS exposed configuration is right done.
 #9455  by prashanth
 
Dear Sir

I copied 2 jar file into lib folder. I got only 2 jar file. Is there any other drivers to copy to lib folder. Please let me know.
 #9472  by prashanth
 
Hello sir

I copied sqljdbc, sqljdbc4 jar files into lib directory. Now i given an path for java in environmental variable for compiling java file. After that when i try to run jboss using a command run -b 0.0.0.0, Its not showing anything(No error msg, nothing). I checked in services also, jboss not running. I m working in server 2008(64) bit. Please give me an solution
 #9480  by jllort
 
That's other kind of problem, that has no relation with sql server.
You've changed your java home no ? the problem is there.
 #9505  by prashanth
 
Thank you sir for replaying.

I solved that problem. that is b'use changes in the home path. But now i return to same problem. I copied sqljdbc, sqljdbc4 jar file into lib directory. Actually i not understand the type mapping part in the Jbossdatasource . Where i should place that piece of code?. Pleace explain me. what i did is i copied that piece of code into mssql-ds.xml file in the \jboss-4.2.3.GA\docs\examples\jca directory. then i changed the username into the username is used to connect the sqlserver 2005. Their is no password used for connect the server 2005 , So i kept password nothing.
Please let me know what is the mistake i did? What is the solution.
 #9506  by jllort
 
You've got a file called openkm-ds.xml into server/default/deploy you must make the changes there.

Don't worry about standardjbosscmp-jdbc.xml and the mapping, because we don't using CMP on OpenKM and really this definition it's not used by application.
 #9513  by prashanth
 
I just edited openkm-ds file. After that i run the jboss, I not getting an error that showing before like 'Table not created something lik that. I already added error block in my forum.Now its not giving any error like this. But tables are not created in database. I dontno what is happening. Please giv me an solution

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.