hive -e throws NoSuchMethodError when called from oozie sub-workflow using <shell>, runs perfectly when called from main workflow - hive

I was refactoring a oozie workflow, all of the workflow in written in single file, was trying to break it down to subworkflows.
But after refactoring it started throwing
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.io.retry.RetryPolicies.retryForeverWithFixedSleep(JLjava/util/concurrent/TimeUnit;)Lorg/apache/hadoop/io/retry/RetryPolicy;
Original workflow:
<?xml version="1.0" encoding="UTF-8"?>
<workflow-app xmlns="uri:oozie:workflow:0.5" name="Main">
<start to="loadToHive"/>
<action name="loadToHive">
<shell xmlns="uri:oozie:shell-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>yarn.nodemanager.container-executor.class</name>
<value>LinuxContainerExecutor</value>
</property>
<property>
<name>yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-user</name>
<value>true</value>
</property>
</configuration>
<exec>${loadToHiveActionScript}</exec>
<argument>${outPutPath}</argument>
<argument>${dataSetPath}</argument>
<argument>${hiveDB}</argument>
<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>
<file>${loadToHiveActionScriptPath}#${loadToHiveActionScript}</file>
</shell>
<ok to="uplaodToMysql"/>
<error to="handleFailure"/>
</action>
Refactored file:
<?xml version="1.0" encoding="UTF-8"?>
<workflow-app xmlns="uri:oozie:workflow:0.5" name="Main">
<start to="loadToHive"/>
<action name="loadToHive">
<sub-workflow>
<app-path>${oozieProjectRoot}/commonWorkflows/mongoTransform.xml</app-path>
<propagate-configuration/>
</sub-workflow>
<ok to="uplaodToMysql"/>
<error to="handleFailure"/>
</action>
Subworkflow file:
<?xml version="1.0" encoding="UTF-8"?>
<workflow-app name="mongoTransform-${module}" xmlns="uri:oozie:workflow:0.5">
<start to="loadToHiveSub"/>
<action name="loadToHive">
<shell xmlns="uri:oozie:shell-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>yarn.nodemanager.container-executor.class</name>
<value>LinuxContainerExecutor</value>
</property>
<property>
<name>yarn.nodemanager.linux-container-executor.nonsecure-mode.limit-user</name>
<value>true</value>
</property>
</configuration>
<exec>${loadToHiveActionScript}</exec>
<argument>${outPutPath}</argument>
<argument>${dataSetPath}</argument>
<argument>${hiveDB}</argument>
<env-var>HADOOP_USER_NAME=${wf:user()}</env-var>
<file>${loadToHiveActionScriptPath}#${loadToHiveActionScript}</file>
</shell>
<ok to="end"/>
<error to="handleFailure"/>
</action>
loadToHiveActionScript.sh
hive -e "Drop table if exists ${3}.${i}_intermediate";
...
hive -e " Alter table ${3}.${i}_intermediate RENAME TO ${3}.$i";
When this is run in the main workflow file, it executes perfectly fine.
Can this be issue of
env-var: HADOOP_USER_NAME=${wf:user()}

Related

No Persistence provider for EntityManager named default

I get the following error:
[16:16:45 WARN]: [jakarta.persistence.spi] jakarta.persistence.spi::No valid providers found.
jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named default
at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:86) ~[?:?]
at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) ~[?:?]
When using:
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("default");
EntityManager entityManager = entityManagerFactory.createEntityManager();
I am using the following dependencies:
dependencies {
implementation('org.hibernate:hibernate-core:6.1.6.Final')
implementation('org.postgresql:postgresql:42.5.1')
}
This is my persistence.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="default">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>me.janic.database.PlayerEntity</class>
<class>me.janic.database.ReviveTokenEntity</class>
<class>me.janic.database.StatsEntity</class>
<properties>
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/1l1c"/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value="root"/>
</properties>
</persistence-unit>
</persistence>
And the persistence.xml file is located in META-INF/persistence.xml. I tried different versions of hibernate but I can not get it to work. How is this caused and how can I solve it?

When the conection to the Oracle DB is dropped, PooledConnection has already been closed is printed continuously

I've installed wso2esb-4.9.0 and the master datasource is configured to a oracle DB. When the connection to the Oracle Database is dropped due to a network connectivity issue the following error is continually printed even though the connection is back again. Only after a restart the exception stops.
TID: [-1234] [] [2016-05-16 00:53:21,457] ERROR {org.wso2.carbon.registry.core.utils.RegistryUtils} - Failed to construct the connectionId. {org.wso2.carbon.registry.core.utils.RegistryUtils}
java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:3131)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
at org.wso2.carbon.ndatasource.rdbms.ConnectionRollbackOnReturnInterceptor.invoke(ConnectionRollbackOnReturnInterceptor.java:51)
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
at org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor.invoke(AbstractCreateStatementInterceptor.java:71)
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
at org.apache.tomcat.jdbc.pool.interceptor.ConnectionState.invoke(ConnectionState.java:153)
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
at org.apache.tomcat.jdbc.pool.TrapException.invoke(TrapException.java:41)
at org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:109)
at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:80)
at com.sun.proxy.$Proxy14.getMetaData(Unknown Source)
at org.wso2.carbon.registry.core.utils.RegistryUtils.getConnectionId(RegistryUtils.java:194)
at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction$ManagedRegistryConnection.getConnectionId(JDBCDatabaseTransaction.java:1133)
at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction$ManagedRegistryConnection.rollback(JDBCDatabaseTransaction.java:1288)
at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.rollbackTransaction(JDBCTransactionManager.java:120)
at org.wso2.carbon.registry.core.jdbc.dao.JDBCLogsDAO.rollbackTransaction(JDBCLogsDAO.java:335)
at org.wso2.carbon.registry.core.jdbc.dao.JDBCLogsDAO.getLogList(JDBCLogsDAO.java:306)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getLogs(EmbeddedRegistry.java:2332)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.getLogs(CacheBackedRegistry.java:402)
at org.wso2.carbon.registry.core.session.UserRegistry.getLogsInternal(UserRegistry.java:1806)
at org.wso2.carbon.registry.core.session.UserRegistry.access$3600(UserRegistry.java:60)
at org.wso2.carbon.registry.core.session.UserRegistry$37.run(UserRegistry.java:1777)
at org.wso2.carbon.registry.core.session.UserRegistry$37.run(UserRegistry.java:1774)
at java.security.AccessController.doPrivileged(Native Method)
at org.wso2.carbon.registry.core.session.UserRegistry.getLogs(UserRegistry.java:1774)
at org.wso2.carbon.registry.indexing.ResourceSubmitter.submitResource(ResourceSubmitter.java:119)
at org.wso2.carbon.registry.indexing.ResourceSubmitter.run(ResourceSubmitter.java:76)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
master-datasources.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?><datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>
<datasources>
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:oracle:thin:#xxx.xx.x.xxx:1528/dvdb</url>
<username>esbuser</username>
<password svns:secretAlias="Datasources.WSO2_CARBON_DB.Configuration.Password">password</password>
<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
<maxActive>80</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1 FROM DUAL</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<datasource>
<name>WSO2_REG_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2REG</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:oracle:thin:#xxx.xx.x.xxx:1528/dvdb</url>
<username>reguser</username>
<password svns:secretAlias="Datasources.WSO2_REG_DB.Configuration.Password">password</password>
<driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<minIdle>5</minIdle>
<validationQuery>SELECT 1 FROM DUAL</validationQuery>
<testWhileIdle>true</testWhileIdle>
<timeBetweenEvictionRunsMillis>1800000</timeBetweenEvictionRunsMillis>
<numTestsPerEvictionRun>5</numTestsPerEvictionRun>
<minEvictableIdleTimeMillis>3600000</minEvictableIdleTimeMillis>
</configuration>
</definition>
</datasource>
<!-- For an explanation of the properties, see: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html -->
<!--datasource>
<name>SAMPLE_DATA_SOURCE</name>
<jndiConfig>
<name></name>
<environment>
<property name="java.naming.factory.initial"></property>
<property name="java.naming.provider.url"></property>
</environment>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<defaultAutoCommit></defaultAutoCommit>
<defaultReadOnly></defaultReadOnly>
<defaultTransactionIsolation>NONE|READ_COMMITTED|READ_UNCOMMITTED|REPEATABLE_READ|SERIALIZABLE</defaultTransactionIsolation>
<defaultCatalog></defaultCatalog>
<username></username>
<password svns:secretAlias="WSO2.DB.Password"></password>
<maxActive></maxActive>
<maxIdle></maxIdle>
<initialSize></initialSize>
<maxWait></maxWait>
<dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
<dataSourceProps>
<property name="url">jdbc:mysql://localhost:3306/Test1</property>
<property name="user">root</property>
<property name="password">123</property>
</dataSourceProps>
</configuration>
</definition>
</datasource-->
</datasources>
repository/conf/registry.xml
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>
<dbConfig name="remoteRegistry">
<dataSource>jdbc/WSO2REG</dataSource>
</dbConfig>
<remoteInstance url="https://registryhost:9453/registry">
<id>9453</id>
<dbConfig>remoteRegistry</dbConfig>
<readOnly>false</readOnly>
<registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/config" overwrite="false">
<instanceId>9453</instanceId>
<targetPath>/_system/nodes</targetPath>
</mount>
<mount path="/_system/governance" overwrite="false">
<instanceId>9453</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
In my case the problem was caused by a wrong line deleted at file repository/config/registry.xml.
I'd removed this code:
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>
Instead of add another dbConfig tag.
For me, the correction was re-add that tag. Like this:
<wso2registry>
<!-- These are used to define the DB configuration and the basic parameters to be used for the registry -->
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<!-- This defines the default database and its configuration of the registry -->
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>
<dbConfig name="sharedregistry">
<dataSource>jdbc/WSO2RegistryDB</dataSource>
</dbConfig>
...
...
</wso2registry>
Hope this post help you...
I had the same issue.
In the master-datasources.xml
1- set the datasource name same as the jndiConfig name
2- set 2 differents datasources with different names for both registry and user management.
Here my master-datasources.xml
<datasource>
<name>WSO2REG_DB</name>
<description>The datasource used for registry</description>
<jndiConfig>
<name>jdbc/WSO2REG_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/registry?autoReconnect=true&relaxAutoCommit=true&</url>
<username>apiuser</username>
<password>apimanager</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<datasource>
<name>WSO2UM_DB</name>
<description>The datasource used for user management</description>
<jndiConfig>
<name>jdbc/WSO2UM_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/userstore?autoReconnect=true&relaxAutoCommit=true&
</url>
<username>apiuser</username>
<password>apimanager</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
In the registry.xml
1- set the wso2registry dbConfig with the user management data source
2- set the govregistry dbConfig with the registry data source
Here my registry.xml
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2UM_DB</dataSource>
</dbConfig>
<dbConfig name="govregistry">
<dataSource>jdbc/WSO2REG_DB</dataSource>
</dbConfig>
It worked for me and my IS-Server could start properly. Hope it will work for you too, when the problem isn't already fixed.

Apache oozie Launcher ERROR

I am want to run sqoop action using apache oozie but it always giving me error:
Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.SqoopMain], main() threw exception, null
my workflow.xml is:
<workflow-app name="Datashop-Core-Sqoop" xmlns="uri:oozie:workflow:0.1">
<!-- <start to="inputAvailableCheckDecision"/>
<decision name="inputAvailableCheckDecision">
<switch>
<case to="sqoopAction">
${sqoopInputRecordCount gt minRequiredRecordCount}
</case>
<default to="end"/>
</switch>
</decision> -->
<start to="sqoopAction"/>
<action name="sqoopAction">
<sqoop xmlns="uri:oozie:sqoop-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
<property>
<name>oozie.libpath</name>
<value>${oozieLibPath}</value>
</property>
</configuration>
<command>import --connect jdbc:mysql://${mysqlServer}/${mysqlServerDB} --username ${mysqlServerDBUID} --password ${mysqlServerDBPwd} --tabltable ${mysqlTable} -m 1 --target-dir ${targetDir}</command>
</sqoop>
<ok to="end"/>
<error to="killJob"/>
</action>
<kill name="killJob">
<message>"Killed job due to error: ${wf:errorMessage(wf:lastErrorNode())}"</message>
</kill>
<end name="end" />
</workflow-app>
this always throwing sqoopmain class exception which is finally treating as Error:
#sqoopAction] ERROR is considered as FAILED for SLA
In some stack question i found that external library is need to be included with <file>
so i changed my workflow.xml and add a line below <command> tag:
<file>${oozieLibPath}/sqoop/mysql-connector-java-5.1.37-bin.jar#mysql-connector-java-5.1.37-bin.jar</file>
But still same error is producing what may be the reason for this error. is there any thing else i need to configure?

Izpack simple installation just to copy files

I am trying to make a very simplistic installer using IzPack. It should do the following two things
1. Copy and paste all the content of dist directory to UserHome/MyApp dir.
2. Execute a batch file to edit registry entry to start the jar file on user logon.
But I am stuck at the first step only! nothing is installed if I use the following XML and generate the installer. Generated installer runs and does show the InstallPanel but nothing is copied to the user_home directory.
From what it seems like I am not able to assign value to Install_path variable.
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<variables>
<variable name="INSTALL_PATH" value="$USER_HOME/MyApp"/>
</variables>
<info>
<appname>My App</appname>
<appversion>1.0</appversion>
<authors>
<author name="My APP Author" email="support#myapp.com"/>
</authors>
<url>http://SomeURL.net</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="InstallPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<fileset dir="dist" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
UPDATE
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<variables>
<variable name="TargetPanel.dir.windows" value="$USER_HOME\MyTeamNinja"/>
<variable name="TargetPanel.dir.mac" value="$USER_HOME/MyTeamNinja"/>
</variables>
<info>
<appname>My App</appname>
<appversion>1.0</appversion>
<authors>
<author name="MyTeamNinja" email="support#MyTeamNinja.com"/>
</authors>
<url>http://myteam.ninja</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="DefaultTargetPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<fileset dir="dist" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
Now as soon as I click the installer it starts the install but in c:\program files\My App\
what you need is a TargetPanel. it allows the user to select the destination dir. to install the files. the location selected in this panel sets the value of $INSTALL_PATH.
however, you may also override the default value of the $INSTALL_PATH.in order to override the default value of $INSTALL_PATH, you may do the following:
<variables>
<variable name="TargetPanel.dir.windows" value="$USER_HOME/MyApp"/>
<variable name="TargetPanel.dir.unix" value="$USER_HOME/MyApp"/>
</variables>
or,
<variables>
<variable name="DEFAULT_INSTALL_PATH" value="$USER_HOME/MyApp"/>
</variables>
and also, remember to include the TargetPanel before the InstallPanel in case you choose to allow the user to select the target loc. for the installation.
<panels>
<panel classname="TargetPanel"/>
<panel classname="InstallPanel"/>
</panels>
See HERE for more on this.
UPDATE:
place the entry for TargetPanel before the InstallPanel in the <panels> section.
remove the <resources> section:
<resources>
<res id="TargetPanel.dir.windows" src="$USER_HOME/MyApp"/>
<res id="TargetPanel.dir.unix" src="$USER_HOME/MyApp"/>
</resources> This is where the error is being generated. Instead use <variables> to specify default values for ${INSTALL_PATH} (see in my answer above).
also, to set a value for ${INSTALL_PATH} through <variables> you need to use name="DEFAULT_INSTALL_PATH" or TargetPanel.dir.windows/unix
UPDATE 2: The following piece of code installs in the correct location (as specified by you in the defaultInstallDir.txt).
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<!-- variables>
<variable name="TargetPanel.dir.windows" value="$USER_HOME\MyTeamNinja"/>
<variable name="TargetPanel.dir.mac" value="$USER_HOME/MyTeamNinja"/>
</variables -->
<!-- remove the above <varible> section and include the REQUIRED defaultInstallDir.txt to set the value for the DefaultTargetPanel -->
<resources>
<res id="TargetPanel.dir" src="defaultInstallDir.txt"/>
</resources>
<info>
<appname>My App</appname>
<appversion>1.0</appversion>
<authors>
<author name="MyTeamNinja" email="support#MyTeamNinja.com"/>
</authors>
<url>http://myteam.ninja</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="DefaultTargetPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<fileset dir="dist" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
now, create a file named defaultInstallDir.txt and simply write the following within this file :
$USER_HOME/MyApp
just make sure that you include this file correctly in the installer through the src=".." attribute of the <resources> section and you're good to go.
double clicking on the installer directly installs the files in $USER_HOME/MyApp (in my case: at C:\Users\Sunny\MyApp)

JBAS011466: PersistenceProvider 'com.impetus.kundera.KunderaPersistence' not found error from kundera 2.7.1

I am new to jBoss (7.1) and Kundera (2.7.1) and I'm working on a project and I want to use Cassandra dataSource implementing JPA using Kundera. my persistence.xml is as follows:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br/>
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence<br/>
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"<br/>
version="1.0"><br/>
<persistence-unit name="cassandra_pu"><br/>
<provider>com.impetus.kundera.KunderaPersistence</provider><br/>
<properties><br/>
<property name="kundera.nodes" value="localhost" /><br/>
<property name="kundera.port" value="9160" />
<property name="kundera.keyspace" value="ech" />
<property name="kundera.dialect" value="cassandra" />
<property name="kundera.client.lookup.class" value="com.impetus.client.cassandra.thrift.ThriftClientFactory" />
<property name="kundera.cache.provider.class" value="com.impetus.kundera.cache.ehcache.EhCacheProvider"/>
<property name="kundera.cache.config.resource" value="/ehcache-test.xml" />
<!-- <property name="jboss.as.jpa.managed" value="false"/>-->
</properties>
</persistence-unit>
</persistence>
and my applicationContext.xml is as follows
?<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="personDAO" class="com.impetus.kundera.examples.spring.PersonDAO">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="cassandra_pu" />
</bean>
</beans>
when I remove "jboss.as.jpa.managed = false" property from persistence.xml, i am receiving JBAS011466: PersistenceProvider 'com.impetus.kundera.KunderaPersistence' not found error and if I place "jboss.as.jpa.managed=false" property, i am endup with No persistence unit with name 'cassandra_pu' found error
Complete trace for both errors:
No persistence unit with name 'cassandra_pu' found --- persistence.xml contains property name="jboss.as.jpa.managed" value="false"
Caused by: java.lang.IllegalArgumentException: No persistence unit with name 'cassandra_pu' found
at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.obtainPersistenceUnitInfo(DefaultPersistenceUnitManager.java:566) [spring-orm-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.determinePersistenceUnitInfo(LocalContainerEntityManagerFactoryBean.java:308) [spring-orm-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:260) [spring-orm-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) [spring-orm-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) [spring-beans-3.2.4.RELEASE.jar:3.2.4.RELEASE]
... 20 more
JBAS011466: PersistenceProvider 'com.impetus.kundera.KunderaPersistence' not found --- remove from persistence.xml - property name="jboss.as.jpa.managed" value="false"
Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'com.impetus.kundera.KunderaPersistence' not found
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.lookupProvider(PersistenceUnitDeploymentProcessor.java:560)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deployPersistenceUnit(PersistenceUnitDeploymentProcessor.java:297)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.addPuService(PersistenceUnitDeploymentProcessor.java:260)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.handleEarDeployment(PersistenceUnitDeploymentProcessor.java:218)
at org.jboss.as.jpa.processor.PersistenceUnitDeploymentProcessor.deploy(PersistenceUnitDeploymentProcessor.java:121)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
jars in ear is
cassandra-connection-pool-0.7.1.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
commons-pool-1.2.jar
guava-14.0.1.jar
hibernate-commons-annotations-4.0.2.Final.jar
hibernate-core-4.2.3.Final.jar
javassist-3.15.0-GA.jar
jta-1.1.jar
jts-1.11.jar
kundera-cassandra-2.7.1.jar
kundera-core-2.7.1.jar
lucene-core-3.5.0.jar
persistence-api-1.0.jar
slf4j-api-1.7.2.jar
spring-beans-3.0.0.RELEASE.jar
spring-context-3.0.0.RELEASE.jar
spring-core-3.0.0.RELEASE.jar
spring-jdbc-3.0.0.RELEASE.jar
spring-orm-3.0.0.RELEASE.jar
spring-tx-3.0.0.RELEASE.jar
P.S - I dont have any jpa related folders under \JBOSS_HOME>\modules\org\apache and my persistence.xml is present under MyEAR.ear>META-INF>persistence.xml (along with application.xml, jboss-deployment-structure.xml and MANIFEST.MF)
Hope I've provided all the necessary informations. I am stuck from entire day at this. Any help is highly appreciated. Thank you.
This should help you out. please have a look at https://github.com/impetus-opensource/Kundera/issues/390 https://github.com/impetus-opensource/Kundera/issues/180