java - Drools 6.x Workbench cannot be deployed to tomcat in windows- no resource registered with uniqueName 'jdbc/jbpm' -
i cannot start drools 6.2 in tomcat (version 7.x) windows. working fine in linux machine. in windows keep getting following error
caused by: org.hibernate.service.jndi.jndiexception: unable lookup jndi name [java:comp/env/jdbc/jbpm] @ org.hibernate.service.jndi.internal.jndiserviceimpl.locate(jndiserviceimpl.java:68) @ org.hibernate.service.jdbc.connections.internal.datasourceconnectionproviderimpl.configure(datasourceconnectionproviderimpl.java:116) @ org.hibernate.service.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:85) @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:184) @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:156) @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.buildjdbcconnectionaccess(jdbcservicesimpl.java:223) @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:89) @ org.hibernate.service.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:85) @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:184) @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:156) @ org.hibernate.cfg.configuration.buildtyperegistrations(configuration.java:1827) @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1785) @ org.hibernate.ejb.entitymanagerfactoryimpl.<init>(entitymanagerfactoryimpl.java:96) @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:915) ... 94 more caused by: javax.naming.namingexception: no resource registered uniquename 'jdbc/jbpm', available resources: [] @ bitronix.tm.resource.resourceobjectfactory.getobjectinstance(resourceobjectfactory.java:55) @ org.apache.naming.factory.resourcefactory.getobjectinstance(resourcefactory.java:141) @ javax.naming.spi.namingmanager.getobjectinstance(namingmanager.java:304)
safely wrapped inside drools war file readme.txt. make sure read before continue here.i followed of instructions. , works pretty in linux in first try. windows things bit different:
step 3 in readme.txt
******************************************************************************* note: jdbc/jbpm jndi name used tomcat distribution of application 3. define system properties btm.root, bitronix config file, jboss logging provider , others. create setenv.sh (or setenv.bat) file inside tomcat_home/bin , add following: catalina_opts="-xmx512m -xx:maxpermsize=512m -dbtm.root=$catalina_home \ -dbitronix.tm.configuration=$catalina_home/conf/btm-config.properties \ -djbpm.tsr.jndi.lookup=java:comp/env/transactionsynchronizationregistry \ -djava.security.auth.login.config=$catalina_home/webapps/kie-drools-wb/web-inf/classes/login.config \ -dorg.jboss.logging.provider=jdk" note: example unix systems windows $catalina_home needs replaced windows env variable or absolute path note: java.security.auth.login.config value includes name of folder in application deployed default assumes kie-drools-wb ensure matches real installation. login.config file can externalized meaning placed outside of war file. *****************************************************************
in above note this:
note: example unix systems windows $catalina_home needs replaced windows env variable or absolute path
this applies files. here, things complicated if not (like me) expert batch , windows. tell 2 things , give exact change made make work.
- the above note applies files.
- just setting environment variable real path didn't make work me, needed remove odd slashes too.
here exact steps followed:
in resources.properties change path of prop in windows format instead of linux. (~ in linux means home directory)
resource.ds1.driverproperties.url=jdbc:h2:file:c:/users/nanospeck/downloads/apache-tomcat-7.0.54/temp2
in catalina.bat add full content of line 'set catalina_opts' above catalina_home ( or may try adding setenv.bat too, might work). of course change path suit locations in machine.
echo using catalina_base: "%catalina_base%"
set catalina_opts=-xmx512m -xx:maxpermsize=512m -dbtm.root=c:\users\nanospeck\downloads\apache-tomcat-7.0.54\ -dbitronix.tm.configuration=c:\users\nanospeck\downloads\apache-tomcat-7.0.54\conf\btm-config.properties -djbpm.tsr.jndi.lookup=java:comp/env/transactionsynchronizationregistry -djava.security.auth.login.config=c:\users\nanospeck\downloads\apache-tomcat-7.0.54\webapps\kie-drools-wb\web-inf\classes\login.config -dorg.jboss.logging.provider=jdk echo using catalina_home: "%catalina_home%" echo using catalina_tmpdir: "%catalina_tmpdir%"
Comments
Post a Comment