You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by "Vinh Nguyen (vinguye2)" <vi...@cisco.com> on 2007/01/11 09:15:36 UTC
dynamic resource properties
I have a resource type that has custom properties identified in an rmd
file. Some of the property elements are defined as <xs:element
ref="..." minOccurs="1" maxOccurs="1"/>, meaning they must exist and
only exist once. I have a capability class which has get/set methods
for each property. When Muse starts, it initializes the resource, and I
get the following error:
org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFau
lt: [ID = 'BelowMinimum'] The property
'{http://schemas.cmp.cisco.com/2006/07/Chameleon/LogicalResource}adminis
teredState' has a minOccurs value of 1, but there are only 0 instances
in the document.
at
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollec
tion.validateSchema(SimpleResourcePropertyCollection.java:1209)
at
org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsRes
ource.java:223)
...
What I'm trying to do is have the resource properties pulled dynamically
from an external source, like from a database. Also, the properties
should only be pulled when the client calls the
GetResourcePropertyDocument operation. This is because the property
values can differ at any point in time, so it should not be "cached" in
the Muse application layer.
But, from the error I'm getting above, it seems as if Muse is explicitly
calling the capability methods to get the resource properties when the
resource is initialized, and not when the client actually makes a call
to get the properties.
Is there a reason why Muse must call to get the properties so early,
instead of when really needed? In my case, the dynamic properties will
always be null until the client makes the call, so Muse will always
throw an error on startup because it is encountering 0 property values
where it expects 1.
Re: dynamic resource properties
Posted by Balan Subramanian <bs...@us.ibm.com>.
I ran into the same issue but my solution to simply provide a initial
value to the properties in initialize(). When the client calls
getResourcePropertyDocument, I believe Muse will call get() for each of
the properties so I get it from the actual datasource (a file in my case).
I believe Andrew is also working on a JIRA item that will automatically
initialize the variables generated by codegen so that you shouldn't see
this error.
Balan Subramanian
Autonomic Computing, IBM, RTP, NC
919.543.0197 | bsubram@us.ibm.com
"Vinh Nguyen \(vinguye2\)" <vi...@cisco.com>
01/11/2007 03:15 AM
Please respond to
muse-user@ws.apache.org
To
<mu...@ws.apache.org>
cc
Subject
dynamic resource properties
I have a resource type that has custom properties identified in an rmd
file. Some of the property elements are defined as <xs:element
ref="..." minOccurs="1" maxOccurs="1"/>, meaning they must exist and
only exist once. I have a capability class which has get/set methods
for each property. When Muse starts, it initializes the resource, and I
get the following error:
org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFau
lt: [ID = 'BelowMinimum'] The property
'{http://schemas.cmp.cisco.com/2006/07/Chameleon/LogicalResource}adminis
teredState' has a minOccurs value of 1, but there are only 0 instances
in the document.
at
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollec
tion.validateSchema(SimpleResourcePropertyCollection.java:1209)
at
org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsRes
ource.java:223)
...
What I'm trying to do is have the resource properties pulled dynamically
from an external source, like from a database. Also, the properties
should only be pulled when the client calls the
GetResourcePropertyDocument operation. This is because the property
values can differ at any point in time, so it should not be "cached" in
the Muse application layer.
But, from the error I'm getting above, it seems as if Muse is explicitly
calling the capability methods to get the resource properties when the
resource is initialized, and not when the client actually makes a call
to get the properties.
Is there a reason why Muse must call to get the properties so early,
instead of when really needed? In my case, the dynamic properties will
always be null until the client makes the call, so Muse will always
throw an error on startup because it is encountering 0 property values
where it expects 1.
RE: Dynamic EPR(s) access and SimpleResourceManager hashCode and Http 500 error
Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
ActionURI mapping for operations contained in the dynamically created
WS-Resource we missing. Adding action mapping in services.xml file fixed
the problem.
Thanks.
--Baseer
-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, January 17, 2007 6:01 PM
To: muse-user@ws.apache.org
Subject: Re: Dynamic EPR(s) access and SimpleResourceManager hashCode
and Http 500 error
HTTP 500 errors are often caused by Axis2 config problems. Do any of
these items apply to you?
http://ws.apache.org/muse/docs/2.1.0/manual/troubleshooting/http-500-axi
s2.html
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/17/2007 07:58:00
PM:
>
> I have a situation where my Dynamically created EPR(s) are not
> accessible and any operation on those EPR(s) result in Http 500 error.
>
> ResourceManager.getNumberOfResources() gives me correct count of
> number of resources.
>
>
> Question(s)
>
> 1) My log level in muse is set to "Finest" and I don't see any log of
> when Http 500 error is returned. Where can I find logging info for
> this type of errors?
> 2) Does the EPR returned by a operation needs to be Exactly the same
> when accessing it?
> 3) My guess is the ResourceManager hashCode() method is returning
> different output(s) for same EPR.
>
> Below is EPR created and passed and a sample code as well. Any
> thoughts on this issue?
>
> Thanks.
>
> --Baseer
>
>
> Dynamic EPR returned by my "create" operation is -
>
> <wsa:EndpointReference
> xmlns:wsa="http://www.w3.org/2005/08/addressing">
>
> <wsa:Address>http://171.69.222.119:8090/ManagedResourceFactory/service
> s/
> OrganizationUnitPort</wsa:Address>
> <wsa:ReferenceParameters>
> <muse-wsa:ResourceId
> xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19
> f8 -7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
> <OrgUnitContext context="bakhan:orgUnit"
> xmlns="http://cisco.ana.com/wsdl/"/>
> </wsa:ReferenceParameters>
> </wsa:EndpointReference>
>
> The Proxy Code (client) when iniatiates a operation request using this
> EPR it constructs soap header as below
>
> <soap:Header>
> <wsa:To
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://171.69.222.119
> :8 090/ManagedResourceFactory/services/OrganizationUnitPort</wsa:To>
> <wsa:Action
>
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.
> org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocument
> Re
> quest</wsa:Action>
> <wsa:MessageID
> xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:3762abf4-8274-cc
> df
> -6c7c-618cb81a4814</wsa:MessageID>
> <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
>
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:
> Ad
> dress>
> </wsa:From>
> <muse-wsa:ResourceId
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:IsReferenceParameter="true"
> xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19
> f8 -7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
> <OrgUnitContext context="bakhan:orgUnit"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:IsReferenceParameter="true"
> xmlns="http://cisco.ana.com/wsdl/"/>
> </soap:Header>
>
>
> Client Code
> -----------
>
> //
> // change these to point to different applications/servers
> //
> String webAppRoot = "/ManagedResourceFactory/services";
> int port = 8090;
>
>
> //
> // test WSSG directory
> //
>
> String contextPath = webAppRoot +
> "/ManagedResourceFactory";
>
> URI address = getLocalAddress(contextPath, port);
> EndpointReference epr = new EndpointReference(address);
>
> System.out.println(epr.toString());
>
> ManagedResourceFactoryProxy sg = new
> ManagedResourceFactoryProxy(epr);
>
> //
> // turn on tracing of SOAP messages
> //
> sg.setTrace(true);
>
> QName qName = new QName("http://cisco.ana.com/wsdl/",
> "OrganizationUnitPort");
> org.apache.muse.core.serializer.QNameSerializer qns =
> new org.apache.muse.core.serializer.QNameSerializer();
> Element qElement = qns.toXML(qName, qName);
>
> //Invoke Create of ManagedResourceFactory WS-Resource.
> Element orgElement = sg.create(qElement);
>
> org.apache.muse.ws.addressing.EndpointReference orgEPR =
> new
> org.apache.muse.ws.addressing.EndpointReference(orgElement, true);
>
> if (orgEPR != null) {
> System.out.println("EPR is ....");
> System.out.println(orgEPR.toString());
> OrganizationUnitPortProxy orgProxy = new
> OrganizationUnitPortProxy(orgEPR);
> orgProxy.setTrace(true);
> Element orgUnit =
> orgProxy.getResourcePropertyDocument(); //Returns 500 error
> System.out.println("OrgUnit is...." +
> orgUnit.toString());
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Re: Dynamic EPR(s) access and SimpleResourceManager hashCode and Http 500
error
Posted by Daniel Jemiolo <da...@us.ibm.com>.
HTTP 500 errors are often caused by Axis2 config problems. Do any of these
items apply to you?
http://ws.apache.org/muse/docs/2.1.0/manual/troubleshooting/http-500-axis2.html
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/17/2007 07:58:00
PM:
>
> I have a situation where my Dynamically created EPR(s) are not
> accessible and any operation on those EPR(s) result in Http 500 error.
>
> ResourceManager.getNumberOfResources() gives me correct count of number
> of resources.
>
>
> Question(s)
>
> 1) My log level in muse is set to "Finest" and I don't see any log of
> when Http 500 error is returned. Where can I find logging info for this
> type of errors?
> 2) Does the EPR returned by a operation needs to be Exactly the same
> when accessing it?
> 3) My guess is the ResourceManager hashCode() method is returning
> different output(s) for same EPR.
>
> Below is EPR created and passed and a sample code as well. Any thoughts
> on this issue?
>
> Thanks.
>
> --Baseer
>
>
> Dynamic EPR returned by my "create" operation is -
>
> <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
>
> <wsa:Address>http://171.69.222.119:8090/ManagedResourceFactory/services/
> OrganizationUnitPort</wsa:Address>
> <wsa:ReferenceParameters>
> <muse-wsa:ResourceId
> xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19f8
> -7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
> <OrgUnitContext context="bakhan:orgUnit"
> xmlns="http://cisco.ana.com/wsdl/"/>
> </wsa:ReferenceParameters>
> </wsa:EndpointReference>
>
> The Proxy Code (client) when iniatiates a operation request using this
> EPR it constructs soap header as below
>
> <soap:Header>
> <wsa:To
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://171.69.222.119:8
> 090/ManagedResourceFactory/services/OrganizationUnitPort</wsa:To>
> <wsa:Action
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.
> org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRe
> quest</wsa:Action>
> <wsa:MessageID
> xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:3762abf4-8274-ccdf
> -6c7c-618cb81a4814</wsa:MessageID>
> <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
>
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Ad
> dress>
> </wsa:From>
> <muse-wsa:ResourceId
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:IsReferenceParameter="true"
> xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19f8
> -7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
> <OrgUnitContext context="bakhan:orgUnit"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:IsReferenceParameter="true"
> xmlns="http://cisco.ana.com/wsdl/"/>
> </soap:Header>
>
>
> Client Code
> -----------
>
> //
> // change these to point to different applications/servers
> //
> String webAppRoot = "/ManagedResourceFactory/services";
> int port = 8090;
>
>
> //
> // test WSSG directory
> //
>
> String contextPath = webAppRoot + "/ManagedResourceFactory";
>
> URI address = getLocalAddress(contextPath, port);
> EndpointReference epr = new EndpointReference(address);
>
> System.out.println(epr.toString());
>
> ManagedResourceFactoryProxy sg = new
> ManagedResourceFactoryProxy(epr);
>
> //
> // turn on tracing of SOAP messages
> //
> sg.setTrace(true);
>
> QName qName = new QName("http://cisco.ana.com/wsdl/",
> "OrganizationUnitPort");
> org.apache.muse.core.serializer.QNameSerializer qns =
> new org.apache.muse.core.serializer.QNameSerializer();
> Element qElement = qns.toXML(qName, qName);
>
> //Invoke Create of ManagedResourceFactory WS-Resource.
> Element orgElement = sg.create(qElement);
>
> org.apache.muse.ws.addressing.EndpointReference orgEPR =
> new
> org.apache.muse.ws.addressing.EndpointReference(orgElement, true);
>
> if (orgEPR != null) {
> System.out.println("EPR is ....");
> System.out.println(orgEPR.toString());
> OrganizationUnitPortProxy orgProxy = new
> OrganizationUnitPortProxy(orgEPR);
> orgProxy.setTrace(true);
> Element orgUnit =
> orgProxy.getResourcePropertyDocument(); //Returns 500 error
> System.out.println("OrgUnit is...." +
> orgUnit.toString());
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Dynamic EPR(s) access and SimpleResourceManager hashCode and Http 500 error
Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
I have a situation where my Dynamically created EPR(s) are not
accessible and any operation on those EPR(s) result in Http 500 error.
ResourceManager.getNumberOfResources() gives me correct count of number
of resources.
Question(s)
1) My log level in muse is set to "Finest" and I don't see any log of
when Http 500 error is returned. Where can I find logging info for this
type of errors?
2) Does the EPR returned by a operation needs to be Exactly the same
when accessing it?
3) My guess is the ResourceManager hashCode() method is returning
different output(s) for same EPR.
Below is EPR created and passed and a sample code as well. Any thoughts
on this issue?
Thanks.
--Baseer
Dynamic EPR returned by my "create" operation is -
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://171.69.222.119:8090/ManagedResourceFactory/services/
OrganizationUnitPort</wsa:Address>
<wsa:ReferenceParameters>
<muse-wsa:ResourceId
xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19f8
-7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
<OrgUnitContext context="bakhan:orgUnit"
xmlns="http://cisco.ana.com/wsdl/"/>
</wsa:ReferenceParameters>
</wsa:EndpointReference>
The Proxy Code (client) when iniatiates a operation request using this
EPR it constructs soap header as below
<soap:Header>
<wsa:To
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://171.69.222.119:8
090/ManagedResourceFactory/services/OrganizationUnitPort</wsa:To>
<wsa:Action
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.
org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRe
quest</wsa:Action>
<wsa:MessageID
xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:3762abf4-8274-ccdf
-6c7c-618cb81a4814</wsa:MessageID>
<wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Ad
dress>
</wsa:From>
<muse-wsa:ResourceId
xmlns:wsa="http://www.w3.org/2005/08/addressing"
wsa:IsReferenceParameter="true"
xmlns:muse-wsa="http://ws.apache.org/muse/addressing">uuid:8ce46e00-19f8
-7012-4908-9dbde23ae48f</muse-wsa:ResourceId>
<OrgUnitContext context="bakhan:orgUnit"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
wsa:IsReferenceParameter="true"
xmlns="http://cisco.ana.com/wsdl/"/>
</soap:Header>
Client Code
-----------
//
// change these to point to different applications/servers
//
String webAppRoot = "/ManagedResourceFactory/services";
int port = 8090;
//
// test WSSG directory
//
String contextPath = webAppRoot + "/ManagedResourceFactory";
URI address = getLocalAddress(contextPath, port);
EndpointReference epr = new EndpointReference(address);
System.out.println(epr.toString());
ManagedResourceFactoryProxy sg = new
ManagedResourceFactoryProxy(epr);
//
// turn on tracing of SOAP messages
//
sg.setTrace(true);
QName qName = new QName("http://cisco.ana.com/wsdl/",
"OrganizationUnitPort");
org.apache.muse.core.serializer.QNameSerializer qns =
new org.apache.muse.core.serializer.QNameSerializer();
Element qElement = qns.toXML(qName, qName);
//Invoke Create of ManagedResourceFactory WS-Resource.
Element orgElement = sg.create(qElement);
org.apache.muse.ws.addressing.EndpointReference orgEPR =
new
org.apache.muse.ws.addressing.EndpointReference(orgElement, true);
if (orgEPR != null) {
System.out.println("EPR is ....");
System.out.println(orgEPR.toString());
OrganizationUnitPortProxy orgProxy = new
OrganizationUnitPortProxy(orgEPR);
orgProxy.setTrace(true);
Element orgUnit =
orgProxy.getResourcePropertyDocument(); //Returns 500 error
System.out.println("OrgUnit is...." +
orgUnit.toString());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
RE: Unable to load inner classes created by xmlbeans complier from within muse.
Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
Converting .zip to .jar file did the trick. Thanks Dan!
--Baseer
-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, January 17, 2007 10:40 AM
To: muse-user@ws.apache.org
Subject: RE: Unable to load inner classes created by xmlbeans complier
from within muse.
I believe the J2EE classloader will only pick up .class files under
WEB-INF/lib if they are part of a .jar file. just unzip the contents and
repackage with jar.
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/17/2007 01:34:11
PM:
> This is in a .zip file under lib folder.
>
> --Baseer
>
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Wednesday, January 17, 2007 7:30 AM
> To: muse-user@ws.apache.org
> Subject: Re: Unable to load inner classes created by xmlbeans complier
> from within muse.
>
> I don't know why Muse would be causing the problem -
> OrganizationUnitDocument.Factory would be loaded by JBoss'
> application-level classloader. Is the .class file for
> OrganizationUnitDocument.Factory in WEB-INF/classes? or a .jar file?
>
> Dan
>
>
>
> "Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/16/2007
> 09:46:08
> PM:
>
> > I am not sure if this problem is related to Muse or ClassLoader of
> > Jboss I am using. From one of the capability class methods if I have
> > a
>
> > code like this below -
> >
> > OrganizationUnitDocument doc =
> > OrganizationUnitDocument.Factory.newInstance();
> >
> > It throws
> > Caused by: java.lang.NoClassDefFoundError:
> > com/cisco/cmp/schemas/x2006/x07/chameleon/organizationUnit/Organizat
> > io
> > nU
> > nitDocument$Factoory
> >
> > Factory is the inner class within OrganizationUnitDocument.
> >
> > Any ideas how to get around this issue?
> >
> > Thanks.
> >
> > --Baseer
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
RE: Unable to load inner classes created by xmlbeans complier from within
muse.
Posted by Daniel Jemiolo <da...@us.ibm.com>.
I believe the J2EE classloader will only pick up .class files under
WEB-INF/lib if they are part of a .jar file. just unzip the contents and
repackage with jar.
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/17/2007 01:34:11
PM:
> This is in a .zip file under lib folder.
>
> --Baseer
>
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Wednesday, January 17, 2007 7:30 AM
> To: muse-user@ws.apache.org
> Subject: Re: Unable to load inner classes created by xmlbeans complier
> from within muse.
>
> I don't know why Muse would be causing the problem -
> OrganizationUnitDocument.Factory would be loaded by JBoss'
> application-level classloader. Is the .class file for
> OrganizationUnitDocument.Factory in WEB-INF/classes? or a .jar file?
>
> Dan
>
>
>
> "Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/16/2007 09:46:08
> PM:
>
> > I am not sure if this problem is related to Muse or ClassLoader of
> > Jboss I am using. From one of the capability class methods if I have a
>
> > code like this below -
> >
> > OrganizationUnitDocument doc =
> > OrganizationUnitDocument.Factory.newInstance();
> >
> > It throws
> > Caused by: java.lang.NoClassDefFoundError:
> > com/cisco/cmp/schemas/x2006/x07/chameleon/organizationUnit/Organizatio
> > nU
> > nitDocument$Factoory
> >
> > Factory is the inner class within OrganizationUnitDocument.
> >
> > Any ideas how to get around this issue?
> >
> > Thanks.
> >
> > --Baseer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
RE: Unable to load inner classes created by xmlbeans complier from within muse.
Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
This is in a .zip file under lib folder.
--Baseer
-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, January 17, 2007 7:30 AM
To: muse-user@ws.apache.org
Subject: Re: Unable to load inner classes created by xmlbeans complier
from within muse.
I don't know why Muse would be causing the problem -
OrganizationUnitDocument.Factory would be loaded by JBoss'
application-level classloader. Is the .class file for
OrganizationUnitDocument.Factory in WEB-INF/classes? or a .jar file?
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/16/2007 09:46:08
PM:
> I am not sure if this problem is related to Muse or ClassLoader of
> Jboss I am using. From one of the capability class methods if I have a
> code like this below -
>
> OrganizationUnitDocument doc =
> OrganizationUnitDocument.Factory.newInstance();
>
> It throws
> Caused by: java.lang.NoClassDefFoundError:
> com/cisco/cmp/schemas/x2006/x07/chameleon/organizationUnit/Organizatio
> nU
> nitDocument$Factoory
>
> Factory is the inner class within OrganizationUnitDocument.
>
> Any ideas how to get around this issue?
>
> Thanks.
>
> --Baseer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Re: Unable to load inner classes created by xmlbeans complier from within
muse.
Posted by Daniel Jemiolo <da...@us.ibm.com>.
I don't know why Muse would be causing the problem -
OrganizationUnitDocument.Factory would be loaded by JBoss'
application-level classloader. Is the .class file for
OrganizationUnitDocument.Factory in WEB-INF/classes? or a .jar file?
Dan
"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 01/16/2007 09:46:08
PM:
> I am not sure if this problem is related to Muse or ClassLoader of Jboss
> I am using. From one of the capability class methods if I have a code
> like this below -
>
> OrganizationUnitDocument doc =
> OrganizationUnitDocument.Factory.newInstance();
>
> It throws
> Caused by: java.lang.NoClassDefFoundError:
> com/cisco/cmp/schemas/x2006/x07/chameleon/organizationUnit/OrganizationU
> nitDocument$Factoory
>
> Factory is the inner class within OrganizationUnitDocument.
>
> Any ideas how to get around this issue?
>
> Thanks.
>
> --Baseer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Unable to load inner classes created by xmlbeans complier from within muse.
Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
I am not sure if this problem is related to Muse or ClassLoader of Jboss
I am using. From one of the capability class methods if I have a code
like this below -
OrganizationUnitDocument doc =
OrganizationUnitDocument.Factory.newInstance();
It throws
Caused by: java.lang.NoClassDefFoundError:
com/cisco/cmp/schemas/x2006/x07/chameleon/organizationUnit/OrganizationU
nitDocument$Factoory
Factory is the inner class within OrganizationUnitDocument.
Any ideas how to get around this issue?
Thanks.
--Baseer
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Re: dynamic resource creation and destruction
Posted by Daniel Jemiolo <da...@us.ibm.com>.
Please create a JIRA item for this - I will work on this today.
thanks,
Dan
<le...@bt.com> wrote on 01/11/2007 09:59:50 AM:
> Hi guys
>
>
> We're currently trying out the muse frameworks ability to create and
> destroy WDSM enabled WsResources, but we seem to have run into a slight
> problem with the correct way to destroy these resources.
>
> A fast overview goes as follows:
>
> 1) We've a factory to create resources on the fly.
> 2) We change a couple of the values held by the resource (to get the
> on-change WS-N sent out)
> 3) Next we attempt to clean up, by destroying the WsResources
> 4) We run the whole thing again from 1) without restarting the Tomcat
> server
>
> Notes regarding software usage:
> MUSE 2.0.0
> Java SDK 1.5_07
> Axis 2.0
>
>
> The printout from the shutdown (destruction) process is:
> 11-Jan-2007 14:21:27 org.apache.muse.core.SimpleResource shutdown
> INFO: [ID = 'ResourceDestroyed'] The resource at 'WsResource' has been
> destroyed.
>
> Though it seems as if, even though the prepareShutdown() function has
> been overridden, that our override doesn't run.
>
> ** overridden initializeComplete()
> public void initializeCompleted() throws SoapFault {
> super.initializeCompleted();
> publishMessage("we have been created");
> }
>
> ** overridden prepareShutdown()
> public void prepareShutdown() throws SoapFault {
> super.prepareShutdown();
> getLog().info("calling shutdown");
>
> }
>
>
> Our problem is that upon the 2nd run of the process (without shutting
> down the server) we get the following error message from the
> SimpleAdvertisement:
>
> INFO: [ID = 'ResourceInitialized'] The resource at 'SubscriptionManager'
> has been initialized.
> java.lang.NullPointerException
> at
> org.apache.muse.ws.dm.muws.adv.impl.SimpleAdvertisement.isAdvertised(Sim
> pleAdvertisement.java:32)
> at
> org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.resourceAdded(
> AbstractAdvertisement.java:96)
> at
> org.apache.muse.core.SimpleResourceManager.addResource(SimpleResourceMan
> ager.java:108)
> at
> org.apache.muse.ws.notification.impl.SimpleNotificationProducer.subscrib
> e(SimpleNotificationProducer.java:575)
> at
> org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.subscribeIniti
> alConsumer(AbstractAdvertisement.java:175)
> ... and a lot more
>
>
> -- Lenni Madsen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
dynamic resource creation and destruction
Posted by le...@bt.com.
Hi guys
We're currently trying out the muse frameworks ability to create and
destroy WDSM enabled WsResources, but we seem to have run into a slight
problem with the correct way to destroy these resources.
A fast overview goes as follows:
1) We've a factory to create resources on the fly.
2) We change a couple of the values held by the resource (to get the
on-change WS-N sent out)
3) Next we attempt to clean up, by destroying the WsResources
4) We run the whole thing again from 1) without restarting the Tomcat
server
Notes regarding software usage:
MUSE 2.0.0
Java SDK 1.5_07
Axis 2.0
The printout from the shutdown (destruction) process is:
11-Jan-2007 14:21:27 org.apache.muse.core.SimpleResource shutdown
INFO: [ID = 'ResourceDestroyed'] The resource at 'WsResource' has been
destroyed.
Though it seems as if, even though the prepareShutdown() function has
been overridden, that our override doesn't run.
** overridden initializeComplete()
public void initializeCompleted() throws SoapFault {
super.initializeCompleted();
publishMessage("we have been created");
}
** overridden prepareShutdown()
public void prepareShutdown() throws SoapFault {
super.prepareShutdown();
getLog().info("calling shutdown");
}
Our problem is that upon the 2nd run of the process (without shutting
down the server) we get the following error message from the
SimpleAdvertisement:
INFO: [ID = 'ResourceInitialized'] The resource at 'SubscriptionManager'
has been initialized.
java.lang.NullPointerException
at
org.apache.muse.ws.dm.muws.adv.impl.SimpleAdvertisement.isAdvertised(Sim
pleAdvertisement.java:32)
at
org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.resourceAdded(
AbstractAdvertisement.java:96)
at
org.apache.muse.core.SimpleResourceManager.addResource(SimpleResourceMan
ager.java:108)
at
org.apache.muse.ws.notification.impl.SimpleNotificationProducer.subscrib
e(SimpleNotificationProducer.java:575)
at
org.apache.muse.ws.dm.muws.adv.impl.AbstractAdvertisement.subscribeIniti
alConsumer(AbstractAdvertisement.java:175)
... and a lot more
-- Lenni Madsen
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
Re: dynamic resource properties
Posted by Daniel Jemiolo <da...@us.ibm.com>.
You can disable WSRP schema validation for your resource type by adding
the following under the <resource-type/> element:
<init-param>
<param-name>validate-wsrp-schema</param-name>
<param-value>false</param-value>
</init-param>
However: in the validateSchema() method, we're reading each property value
with getResourceProperty(). At this point in the initializaiton process,
the resource is fully initialized, and the code is just doing a sanity
check to make sure you're returning property values the way you said you
would (in your schema). So, there's really no difference between a client
issuing a GetResourceProperty call and the validateSchema() method calling
getResourceProperty().
Did you only implement GetResourcePropertyDocument? GetResourceProperty is
required by WSRF, so you should implement both for a WS-resource.
Dan
"Vinh Nguyen \(vinguye2\)" <vi...@cisco.com> wrote on 01/11/2007
03:15:36 AM:
> I have a resource type that has custom properties identified in an rmd
> file. Some of the property elements are defined as <xs:element
> ref="..." minOccurs="1" maxOccurs="1"/>, meaning they must exist and
> only exist once. I have a capability class which has get/set methods
> for each property. When Muse starts, it initializes the resource, and I
> get the following error:
>
> org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFau
> lt: [ID = 'BelowMinimum'] The property
> '{http://schemas.cmp.cisco.com/2006/07/Chameleon/LogicalResource}adminis
> teredState' has a minOccurs value of 1, but there are only 0 instances
> in the document.
> at
> org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollec
> tion.validateSchema(SimpleResourcePropertyCollection.java:1209)
> at
> org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsRes
> ource.java:223)
> ...
>
> What I'm trying to do is have the resource properties pulled dynamically
> from an external source, like from a database. Also, the properties
> should only be pulled when the client calls the
> GetResourcePropertyDocument operation. This is because the property
> values can differ at any point in time, so it should not be "cached" in
> the Muse application layer.
>
> But, from the error I'm getting above, it seems as if Muse is explicitly
> calling the capability methods to get the resource properties when the
> resource is initialized, and not when the client actually makes a call
> to get the properties.
>
> Is there a reason why Muse must call to get the properties so early,
> instead of when really needed? In my case, the dynamic properties will
> always be null until the client makes the call, so Muse will always
> throw an error on startup because it is encountering 0 property values
> where it expects 1.
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org