Thanks Ian. I am now able to run the Disk example successfully.
Here is a brief description of some of the issues that I encountered
(FYI):
1. Incompatiblity with JDK1.5. I was not able to build the muse jar file
incubating-muse-0.5-beta1.jar from source files (obtained from SVN
archive) under JDK1.5. The problem is that a couple of files import
org.apache.axis.enum.Style and org.apache.axis.enum.Use, but enum is a
reserved keyword in JDK1.5.
To get around this, I set JAVA_HOME to point to a JDK1.4 installation.
This caused the compilation to succeed. However, I had JDK1.5 bin
directory in my PATH, and apparently the javac in that directory was
getting picked up by XMLBEANS, causing the ExceptionInInitializerError
during Tomcat startup.
After you pointed me to the distribution file in your Apache directory,
I switched to that.
2. After copying the incubating-muse-0.5-beta1\webapps\muse to the
webapps of my Tomcat (5.5.3), adding a jar for all the Disk example
classes and deploying the Disk service, I was still getting the
following error during Tomcat startup:
------------------------------------------------------------------------
--
--> 01-06-05 16:47:49 INFO [muse.thread.1.discovery-agent-registry]
DiskDiscove
ryAgent: Attempting to register an instance of DiskWsdmServiceWSResource
Resourc
eID=1234
--> 01-06-05 16:47:49 INFO [muse.thread.2.discovery-agent-registry]
DiskDiscove
ryAgent: Attempting to register an instance of DiskWsdmServiceWSResource
Resourc
eID=4321
--> 01-06-05 16:47:49 ERROR [muse.thread.2.discovery-agent-registry]
DiskDiscove
ryAgent: Discovery failed to register ResourceID
org.apache.ws.resource.discovery.faults.RegistrationFailureException:
java.lang.
IllegalStateException: The following required properties were not
initialized: [
{http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime}Termin
ationTim
e,
{http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification}FixedT
opicS
et,
{http://docs.oasis-open.org/wsdm/2004/04/muws-0.5/schema}ResourceState,
{htt
p://xyz.com/}BlockSize, {http://xyz.com/}NumberOfBlocks,
{http://xyz.com/}Capaci
ty, {http://xyz.com/}ActiveTime]
at
org.apache.ws.resource.discovery.DefaultRegistrationManager.addResour
ce(DefaultRegistrationManager.java:294)
------------------------------------------------------------------------
-
Turned out that this was due to some duplication of class files in
disk-types-SNAPSHOT.jar and the my jar file that had Disk example
classes. After removing disk-types-SNAPSHOT.jar from the WEB-INF\lib
directory, this error went away. However, I got the following exception:
------------------------------------------------------------------------
--> 01-06-05 16:56:37 INFO [main] DefaultRegistrationManager:
Registered single
ton WS-Resource: WS-Resource with ID: 0
--> 01-06-05 16:56:39 ERROR [muse.thread.2.discovery-agent-registry]
DiskDiscove
ryAgent: Discovery failed for DiskWsdmServiceWSResource with Id
ResourceID
java.lang.NoClassDefFoundError: com/xyz/NotificationSimulator
at
axis.com.xyz.DiskWsdmServiceWSResource.setupBadSectorNotifications(Di
skWsdmServiceWSResource.java:412)
------------------------------------------------------------------------
I noticed that NotificationSimulator class was referenced in the
WsdmResource implementation class and was part of
disk-types-SNAPSHOT.jar. To get rid of this exception, I just commented
out the references to NotificationSimulator from WsdmResource
implementation class DiskWsdmServiceWSResource. That got the example
finally working.
Thanks,
Pankaj Kumar.
> -----Original Message-----
> From: Ian Springer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 06, 2005 11:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Getting "Resource not found" fault with Disk example with
> Tomcat
>
> We think this is because Pankaj built the Muse bits himself, and some
> pieces got compiled w/ JDK 1.4 and others w/ JDK 1.5. Since we haven't
> done any testing w/ 1.5, I suspect this was the cause of the XmlBeans
> issue. Pankaj is going to give it another try w/ the pre-built dist
bits
> at http://www.apache.org/~ips/muse/. Pankaj, let us know how this
works
> out.
>
> Thanks,
> Ian
>
> Kumar, Pankaj wrote:
>
> > Hi,
> >
> > My Muse seem to be stuck at reading the discovery-agent-registry.xml
> > file. I get the java.lang.ExceptionInInitializerError
> >
> > Exception within discoverResources() call. (Trace dump enclosed.) I
> > was also able to produce the same error with the following test
program:
> >
> >
------------------------------------------------------------------------
> ----------------------------
> >
> > import org.apache.ws.resource.discovery.xml.DiscoveryConfigDocument;
> >
> > import java.io.FileInputStream;
> >
> > public class DiscoveryTest
> >
> > {
> >
> > public static void main( String[] args )
> >
> > throws Exception
> >
> > {
> >
> > if (args.length < 1){
> >
> > System.out.println("Usage:: DiscoveryTest <filename>");
> >
> > return;
> >
> > }
> >
> > FileInputStream discoveryConfigFile = new FileInputStream(args[0]);
> >
> > DiscoveryConfigDocument dcd = DiscoveryConfigDocument.Factory.parse(
> > discoveryConfigFile );
> >
> > System.out.println("DiscoveryTest succeeded");
> >
> > }
> >
> > }
> >
> > Any help is most appreciated.
> >
> > Thanks,
> >
> > Pankaj Kumar.
> >
> > Exception trace dump:
> >
> > discoverResources():: externalConfigFile =
> > C:\apache\jakarta-tomcat-5.5.3\discov
> >
> > ery-agent-registry.xml
> >
> > file exists ...
> >
> > - StandardWrapper.Throwable
> >
> > java.lang.ExceptionInInitializerError
> >
> > at
org.apache.ws.resource.discovery.xml.DiscoveryConfigDocument.<clinit>
> >
> > (DiscoveryConfigDocument.java:19)
> >
> > at
org.apache.ws.resource.discovery.xml.DiscoveryConfigDocument$Factory.
> >
> > parse(DiscoveryConfigDocument.java:259)
> >
> > at
org.apache.ws.resource.discovery.impl.DiscoveryAgentRegistry.storeCon
> >
> > fig(DiscoveryAgentRegistry.java:380)
> >
> > at
org.apache.ws.resource.discovery.impl.DiscoveryAgentRegistry.<init>(D
> >
> > iscoveryAgentRegistry.java:87)
> >
> > at
org.apache.ws.resource.discovery.RegistrationManagerFactory.discoverR
> >
> > esources(RegistrationManagerFactory.java:184)
> >
> > at
org.apache.ws.platform.axis.transport.http.MuwsAxisServlet.init(MuwsA
> >
> > xisServlet.java:57)
> >
> > at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> >
> > at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
> >
> > java:1003)
> >
> > at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83
> >
> > 6)
> >
> > at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> >
> > t.java:3783)
> >
> > at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4
> >
> > 045)
> >
> > at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
> >
> > .java:755)
> >
> > at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73
> >
> > 9)
> >
> > at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> >
> > at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.jav
> >
> > a:886)
> >
> > at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
> >
> > ava:849)
> >
> > at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474
> >
> > )
> >
> > at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079)
> >
> > at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
> >
> > :310)
> >
> > at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
> >
> > eSupport.java:119)
> >
> > at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
> >
> > at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> >
> > at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
> >
> > at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437
> >
> > )
> >
> > at
org.apache.catalina.core.StandardService.start(StandardService.java:4
> >
> > 50)
> >
> > at
org.apache.catalina.core.StandardServer.start(StandardServer.java:200
> >
> > 9)
> >
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:538)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
> > at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> >
> > java:39)
> >
> > at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> >
> > sorImpl.java:25)
> >
> > at java.lang.reflect.Method.invoke(Method.java:585)
> >
> > at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
> >
> > at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
> >
> > Caused by: java.lang.RuntimeException: Could not instantiate
> > SchemaTypeSystemImp
> >
> > l (java.lang.reflect.InvocationTargetException): is the version of
> > xbean.jar cor
> >
> > rect?
> >
> > at
schema.system.s64DEFF9531F38EF20036324D8F4B4F65.TypeSystemHolder.load
> >
> > TypeSystem(TypeSystemHolder.java:12)
> >
> > at
schema.system.s64DEFF9531F38EF20036324D8F4B4F65.TypeSystemHolder.<cli
> >
> > nit>(TypeSystemHolder.java:6)
> >
> > ... 33 more
> >
> > Caused by: java.lang.reflect.InvocationTargetException
> >
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
> >
> > at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
> >
> > orAccessorImpl.java:39)
> >
> > at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
> >
> > onstructorAccessorImpl.java:27)
> >
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> >
> > at
schema.system.s64DEFF9531F38EF20036324D8F4B4F65.TypeSystemHolder.load
> >
> > TypeSystem(TypeSystemHolder.java:10)
> >
> > ... 34 more
> >
> > Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: null
> > (schema.system.s6
> >
> > 4DEFF9531F38EF20036324D8F4B4F65.index) - code 9
> >
> > at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$StringPool.readF
> >
> > rom(SchemaTypeSystemImpl.java:652)
> >
> > at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>
> >
> > (SchemaTypeSystemImpl.java:1102)
> >
> > at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(S
> >
> > chemaTypeSystemImpl.java:271)
> >
> > at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTyp
> >
> > eSystemImpl.java:151)
> >
> > ... 39 more
> >
> > Caused by: java.io.EOFException
> >
> > at java.io.DataInputStream.readFully(DataInputStream.java:178)
> >
> > at java.io.DataInputStream.readUTF(DataInputStream.java:565)
> >
> > at java.io.DataInputStream.readUTF(DataInputStream.java:522)
> >
> > at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$StringPool.readF
> >
> > rom(SchemaTypeSystemImpl.java:644)
> >
> > ... 42 more
> >
> >
------------------------------------------------------------------------
> >
> > *From:* Kumar, Pankaj
> > *Sent:* Wednesday, January 05, 2005 9:36 AM
> > *To:* [EMAIL PROTECTED]
> > *Subject:* RE: Getting "Resource not found" fault with Disk example
> > with Tomcat
> >
> > Well, I think I know the problem with my setup (or is it a problem
> > with Muse design ;-) ).
> >
> > Muse webapp uses MuseAxisServlet in web.xml, which has the
invocation
> > code to do the discovery. However, I had started with a Vanilla Axis
> > servlet, adding jar files from Muse on need basis ( I wanted to
better
> > understand the dependencies than using the whole thing as a black
box
> > - actually, I did try using it as a blackbox but that was not
letting
> > me go any further than running the packaged test cases).
> >
> > After changing the Axis's web.xml (so that it uses MuseAxisServlet
in
> > place of AxisServlet), I am able to get the resources discovered.
> > Well, I am getting other exceptions, but that is a different
problem.
> >
> > /Pankaj.
> >
> >
------------------------------------------------------------------------
> >
> > *From:* Kumar, Pankaj
> > *Sent:* Tuesday, January 04, 2005 11:11 PM
> > *To:* [EMAIL PROTECTED]
> > *Subject:* Getting "Resource not found" fault with Disk example with
> > Tomcat
> >
> > Hi,
> >
> > I have setup the Muse Disk example to run when Axis is deployed as a
> > WebApp to Tomcat.
> >
> > I am able to see the Disk service deployed from the browser. I am
also
> > able to retrieve the WSDL document through the browser.
> >
> > However, I get a "Resource [disk:1234] not found" fault (don't
> > remember the exact string, but this should be close).
> >
> > I did some debugging and found that the WsrfWsAddressingHandler is
not
> > able to get the WSResource corresponding to the resource id. In the
> > SOAP Header and hence generates the fault. Looking at the code, I
> > found that static method ResourceManagerFactory.discoverResources()
is
> > responsible for discovering the resources (it reads an xml file).
But
> > this method never gets called (I put a println). I also verified
this
> > by going through the call hierarchy of this method. The only place
> > where this method is being called is a subclass of AxisServlet used
> > for unit testing program (this might explain why it might work for
the
> > unit test).
> >
> > Do I need to do something special for running the example under
Tomcat?
> >
> > Thanks in advance.
> >
> > /Pankaj.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]