maya kannan

Greenhorn
+ Follow
since Sep 22, 2010
Merit badge: grant badges
For More
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 maya kannan

Hi
We have one struts+spring+hibernate Application , we are trying to do "Integrating JSF with Struts applications", for that

we have done some configuration in web.xml and struts-config.xml. I have added some jar file in my WEB-INF/lib.


The jar files containing in my WEB-INF/lib are listed here:
antlr-2.7.6rc1.jar,asm.jar,asm-attrs.jar,bsh-2.0b2.jar,c3p0-0.9.1.2-jdk1.3.jar,cglib-2.1.3.jar,commons-beanutils-1.7.jar,commons-betwixt-0.8.jar,commons-cli-1.0.jar,commons-codec-1.3.jar,commons-collections-3.jar,commons-dbcp-1.2.1.jar,commons-digester-1.7.jar,commons-discovery-0.2.jar,commons-fileupload.jar,commons-httpclient-3.1.jar,commons-io-1.3.1.jar,commons-lang-2.3.jar,commons-logging-1.1.jar,commons-pool-1.2.jar,commons-validator.jar,connector-1_5.jar,dom4j-1.6.1.jar,ehcache-1.1.jar,el-api-6.0.20.jar,el-impl-2.2.0-SNAPSHOT.jar,hibernate-3.1.3.jar,jetty-util-6.0.0,.jar,servlet-api-2.3.jar,spring-2.5.6.jar,standard.jar,struts.jar,xercesImpl-2.6.2.jar,xmlParserAPIs-2.6.2.jar,xstream-1.3.1

The below jar file are the one's newly added for "Integrating JSF with Struts applications"
jsf-api-2.0.jar,jsf-impl-2.0.jar,myfaces-jsf-api-1.0.9.jar.jar.jar,struts-faces-1.3.10.jar



My web.xml is:

My struts-config.xml is


I am using Spring source toll suite, tomcat 5.5 and jdk 1.5
my Tomcat 5.5\common\lib containing jar files
commons-el.jar,jasper-compiler.jar,jasper-compiler-jdt.jar,jasper-runtime.jar,jsp-api.jar,naming-factory.jar,naming-factory-dbcp.jar,
naming-resources.jar,servlet-api.jar

My Server is starting properly . not able to load jsp page

, I am getting the exception as



org.apache.jasper.JasperException: Unable to read TLD "META-INF/jsf_core.tld" from JAR file "file:/SSHIntgr/WEB-INF/lib/jsf-impl-2.0.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: com.sun.faces.taglib.jsf_core.CoreValidator
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:179)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)


How can i solve this ?
thanks in advance
13 years ago
JSF
Hi all
I have done an application configuration using hybernate + JPA ,and atomikos for XA transcation management and spring 3.0 ,here every thing is working fine however insert operation, when exception is throwing the transcation should rollback,but it is not happening!!
here is a small flow for our application, in our manager level we are calling the businesss (here we are using Spring IOC)
my Manager.java

business.java we are using one method insertuser()

and our dao.java class we are using one method insertuser(Object entity)


and our
and my pojo class is


and my persistence.xml file is


my transcation log is
DEBUG - AbstractPlatformTransactionManager.handleExistingT ransaction(470) | Participating in existing transaction
Hibernate: insert into ta_user (created_USER_IDdate, userName) values (?, ?)
DEBUG - AbstractPlatformTransactionManager.processRollback (850) | Participating transaction failed - marking existing transaction as rollback-only
DEBUG - JtaTransactionManager.doSetRollbackOnly(1060) | Setting JTA transaction rollback-only
134578 [http-8080-Processor23] INFO atomikos - setRollbackOnly() called for transaction PaymentsTransactions0000100653
DEBUG - AbstractPlatformTransactionManager.processRollback (843) | Initiating transaction rollback
175094 [http-8080-Processor23] INFO atomikos - afterCompletion ( STATUS_ROLLEDBACK ) called on Synchronization: org.hibernate.ejb.AbstractEntityManagerImpl$1@c5c2 3d
175094 [http-8080-Processor23] INFO atomikos - afterCompletion ( STATUS_ROLLEDBACK ) called on Synchronization: org.hibernate.transaction.CacheSynchronization
175094 [http-8080-Processor23] INFO atomikos - rollback() done of transaction PaymentsTransactions0000100653



please anybady tel the solution

I am using Spring 2.0.6 and Hibernate 3.2.x on apache tomcat5.5,now we planed to changed our hybernate mapping files into hybernate+jpa support mapping files.
for that we created files like this

daoConfig.xml
<beans:bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<beans: property name="jndiName">
<beans: value>java:/comp/jdbc/Paymentsdb</beans:value>
</beans: property>
</beans: bean>
<beans: bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<beans: property name="useTransactionAwareDataSource"
value="true" />
<beans: property name="dataSource">
<beans:ref bean="dataSource"/>
</beans: property>
<beans: property name="hibernateProperties">
<beans: props>
<beans:prop key="hibernate.dialect">${database.target}</beans:prop>
<beans:prop key="hibernate.connection.isolation">3</beans:prop>
<beans:prop key="hibernate.current_session_context_class">jta</beans:prop>
<beans:prop key="hibernate.transaction.factory_class">com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory
</beans:prop>
<beans: prop key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup
</beans: prop>
<beans: prop key="hibernate.connection.release_mode">on_close</beans: prop>
<beans: prop key="hibernate.show_sql">false</beans: prop>
</beans: props>
</beans: property>
</beans: bean>

<beans: bean id="jpaTemplate"
class="org.springframework.orm.jpa.JpaTemplate">
<beans: property name="entityManagerFactory">
<beans:ref bean="entityManagerFactory" />
</beans: property>
</beans: bean>

<beans: bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<beans: property name="dataSource">
<beans:ref bean="dataSource" />
</beans: property>
<beans: property name="jpaVendorAdapter">
<beans:bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<beans: property name="generateDdl" value="false"/>
<beans: property name="showSql" value="true" />
<beans: property name="databasePlatform" value="${database.target}" />
</beans: bean>
</beans: property>
<beans: property name="persistenceXmlLocation">
<beans:value>classpath:META-INF/persistence.xml</beans: value>
</beans: property>
</beans: bean>

<beans:bean id="atomikosTransactionManager"
class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init"
destroy-method="close">
<beans:property name="forceShutdown" value="true" />
<beans:property name="startupTransactionService" value="true" />
</beans:bean>

<beans:bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
<beans:property name="transactionTimeout">
<beans:value>300</beans:value>
</beans:property>
</beans:bean>

<beans:bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<beans:property name="transactionManager">
<beans:ref bean="atomikosTransactionManager" />
</beans:property>
<beans:property name="userTransaction">
<beans:ref bean="atomikosUserTransaction" />
</beans:property>
</beans:bean>

</beans: beans>


in my daoconfig.xml i given path for prsistence.xml
and this is my persistence.xml file

<?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"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="payhub" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/orm.xml</mapping-file>
<class>com.evolvus.common.model.TaUser</class>
----------
----------
----------
<class>com.evolvus.common.model.TaBooks</class>
</persistence-unit>
</persistence>


here i am specifying my orm mapping file name

orm.xml file is
<?xml version="1.0" encoding="UTF-8" ?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
version="1.0">
<description>Welcome</description>
<package>com.evolvus.common.model</package>

<!-- TaUser starts-->
<entity class="com.evolvus.common.model.TaUser" name="TaUser">
<table name="ta_user" />
<attributes>
<id name="userId">
<column name="USER_ID"/>
<generated-value strategy="TABLE" />
</id>
<basic name="userName">
<column name="USER_NAME" length="50" />
</basic>
<basic name="password">
<column name="PASS_WORD" length="50" />
</basic>
</attributes>
</entity>
<entity class="com.evolvus.common.model.TaBooks" name="TaBooks">
<table name="ta_user"/>
<attributes>
--------------
--------------
------------
</attributes>
</entity>
</entity-mappings>


when i am trying to run my server .i Am getting the error


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaTemplate' defined in ServletContext resource [/WEB-INF/xaconfig/daoJPAConfig.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/xaconfig/daoJPAConfig.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: payhub] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/xaconfig/daoJPAConfig.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: payhub] Unable to build EntityManagerFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: payhub] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:329)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)


please give me any suggestions
hi all

I am using jsf 2.0 ..I need to know how to pass property value from one bean to another bean without using session scope
is any possibility ?

please share with me
13 years ago
JSF