The architecture between JBoss AS 5 and wildfly is vastly different. The specific error that you are seeing has a good chance to be due to the datasource not being deployed. With wildfly, the datasource has to be defined within the standalone.xml (or domain.xml, depending on which profile you are utilizing). Additionally, the ojdbc jar file has to be configured as a module now, and not deployed as part of your application.
Thanks @Greg for the prompt reply.
I have one more doubt, i.e, I have a db.jndi.properties deployed and have environments details which has to match the ds.xml file or else it is throwing error like subcontext not found.
And the problem is in the code it has reference like below:
String propertiesFileName = "/db.jndi.properties";
props = new Properties();
String path = System.getProperty("jboss.server.config.dir");
String propertiesPath = path + propertiesFileName;
FileInputStream fis = new FileInputStream(propertiesPath);
System.out.println("********** Loaded application properties from file: " + propertiesPath);
so , i doubt if i remove the ds.xml file and place all the datasource details in standalone.xml will it work ?
I believe it is possible to deploy the driver as a jboss module, and then define that driver in standalone.xml. You application could then mark that driver module as a dependency. After that, you can use your ds.xml in your application to establish the connection. The ds.xml would probably have to reference the driver by the driver name as defined in the standalone.xml.
I think that older versions of wildfly did allow this sort of configuration, but that it was deprecated. It's possible that WF 13 doesn't support it anymore.
Hi. I tried with the possibility but the server is not starting in this scenario. Also I have tried putting the below in the standalone.xml to pick up the ds.xml file:
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
<deployment-scanner name="new-external-deployment-scanner" path="/opt/wildfly/server/deployments" scan-interval="5000" />
But the same issue again.