Hi J�ns,
Yup, you're right about the URL : mssqlserver4 is the right string to use !
Sorry about that (I should have cut & pasted it instead of copying it... ;o)
Happy it helped you through...
Yes, you're right, do make some test before using a JDBC driver, or you'll
may run into troubles at the less affordable time in your development
schedule.
FYI, it also works with i-Net JDBC type 4 driver (4 times less expensive
than WL)...
Pascal Davoust.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 28, 2000 2:36 PM
To: [EMAIL PROTECTED]
Subject: RE: [jBoss-User] jBoss Final 2.0 & MS SQL & WebLogic JDBC
driver
Thanx,
I now got the SQLServer up and running together with Jboss and and the
driver from Weblogic (Can't get the driver from Atinav to work though...It
seems like you have to make the right choice with those drivers...). A small
comment though:
<attribute
name="URL">jdbc:weblogic:mssqldriver4:j2eedb@mymachine:1433</attribute>
in your supplied code really should be
<attribute
name="URL">jdbc:weblogic:mssqlserver4:j2eedb@mymachine:1433</attribute>
shouldn�t it?
Regards and thanks again
/J�ns
-----Original Message-----
From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 27, 2000 5:16 PM
To: jBoss Users Mailing List
Subject: [jBoss-User] jBoss Final 2.0 & MS SQL & WebLogic JDBC driver
Hi all,
I finally got the CMP example (CD sample) from
http://www.jboss.org/documentation/jboss_cmp_trail_index.html
running with MS SQL Svr 7 as the DB store, using WebLogic type 4 JDBC
driver. After a few (solved) problems, it runs quite well.
What I did (anybody interested ? ;o) :
** First, I configured the Data source to use MS SQL Svr 7 and the WebLogic
driver :
++[jBoss Home]/conf/default/jboss.properties++
Modified the 'jdbc.drivers' property :
jdbc.drivers=org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,weblog
ic.jdbc.mssqlserver4.Driver
--
++[jBoss Home]/conf/jboss.conf++
Copied [jBoss Home]/conf/default/jboss.conf to [jBoss Home]/conf/jboss.conf,
replaced any '../../lib/ext/' by '../lib/ext/' and added the following node
:
<MLET CODE="org.jboss.jdbc.XADataSourceLoader"
ARCHIVE="jboss.jar,weblogicdriver.jar" CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="SqlSvrConnectionPool">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
--
++[jBoss Home]/conf/jboss.jcml++
Copied [jBoss Home]/conf/default/jboss.jcml to [jBoss Home]/conf/jboss.jcml,
and added the following node :
<mbean
name="DefaultDomain:service=XADataSource,name=SqlSvrConnectionPool">
<attribute
name="URL">jdbc:weblogic:mssqldriver4:j2eedb@mymachine:1433</attribute>
<attribute name="Password">test</attribute>
<attribute name="JDBCUser">test</attribute>
</mbean>
--
** Then, I added the jaws.xml descriptor to the CD archive, to specify to
use the newly defined MS SQL datasource instead of the DefaultDS :
++[archive root]/META-INF/jaws.xml++
<?xml version="1.0" encoding="Cp1252"?>
<jaws>
<datasource>java:/SqlSvrConnectionPool</datasource>
<type-mapping>MS SQLSERVER</type-mapping>
<enterprise-beans>
<entity>
<ejb-name>CDBean</ejb-name>
<table-name>CD</table-name>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
<time-out>300</time-out>
</entity>
</enterprise-beans>
</jaws>
--
And here we are !
The CD table is created automatically when deploying the archive.
Then, uploading the CDs into the DB raises an error on the client side, and
nothing happens (table is still empty). I modified the Upload.java file so
that a stack trace is displayed instead of an ambiguous 'cannot open
file...' message, and it turns out that some of the records have null
fields. A quick look into the DB shows that the table was created with the
NULL option unchecked for every field !
Then check this option for all the fields (except the ID, which is the
primary key, and you definetly don't want to have NULLs here...), and try
running the Upload client again.
Another exception occurs, but more explicit : a duplicate ID has been found
in the CDs.txt file (from which the Upload client reads the records to
populate the table with).
Is it made on purpose to show how such a situation is handled ?
Anyway, change the ID to an unused one, and the database is correctly filled
.
>From that point, no real problem : lookups are correctly done, removing the
records from the table is all right...
I do have some IllegalStateException with the message "Attempt to put in the
cache an object that is already there", but I guess it's not important
(hoping so, actually).
Next step : same thing with i-net Software JDBC driver and MS SQL Svr 7 !
I hope that it can help anybody who tries to do the same thing.
Pascal Davoust.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]