[EJB 3.0] - Re: Why is injection not working in AS 4.0 and 4.2 (servlets
by Zyborg
Thanks for your hint Wolfgang!
I tried to put the persitence.xml everywhere in the war file without success.
WEB-INF/persistence.xml
WEB-INF/META-INF/persistence.xml
WEB-INF/classes/persistence.xml
WEB-INF/classes/META-INF/persistence.xml
Maybe i also should have posted my persistence.xml:
| <persistence>
| <persistence-unit name="MyUnit">
| <jta-data-source>java:/MySqlDS</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="jboss.entity.manager.jndi.name" value="java:/MyUnit"/>
| <property name="jboss.entity.manager.factory.jndi.name" value="java:/MyUnitFactory"/>
| </properties>
| </persistence-unit>
| </persistence>
|
tried it with and without the jndi properties. :/
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097705#4097705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097705
18Â years, 8Â months
[Microcontainer] - cleartext password in jboss-beans.xml
by rlao
I am looking for a way to avoid putting a cleartext password in my jboss-beans.xml file for the microcontainer. Can someone point me to information on how to put encrypted password which can be decrypted later before being used to connect to the database (I put an ! in front of each line as otherwise, they don't get displayed correctly. thank you for your help
...
<!bean name="DatasourceFactory" class="org.jboss.seam.microcontainer.DataSourceFactory">
<!property name="driverClass">com.mysql.jdbc.Driver
<!property name="connectionUrl">jdbc:mysql://localhost:3306/db
<!property name="userName">root
<!property name="password">password
<!property name="jndiName">java:/hibernateDatasource
<!property name="transactionManager">
<!inject bean="TransactionManager" />
<!/property>
...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097703#4097703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097703
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Overriding universal classloader, JBoss 4.2.1GA
by jimpo991
"jaikiran" wrote : Good news !!! It works now :) The application deploys fine without errors. I havent tried any of the functionality of the same application that you mailed me. Here's the changes that i had to do to get it working(point#2 below is which got it working) :
|
| 1) Removed the commons-logging-xxx.jar from the WEB-INF/lib folder of the application. Having this in the application's lib folder causing some known exceptions (however this wasn't why you were getting the java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListener).
|
| 2) The hibernate-annotations.jar file which comes with JBoss-4.2.1 is of Version: 3.2.1.GA. This jar contains the org.hibernate.search..... package. This package (one of its sub-package) contains the FullTextIndexEventListener class. However the version of hibernate-annotations that your application is using is of Version: 3.3.0.GA. If you look at the contents of this jar the org.hibernate.search package does not exist. Looking at the Hibernate download site (http://www.hibernate.org/6.html), this package now comes bundled through the "Hibernate Search" project, which has its own jar named hibernate-search.jar (the version is 3.0.0.GA).
| So, your application should also include this jar. I copied the hibernate-search.jar to the WEB-INF/lib folder of your application and started the deployment. It went past this error and ran into a class not found exception for a Lucene related class. Apparently, you also need the lucene-core-2.2.0.jar that comes bundled with hibernate-search project, in the application classpath. So i copied this lucene-core-2.2.0.jar to the WEB-INF/lib folder of the application. Then redeployed the application. Everything went fine and the application deployed successfully.
|
| I will mail you the modified war file so that you can look at the changes. In the meantime i will try to figure out why the search event listener functionality (which as far as i know is optional) was being used by Hibernate even though the application wasn't explicitly setting the requisite property.
Wow - great stuff! I am impressed how much effort you put towards solving this. I will test this on my side.
I still don't understand why all this results in a ClassCastException about FullTextIndexEventListener. If my war uses the hibernate jars from WEB-INF, and they don't contain org.hibernate.search package, where does the classcastexception come from?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097702#4097702
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097702
18Â years, 8Â months