Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
kumar73
Post subject: ERROR WHILE TESTING EJB 3.0  PostPosted: Jan 05, 2009 - 07:51 PM



Joined: Nov 03, 2008
Posts: 20

I had written EJB 3.0 JPA and deployed on JBOSS 4.21 . I am using Myeclipse 6.6 IDE. IDE and JBSS is on my laptop.

I am trying to test my EJB3.0. I had written test program and running it through myeclipse.



public class TestDBClient {


public static void main(String[] args) {



Properties properties = new Properties();
properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url","localhost:1099");







try{

System.out.print("Starting call and getting Instance \n" );


GroupDAO groupDAO = (GroupDAO)context.lookup(GroupDAOBean.REMOTE_JNDI_NAME );

groupDAO.insertGroup(107);
System.out.print("DONE" );

}
catch(Exception e)
{
//throw DataAccessException

System.out.print("\nException " + e);

}

}


}


At line Context context = new InitialContext(properties) ...It is throwing error " The jar file jbosall-client.jar has no source attachment. Below is stake trace. What is wrong....Do I need to use Junit to test ? Please help.





// Compiled from FastNamingProperties.java (version 1.5 : 49.0, super bit)
class org.jnp.interfaces.FastNamingProperties extends java.util.Properties {

// Field descriptor #15 J
private static final long serialVersionUID = 190486940953472275L;

// Method descriptor #20 ()V
// Stack: 1, Locals: 1
FastNamingProperties();
0 aload_0 [this]
1 invokespecial java.util.Properties() [1]
4 return
Line numbers:
[pc: 0, line: 48]
[pc: 4, line: 49]
Local variable table:
[pc: 0, pc: 5] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #27 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
// Stack: 2, Locals: 3
public java.lang.Object setProperty(java.lang.String s1, java.lang.String s2);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 53]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: s1 index: 1 type: java.lang.String
[pc: 0, pc: 8] local: s2 index: 2 type: java.lang.String

// Method descriptor #32 (Ljava/io/InputStream;)V
// Stack: 2, Locals: 2
public void load(java.io.InputStream is) throws java.io.IOException;
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 58]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: is index: 1 type: java.io.InputStream

// Method descriptor #38 (Ljava/lang/String;)Ljava/lang/String;
// Stack: 2, Locals: 2
public java.lang.String getProperty(java.lang.String s);
0 aload_1 [s]
1 ldc <String "jndi.syntax.direction"> [4]
3 invokevirtual java.lang.String.equals(java.lang.Object) : boolean [5]
6 ifeq 12
9 ldc <String "left_to_right"> [6]
11 areturn
12 aload_1 [s]
13 ldc <String "jndi.syntax.ignorecase"> [7]
15 invokevirtual java.lang.String.equals(java.lang.Object) : boolean [5]
18 ifeq 24
21 ldc <String "false"> [8]
23 areturn
24 aload_1 [s]
25 ldc <String "jndi.syntax.separator"> [9]
27 invokevirtual java.lang.String.equals(java.lang.Object) : boolean [5]
30 ifeq 36
33 ldc <String "/"> [10]
35 areturn
36 aconst_null
37 areturn
Line numbers:
[pc: 0, line: 63]
[pc: 9, line: 65]
[pc: 12, line: 67]
[pc: 21, line: 69]
[pc: 24, line: 71]
[pc: 33, line: 73]
[pc: 36, line: 77]
Local variable table:
[pc: 0, pc: 38] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 38] local: s index: 1 type: java.lang.String

// Method descriptor #40 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
// Stack: 2, Locals: 4
public java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue);
0 aload_0 [this]
1 aload_1 [name]
2 invokevirtual org.jnp.interfaces.FastNamingProperties.getProperty(java.lang.String) : java.lang.String [11]
5 astore_3 [ret]
6 aload_3 [ret]
7 ifnonnull 12
10 aload_2 [defaultValue]
11 astore_3 [ret]
12 aload_3 [ret]
13 areturn
Line numbers:
[pc: 0, line: 83]
[pc: 6, line: 84]
[pc: 10, line: 86]
[pc: 12, line: 88]
Local variable table:
[pc: 0, pc: 14] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 14] local: name index: 1 type: java.lang.String
[pc: 0, pc: 14] local: defaultValue index: 2 type: java.lang.String
[pc: 6, pc: 14] local: ret index: 3 type: java.lang.String

// Method descriptor #45 ()Ljava/util/Enumeration;
// Stack: 2, Locals: 1
public java.util.Enumeration propertyNames();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 93]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #47 (Ljava/io/PrintStream;)V
// Stack: 2, Locals: 2
public void list(java.io.PrintStream ps);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 98]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: ps index: 1 type: java.io.PrintStream

// Method descriptor #50 (Ljava/io/PrintWriter;)V
// Stack: 2, Locals: 2
public void list(java.io.PrintWriter ps);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 103]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: ps index: 1 type: java.io.PrintWriter

// Method descriptor #53 ()I
// Stack: 2, Locals: 1
public int size();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 110]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #55 ()Z
// Stack: 2, Locals: 1
public boolean isEmpty();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 115]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #45 ()Ljava/util/Enumeration;
// Stack: 2, Locals: 1
public java.util.Enumeration keys();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 120]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #45 ()Ljava/util/Enumeration;
// Stack: 2, Locals: 1
public java.util.Enumeration elements();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 125]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #59 (Ljava/lang/Object;)Z
// Stack: 2, Locals: 2
public boolean contains(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 130]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #59 (Ljava/lang/Object;)Z
// Stack: 2, Locals: 2
public boolean containsValue(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 135]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #59 (Ljava/lang/Object;)Z
// Stack: 2, Locals: 2
public boolean containsKey(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 140]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #65 (Ljava/lang/Object;)Ljava/lang/Object;
// Stack: 2, Locals: 2
public java.lang.Object get(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 145]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #67 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
// Stack: 2, Locals: 3
public java.lang.Object put(java.lang.Object o1, java.lang.Object o2);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 150]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o1 index: 1 type: java.lang.Object
[pc: 0, pc: 8] local: o2 index: 2 type: java.lang.Object

// Method descriptor #65 (Ljava/lang/Object;)Ljava/lang/Object;
// Stack: 2, Locals: 2
public java.lang.Object remove(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 155]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #72 (Ljava/util/Map;)V
// Stack: 2, Locals: 2
public void putAll(java.util.Map m);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 160]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: m index: 1 type: java.util.Map

// Method descriptor #20 ()V
// Stack: 2, Locals: 1
public void clear();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 165]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #77 ()Ljava/lang/Object;
// Stack: 2, Locals: 1
public java.lang.Object clone();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 170]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #79 ()Ljava/lang/String;
// Stack: 2, Locals: 1
public java.lang.String toString();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 175]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #81 ()Ljava/util/Set;
// Stack: 2, Locals: 1
public java.util.Set keySet();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 180]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #81 ()Ljava/util/Set;
// Stack: 2, Locals: 1
public java.util.Set entrySet();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 185]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #84 ()Ljava/util/Collection;
// Stack: 2, Locals: 1
public java.util.Collection values();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 190]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties

// Method descriptor #59 (Ljava/lang/Object;)Z
// Stack: 2, Locals: 2
public boolean equals(java.lang.Object o);
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 195]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
[pc: 0, pc: 8] local: o index: 1 type: java.lang.Object

// Method descriptor #53 ()I
// Stack: 2, Locals: 1
public int hashCode();
0 new java.lang.UnsupportedOperationException [2]
3 dup
4 invokespecial java.lang.UnsupportedOperationException() [3]
7 athrow
Line numbers:
[pc: 0, line: 200]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: org.jnp.interfaces.FastNamingProperties
}

What are the option to test JPA EJB 3.0.

Kumar
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: ERROR WHILE TESTING EJB 3.0  PostPosted: Jan 06, 2009 - 02:35 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 8013

Kumar,
Was this app created using MyEclipse ?

Can you paste the error that gets recorded under <workspace>/.metadata/.log file when you try testing this app.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits