Thursday, November 25, 2010

Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx

Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx
at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.storeElementAndChildren(StreamReaderBufferCreator.java:174)
at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.storeDocumentAndChildren(StreamReaderBufferCreator.java:158)
at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.store(StreamReaderBufferCreator.java:139)
at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.create(StreamReaderBufferCreator.java:82)
at com.sun.xml.stream.buffer.MutableXMLStreamBuffer.createFromXMLStreamReader(MutableXMLStreamBuffer.java:113)
at com.sun.xml.stream.buffer.XMLStreamBuffer.createNewBufferFromXMLStreamReader(XMLStreamBuffer.java:398)
at com.sun.xml.ws.api.addressing.WSEndpointReference.<init>(WSEndpointReference.java:174)
at com.sun.xml.ws.api.addressing.WSEndpointReference.<init>(WSEndpointReference.java:166)
at com.sun.xml.ws.api.addressing.AddressingVersion.<init>(AddressingVersion.java:436)
at com.sun.xml.ws.api.addressing.AddressingVersion.<init>(AddressingVersion.java:67)
at com.sun.xml.ws.api.addressing.AddressingVersion$1.<init>(AddressingVersion.java:146)
at com.sun.xml.ws.api.addressing.AddressingVersion.<clinit>(AddressingVersion.java:69)
at com.sun.tools.ws.wsdl.parser.MemberSubmissionAddressingExtensionHandler.getNamespaceURI(MemberSubmissionAddressingExtensionHandler.java:62)
at com.sun.tools.ws.wsdl.parser.WSDLParser.register(WSDLParser.java:129)
at com.sun.tools.ws.wsdl.parser.WSDLParser.<init>(WSDLParser.java:119)
at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:109)
at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.tools.ws.Invoker.invoke(Invoker.java:116)
at com.sun.tools.ws.WsImport.main(WsImport.java:52)
erEx

Solution:
During the setup of Metro 1.5 I had also copied the webservices-rt.jar and other files in JDK_HOME/jre/lib/endorsed directory.
Removing the files from endorsed directory removed this error and led to generation of files.

Monday, November 01, 2010

org.postgresql.util.PSQLException: The column {n} index is out of range {m}

The cause of the error was that in the Query for {n} dynamic parameters, {m} parameters were being inserted

Tuesday, October 19, 2010

Cannot find message resources under key org.apache.struts.action.MESSAGE with

Received error while using <bean:write> tag
Cannot find message resources under key org.apache.struts.action.MESSAGE

Cause:
A int value was being displayed using <bean:write>
<bean:write property="xxxProperty" name="xxForm />

Solution:
Used format attribute to provide the format of Integer
<bean:write property="xxxProperty" name-"xForm" format="#" />

and it worked.

P.S.- Working in Struts 1 again makes me realize how painful it was :-)