Win a copy of Java Challengers this week in the Java in General forum!

dnyan ginde

Ranch Hand
+ Follow
since Jan 17, 2006
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 dnyan ginde

I was able to resolve the issue. Thanks
12 years ago
When i move the contents of the JPA project to the stateless bean project, everything works fine. The problem arises only when the JPA project and the stateless bean projects are different.
12 years ago
Hello,

I have created an EJB project in Eclipse Ganymede. This EJB project contains one stateless session bean and a client to test this bean. I have created a separate JPA project which contains one EJB 3.0 entity bean. I packaged both these projects in one single EAR file. When i try to deploy this EAR file to OC4J 10.1.3.4, i get the following warning on server startup:


Terminal is the EJB 3.0 entity bean.
The EAR gets deployed successfully even after this warning. However when i test the application i get the following exception:


While creating the JPA project in eclipse i have selected "Automatic detection of entity beans" hence i have not declared the entity beans in persistence.xml.

Can anybody tell me if I am missing anything?
12 years ago
I am getting the following exception:



I have provided the correct value for the element in the persistence.xml to use Hibernate persistence.
Hello,

Has anyone tried to obtain container managed EntityManager instance using JNDI lookup from a EJB 2.1 Session Bean on Websphere?
I could do this on JBoss by adding a property in persistence.xml file .
However, I couldn't figure out a way to do the same on Websphere 6.1.0.15 with EJB3 feature pack. Can someone guide me in this regard?

I am getting the following exception



I have provided the correct value for the <provider> element in the persistence.xml to use Hibernate persistence.

Regards,

Dnyanesh
12 years ago
Hello,

Has anyone tried to obtain container managed EntityManager instance using JNDI lookup from a EJB 2.1 Session Bean on Websphere?
I could do this on JBoss by adding a property in persistence.xml file .
However, I couldn't figure out a way to do the same on Websphere 6.1.0.15 with EJB3 feature pack. Can someone guide me in this regard?

Regards,

Dnyanesh
HI,

I have managed to solve this problem. After adding @Temporal(TemporalType.DATE) annotation it works fine.
The date from the database is exactly the same as the date i am searching with.
I have even tried using new Date(long date) constructor. I still face the same issue.
I tried to put all the annotations in the attributes and then i tried putting them before the getter methods but both these solutions dont seem to work. I still get null from the find() method.
Hello All,

I have been facing an issue with the find() method of the EntityManager(EJB 3.0). I have an entity bean which has composite primary key. When i try to find an object with the primary key the find() method of the EntityManager returns null. When i check the database the entity that i am searching for exists. The user with which i am creating the entity in the DB is the same as the user with which i am searching for it. Can anybody let me know whether i am missing anything? Is there something incorrect that i am doing?
The code works fine when i have entity beans without composite primary keys.
Its a Java SE application.
The entity bean and its corresponding primary key class are as shown below:

The code for testing the bean is as shown below
Hello,

I am getting the following exception when i am deploying an ear on WAS 6.1.


The "connected" property is defined in the following way in one of the properties files:



the value of
einzeltest.backenddummy.blwconnector.mqConnect is TRUE. Can anybody let me know what is going wrong? I have deployed the same ear in WAS6.0 successfully.
hi Shobhar,

try using the schema name along with your table name. For example,

insert into schema_name.table values (?,?);

say your schema name is shobhar and the table name is employee, your query would be:

insert into shobhar.employee values (?,?);

are u converting your blob into byte[]? please try doing this.

try this, if you still face some problems then let us know.
[ April 02, 2006: Message edited by: dnyan ginde ]
Spring has excellent support classes for jdbc. Classes like MappingSqlQuery, SqlUpdate, StoredProcedure help you manage the selects,inserts and stored procedures. With Spring you need not even have try, catch and finally in your jdbc code. Spring handles opening, transaction management and closing of connections. When it comes to designing your application i would say that integrating struts with Spring gives you quite a few options. Struts for the view and control, Spring for the jdbc part.
[ February 24, 2006: Message edited by: dnyan ginde ]
15 years ago