I've been tas,ked with porting a couple of servlets from JBoss 2.4.4 to 4.2.1.  
They run on Windows 2000 servers with MS SQL Server 2K.   Problem is, I don't 
have much experience with J2EE and app servers, so I'm working by trial and 
error.  

I configured the mssql-ds.xml file, deployed the Opta2000.jar (with inet 
drivers), and created a test servlet that connects in the same manner as the 
application:

InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("java:/mydb");
DataSource fDataSource = (DataSource) obj;
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl fXADataSource = 
    (org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl) obj; 

But the last cast is throwing this:

java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource
        at Test400.doGet(Test400.java:25)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
(rest of stack trace omitted).

I've also tried it with a mssql-xa-ds.xml using the XADataSourceImpl above as 
the datasource class, but the WrapperDataSource is still returned.  Below is 
the relevant portion of the jboss.jcml deployment, which is used by the code 
above.   If someone could help me get this ported to 4.2.1 it would be greatly 
appreciated.

>From 2.4.4 Jboss.jcml:

 
     com.inet.tds.TdsDriver,com.ibm.as400.access.AS400JDBCDriver
  


  
   org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
   mydb
   jdbc:inetdae:myserver:1433?database=mydbname
   user
   pass
   false
   false
   false
   true
   120000
   1800000
   false
   false
   1.0
   0
   40
  


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111733#4111733

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111733
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to