• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Application Build error: Could not find method or setter for attribute

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Application run on 1.6 SE. I migrated to 12c R2 which uses 1.8 by default. I get the error
weblogic.application.ModuleException: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class xxx with preferred type java.util.HashMap
How do i fix it
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Can you show us the code for class cute? It's apparently missing a method or field, but I want to know why.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no method called cute in my class. The method name is 'execute' which is an abstract method called from my class. This method also has an annotation @WebServiceRef. THe applications runs fine in 1.6 SE .
 
Rancher
Posts: 662
10
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please post your code for class xxx
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public class classname extends abstractClass{
   public classname () {
       super();
   }

   private static final String className = "classname";

   @WebServiceRef
   public String execute(HashMap<String, String> ctrlInfo, String strXMLMsg) {
;;;
}
 
Randy Tong
Rancher
Posts: 662
10
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why you have so many ; ?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just mean to say statements inside.
 
Bartender
Posts: 667
14
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So there is no field cute in class xxx?
 
Al Hobbs
Bartender
Posts: 667
14
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it actually say cute in the error message or does it say execute?  Probably you screwed up somewhere by writing cute instead of execute
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO .. I dont have any attribute called cute. I think it is expecting setters for the 'exe'cute method name. Now if i change the method name to setwebserviceConfig() ..I get the error Could not find method or setter for attribute webserviceConfig on class xxx with preferred type java.util.HashMap

 
Al Hobbs
Bartender
Posts: 667
14
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it actually says cute in the error then thats what its looking for.  I don't know exactly what youre trying to do but probably there is something wrong if it's looking for 'cute'
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<May 9, 2019 4:21:31,540 PM IST> <Warning> <EJB> <BEA-012035> <The Remote interface method: public abstract java.lang.String com.xxx.common.xmlwrapper.JDBCWrapperEJB.executeSelectSqls(java.util.HashMap,com.xxx.common.util.UserContext) in EJB JDBCWrapperEJB contains a parameter of type com.xxx.common.util.UserContext which is not serializable. Though the EJB JDBCWrapperEJB has call-by-reference set to false, this parameter is not serializable and hence will be passed by reference. A parameter can be passed using call-by-value only if the parameter type is serializable.>
<May 9, 2019 4:21:32,892 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1212644072273576" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap"
weblogic.application.ModuleException: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap
at weblogic.utils.reflect.ReflectUtils.getMethodOrFieldForSetter(ReflectUtils.java:340)
at weblogic.j2ee.injection.BaseComponentContributor.findTargetMethodOrField(BaseComponentContributor.java:278)
at weblogic.j2ee.injection.BaseComponentContributor.parseInjectionTarget(BaseComponentContributor.java:266)
at weblogic.j2ee.injection.BaseComponentContributor.parseInjectionTarget(BaseComponentContributor.java:239)
at weblogic.j2ee.injection.BaseComponentContributor.addServiceRef(BaseComponentContributor.java:203)
Truncated. see log file for complete stacktrace
weblogic.application.ModuleException: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap
at weblogic.utils.reflect.ReflectUtils.getMethodOrFieldForSetter(ReflectUtils.java:340)
at weblogic.j2ee.injection.BaseComponentContributor.findTargetMethodOrField(BaseComponentContributor.java:278)
at weblogic.j2ee.injection.BaseComponentContributor.parseInjectionTarget(BaseComponentContributor.java:266)
at weblogic.j2ee.injection.BaseComponentContributor.parseInjectionTarget(BaseComponentContributor.java:239)
at weblogic.j2ee.injection.BaseComponentContributor.addServiceRef(BaseComponentContributor.java:203)
Truncated. see log file for complete stacktrace

[04:21:33 PM] Deployment cancelled.


 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Could not find method or setter for attribute cute on class com.xxx.lm.bookNew with preferred type java.util.HashMap"

Something somewhere is referring to an attribute cute on the class bookNew.
Is there some mapping somewhere?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not cute attribute. I have a method execute in my class .Same method name is declared in an abstract class which is called in a bean class.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you need to show us those declarations.
For example the bookNew class.


Because those errors don't lie.
Somewhere it has been told to look for an attribute called cute on the bookNew class.
It'll be a typo, but it will exist.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
public class bookNew extends CommandInf //abstract class with method name execute {
 
   public bookNew() {
       super()  ;
   }

   private static final String className = "bookNew";

   @WebServiceRef
   public String execute(HashMap<String, String> ctrlInfo, String strXMLMsg) {

   ....
}
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And that is being referenced from somewhere.
Maybe XML?
Or an annotation somewhere?

Somewhere that Weblogic is trying to inject a bookNew (possibly) or inject a value into a bookNew.

That's where the issue is.
Something is saying that there is a cute attribute.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 3 java classes: a remote interface,client interface and a bean class which delegates method calls to the original classes. The abstract method execute() does the job. Here the execute() method in my booknew class has a @WebserviceRef annotation.  There is no attribute called 'cute' to generate setter method.  
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this occur on startup, or on a call to the service?

If it's a call to the service, do you have the calling code, and the call that failed?
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now that I've had a proper think about this, is that actually a valid place to stick an @WebServiceRef annotation?

I thought it was used to mark a variable as being a web service to be used, so would be associated with an instance variable or (at a guess) a setter.  It was a way of injecting a reference.
Now, since this is being associated with a method, I am wondering if it is assuming that this is a setter, and so (slightly hackily) substrings out the 'set', leaving you with 'cute'.

Essentially I would say you are using the wrong annotation.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This was working properly in 1.6 SE .Now had i migrated my code to 1.8 this error pop up while running the application. I tried changing the method name to 'setexecute' as though it is expecting a setter method. But the error was could not find method or setter for attribute "execute". If @WebServiceRef is not the right annotation what would i try otherwise.?
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Set up a trial Java6 installation somewhere and compile your app with that JDK. Tell us what happens.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It works fine with Java 6.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea exactly what annotation you should be using, but that one (in the documentation) clearly refers to it being for use on the client to mark a variable as a service.

If you are marking the execute method as a service, on the server, then presumably there's an annotation for that.

As far as I can make out this has been the case for quite a while, and it is quite possible you were operating with a bug that has since been fixed.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed, thinking about it, this can't have been doing anything at all, so what happens if you remove the annotation entirely?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If i completely remove the annotation it throws weblogic.application.ModuleException: java.io.EOFException: Response had end of stream after 0 bytes
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When does it throw that exception?
What is it doing when it throws that exception?
Is there a stack trace?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While running the application

Stack Trace

weblogic.application.ModuleException: java.io.EOFException: Response had end of stream after 0 bytes
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:57)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:114)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:752)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:262)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:66)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:274)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:507)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:53)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:202)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:52)
at weblogic.management.deploy.internal.ConfiguredDeployments$2.doItem(ConfiguredDeployments.java:741)
at weblogic.management.deploy.internal.parallel.BucketInvoker$2.run(BucketInvoker.java:95)
at weblogic.work.ContextWrap.run(ContextWrap.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
Caused By: java.io.EOFException: Response had end of stream after 0 bytes
at weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:312)
at weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:232)
at weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:554)
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:688)
at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConnection.java:42)
at java.net.URL.openStream(URL.java:1045)
at weblogic.wsee.jaxws.spi.WLSProvider.createReader(WLSProvider.java:284)
at weblogic.wsee.jaxws.spi.WLSProvider.resolveWSDL(WLSProvider.java:257)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:173)
at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:150)
at javax.xml.ws.Service.<init>(Service.java:77)
at com.jmr.lm.dsbr.Service.<init>(Service.java:71)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.createService(ServiceRefProcessorImpl.java:289)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.createTargetRef(ServiceRefProcessorImpl.java:130)
at weblogic.wsee.jaxws.ServiceRefProcessorImpl.bindServiceRef(ServiceRefProcessorImpl.java:420)
at weblogic.application.naming.EnvironmentBuilder.bindServiceRef(EnvironmentBuilder.java:1179)
at weblogic.application.naming.EnvironmentBuilder.bindServiceReferences(EnvironmentBuilder.java:1146)
at weblogic.application.naming.EnvironmentBuilder.bindServiceReferences(EnvironmentBuilder.java:1518)
at weblogic.application.naming.EnvironmentBuilder.bindEnvEntriesFromDDs(EnvironmentBuilder.java:2118)
at weblogic.application.naming.EnvironmentBuilder.bindEnvEntriesFromDDs(EnvironmentBuilder.java:2089)
at weblogic.ejb.container.deployer.EJBDeployer.activate(EJBDeployer.java:865)
at weblogic.ejb.container.deployer.EJBModule.activate(EJBModule.java:447)
at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:317)
at weblogic.application.internal.ExtensibleModuleWrapper$ActivateStateChange.next(ExtensibleModuleWrapper.java:313)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:121)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:57)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:114)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:752)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:262)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:66)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:90)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:274)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:507)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:53)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:202)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:52)
at weblogic.management.deploy.internal.ConfiguredDeployments$2.doItem(ConfiguredDeployments.java:741)
at weblogic.management.deploy.internal.parallel.BucketInvoker$2.run(BucketInvoker.java:95)
at weblogic.work.ContextWrap.run(ContextWrap.java:46)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:670)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:355)
>
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But what is it trying to do when it fails with that exception?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is trying to inject a @webserviceref to that method.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK..

I think you;re going to have to explain what this is all supposed to do.

You have an execute method in a class.
Is that supposed to be a web service method?

Is the class annotated correctly for it to be a web service?

At the moment you are showing us really, really tiny bits of the picture and, beyond the use of WebServiceRef to seemingly mark an endpoint (which is a bit of a guess, but wrong in any case), I really can't tell what is going on.

A stack trace by itself is almost useless.
Hacked up fragments of code are almost useless.
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here it goes
I have a bean class where the abstract method 'execute' is being called.
The same is overrided in booknew class. Here the execute method calls some webservice methods and hence annotated with @WebServiceRef. This was how it worked in 1.6 SE
So on startup it throws could not find method or setter for attribute "cute" in booknew class. I donot have any attribute called cute first of all.
It is using SOAP webservices
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But, from what I can see, the WebServiceRef annotation is used to annotate the client reference to the service.
execute is not a reference to such.

I'm pulling this stuff from here, just to check.

It's not going to be 1.6 to 1.8.
It's the upgrade to WebLogic.  At least that's where I'd place the change.  It still looks to me like that annotation was incorrectly applied, though.  Even the 1.6 docs (old link I dug up) say it's to mark an injection target, which execute clearly isn't.  The newer stuff talks about ensuring an error is given, so that's what you seem to be seeing.

Now, having said all that, I still can't tell what is happening where.

I assume bookNew is a client somewhere trying to access a service?
Since there's loads of weblogic stuff in there I assume that's on a weblogic box.

So something calls execute on bookNew and it fails?
Is that where that stacktrace comes from?

You say it is trying to inject the reference into the method, but what is trying to do the oinjecting, and what is it injecting, and why is it trying to inject into a method that has nothing that is injectible?

This is the method signature:


What is being injected?
I see no service in there at all?
 
Shilpa Sathyan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

   @WebServiceRef
   public String execute(HashMap<String, String> ctrlInfo, String strXMLMsg) {

           if (strOp.equals("ALLOCATE_FACILITY")) {
           strRetVals = generateFacilityNum(strXMLMsg);//webservice method
       }


   public String generateFacilityNum(String strXMLMsg) {

       String response =
           disbComFunc.generateCallWebService(strXMLMsg, usrContext,

       return response;
   }
}

   public String generateCallWebService(String strXMLMsg, UserContext usrContext, String webServiceCall) {
       
       HashMap<String, String> intr_Err_Hm = new HashMap<String, String>();
       LmWebSrvcHandler intrHndlr = new LmWebSrvcHandler();
       intrHndlr.usrContext = usrContext;
       intr_Err_Hm = intrHndlr.callWebService(strXMLMsg, webServiceCall);
       String response = intr_Err_Hm.get("RESP");
       return response;
   }

//webservice Handler
public HashMap<String, String> callWebService(String xmlParms,String event_Nm) {

                lmWebSrvcIntr = service.getPort(portqname, LmWebSrvcIntr.class);
               try {
           
                  if(event_Nm.equals("ALLOCATE_FACILITY"))
                   resp = lmWebSrvcIntr.allocateFacilityRequest(xmlParms);
}


//webservice Interface

@WebService(targetNamespace = "URL")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
            parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)

public interface LmWebSrvcIntr {

   @WebMethod(operationName = "AllocateFacilityRequest",action="URL")
   @WebResult(targetNamespace = "URL",name = "AllocateFacilityRequestResult")
   public String allocateFacilityRequest(@WebParam(targetNamespace ="URL",name = "xmlParams")String xmlParams);
   
}
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read through the web logic link I posted (first link in the previous post)?
Does your code match up with what that is talking about?

For example, it has the service tagged with the annotation, as I would have expected.
So in your case (and again, I cannot see all your code, so there could well be some other reason for the current structure) that would be the service used in your handler.
(By the way, please use the code tags when posting code, there's a code button at the top of the reply box)

So, does any of this code execute when the annotation is removed?

Is it the call to the service that fails?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic