mte01
asked on
Problem in creating a service
Hey experts,
I am changing a small section in the code of huge java web application (based on struts & EJBs), and I am having a problem in a service creation. This piece of code:
PreferencesManager preferencesManager = null;
preferencesManager = (PreferencesManager)Busine ssServiceF actory.get Instance() .createSer vice("com. tangoe.cmp .enterpris e.business .services. preference s.Preferen cesManager ",
null);
is working fine in several places of the application, but when I tried to call it from a class of mine, it caused a ServiceNotFoundException (due to an Invocation Target Exception - trying to call the create method); why do you think a service creation would be successful in a class of the application and won't work in a class of mine??
I am changing a small section in the code of huge java web application (based on struts & EJBs), and I am having a problem in a service creation. This piece of code:
PreferencesManager preferencesManager = null;
preferencesManager = (PreferencesManager)Busine
null);
is working fine in several places of the application, but when I tried to call it from a class of mine, it caused a ServiceNotFoundException (due to an Invocation Target Exception - trying to call the create method); why do you think a service creation would be successful in a class of the application and won't work in a class of mine??
It might be a classloader issue. Can you post the full stack trace?
ASKER
2006-06-28 15:12:55,546 ERROR SessionBeanServiceFactory - (create) InvocationTargetException caught while invoking the create() method on the home interface. Service cannot be created.
java.lang.reflect.Invocati onTargetEx ception
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:32 4)
at com.tangoe.cmp.common.busi ness.servi ceFactory. SessionBea nServiceFa ctory.crea te(Session BeanServic eFactory.j ava:68)
at com.tangoe.cmp.common.busi ness.servi ceFactory. BusinessSe rviceFacto ry.createS ervice(Bus inessServi ceFactory. java:205)
at com.tangoe.cmp.enterprise. ui.profile .Enterpris eSecurityH elper.getP references (Enterpris eSecurityH elper.java :232)
at com.tangoe.cmp.common.ui.p rofile.Pro file.getCu rrentLocal e(Profile. java:633)
at com.tangoe.cmp.enterprise. ui.uiservi ces.schedu ler.jobs.E mailNotify Job.execut e(EmailNot ifyJob.jav a:63)
at org.quartz.core.JobRunShel l.run(JobR unShell.ja va:191)
at org.quartz.simpl.SimpleThr eadPool$Wo rkerThread .run(Simpl eThreadPoo l.java:516 )
java.lang.reflect.Invocati
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at com.tangoe.cmp.common.busi
at com.tangoe.cmp.common.busi
at com.tangoe.cmp.enterprise.
at com.tangoe.cmp.common.ui.p
at com.tangoe.cmp.enterprise.
at org.quartz.core.JobRunShel
at org.quartz.simpl.SimpleThr
Where is your class? do you have all relevant proxy/stub classes you need in the classpath?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>>girionis
It turned out it's a security/login issue (in lower level methods).....the userId wasn't available for the invoker of the method...thanks for your help!
It turned out it's a security/login issue (in lower level methods).....the userId wasn't available for the invoker of the method...thanks for your help!
No problem. Please ask for a PAQ/Refund :)