Mukhtiar Ahmed

Greenhorn
+ Follow
since Jun 27, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mukhtiar Ahmed

Hi,
Please user where clause in your query

select
(posstr(t1.NAME,'A')) as Location, t1.Name from vista.VFZPVACCOUNTANT t1

where Location > 0
hi,

used this command for creating jar

jar cvfM FirstEJB.jar com META-INF

please used M stwich which are tell command do not creating a manifest file for the entries

thanks
Hi,

Please check your Jboss log for your Data Source is bound successfully or not.
Your are doing update and listing in a single transaction.the hibernate change object in memory but not in database.
Hi,
there are problem in context listener

Jun 27, 2007 10:54:54 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart


if you do not have any applicationContext.xml file do not you contextLoaderListener

<!--Context Load Listener.-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>


use DAO bean definition in applicationContext.xml


<!-- Login Mappings -->
<bean id="LoginIbatis"
class="com.con.app.persistence.sqlmapdao.LoginSqlMapDAO">
<property name="ibatisWrapper">
<ref bean="sqlMapClient" />
</property>
</bean>


<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>WEB-INF/sql-map-config.xml</value>
</property>
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>


<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/f1" />
<property name="username" value="root" />
<property name="password" value="Passmein" />
</bean>

and define in web.xml like this

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>applicationContext.xml</param-value>
</context-param>
<!--Context Load Listener.-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

and implement your DAO class like this

public class LoginSqlMapDAOIbatis extends extends SqlMapClientDaoSupport implements LoginSqlMapDAO {

}

do not define f1App-servlet.xml file in context param spring automatic load it.
hi,
first create oracle-ds.xml look like following file

<?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<!-- $Id: oracle-ds-template.xml,v 1.6 2007/01/24 18:40:34 dave Exp $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Oracle originally from Steven Coy -->
<!-- ==================================================================== -->


<local-tx-datasource>
<jndi-name>system</jndi-name>
<connection-url>jdbc racle:thin:@localhost:1521:XE</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>username</user-name>
<password>password</password>

<min-pool-size>20</min-pool-size>
<max-pool-size>100</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>1</idle-timeout-minutes>
<type-mapping>Oracle9i</type-mapping>
<local-tx-datasource>


then create persistance.xml file like following

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="testApp" transaction-type="JTA">
<provider> oracle.toplink.essentials.PersistenceProvider</provider>
<jta-data-source>java:/system</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
</properties>
</persistence-unit>

</persistence>
13 years ago
hi,
first your configure jndi datasoruce
in datasoruce.xml
<local-tx-datasource>
<jndi-name>JNDI java:/system<</jndi-name>
<connection-url>jdbc racle:thin:@localhost:1521:XE</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<user-name>USERNAME HERE</user-name>
<password>PASSWORD HERE</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
</local-tx-datasource>
</datasources>


and then reference it in persistance.xml file
do not give datasource properties in persistance.xml
here you give the ORM related properties