[Beginners Corner] - Missing SecurityContextInterceptor while starting a HelloWor
by JRookie_2402
Hello all,
I try to run a very simple ejb3 application under JBoss5.0.
It's just Hello World where you give a name and get the reply "Hello ". When I try to start the client I get this message:
org.jboss.proxy.ejb.SecurityContextInterceptor (no security manager: RMI class loader disabled)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:668)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
at javax.naming.InitialContext.lookup(Unknown Source)
at de.akdabas.jli.j2ee.ejb.HelloWorldClient.main(HelloWorldClient.java:37)
In line 37 of my program there is:
InitialContext ctx = new InitialContext(env);
Object objRef = ctx.lookup("ejb/HelloWorld");
Do I have to set up a security policy, if I try to run a ejb3 application? Or is it something else?
Deployment of that bean looks alright:
11:42:35,656 INFO [EjbDeployer] installing bean: ejb/HelloWorld.jar#HelloWorld,uid27633413
11:42:35,656 INFO [EjbDeployer] with dependencies:
11:42:35,656 INFO [EjbDeployer] and supplies:
11:42:35,656 INFO [EjbDeployer] jndi:ejb/HelloWorld
11:42:35,890 INFO [EjbModule] Deploying HelloWorld
11:42:35,953 WARN [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=HelloWorld Deployment=vfszip:/F:/Entwicklung/JBos
s_5.0/jboss-5.0.0.GA/server/default/deploy/HelloWorldApp.ear/HelloWorld.jar
11:42:36,609 INFO [ProxyFactory] Bound EJB Home 'HelloWorld' to jndi 'ejb/HelloWorld'
Is there anyone who has an idea ??
regards
JRookie
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225974#4225974
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225974
17 years
[JBoss jBPM] - Re: ActorId & PooledActors
by ardavan
Thank you my friend.
There was an issue in my query. Now I am using this query and get the right information.
public List findEndedPooledTaskInstancesByName(List actorIds) {
| JbpmContext jbpmContext = Tools.jbpmConfiguration.createJbpmContext();
| try {
| List taskList;
| Query query =
| getSession(jbpmContext).createQuery("select distinct ti\n" +
| " from org.jbpm.taskmgmt.exe.PooledActor pooledActor "+
| " join pooledActor.taskInstances ti " +
| " where pooledActor.actorId in ( :actorIds ) " +
| " and ti.actorId != null " +
| " and ti.end != null");
| query.setParameterList("actorIds", actorIds);
| taskList = query.list();
| return taskList;
| } finally {
| jbpmContext.close();
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225960#4225960
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225960
17 years
[EJB 3.0] - Re: Specifying default values to @Service attributes (JBoss
by csorbag
"jaikiran" wrote : anonymous wrote :
| | The service element in not available in ejb-jar.xml. Its available only in jboss.xml.
| |
I tried both ejb-jar.xml and jboss.xml. None of them worked. I know the tutorial mentions only jboss.xml. The problem is that there is only a partial deployment descriptor in the tutorial that does not mention where I should put the service tag. Unfortunately I couldn't even find any references to the deployment descriptor XSD or DTD, so I couldn't figure out myself. No matter where I put the service tag I get the following exception after deploying the service:
| org.jboss.xb.binding.JBossXBRuntimeException: service not found as a child of enterprise-beans
|
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:863)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:806)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:293)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
| at java.lang.Thread.run(Thread.java:619)
|
"jaikiran" wrote : anonymous wrote :
| | The env-entry can be specified for the services in the jboss.xml. If that doesn't work then please post the contents of your jboss.xml and the entire exception stacktrace.
| |
That's exactly what I'm trying to do. Here are the DD and the class.
| <?xml version="1.0"?>
| <jboss>
| <enterprise-beans>
| <service>
| <ejb-name>TestService</ejb-name>
| <env-entry>
| <env-entry-name>defaultAttributeValue</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>10</env-entry-value>
| <injection-target>
| <injection-target-class>test.TestService</injection-target-class>
| <injection-target-name>attribute</injection-target-name>
| </injection-target>
| </env-entry>
| </service>
| </enterprise-beans>
| </jboss>
|
The service:
| package test;
|
| import javax.ejb.Remote;
|
| import org.jboss.ejb3.annotation.Management;
| import org.jboss.ejb3.annotation.Service;
|
| @Service(name = "TestService", objectName = "test:service=TestService")
| @Remote(TestInterface.class)
| @Management(TestInterface.class)
| public class TestService implements TestInterface {
|
| private int attribute;
|
| @Override
| public int getAttribute() {
| return attribute;
| }
|
| public void setAttribute(int attribute) {
| this.attribute = attribute;
| }
|
| }
|
If I change the @Service attribute to @Stateless and the service tag to session, so that it's a regular SB, then it works fine and the container injects the value specified in the env-entry-value tag. I just cannot figure out how to do it with a @Service.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225959#4225959
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225959
17 years