Hello everyone,
I have a simple aspect that invokes a web service which needs to connect to SQLServer to get some information from SQLServer database. The aspect takes an integer values and also return an integer value. Every time I try calling my aspect, I can't get the results from database. I searched a lot trying to figure out how to connect my SQLServer database with AO4BPEL.
After days of searching I managed to create a context.xml file in the ao4ode\META-INF which contains the following:
<Context path="/ao4ode" docBase="ao4ode" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/ao4ode"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="xxx"
password="xxx"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=ValidatedData;user=xxx;password=xxx"/>
</Context>
I also configured the web.xml in the ao4ode\WEB-INF with:
<resource-ref>
<res-ref-name>jdbc/ao4ode</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
And created ao4ode-axis2.properties with:
ao4ode-axis2.db.mode=EXTERNAL
ao4ode-axis2.db.ext.dataSource=java:comp/env/jdbc/ao4ode
ao4ode-axis2.http.connection-manager.max-per-host=100
ao4ode-axis2.http.connection-manager.max-total=100
ao4ode-axis2.process.dehydration=true
ao4ode-axis2.cluster.localRoute.targets=
http://myloadbalancer.com:8080/ao4ode/processes/ ode-axis2.cluster.localRoute.base=
http://localhost:8888/ao4ode/processes/ ode-axis2.db.emb.type=derby
When I used the previous configuration, tomcat didn't deploy the aspect and I get "SOAP message MUST NOT contain a Document Type Declaration(DTD)"
If I comment the configuration in the ao4ode-axis2.properties, Tomcat deploys the aspect but when I try to evaluate the process I get "axis2nsx:SelectionFailure".
I also tried to change the db.mode in ao4ode-axis2.properties to internal and embedded but I got database derby error connection.
I've been trying to figure out what's causing the problem. I've tried many different configurations on the previous files, I searched a lot on the internet and I keep getting the same errors and sometimes a few extra ones with most of the solutions I've tried. I don't know whether the error in my connection with SQLServer or if it is in my aspect,
please... If anyone have an ideas about what could be causing those errors, I would be very grateful for any help!
I use:
apache-tomcat-6.0.35.
apache-ode-1.3.6
axis2-1.6.2
sqljdbc4.jar in tomcat\lib
ao4ode2