Discussion:
[Middlegen-user] Newbie question
Matthew Schleindl
2004-08-19 19:13:09 UTC
Permalink
Hi -

Looks like I can run the basic hsqldb stuff, as
indicated in the 'Getting Started' section 'Create
tables' ("7 of 7 SQL statements executed
successfully").

Now for my stuff...

I've got an Oracle DB with 5000+ tables, so I'm
warming up on MS Sequel Server 2000's 'Northwind'
sample running locally (I am able to connect to it via
JDBC).

When I modify the corresponding mssql.xml and try the
same thing, I get:

Class Not Found: JDBC driver
com.microsoft.jdbc.sqlserver.SQLServerDriver could not
be loaded

My mssql.xml looks like this:

<property name="database.script.file"
value=""/>
<property name="database.driver.file"
value="${lib.dir}/mssqlserver.zip"/>
<property name="database.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url"
value="jdbc:Microsoft:sqlserver://mfsmobile:1433;DatabaseName=Northwind"/>
<property name="database.userid"
value="sa"/>
<property name="database.password"
value="password"/>
<property name="database.schema"
value=""/>
<property name="database.catalog"
value=""/>

<!--poperty name="jboss.datasource.mapping"
value="MS SQLSERVER"/-->
<property name="jboss.datasource.mapping"
value="MS SQLSERVER2000"/>


Any ideas?

Thanks in advance...
M.-Leander Reimer
2004-08-20 05:17:04 UTC
Permalink
Hi Matthew,

everythings looks kind of alright, not sure about your driver ZIP,

<property name="database.driver.file"
Post by Matthew Schleindl
value="${lib.dir}/mssqlserver.zip"/>
That usually isn't right, because the driver is in a JAR not a ZIP. The
MS SQL Server driver consists of 3 JARs, msbase.jar, mssqlserver.jar and
msutil.jar and all three need to be on your CLASSPATH. Try putting all
JARs into the database.driver.file property separeted by ;

Hope that solves the problem.

Leander
Post by Matthew Schleindl
Hi -
Looks like I can run the basic hsqldb stuff, as
indicated in the 'Getting Started' section 'Create
tables' ("7 of 7 SQL statements executed
successfully").
Now for my stuff...
I've got an Oracle DB with 5000+ tables, so I'm
warming up on MS Sequel Server 2000's 'Northwind'
sample running locally (I am able to connect to it via
JDBC).
When I modify the corresponding mssql.xml and try the
Class Not Found: JDBC driver
com.microsoft.jdbc.sqlserver.SQLServerDriver could not
be loaded
<property name="database.script.file"
value=""/>
<property name="database.driver.file"
value="${lib.dir}/mssqlserver.zip"/>
<property name="database.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<property name="database.url"
value="jdbc:Microsoft:sqlserver://mfsmobile:1433;DatabaseName=Northwind"/>
<property name="database.userid"
value="sa"/>
<property name="database.password"
value="password"/>
<property name="database.schema"
value=""/>
<property name="database.catalog"
value=""/>
<!--poperty name="jboss.datasource.mapping"
value="MS SQLSERVER"/-->
<property name="jboss.datasource.mapping"
value="MS SQLSERVER2000"/>
Any ideas?
Thanks in advance...
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Matthew Schleindl
2004-08-20 10:46:11 UTC
Permalink
Hi Leander -

Thanks for the quick response!

Actually, the first time I tried it I set the
driver.file property to the three jars, separated by
semicolons like a classpath, and I had the same
problem...

Since I wasn't sure about how to Middlegen was
expecting three separate jars, and I couldn't find an
example, I just dumped the contents of the three jars
into a single zip and used that, after testing the zip
by making sure I could establish a JDBC connection.

I'll dispense with the zip and go back to the three
jars, but unless you hear from me again you can assume
I'm getting the same result.

Thanks again,
Matt
Post by M.-Leander Reimer
Hi Matthew,
everythings looks kind of alright, not sure about
your driver ZIP,
<property name="database.driver.file"
Post by Matthew Schleindl
value="${lib.dir}/mssqlserver.zip"/>
That usually isn't right, because the driver is in a
JAR not a ZIP. The
MS SQL Server driver consists of 3 JARs, msbase.jar,
mssqlserver.jar and
msutil.jar and all three need to be on your
CLASSPATH. Try putting all
JARs into the database.driver.file property
separeted by ;
Hope that solves the problem.
Leander
Post by Matthew Schleindl
Hi -
Looks like I can run the basic hsqldb stuff, as
indicated in the 'Getting Started' section 'Create
tables' ("7 of 7 SQL statements executed
successfully").
Now for my stuff...
I've got an Oracle DB with 5000+ tables, so I'm
warming up on MS Sequel Server 2000's 'Northwind'
sample running locally (I am able to connect to it
via
Post by Matthew Schleindl
JDBC).
When I modify the corresponding mssql.xml and try
the
Post by Matthew Schleindl
Class Not Found: JDBC driver
com.microsoft.jdbc.sqlserver.SQLServerDriver could
not
Post by Matthew Schleindl
be loaded
<property name="database.script.file"
value=""/>
<property name="database.driver.file"
value="${lib.dir}/mssqlserver.zip"/>
<property name="database.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.url"
value="jdbc:Microsoft:sqlserver://mfsmobile:1433;DatabaseName=Northwind"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.userid"
value="sa"/>
<property name="database.password"
value="password"/>
<property name="database.schema"
value=""/>
<property name="database.catalog"
value=""/>
<!--poperty name="jboss.datasource.mapping"
value="MS SQLSERVER"/-->
<property name="jboss.datasource.mapping"
value="MS SQLSERVER2000"/>
Any ideas?
Thanks in advance...
-------------------------------------------------------
Post by M.-Leander Reimer
Post by Matthew Schleindl
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
Post by Matthew Schleindl
100pk Sonic DVD-R 4x for only $29 -100pk Sonic
DVD+R for only $33
Post by Matthew Schleindl
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
Post by Matthew Schleindl
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by M.-Leander Reimer
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R
for only $33
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Matthew Schleindl
2004-08-20 11:09:06 UTC
Permalink
Hi Leander -

Ok, went back to the original jars, and the failure is
different (I've tried using forward and backward
slashes for separators - result is the same):

BUILD FAILED
C:\jars\Middlegen\middlegen-2.0-vo\samples\build.xml:161:
The JDBC driver you have specified by including one of
the files in C:\jars\Middle
gen\middlegen-2.0-vo\samples/config/database
doesn't exist. You have to download this driver
separately and put it in
C:\jars\Middlegen\middlegen-2.0-vo\samples/lib\msbase.jar;C:\
jars\Middlegen\middlegen-2.0-vo\samples/lib\mssqlserver.jar;C:\jars\Middlegen\middlegen-2.0-vo\samples/lib\msutil.jar
Please make sure you're using a version that is
equal or superior to the one we looked for.
If you name the driver jar file differently,
please update the database.driver.file property
in the
C:\jars\Middlegen\middlegen-2.0-vo\samples/config/database/xxx.xml
file accordingly.

Total time: 1 second
Post by M.-Leander Reimer
Hi Matthew,
everythings looks kind of alright, not sure about
your driver ZIP,
<property name="database.driver.file"
Post by Matthew Schleindl
value="${lib.dir}/mssqlserver.zip"/>
That usually isn't right, because the driver is in a
JAR not a ZIP. The
MS SQL Server driver consists of 3 JARs, msbase.jar,
mssqlserver.jar and
msutil.jar and all three need to be on your
CLASSPATH. Try putting all
JARs into the database.driver.file property
separeted by ;
Hope that solves the problem.
Leander
Post by Matthew Schleindl
Hi -
Looks like I can run the basic hsqldb stuff, as
indicated in the 'Getting Started' section 'Create
tables' ("7 of 7 SQL statements executed
successfully").
Now for my stuff...
I've got an Oracle DB with 5000+ tables, so I'm
warming up on MS Sequel Server 2000's 'Northwind'
sample running locally (I am able to connect to it
via
Post by Matthew Schleindl
JDBC).
When I modify the corresponding mssql.xml and try
the
Post by Matthew Schleindl
Class Not Found: JDBC driver
com.microsoft.jdbc.sqlserver.SQLServerDriver could
not
Post by Matthew Schleindl
be loaded
<property name="database.script.file"
value=""/>
<property name="database.driver.file"
value="${lib.dir}/mssqlserver.zip"/>
<property name="database.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.url"
value="jdbc:Microsoft:sqlserver://mfsmobile:1433;DatabaseName=Northwind"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.userid"
value="sa"/>
<property name="database.password"
value="password"/>
<property name="database.schema"
value=""/>
<property name="database.catalog"
value=""/>
<!--poperty name="jboss.datasource.mapping"
value="MS SQLSERVER"/-->
<property name="jboss.datasource.mapping"
value="MS SQLSERVER2000"/>
Any ideas?
Thanks in advance...
-------------------------------------------------------
Post by M.-Leander Reimer
Post by Matthew Schleindl
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
Post by Matthew Schleindl
100pk Sonic DVD-R 4x for only $29 -100pk Sonic
DVD+R for only $33
Post by Matthew Schleindl
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
Post by Matthew Schleindl
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by M.-Leander Reimer
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R
for only $33
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
M.-Leander Reimer
2004-08-20 11:34:06 UTC
Permalink
OK, forget the stuff with the ; separated JARs. Put all three JARs into
the samples/lib/ directory. Then put ${lib.dir}/mssqlserver.jar as the
value for the database.driver.file property.

If you want to put everything into one file, you have to put the
contents of all 3 JARs into one big JAR and use this instead, but I have
never done that.

If that doesn't solve it, I don't know anymore :-)

Regards,
Leander
Post by Matthew Schleindl
Hi Leander -
Ok, went back to the original jars, and the failure is
different (I've tried using forward and backward
BUILD FAILED
The JDBC driver you have specified by including one of
the files in C:\jars\Middle
gen\middlegen-2.0-vo\samples/config/database
doesn't exist. You have to download this driver
separately and put it in
C:\jars\Middlegen\middlegen-2.0-vo\samples/lib\msbase.jar;C:\
jars\Middlegen\middlegen-2.0-vo\samples/lib\mssqlserver.jar;C:\jars\Middlegen\middlegen-2.0-vo\samples/lib\msutil.jar
Please make sure you're using a version that is
equal or superior to the one we looked for.
If you name the driver jar file differently,
please update the database.driver.file property
in the
C:\jars\Middlegen\middlegen-2.0-vo\samples/config/database/xxx.xml
file accordingly.
Total time: 1 second
Post by M.-Leander Reimer
Hi Matthew,
everythings looks kind of alright, not sure about
your driver ZIP,
<property name="database.driver.file"
Post by Matthew Schleindl
value="${lib.dir}/mssqlserver.zip"/>
That usually isn't right, because the driver is in a
JAR not a ZIP. The
MS SQL Server driver consists of 3 JARs, msbase.jar,
mssqlserver.jar and
msutil.jar and all three need to be on your
CLASSPATH. Try putting all
JARs into the database.driver.file property
separeted by ;
Hope that solves the problem.
Leander
Post by Matthew Schleindl
Hi -
Looks like I can run the basic hsqldb stuff, as
indicated in the 'Getting Started' section 'Create
tables' ("7 of 7 SQL statements executed
successfully").
Now for my stuff...
I've got an Oracle DB with 5000+ tables, so I'm
warming up on MS Sequel Server 2000's 'Northwind'
sample running locally (I am able to connect to it
via
Post by Matthew Schleindl
JDBC).
When I modify the corresponding mssql.xml and try
the
Post by Matthew Schleindl
Class Not Found: JDBC driver
com.microsoft.jdbc.sqlserver.SQLServerDriver could
not
Post by Matthew Schleindl
be loaded
<property name="database.script.file"
value=""/>
<property name="database.driver.file"
value="${lib.dir}/mssqlserver.zip"/>
<property name="database.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.url"
value="jdbc:Microsoft:sqlserver://mfsmobile:1433;DatabaseName=Northwind"/>
Post by M.-Leander Reimer
Post by Matthew Schleindl
<property name="database.userid"
value="sa"/>
<property name="database.password"
value="password"/>
<property name="database.schema"
value=""/>
<property name="database.catalog"
value=""/>
<!--poperty name="jboss.datasource.mapping"
value="MS SQLSERVER"/-->
<property name="jboss.datasource.mapping"
value="MS SQLSERVER2000"/>
Any ideas?
Thanks in advance...
-------------------------------------------------------
Post by M.-Leander Reimer
Post by Matthew Schleindl
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
Post by Matthew Schleindl
100pk Sonic DVD-R 4x for only $29 -100pk Sonic
DVD+R for only $33
Post by Matthew Schleindl
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
Post by Matthew Schleindl
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by M.-Leander Reimer
SF.Net email is sponsored by Shop4tech.com-Lowest
price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R
for only $33
Save 50% off Retail on Ink & Toner - Free Shipping
and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Post by M.-Leander Reimer
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...