You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by recursion <ba...@yahoo.com> on 2009/06/10 10:13:58 UTC

java.lang.NumberFormatException when calling EJBs

Hello,

I am using the latest OpenEJB 3.1, started the server, deployed my EJB 3.0
application, and wrote inside Eclipse a simple remote EJB client that
invokes my EJBs one by one. Some of the invocations are successful, but most
of them fail with java.lang.NumberFormatException and with NPE:

1. Caused by: javax.ejb.EJBException: Unknown Container Exception:
java.lang.NullPointerException: null
	at
org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:184)

2. Caused by: java.lang.NumberFormatException: For input string: "u"
	at java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at
org.apache.openejb.client.ProtocolMetaData.init(ProtocolMetaData.java:57)

3.  The same message for input strings "[]", "F", "~", "q", "Y", etc.

I have no idea where this symbols come from! On my Eclipse project i have on
the classpath the client jar that can be found under the /lib directory of
my OpenEJB installation. It is called openejb-client-3.1.jar

Can you please help me with this issue ?


recursion.
-- 
View this message in context: http://www.nabble.com/java.lang.NumberFormatException-when-calling-EJBs-tp23957712p23957712.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: java.lang.NumberFormatException when calling EJBs

Posted by recursion <ba...@yahoo.com>.
One more thing to add about my test case:
I create several threads, each of them is a remote client of my EJBs, and
execute them concurrently. Could this be somehow related to the problem ?
Does OpenEJB 3.1 support multithreaded clients, from the same JVM instance ?
(each thread creates its own initial context and performs its own lookup of
my EJBs and then invokes business methods)



-- 
View this message in context: http://www.nabble.com/java.lang.NumberFormatException-when-calling-EJBs-tp23957712p23962591.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: java.lang.NumberFormatException when calling EJBs

Posted by Jonathan Gallimore <jo...@gmail.com>.
This is definitely an odd problem. I ran the tests in our testing-security
and testing-security-2 examples, and they seem to work. Do you have a test
case that you might be able to share with us that can reproduce the problem?

Jon

On Wed, Jun 10, 2009 at 10:06 AM, recursion <ba...@yahoo.com> wrote:

>
> I forgot to mention that i use abstract J2EE security roles in my EJBs. I
> thought that the problem comes from the fact that i didn't include the
> necessary security roles mapping in my application.
> Since i know that OpenEJB handles properly all the GlassFish vendor
> specific
> descriptors, i wrote manually a sun-ejb-jar.xml and specified the mapping
> from my abstract security roles to groups. I added it in the application,
> undeployed it and deployed it again.
> Separately i created those groups in /conf/groups.properties and defined
> them to include all the users i have in /conf/users.properties.
>
> The problem remains the same....
>
>
> To Add: when i look more carefully at :
>
> Caused by: javax.ejb.EJBException: Unknown Container Exception:
> java.lang.NullPointerException: null
>        at
>
> org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:184)Error
> in statelessMethodPermissionsPositive
>
>        at
>
> org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
>        at
>
> org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
>        at $Proxy0.statelessMethodPermissionsPositive(Unknown Source)
>
> i come to the question: what does this package name
> "Jdk13InvocationHandler"
> have to do with OpenEJB 3.1, running on JDK 6 ??
> --
> View this message in context:
> http://www.nabble.com/java.lang.NumberFormatException-when-calling-EJBs-tp23957712p23957839.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
>

Re: java.lang.NumberFormatException when calling EJBs

Posted by recursion <ba...@yahoo.com>.
I forgot to mention that i use abstract J2EE security roles in my EJBs. I
thought that the problem comes from the fact that i didn't include the
necessary security roles mapping in my application.
Since i know that OpenEJB handles properly all the GlassFish vendor specific
descriptors, i wrote manually a sun-ejb-jar.xml and specified the mapping
from my abstract security roles to groups. I added it in the application,
undeployed it and deployed it again.
Separately i created those groups in /conf/groups.properties and defined
them to include all the users i have in /conf/users.properties.

The problem remains the same....


To Add: when i look more carefully at :

Caused by: javax.ejb.EJBException: Unknown Container Exception:
java.lang.NullPointerException: null
	at
org.apache.openejb.client.EJBObjectHandler._invoke(EJBObjectHandler.java:184)Error
in statelessMethodPermissionsPositive

	at
org.apache.openejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:117)
	at
org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:52)
	at $Proxy0.statelessMethodPermissionsPositive(Unknown Source)

i come to the question: what does this package name "Jdk13InvocationHandler"
have to do with OpenEJB 3.1, running on JDK 6 ??
-- 
View this message in context: http://www.nabble.com/java.lang.NumberFormatException-when-calling-EJBs-tp23957712p23957839.html
Sent from the OpenEJB User mailing list archive at Nabble.com.