[JBoss AOP] - Re: Dynamic AOP and User-Defined Class Loader
by shu_boston
Hi,
I tried what you said, and got a series of stack traces as below. Line 44 of test.Main.main (Main.java) invokes test.Test.print(), and the last stack trace came from RuntimeException thrown by JBoss AOP.
I'll try load-time weaving. Thanks for your advice!
| java.lang.Exception
| at test.MyClassLoader.getResource(MyClassLoader.java:30)
| at org.jboss.aop.classpool.AOPClassPool.isLocalResource(AOPClassPool.java:164)
| at org.jboss.aop.classpool.AOPClassPool.getCached(AOPClassPool.java:98)
| at javassist.ClassPool.get0(ClassPool.java:453)
| at javassist.ClassPool.get(ClassPool.java:433)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
| at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
| at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
| at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
| at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
| at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
| at test.Test.print(Unknown Source)
| at main.Main.main(Main.java:44)
|
| java.lang.Exception
| at test.MyClassLoader.getResource(MyClassLoader.java:30)
| at javassist.LoaderClassPath.find(LoaderClassPath.java:86)
| at javassist.ClassPoolTail.find(ClassPoolTail.java:369)
| at javassist.ClassPool.find(ClassPool.java:514)
| at javassist.ClassPool.createCtClass(ClassPool.java:498)
| at javassist.ClassPool.get0(ClassPool.java:464)
| at javassist.ClassPool.get(ClassPool.java:433)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
| at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
| at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
| at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
| at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
| at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
| at test.Test.print(Unknown Source)
| at main.Main.main(Main.java:44)
|
| java.lang.Exception
| at test.MyClassLoader.getResource(MyClassLoader.java:30)
| at javassist.LoaderClassPath.find(LoaderClassPath.java:86)
| at javassist.ClassPoolTail.find(ClassPoolTail.java:369)
| at javassist.ClassPool.find(ClassPool.java:514)
| at javassist.ClassPool.createCtClass(ClassPool.java:498)
| at javassist.ClassPool.get0(ClassPool.java:464)
| at javassist.ClassPool.get0(ClassPool.java:473)
| at javassist.ClassPool.get(ClassPool.java:433)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinpointClass(JoinPointGenerator.java:401)
| at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:287)
| at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
| at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
| at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
| at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
| at test.Test.print(Unknown Source)
| at main.Main.main(Main.java:44)
|
| java.lang.RuntimeException: Error generating joinpoint class for joinpoint Method[method=public void test.Test.print(test.Message)]
| at org.jboss.aop.instrument.JoinPointGenerator.doGenerateJoinPointClass(JoinPointGenerator.java:321)
| at org.jboss.aop.instrument.JoinPointGenerator.access$100(JoinPointGenerator.java:77)
| at org.jboss.aop.instrument.JoinPointGenerator$GenerateJoinPointClassAction$2.generateJoinPointClass(JoinPointGenerator.java:1672)
| at org.jboss.aop.instrument.JoinPointGenerator.generateJoinPointClass(JoinPointGenerator.java:251)
| at org.jboss.aop.GeneratedClassAdvisor.generateJoinPointClass(GeneratedClassAdvisor.java:1018)
| at test.Test$TestAdvisor.print_N_5551872189459734426(Test$TestAdvisor.java)
| at test.Test.print(Unknown Source)
| at main.Main.main(Main.java:44)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150812#4150812
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150812
18 years, 2 months
[JBoss Portal] - Re: Instance Level Portlet Preferences in Mysql
by jdestef
Ok, here is the problem.
org.jboss.portal.portlet.InvalidPortletIdException: Cannot configure producer offered portlets
org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.setProperties(ProducerPortletInvoker.java:538)
I looked at the ProducerPortletInvoker code and found this:
| //
| if (context.isStateful() == false)
| {
| throw new InvalidPortletIdException("Cannot configure producer offered portlets", portletId);
| }
|
So I started looking in the database and found JBP_INSTANCE and JBP_PORTLET_STATE. All the new instances that came with the portal worked fine, All the ones I created threw the above exception. The difference was the PORTLET_REF column in the JBP_INSTANCE table.
Mine had "local.news.RSSNewsPortlet" as the PORTLET_REF, and the default instances had local._7.
The "7" represents the primary key of the JBP_PORTLET_STATE table.
So I changed my PORTLET_REF to local._7 and it worked.
Is this is a bug?
thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150808#4150808
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150808
18 years, 2 months
[JBossWS] - JBossWs 3.0.1 client IllegalAnnotationsException
by gryffin
I used the wsconsume ant task to build a client for a simple web service designed to return the current time as a string. I built the service as an EJB3 with an endpoint, and it published fine on JBoss 4.2.2.
The client built by jbossws however throws a fit before calling the service.
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namespace to assign different names to them.
Looking at the code, there is not XML 'type name' of 'address'. I think that the JBossWS stack is a little unclear in describing the problem. I had this issue before, unsolved, and I have all of the JBoss endorsed libraries included in the classpath.
Can someone tell me what field needs to be annotated please?
full error:
| run-ts-client:
| [echo] Running timeservice client: C:\Documents and Settings\tx714c\My Documents\workspace\EJB3
| fun\gen\TimeServiceClient.jar
| [java] Exception in thread "main" javax.xml.ws.WebServiceException: Unable to load Provider: Fa
| iled to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
| [java] at javax.xml.ws.spi.Provider.provider(Provider.java:90)
| [java] at javax.xml.ws.Service.<init>(Service.java:81)
| [java] at com.boeing.nmt.client.timeservice.TimeService.<init>(TimeService.java:42)
| [java] at com.boeing.nmt.client.timeservice.TimeServiceClient.main(TimeServiceClient.java:1
| 1)
| [java] Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: co
| m.sun.xml.ws.spi.ProviderImpl
| [java] at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
| [java] at javax.xml.ws.spi.Provider.provider(Provider.java:82)
| [java] ... 3 more
| [java] Caused by: java.lang.ExceptionInInitializerError
| [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorIm
| pl.java:39)
| [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAc
| cessorImpl.java:27)
| [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| [java] at java.lang.Class.newInstance0(Class.java:350)
| [java] at java.lang.Class.newInstance(Class.java:303)
| [java] at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
| [java] ... 4 more
| [java] Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointR
| eference.
| [java] at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:188)
| [java] at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:65)
| [java] ... 11 more
| [java] Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalA
| nnotationExceptions
| [java] Two classes have the same XML type name "address". Use @XmlType.name and @XmlType.namesp
| ace to assign different names to them.
| [java] this problem is related to the following location:
| [java] at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
| [java] at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
| com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
| [java] at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| [java] this problem is related to the following location:
| [java] at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
| [java] at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.
| ws.wsaddressing.W3CEndpointReference.address
| [java] at javax.xml.ws.wsaddressing.W3CEndpointReference
| [java] Two classes have the same XML type name "elements". Use @XmlType.name and @XmlType.names
| pace to assign different names to them.
| [java] this problem is related to the following location:
| [java] at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
| [java] at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Element
| s com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
| [java] at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
| [java] this problem is related to the following location:
| [java] at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
| [java] at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml
| .ws.wsaddressing.W3CEndpointReference.referenceParameters
| [java] at javax.xml.ws.wsaddressing.W3CEndpointReference
| [java]
| [java] at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnno
| tationsException.java:102)
| [java] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:4
| 38)
| [java] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
| [java] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
| [java] at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
| [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
| :25)
| [java] at java.lang.reflect.Method.invoke(Method.java:585)
| [java] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
| [java] at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
| [java] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
| [java] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
| [java] at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:186)
| [java] ... 12 more
| [java] Java Result: 1
|
service class
|
| package com.boeing.nmt.client.timeservice;
|
| import java.net.MalformedURLException;
| import java.net.URL;
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
| import javax.xml.ws.WebEndpoint;
| import javax.xml.ws.WebServiceClient;
|
|
| /**
| * This class was generated by the JAX-WS RI.
| * JAX-WS RI 2.1.1-b03-
| * Generated source version: 2.0
| *
| */
| @WebServiceClient(name = "TimeService",
| targetNamespace = "http://www.boeing.com/nmt/ejb3/TimeService",
| wsdlLocation = "http://127.0.0.1:8080/TimeService?wsdl")
| public class TimeService
| extends Service
| {
|
| private final static URL TIMESERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://127.0.0.1:8080/TimeService?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| TIMESERVICE_WSDL_LOCATION = url;
| }
|
| public TimeService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public TimeService() {
| super(TIMESERVICE_WSDL_LOCATION, new QName("http://www.boeing.com/nmt/ejb3/TimeService", "TimeService"));
| }
|
| /**
| *
| * @return
| * returns TimeServiceEndpoint
| */
| @WebEndpoint(name = "TimeAgentPortBindingNamePort")
| public TimeServiceEndpoint getTimeAgentPortBindingNamePort() {
| return (TimeServiceEndpoint)super.getPort(new QName("http://www.boeing.com/nmt/ejb3/TimeService", "TimeAgentPortBindingNamePort"), TimeServiceEndpoint.class);
| }
|
| }
|
endpoint
|
| package com.boeing.nmt.client.timeservice;
|
| import javax.jws.WebMethod;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
|
| /**
| * This class was generated by the JAX-WS RI.
| * JAX-WS RI 2.1.1-b03-
| * Generated source version: 2.0
| *
| */
| @WebService()//name = "TimeServiceEndpoint", targetNamespace = "http://foo")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public interface TimeServiceEndpoint {
|
|
| /**
| *
| * @return
| * returns java.lang.String
| */
| @WebMethod
| @WebResult(partName = "return")
| public String getTime();
|
| }
|
wsdl:
<definitions name='TimeService' targetNamespace='http://www.boeing.com/nmt/ejb3/TimeService' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://foo' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://www.boeing.com/nmt/ejb3/TimeService' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <import location='http://127.0.0.1:8080/TimeService?wsdl&resource=TimeServiceEndpoint_PortT...' namespace='http://foo'></import>
| <service name='TimeService'>
| <port binding='ns1:TimeServiceEndpointBinding' name='TimeAgentPortBindingNamePort'>
| <soap:address location='http://127.0.0.1:8080/TimeService'/>
| </port>
| </service>
| </definitions>
imported wsdl:
<definitions name='TimeService' targetNamespace='http://foo' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://foo' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://www.boeing.com/nmt/ejb3/TimeService' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types></types>
| <message name='TimeServiceEndpoint_getTime'></message>
| <message name='TimeServiceEndpoint_getTimeResponse'>
| <part name='return' type='xsd:string'></part>
| </message>
| <portType name='TimeServiceEndpoint'>
| <operation name='getTime'>
| <input message='ns1:TimeServiceEndpoint_getTime'></input>
|
| <output message='ns1:TimeServiceEndpoint_getTimeResponse'></output>
| </operation>
| </portType>
| <binding name='TimeServiceEndpointBinding' type='ns1:TimeServiceEndpoint'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='getTime'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://www.boeing.com/nmt/ejb3/TimeService' use='literal'/>
|
| </input>
| <output>
| <soap:body namespace='http://www.boeing.com/nmt/ejb3/TimeService' use='literal'/>
| </output>
| </operation>
| </binding>
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150797#4150797
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150797
18 years, 2 months
[Installation, Configuration & DEPLOYMENT] - mm.sh
by SlothB77
According to an application I am using,
I need to start SPSS Predictive Enterprise Services as a daemon. The SPSS documentation says the following:
anonymous wrote : Starting as a Daemon under UNIX
|
| For information on starting the SPSS Predictive Enterprise Repository daemon on an application server other than JBoss, see the application server vendor documentation.
|
| To start the SPSS Predictive Enterprise Repository as a daemon under UNIX for an installation using JBoss:
|
| 1. From a command line, navigate to the bin directory of the JBoss installation.
|
| 2. Enter: ./mm.sh start
|
| Note: It may take several minutes for the server and its components to become active.
|
| 3. To verify the server is stopped, enter ps -e | grep wrapper. The process should not appear in the list.
What does mm.sh do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150790#4150790
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150790
18 years, 2 months
Delivery Status Notification (Failure)
by postmaster@lists.jboss.org
This is an automatically generated Delivery Status Notification.
Unable to deliver message to the following recipients, because the message was forwarded more than the maximum allowed times. This could indicate a mail loop.
dannam(a)technodom.kz
18 years, 2 months