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 "Subhro Moitra (smoitra)" <sm...@cisco.com> on 2007/12/27 18:34:04 UTC

Problem with using xmlbeans with Muse2.0

Hi All,
 
I am trying to use xmlbeans and muse2.0 and receive the below exception
when the service is deployed.
 
The dev steps I am following are:
1. Use wsdl2java in Muse2.0 binary dist, to generate the Capability
classes.
2. Use xmlbeans scomp.cmd utility to generate the custom types I have.
3. Add the following lines in build.xml (generated by wsdl2java) to
build the xbeans jar file
    
<echo>Starting xbeans packaging.....</echo>
  <jar destfile="${XBEANS_JAR}">
   <fileset dir="${RESOURCES_DIR}">
    <include name="**/*"/>
   </fileset>
  </jar>
 
4. I then copy the war file to by Tomcat webapps.
5. Start tomcat.
 
I have written a very simple client to access this service. Below is the
server side logs for the service.
 
I am stuck and cant seem to find any thing usefull in the mailing lists.
Please help. 
Thanks a lot in advance,
Subhro.
 
<Exception>
Dec 27, 2007 10:38:15 PM com.cisco.csm.nbi.xsd.MyCapability createDevice

<snip>
Dec 27, 2007 10:38:15 PM org.apache.muse.util.LoggingUtils logError
INFO: There was an error while processing a request:
 
null
 
 sun.misc.Unsafe.ensureClassInitialized(Native Method)
 
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAcces
sorFactory.java:25)
 
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12
2)
 java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
 java.lang.reflect.Field.getFieldAccessor(Field.java:898)
 java.lang.reflect.Field.get(Field.java:357)
 
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
 com.cisco.csm.nbi.xsd.Device.<clinit>(Unknown Source)
 com.cisco.csm.nbi.xsd.Device$Factory.newInstance(Unknown Source)
 com.cisco.csm.nbi.xsd.MyCapability.createDevice(Unknown Source)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:373)
 28 more...
 
</Exception>

RE: Problem with using xmlbeans with Muse2.0

Posted by "Subhro Moitra (smoitra)" <sm...@cisco.com>.
Thanks a lot Vinh for the clarification.
I will start with generating schemas using xmlbeans 2.2.0 instead of
using the 2.3.0, to be on the safe side.

But my initial tests looked ok with replacing 2.2.0 with 2.3.0 jar.

Thanks,
Subhro.

 

-----Original Message-----
From: Vinh Nguyen (vinguye2) 
Sent: Friday, December 28, 2007 3:03 PM
To: muse-user@ws.apache.org
Subject: RE: Problem with using xmlbeans with Muse2.0

Hi Subhro,

If you use an Axis2-based deployment for Muse 2.0, it comes with
XmlBeans 2.2.0 version jars (i.e. xbean.jar).  Since it looks like you
are using XmlBeans 2.3.0 to generate your schemas, this is causing your
class-clashing problems.

You can replace the xbean.jar with the newer XmlBeans 2.3.0 jar version,
but be careful because there may be other XmlBean-related jars in the
Muse deployment that you may also need to replace.  You should also
check with Axis2 to see what is safe to replace regarding XmlBeans.

-Vinh


-----Original Message-----
From: Subhro Moitra (smoitra)
Sent: Friday, December 28, 2007 12:49 AM
To: muse-user@ws.apache.org
Subject: RE: Problem with using xmlbeans with Muse2.0

Hi All,
I have solved this problem by replacing the xbeans.jar(xmlbeans 2.2.0)
file that comes with Muse2.0, with xbeans.jar(xmlbeans 2.3.0) that I was
using the compile my schema.

Thanks anyways.. 
Subhro.

-----Original Message-----
From: Subhro Moitra (smoitra)
Sent: Thursday, December 27, 2007 11:04 PM
To: muse-user@ws.apache.org
Subject: Problem with using xmlbeans with Muse2.0

Hi All,
 
I am trying to use xmlbeans and muse2.0 and receive the below exception
when the service is deployed.
 
The dev steps I am following are:
1. Use wsdl2java in Muse2.0 binary dist, to generate the Capability
classes.
2. Use xmlbeans scomp.cmd utility to generate the custom types I have.
3. Add the following lines in build.xml (generated by wsdl2java) to
build the xbeans jar file
    
<echo>Starting xbeans packaging.....</echo>
  <jar destfile="${XBEANS_JAR}">
   <fileset dir="${RESOURCES_DIR}">
    <include name="**/*"/>
   </fileset>
  </jar>
 
4. I then copy the war file to by Tomcat webapps.
5. Start tomcat.
 
I have written a very simple client to access this service. Below is the
server side logs for the service.
 
I am stuck and cant seem to find any thing usefull in the mailing lists.
Please help. 
Thanks a lot in advance,
Subhro.
 
<Exception>
Dec 27, 2007 10:38:15 PM com.cisco.csm.nbi.xsd.MyCapability createDevice

<snip>
Dec 27, 2007 10:38:15 PM org.apache.muse.util.LoggingUtils logError
INFO: There was an error while processing a request:
 
null
 
 sun.misc.Unsafe.ensureClassInitialized(Native Method)
 
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAcces
sorFactory.java:25)
 
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12
2)
 java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
 java.lang.reflect.Field.getFieldAccessor(Field.java:898)
 java.lang.reflect.Field.get(Field.java:357)
 
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
 com.cisco.csm.nbi.xsd.Device.<clinit>(Unknown Source)
com.cisco.csm.nbi.xsd.Device$Factory.newInstance(Unknown Source)
com.cisco.csm.nbi.xsd.MyCapability.createDevice(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:373)
 28 more...
 
</Exception>

---------------------------------------------------------------------
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: Problem with using xmlbeans with Muse2.0

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Hi Subhro,

If you use an Axis2-based deployment for Muse 2.0, it comes with
XmlBeans 2.2.0 version jars (i.e. xbean.jar).  Since it looks like you
are using XmlBeans 2.3.0 to generate your schemas, this is causing your
class-clashing problems.

You can replace the xbean.jar with the newer XmlBeans 2.3.0 jar version,
but be careful because there may be other XmlBean-related jars in the
Muse deployment that you may also need to replace.  You should also
check with Axis2 to see what is safe to replace regarding XmlBeans.

-Vinh


-----Original Message-----
From: Subhro Moitra (smoitra) 
Sent: Friday, December 28, 2007 12:49 AM
To: muse-user@ws.apache.org
Subject: RE: Problem with using xmlbeans with Muse2.0

Hi All,
I have solved this problem by replacing the xbeans.jar(xmlbeans 2.2.0)
file that comes with Muse2.0, with xbeans.jar(xmlbeans 2.3.0) that I was
using the compile my schema.

Thanks anyways.. 
Subhro.

-----Original Message-----
From: Subhro Moitra (smoitra)
Sent: Thursday, December 27, 2007 11:04 PM
To: muse-user@ws.apache.org
Subject: Problem with using xmlbeans with Muse2.0

Hi All,
 
I am trying to use xmlbeans and muse2.0 and receive the below exception
when the service is deployed.
 
The dev steps I am following are:
1. Use wsdl2java in Muse2.0 binary dist, to generate the Capability
classes.
2. Use xmlbeans scomp.cmd utility to generate the custom types I have.
3. Add the following lines in build.xml (generated by wsdl2java) to
build the xbeans jar file
    
<echo>Starting xbeans packaging.....</echo>
  <jar destfile="${XBEANS_JAR}">
   <fileset dir="${RESOURCES_DIR}">
    <include name="**/*"/>
   </fileset>
  </jar>
 
4. I then copy the war file to by Tomcat webapps.
5. Start tomcat.
 
I have written a very simple client to access this service. Below is the
server side logs for the service.
 
I am stuck and cant seem to find any thing usefull in the mailing lists.
Please help. 
Thanks a lot in advance,
Subhro.
 
<Exception>
Dec 27, 2007 10:38:15 PM com.cisco.csm.nbi.xsd.MyCapability createDevice

<snip>
Dec 27, 2007 10:38:15 PM org.apache.muse.util.LoggingUtils logError
INFO: There was an error while processing a request:
 
null
 
 sun.misc.Unsafe.ensureClassInitialized(Native Method)
 
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAcces
sorFactory.java:25)
 
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12
2)
 java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
 java.lang.reflect.Field.getFieldAccessor(Field.java:898)
 java.lang.reflect.Field.get(Field.java:357)
 
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
 com.cisco.csm.nbi.xsd.Device.<clinit>(Unknown Source)
com.cisco.csm.nbi.xsd.Device$Factory.newInstance(Unknown Source)
com.cisco.csm.nbi.xsd.MyCapability.createDevice(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:373)
 28 more...
 
</Exception>

---------------------------------------------------------------------
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: Problem with using xmlbeans with Muse2.0

Posted by "Subhro Moitra (smoitra)" <sm...@cisco.com>.
Hi All,
I have solved this problem by replacing the xbeans.jar(xmlbeans 2.2.0)
file that comes with Muse2.0, with xbeans.jar(xmlbeans 2.3.0) that I was
using the compile my schema.

Thanks anyways.. 
Subhro.

-----Original Message-----
From: Subhro Moitra (smoitra) 
Sent: Thursday, December 27, 2007 11:04 PM
To: muse-user@ws.apache.org
Subject: Problem with using xmlbeans with Muse2.0

Hi All,
 
I am trying to use xmlbeans and muse2.0 and receive the below exception
when the service is deployed.
 
The dev steps I am following are:
1. Use wsdl2java in Muse2.0 binary dist, to generate the Capability
classes.
2. Use xmlbeans scomp.cmd utility to generate the custom types I have.
3. Add the following lines in build.xml (generated by wsdl2java) to
build the xbeans jar file
    
<echo>Starting xbeans packaging.....</echo>
  <jar destfile="${XBEANS_JAR}">
   <fileset dir="${RESOURCES_DIR}">
    <include name="**/*"/>
   </fileset>
  </jar>
 
4. I then copy the war file to by Tomcat webapps.
5. Start tomcat.
 
I have written a very simple client to access this service. Below is the
server side logs for the service.
 
I am stuck and cant seem to find any thing usefull in the mailing lists.
Please help. 
Thanks a lot in advance,
Subhro.
 
<Exception>
Dec 27, 2007 10:38:15 PM com.cisco.csm.nbi.xsd.MyCapability createDevice

<snip>
Dec 27, 2007 10:38:15 PM org.apache.muse.util.LoggingUtils logError
INFO: There was an error while processing a request:
 
null
 
 sun.misc.Unsafe.ensureClassInitialized(Native Method)
 
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAcces
sorFactory.java:25)
 
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:12
2)
 java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
 java.lang.reflect.Field.getFieldAccessor(Field.java:898)
 java.lang.reflect.Field.get(Field.java:357)
 
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:770)
 com.cisco.csm.nbi.xsd.Device.<clinit>(Unknown Source)
com.cisco.csm.nbi.xsd.Device$Factory.newInstance(Unknown Source)
com.cisco.csm.nbi.xsd.MyCapability.createDevice(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:373)
 28 more...
 
</Exception>

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org