[Installation, Configuration & Deployment] - classcast exception
by jgayathri
When i deploy a session bean in JBoss, while deploying i got classcast exception . When i am looking thro ctxlook up, it is always returing the object ref as JNDI name+Home. why this error is coming? i need help.
servlet code
code:
|
| try {
|
| InitialContext ctx = new InitialContext();
| System.out.println("aaaaaaaaaa");
|
| Object objref = ctx.lookup("ejb/test/MyTestSessionBean/remote");
| //testSessionBean = (MyTestSessionHome)ctx.lookup("test.session.MyTestSessionBean.class.getName());
| //testSessionBean = (MyTestSessionHome)ctx.lookup("test/session/MyTestSessionBean");
| System.out.println("bbbbbbbbb"+objref);
|
| testSessionBean = (MyTestSessionHome)PortableRemoteObject.narrow(objref, MyTestSessionHome.class);
| System.out.println("ccccccccc");
|
| } catch (Exception NamingException) {
|
| NamingException.printStackTrace();
THis is the output in Jboss:
393 INFO [STDOUT] bbbbbbbbbejb/test/MyTestSessionBean/remoteHome
11:43:38,408 ERROR [STDERR] java.lang.ClassCastException
11:43:38,413 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
If the code is like this in the lookup:
Object objref = ctx.lookup("ejb/test/MyTestSessionBean");
It returns objref like this:MyTestSessionBeanHome - This class does not exist.
I need help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038724#4038724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038724
19 years
[JBoss jBPM] - fork related problem
by shirodkar4
hi,
i am using jboss starters kit 3.1.4
here is my processdefinition.xml file
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.1" name="firstProcess">
| <swimlane name="Market Requestor">
| <assignment expression="user(grover)"></assignment>
| </swimlane>
| <swimlane name="Process Leader">
| <assignment expression="user(ernie)"></assignment>
| </swimlane>
| <swimlane name="Market Strategy Director">
| <assignment expression="user(bert)"></assignment>
| </swimlane>
| <start-state name="Set up a draft proposal">
| <task name="Draft proposal" swimlane="Market Requestor">
| <controller>
| <variable name="Engine Type"></variable>
| </controller>
| </task>
| <transition name="" to="Notify Process Leader"></transition>
| </start-state>
| <task-node name="Notify Process Leader">
| <task swimlane="Market Strategy Director">
| <controller>
| <variable name="values" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="to branchfork" to="branchfork"></transition>
| </task-node>
| <fork name="branchfork">
| <transition name="Notify field support" to="Notify field support"></transition>
| <transition name="gather list of items to investigate" to="Gather list of items to investigate"></transition>
| </fork>
| <task-node name="Gather list of items to investigate">
| <task swimlane="Market Requestor">
| <controller>
| <variable name="Part Numbers"></variable>
| </controller>
| </task>
| <transition name="" to="branchjoin"></transition>
| </task-node>
| <task-node name="Notify field support">
| <task swimlane="Process Leader">
| <controller>
| <variable name="Person to notify"></variable>
| </controller>
| </task>
| <transition name="" to="branchjoin"></transition>
| </task-node>
| <join name="branchjoin">
| <transition name="" to="Review proposal"></transition>
| </join>
| <decision name="Review proposal">
| <transition name="approve proposal" to="Approve proposal">
| </transition>
| <transition name="reject proposal" to="Reject proposal"></transition>
| </decision>
| <task-node name="Approve proposal">
| <task name="Approve Proposal" swimlane="Market Strategy Director">
| <controller>
| <variable name="Comment" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="end1"></transition>
| </task-node>
| <task-node name="Reject proposal">
| <task name="Reject Proposal" swimlane="Market Strategy Director">
| <controller>
| <variable name="Comment" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="end1"></transition>
| </task-node>
| <end-state name="end1"></end-state>
|
| </process-definition>
|
now the problem is the moment market strategy director saves and closes the task assigned to him
i get the message the task has been assigned to null,null
i have also made this observation that the TASK "getting list of items to investigate" which appears after the fork gets assigned to the user who begins the process rather than getting assigned to the user defined in the swimlane(grover) However the Task "Notify field support" gets assigned correctly to ernie.
is this a bug with JBPM-starters kit 3.1.4..
please help me as i am stuck.....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038723#4038723
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038723
19 years