Robert, Thanks for the reply. I think I understand what you are saying but I want to make sure. You are saying that I should use the implementation class (requestServiceTarget)rather than the proxy (requestService).
I was under the impression that I had to use the proxied class to get the transaction management. Is this the case, or will I get the transaction management by using the implementation class? Thanks, John -----Original Message----- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Tue 2/13/2007 2:17 PM To: [email protected] Subject: Re: Axis2 Service Using Spring TransactionProxyFactoryBean and Hibernate Wrapping your hibernate transactions in spring is what I do so you are in good shape there. This step doesn't seem to be needed though: > DAO's. Each web service is a bean defined in the spring context and loaded > by my SpringInit class. One services.xml and one SpringInit should suffice for the entire AAR. Maybe that's what you are doing. Getting to your error, that seems to be an axis2 error coming from the java2wsdl package class ClassReader : InputStream fin = c.getResourceAsStream('/' + c.getName().replace('.', '/') + ".class"); if (fin == null) { throw new IOException("Unable to load bytecode for class " + c.getName() ); } So you seem to be loading the spring proxy objects somehow. "$Proxy98" is the proxy class of the underlying proxied class. What does that mean you may ask? Say you have your spring transactions over hibernate defined like so: <!-- BASIC SERVICE --> <bean id="basicService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" lazy-init="true"> <property name="transactionManager"><ref bean="myTransactionManager"/></property> <property name="target"><ref bean="basicServ"/></property> <property name="transactionAttributes"> <props> <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="create*">PROPAGATION_REQUIRED</prop> <prop key="update*">PROPAGATION_REQUIRED, -Exception</prop> <prop key="remove">PROPAGATION_REQUIRED</prop> <prop key="merge*">PROPAGATION_REQUIRED, -Exception</prop> </props> </property> </bean> <!-- Implementation of Basic Service --> <bean id="basicServ" class="com.wazollc.alphatheory.hibernate.services.BasicServiceImpl" lazy-init="true"> <property name="basicDAO"><ref bean="basicDAO"/></property> </bean> BasicServ in this case is this proxied class. At least I would think it would be ;-) . So use BasicService in this example, not the proxied class, ie the implementation BasicServ . If you are still stuck, try posting the relevant spring xml file and the AAR services.xml and maybe we can help. Robert On 2/13/07, John Pfeifer <[EMAIL PROTECTED]> wrote: > > > > I am currently using Hibernate 3.2 for ORM with Spring. In addition, I am > using the Axis2 Spring integration to load my hibernate configuration and > DAO's. Each web service is a bean defined in the spring context and loaded > by my SpringInit class. > > I am at the point where each web service must be an atomic transaction and > as a result, I have wired my service like this. > > <bean id="requestServiceTarget" class="com.foo.RequestServiceImpl" > parent="payCaptureService"> > .... > </bean> > > <bean id="requestService" > class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> > <property name="transactionManager"><ref > bean="bmlXATransactionManager"/></property> > <property name="target"><ref > local="requestServiceTarget"/></property> > <property name="transactionAttributes"> > <props> > <prop > key="handle*">PROPAGATION_REQUIRED</prop> > </props> > </property> > </bean> > > When I redeploy the service I get the following exception. Has anyone > attempted this sort of configuration before? It looks like the problem is > in the java2wsdl call. Is there any way to disable this? Any help would be > greatly appreciated. > > startUp() set spring classloader via axisService.getClassLoader() ... | > <02/13/07 > 12:56:05:102>|main|INFO|deployment.ServiceBuilder|The > Service paycapture-origin-request_v_1_0_0 does not specify > a Service Class| > <02/13/07 > 12:56:05:181>|main|DEBUG|i18n.ProjectResourceBundle|org.apache.axis2.i18n.resource::handleGetObject(errorinschemagen)| > <02/13/07 > 12:56:05:182>|main|DEBUG|i18n.ProjectResourceBundle|org.apache.axis2.i18n.resource::handleGetObject(op_error)| > <02/13/07 > 12:56:05:186>|main|DEBUG|i18n.ProjectResourceBundle|org.apache.axis2.i18n.resource::handleGetObject(invalidservice)| > <02/13/07 > 12:56:05:188>|main|ERROR|deployment.DeploymentEngine|Invalid > service > pay-capture-gateway-origin-service-1.0-SNAPSHOT.aar due to > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98| > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98 > at > org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:139) > at > org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:528) > at > org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196) > at > org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:227) > at > org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:174) > at > org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:88) > at > org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:252) > at > org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:72) > at > org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:373) > at > org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:317) > at > weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1028) > at > weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) > at > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) > at > weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:904) > at > weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:883) > at > weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:822) > at > weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3333) > at > weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3278) > at > weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3259) > at > weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5949) > at > weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862) > at > weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2127) > at > weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2168) > at > weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2115) > at > weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3082) > at > weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1751) > at > weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359) > at > weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229) > at > weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) > at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966) > at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361) > at weblogic.Server.main(Server.java:32) > Caused by: > org.apache.axis2.deployment.DeploymentException: Processing > Operations Modules Error in schema generating Unable to load bytecode for > class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Processing Operations Modules Error in schema generating Unable to load > bytecode for class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98 > at > org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101) > at > org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:99) > at > org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:133) > ... 31 more > Caused by: > org.apache.axis2.deployment.DeploymentException: Processing > Operations Modules Error in schema generating Unable to load bytecode for > class $Proxy98; nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98; > nested exception is: > org.apache.axis2.deployment.DeploymentException: > Error in schema generating Unable to load bytecode for class $Proxy98; > nested exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98 > at > org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:329) > at > org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:96) > ... 33 more > Caused by: > org.apache.axis2.deployment.DeploymentException: Error in > schema generating Unable to load bytecode for class $Proxy98; nested > exception is: > java.io.IOException: Unable to load bytecode for class $Proxy98 > at > org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:304) > ... 34 more > Caused by: java.io.IOException: Unable to load bytecode for class $Proxy98 > at > org.apache.ws.java2wsdl.bytecode.ClassReader.getBytes(ClassReader.java:81) > at > org.apache.ws.java2wsdl.bytecode.ParamReader.<init>(ParamReader.java:54) > at > org.apache.ws.java2wsdl.bytecode.ChainedParamReader.<init>(ChainedParamReader.java:49) > at > org.apache.ws.java2wsdl.bytecode.MethodTable.<init>(MethodTable.java:28) > at > org.apache.ws.java2wsdl.SchemaGenerator.<init>(SchemaGenerator.java:93) > at > org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:272) > at > org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:300) > ... 34 more > > Thanks, > jp4 > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
