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.