Chandrashekhar Kotekar

Greenhorn
+ Follow
since Aug 17, 2009
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 Chandrashekhar Kotekar

0 down vote favorite


Hi,

I am new to Java world. I have few classes which are inside nested folders (namespace).

My namespace has following folder structure (Assume that companyName folder is on C:\ ):



My problem is, I want to compile all of these classes from command prompt.

I tried the following command but its not working :



but its not working. I am getting following error :



Please help to compile all of these classes and possibly to create jar out of it.
12 years ago
@Peter,

Thanks for answering my question.
Now I know why these many projects get created and what is the use of these projects. In fact, I am using those projects for my application and I am able to deploy one toy application on server.

14 years ago
Im sorry but I do not know much about JPA. What I think is the line I mentioned in my reply is causing the table to get truncated as soon as you reload your classes on database.
@Anil,



this property in properties.xml file is the root of your problem.

Also, just wanted to know is your entire database is getting deleted? or only table or rows?
Hi,

I am learning EJB and I want to build toy shopping cart appplication. I am stuck up at session management.
Can we use EJB for session management of users?
I want to develop simple website in which user enters his/her name, password and logs into the system.
After logging into the system, whatever action user performs like adding item into shopping cart or changing his own profile information etc. I want to log all those actions under the name of that particular user.

Can we do this using EJBs?

Till now I have developed an entity bean called User and one statuful bean called LogInBean. I am able to force user to login, logout with these two beans. But now problem is, how to check which action has been performed by which user?

In EJB container there might be multiple beans present at a time. So does EJB container handles all this mapping?
Does anyone knows some book or tutorial which explains all these things?

Many thanks,
@Vasanthi

First thing, my name is not Karekar. Its KOTEKAR. I know you are frustated because of your problem but then also you should take a final look of your text before posting.
Anyways, about your problem....

Can you please tell us what application server you are using? (JBoss, Glassfish, etc.)
Have you created jndi.properties file? If yes, where is it located? You need to place all files (class files, xml file, properties file) in proper folders.
Are you deploying EAR file or JAR file?

Try to run this tutorial. I was also facing the same problem as yours but this tutorial helped me. I am sure it will help you also. Below is the link for the tutorial.

http://javahowto.blogspot.com/2007/11/simple-ejb-3-on-jboss-application.html

Best of luck
@Peter,

Thank you very much for answering my stupid questions. Now I am comfortable with EJB and start working on my application.
14 years ago
@Tomasz,

I have faced same problem that you are facing. I was able to run "Hello world" program using this tutorial.

http://javahowto.blogspot.com/2007/11/simple-ejb-3-on-jboss-application.html

Follow all the steps given in this tutorial and you will be able to run rest of the programs.

Tutorial tells you how to run program using command prompt, but dont worry just give it a try. Once you know what steps to follow, you will be able to run any EJB program.

I used this tutorials just two days ago and now I am able to run all the examples given in "EJB 3 in Action" book from eclipse itself.


Cheers
@Vasanthi

Have you found solution for this problem?

If not, I think there is some problem in the port to which you are connecting.
From first line of your exception we can deduce this (look at the underlined part).

21-Sep-2009 14:10:43 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No



I think by default JNDI runs on port # 1099 and in your case it is trying to connect to port # 3700.
Just see if this is the root of your problem.
Hi,

I want to develop one application using Flex, Struts, EJB and hibernate. Does anyone knows how to integrate all these technologies?

I learnt these technologies seperately but I do not know how do I connect all these.

Is there any tutorial or book which explains how to integrate these technologies?

Also, as I am new to JavaRanch, I do not know exactly in which forum this post should go. So if I have posted question in wrong forum, please forgive me and tell me where this post should go.


Regards,
@Peter Johnson,

Thanks for reply.

I have one more question.

The contents are application server specific, so for every app server you will need to read its documentation to determine what the contents should be.



If contents jndi.properties file depends on specific server, then the application will become dependent on that particular server. Thus it cannot be deployed on other server without modifying code. Isnt it a disadvantage?

Also, I just wanted to confirm, the way we get the access to remote bean depends on particular server. Am I right?
For example,
In GlassFish server, we can just use @EJB annotation but in JBoss we have to do JNDI lookup with InitialContext object. Right?
14 years ago
@Peter Johnson

Thanks for reply. I have solved the problem with the help of following tutorial.


http://javahowto.blogspot.com/2007/11/simple-ejb-3-on-jboss-application.html

The problem with other tutorials is that, some of the tutorials do not mention jndi.properties file and those who mention those files, they give information about particular app server like JBoss, Glass fish, etc.

Now I know what should be the content of jndi.properties file if we are going to use JBoss AS, but I dont know what should I write if we change the server.

Is there any book or tutorial which explains what should be the content of this file and what are other possible configurations in the file?
14 years ago
Hello everyone,

I am trying to learn EJB 3 and I am struggeling with very first "Hello world" program.
I have many (dumb) doubts regarding EJB concept itself which I hope some of you might be able to clear.

I am tyring to run one simple EJB program but I guess I am missing something.

I have one @remote interface :




One bean class which implements this interface :


[color=darkblue][/color]

I have application.xml file which looks something like this :



I am using JBoss 5 server and eclipse galilelo IDE for this.
I used wizard to create project (project name is ConverterBean) and eclipse has created 5 kind of projects for me.

A) ConverterBean -->> this project contains application.xml
b) ConverterBeanClient -->>
c) ConverterBeanEJB -->> my remote interface and implementer class
d) ConverterBeanWeb -->>
e) ConverterBeanConnector -->>

Can anyone please tell me why all this projects are getting created???

After implementing interface, I have successfully deployed the bean. (I can see the message printed on console).

Now, I have created client in "ConverterBeanCLient" .
Its main class is as follows :



I have added "ConverterBeanEJB" as dependeny in this "ConverterBeanCLient" project.
Now when I try to run the client, I get following error :






I googled for above error, and I found out that somewhere I have to keep "jndi.properties" file. I do not know where to keep this file and what is the purpose of this file.
I looked into many tutorials and none of the tutorial has mentioned this file nor what is the purpose of this file.
Even JEE 5 tutorial from sun also does not mention this file.

I have more questions :

1) Can anyone please tell me how to run client program?
2) Why jndi.properties file is needed? And why most of the tutorials do not mention this file?
3) What should be the file structure for EJB and its clients?
4) If we are importing the beans interface, then what is the need for EJB? We can import bean itself. (Sorry about my lack knowledge, but none of the book answered my this question.)
5) Does anyone knows some tutorial which gives step by step procedure for deploying EJB's and clients?




I will upload my more dumb questions in next post


Many thanks
Hello everyone,

I am trying to learn EJB 3 and I am struggeling with very first "Hello world" program.
I have many (dumb) doubts regarding EJB concept itself which I hope some of you might be able to clear.

I am tyring to run one simple EJB program but I guess I am missing something.

I have one @remote interface :




One bean class which implements this interface :


[color=darkblue][/color]

I have application.xml file which looks something like this :



I am using JBoss 5 server and eclipse galilelo IDE for this.
I used wizard to create project (project name is ConverterBean) and eclipse has created 5 kind of projects for me.

A) ConverterBean -->> this project contains application.xml
b) ConverterBeanClient -->>
c) ConverterBeanEJB -->> my remote interface and implementer class
d) ConverterBeanWeb -->>
e) ConverterBeanConnector -->>

Can anyone please tell me why all this projects are getting created???

After implementing interface, I have successfully deployed the bean. (I can see the message printed on console).

Now, I have created client in "ConverterBeanCLient" .
Its main class is as follows :



I have added "ConverterBeanEJB" as dependeny in this "ConverterBeanCLient" project.
Now when I try to run the client, I get following error :





I googled for above error, and I found out that somewhere I have to keep "jndi.properties" file. I do not know where to keep this file and what is the purpose of this file.
I looked into many tutorials and none of the tutorial has mentioned this file nor what is the purpose of this file.
Even JEE 5 tutorial from sun also does not mention this file.

Can anyone please tell me how to run client program?


I will upload my more dumb questions in next post
14 years ago