Shouvanik Haldar

Greenhorn
+ Follow
since Jun 16, 2010
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shouvanik Haldar

If you hit a roadblock while running the first EJB example simply follow these steps
to run the first example of HeadFirst EJB.

Softwares
1. j2sdk1.4.1 - jdk
2. j2sdkee1.3.1 - j2ee RI
3. CMD (command prompt)

Compile all the classes using c:\j2sdkee1.3.1\lib\j2ee.jar library.
Now, create a App and deploy EJB inside RI. download the application client as shown in the book.

Now, comes the tricky part.

Compile client class using the following jars

javac -classpath AdviceAppClient.jar;c:\j2sdkee1.3.1\lib\j2ee.jar AdviceClient.java

Next, run the client as follows

java -cp AdviceAppClient.jar;c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdk1.4.1\jre\lib\rt.jar;. AdviceClient
If you hit a roadblock while running the first EJB example simply follow these steps
to run the first example of HeadFirst EJB.

Softwares
1. j2sdk1.4.1 - jdk
2. j2sdkee1.3.1 - j2ee RI
3. CMD (command prompt)

Compile all the classes using c:\j2sdkee1.3.1\lib\j2ee.jar library.
Now, create a App and deploy EJB inside RI. download the application client as shown in the book.

Now, comes the tricky part.

Compile client class using the following jars

javac -classpath AdviceAppClient.jar;c:\j2sdkee1.3.1\lib\j2ee.jar AdviceClient.java

Next, run the client as follows

java -cp AdviceAppClient.jar;c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdk1.4.1\jre\lib\rt.jar;. AdviceClient
Hi Anil,

You are right. In order to know the basics HF EJB is the best book. Can you please tell me how you solved the problem.

java -cp AdviceAppClient.jar;c:\j2sdkee1.3.1\lib\j2ee.jar;. AdviceClient

After issuing this command, I get the following error

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge
at com.sun.corba.ee.internal.core.IOR$LocalCodeBaseSingletonHolder.<clinit>(IOR.java:90)
at com.sun.corba.ee.internal.core.IOR.<init>(IOR.java:238)
at com.sun.corba.ee.internal.iiop.messages.LocateReplyMessage_1_2.read(LocateReplyMessage_1_2.java:137)
at com.sun.corba.ee.internal.iiop.IIOPInputStream.unmarshalHeader(IIOPInputStream.java:126)
at com.sun.corba.ee.internal.iiop.IIOPConnection.getResponse(IIOPConnection.java:671)
at com.sun.corba.ee.internal.iiop.IIOPConnection.send(IIOPConnection.java:778)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:786)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(InitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:29)
at AdviceClient.main(AdviceClient.java:16)
Caused by: java.lang.ClassNotFoundException: com.sun.corba.se.internal.util.JDKBridge
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 18 more


Please help.

Regards,
Shouvanik
Sir,

I used the same approach. But, I am getting a new error. Please reply.

F:\EJBProject\advice>set CLASSPATH=c:\j2sdkee1.3.1\lib\j2ee.jar;c:\j2sdk1.4.0\jre\lib\rt.jar;C:\j2sdkee1.3.1\nativelib

F:\EJBProject\advice>java -cp %CLASSPATH%;AdviceAppClient.jar;. AdviceClient
ERROR! Shared library ioser12 could not be found.
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.sun.corba.se.internal.util.RepositoryId
at com.sun.corba.ee.internal.orbutil.RepIdDelegator.getStandardRMIUnchunkedId(RepIdDelegator.java:90)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.writeValueTag(CDROutputStream_1_0.java:1515)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:987)
at com.sun.corba.ee.internal.iiop.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:638)
at com.sun.corba.ee.internal.iiop.CDROutputStream.write_value(CDROutputStream.java:268)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:29)
at AdviceClient.main(AdviceClient.java:11)




Regards,
Shouvanik
I am surprised. I thought this forum is very active. Still I did not get a reply. Anyone who had this running in the past, please share the steps
Hi All & Hi Kathy,

I did whatever changes you had suggested, still I am getting the following error; Below is the code

Advice.java -> Remote Interface


AdviceBean.java -> EJB



AdviceHome.java -> Remote Interface



AdviceClient.java










I am following Head First EJB. I know it has EJB 2.0 which is old as now EJB 3.1 is in. But I consider Head first book a good book for learning for amateurs like us.

I am using J2ee 1.3.1 RI and jdk 1.4. I ran the "deploy" tool to deploy by EJB and now I have a ejb client JAVA program given below:








Following the book, I compiled the program. The "Properties" part is something not mentioned in the example. I got it from some other examples on the web. Now, that when I am executing the client, am getting the following error:


F:\EJBProject\advice>java -classpath AdviceAppClient.jar;. AdviceClient
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:

java.net.SocketTimeoutException: Read timed out]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:26)
at AdviceClient.main(AdviceClient.java:11)
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
... 5 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at java.io.DataInputStream.readByte(Unknown Source)

Please help. I am stuck up badly here. I wanted to sit for the OCBCD exam!

Regards, Shouvanik
Thanks Ulf. That really helped a lot!

Regards,
Shouvanik
7 years ago
Hi,

Can anybody help me with this?

I am looking for java apis or code to convert between a JPEG format and TIFF format?

Regards,
Shouvanik
7 years ago
Hi,

The specs changed last friday. Now, I have a EBCDIC format file. I have to convert it into ASCII format file.

Shouvanik
8 years ago
Hi,

I came across a most unique problem yesterday. I was assigned to find out how to read contents of a .cff (compressed file format) file using JAVA. I googled all day long, yet was unable to find any solution. My boss wants to see some progress on that today. Anybody kindly help me....it will be great! I will be extremely thankful.


Regards,
Shouvanik
8 years ago
Hi,
I am using Spring Source Tool Suite Version: 2.8.1.RELEASE Build Id: 201111221000. jdk version ->"1.6.0_02", axis2 runtime->axis2-1.5 and axis2 war file version->1.5. When I am going to create a webservice, I am getting error as "Failed while installing Axis2 Web Services Core 1.1" and if I click on "Details" button, I find reason as "null pointer exception". I don't understand what the error means....

before, I had done the same exercise with STS on 64 bit Windows 7 machine and jdk 1.7.x. It had worked fine.

This pc, where I am having problem has OS windows 7 32 bit machine and "jdk 1.6.0_02"

Please help me at the earliest. I am stuck!

Regards,
Shouvanik
8 years ago
Please suggest some good books for learning Spring MVC + Hibernate from scratch. I tried to read springsource.org but seriously, got carried away. Tutorials - pdfs also will be of great help.

Shouvanik
9 years ago
Thanks buddy. I referred the same and finally did a small part for my project.
9 years ago