Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Server integration problem (jboss)
Server integration problem (jboss) [message #443884] Mon, 06 February 2006 10:51 Go to next message
Eclipse UserFriend
Originally posted by: alexander.meisinger.ams-engineering.com

Hello dear newsgroup-members,

I am using a JBoss 4.0.3SP1 with Hibernate, EJB 3.0 and Eclipse 3.1.1.

After deploying a .ear-file on my jboss-server I want to access it with my
own RCP-client. My lookup looks like the following code-excerpt:

Properties env = new Properties();
env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
env.setProperty(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");

In the RCP-client the code looks like this:

project = (IProject) JBossConfiguration.getInstance().lookup(
"my.package.stateless.IProject");

Collection coll = project.getAllProjects();

After running the RCP-client I got this error:

javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: my.package.stateless.IProject (no security
manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 13)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:5 72)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
[...]

If I run this code outside an RCP-client it works without problems.

Is there anybody who has a solution to this problem.


Thanks in advance,
alex
Re: Server integration problem (jboss) [message #444032 is a reply to message #443884] Wed, 08 February 2006 13:08 Go to previous messageGo to next message
Eclipse UserFriend
hi Alex,
I'm having a similar problem with my RCP application.
If you resolve this problem could you post the solution. I will do the
same if/when i solve this.
the error that I'm getting is:
-
javax.naming.NoInitialContextException: Cannot instantiate class:
NamingContextFactory [Root exception is
java.lang.ClassNotFoundException: NamingContextFactory]
-
I have tried using a jndi.property file and a similar lookup to what you
have done. My application throws the above mentioned exception when i do a:
-
Context ctx = new InitialContext();
-
Any experience that you might have would be greatly appreciated as i am
relatively new to RCP application development.

thanks
Robert.

Alexander Meisinger wrote:
> Hello dear newsgroup-members,
>
> I am using a JBoss 4.0.3SP1 with Hibernate, EJB 3.0 and Eclipse 3.1.1.
>
> After deploying a .ear-file on my jboss-server I want to access it with my
> own RCP-client. My lookup looks like the following code-excerpt:
>
> Properties env = new Properties();
> env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
> env.setProperty(Context.URL_PKG_PREFIXES,
> "org.jboss.naming:org.jnp.interfaces");
> env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory");
>
> In the RCP-client the code looks like this:
>
> project = (IProject) JBossConfiguration.getInstance().lookup(
> "my.package.stateless.IProject");
>
> Collection coll = project.getAllProjects();
>
> After running the RCP-client I got this error:
>
> javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: my.package.stateless.IProject (no security
> manager: RMI class loader disabled)]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 13)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:5 72)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> [...]
>
> If I run this code outside an RCP-client it works without problems.
>
> Is there anybody who has a solution to this problem.
>
>
> Thanks in advance,
> alex
>
>
>
Re: Server integration problem (jboss) [message #444085 is a reply to message #443884] Thu, 09 February 2006 02:35 Go to previous messageGo to next message
Eclipse UserFriend
See my answer to you question provided in the eclipse.platform
newsgroup. I hope, its corresponds to your problem.

Greetings from Bremen,

Daniel Krügler
Re: Server integration problem (jboss) [message #444315 is a reply to message #443884] Mon, 13 February 2006 12:19 Go to previous messageGo to next message
Eclipse UserFriend
> Hello dear newsgroup-members,

>
> After running the RCP-client I got this error:
>
> javax.naming.CommunicationException [Root exception is
> java.lang.ClassNotFoundException: my.package.stateless.IProject (no security
> manager: RMI class loader disabled)]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 13)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:5 72)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> [...]
>
> If I run this code outside an RCP-client it works without problems.
>
> Is there anybody who has a solution to this problem.
>
>
> Thanks in advance,
> alex
>


Take a look on my answer in the topic "Re: Connect to JBOSS ejb3 via RMI", from 13.02.2006.
I hope, the example, i mentioned there might be helpful...


Aleksey Aristov

--
www.imedic.de
www.rcp-training.com
Re: Server integration problem (jboss) [message #444405 is a reply to message #444315] Wed, 15 February 2006 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Thanks the example helped a lot. A related question.
I have an ejb3 application running on JBOss and what gets returned from my
context.lookup(MaseSystem.class.getName());

is not what i'm expecting. i am expecting to be able to cast this to a
MaseSystem object as this is my remote interface, however what is being
returned is actually a MaseSystemStatefulProxyFactory. Can you point out
what i'm missing?
Thanks again for all your help.
Robert.

Aleksey Aristov wrote:
> > Hello dear newsgroup-members,
>
> >
> > After running the RCP-client I got this error:
> >
> > javax.naming.CommunicationException [Root exception is
> > java.lang.ClassNotFoundException: my.package.stateless.IProject (no
> security
> > manager: RMI class loader disabled)]
> > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:7 13)
> > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:5 72)
> > at javax.naming.InitialContext.lookup(InitialContext.java:351)
> > [...]
> >
> > If I run this code outside an RCP-client it works without problems.
> >
> > Is there anybody who has a solution to this problem.
> >
> >
> > Thanks in advance,
> > alex
> >
>
>
> Take a look on my answer in the topic "Re: Connect to JBOSS ejb3 via
> RMI", from 13.02.2006.
> I hope, the example, i mentioned there might be helpful...
>
>
> Aleksey Aristov
>
Re: Server integration problem (jboss) [message #444473 is a reply to message #444032] Thu, 16 February 2006 06:26 Go to previous message
Eclipse UserFriend
I only started a few weeks ago with J2EE programming but got similar
errors. Try to include the jbossall-client.jar in your classpath. As I do
not understand the package structure I include nearly all available jars
from jboss to be sure that nothing is missing.

hth,

Ricky
Previous Topic:Passing data to new workbench/ Saving workbench data
Next Topic:view Problem
Goto Forum:
  


Current Time: Mon Jul 14 00:04:29 EDT 2025

Powered by FUDForum. Page generated in 0.06333 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top