Hi all.
I am trying to install a rest api extension in a Jboss installation. However, everytime i use some of the new api, i get a 500 error and log says:
“Exception or error caught in server resource: javax.naming.NameNotFoundException: env/BusinessDataDS – service jboss.naming.context.java.module.bonita-ear.bonita.env.BusinessDataDS”
Obviously this has to do with some mismatch in datasource names. I developed the extension in a Tomcat environment and datasource.properties file contains
datasource.name = java:comp/env/BusinessDataDS
in my standalone.xml file i have:
<xa-datasource jndi-name="java:jboss/datasources/BusinessDataDS" pool-name="BusinessDataDS" enabled="true" use-java-context="false" use-ccm="false"> <xa-datasource-property name="URL"> jdbc:sqlserver://10.224.31.49:1433;database=bonita_prodotti </xa-datasource-property> <driver>sqlserver</driver> <xa-pool> <min-pool-size>1</min-pool-size> <max-pool-size>50</max-pool-size> <prefill>true</prefill> </xa-pool> <security> <user-name>bonita</user-name> <password>pwd</password> </security> <validation> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql> <background-validation-millis>30000</background-validation-millis> </validation> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </xa-datasource>
is it because it is a xa-datasource? How am i supposed to point to this datasource in my datasource.properties?
Thank you all.