You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by Tom Herbert <tw...@gmail.com> on 2010/05/19 15:38:08 UTC

Post: Axis/StAX problem

Hello,

I am having a particular problem with the AXIOM classes and using
AXIS2. I've tried to do a bit of research, but can't seem to find the
problem

The issue is when making the call:

       org.apache.axis2.client ServiceClient sc = new ServiceClient();

I'm getting an exception stating:

Exception in thread "main" javax.xml.stream.FactoryConfiguration:
Provider javax.xml.stream.XMLInputFactory could not be instatiated

I am already setting the system property
"javax.xml.stream.XMLInputFactory" to the implementation class
"com.ctc.wstx.stax.WstxInputFactory"

Right now, just running in standalone mode for testing.  I am able to
directly call:

       XMLInputFactory f = XMLInputFactory.newInstance();

and the get the appropriate implementation class returned.  however, the call

        XMLInputFactor sf = StAXUtils.getXMLInputFactory();

fails (insternally when it calls the saem XMLInputFactory.newInstance() call)


So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
implementation file setting.

I'm using JDK1.6.0_18 on Windows

any help would be appreciated

thank you

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Andreas Veithen <an...@gmail.com>.
I would recommend to increase the log level of StAXUtils to DEBUG.
This should output some information about what is going on. Also you
should report which versions of Axiom you are using.

Andreas

PS: The mailing list for Axiom specific issues is
commons-dev@ws.apache.org (please prefix posts with [Axiom]).

On Wed, May 19, 2010 at 15:38, Tom Herbert <tw...@gmail.com> wrote:
> Hello,
>
> I am having a particular problem with the AXIOM classes and using
> AXIS2. I've tried to do a bit of research, but can't seem to find the
> problem
>
> The issue is when making the call:
>
>       org.apache.axis2.client ServiceClient sc = new ServiceClient();
>
> I'm getting an exception stating:
>
> Exception in thread "main" javax.xml.stream.FactoryConfiguration:
> Provider javax.xml.stream.XMLInputFactory could not be instatiated
>
> I am already setting the system property
> "javax.xml.stream.XMLInputFactory" to the implementation class
> "com.ctc.wstx.stax.WstxInputFactory"
>
> Right now, just running in standalone mode for testing.  I am able to
> directly call:
>
>       XMLInputFactory f = XMLInputFactory.newInstance();
>
> and the get the appropriate implementation class returned.  however, the call
>
>        XMLInputFactor sf = StAXUtils.getXMLInputFactory();
>
> fails (insternally when it calls the saem XMLInputFactory.newInstance() call)
>
>
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>
> I'm using JDK1.6.0_18 on Windows
>
> any help would be appreciated
>
> thank you
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Just to update (in case anyone else has this problem)

This problem went away (i.e. everything went as expected) when I switched
from using JDK 1.6 (1.6_0_17) to using JDK 1.5

Not sure if this is a bug with JDK6/Axis2 or not, but this fixed it



On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Just to update (in case anyone else has this problem)

This problem went away (i.e. everything went as expected) when I switched
from using JDK 1.6 (1.6_0_17) to using JDK 1.5

Not sure if this is a bug with JDK6/Axis2 or not, but this fixed it



On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Just to update (in case anyone else has this problem)

This problem went away (i.e. everything went as expected) when I switched
from using JDK 1.6 (1.6_0_17) to using JDK 1.5

Not sure if this is a bug with JDK6/Axis2 or not, but this fixed it



On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Thanks for the idea, however, the call

StAXUtils.getXMLInputFactory()

is the one that throws the initial exception, so I can't call anything
(getClass(), etc) off of that method

I'll have to play around with this more to figure it out, but if you have
any other ideas, let me know!


On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Just to update (in case anyone else has this problem)

This problem went away (i.e. everything went as expected) when I switched
from using JDK 1.6 (1.6_0_17) to using JDK 1.5

Not sure if this is a bug with JDK6/Axis2 or not, but this fixed it



On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Thanks for the idea, however, the call

StAXUtils.getXMLInputFactory()

is the one that throws the initial exception, so I can't call anything
(getClass(), etc) off of that method

I'll have to play around with this more to figure it out, but if you have
any other ideas, let me know!


On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Just to update (in case anyone else has this problem)

This problem went away (i.e. everything went as expected) when I switched
from using JDK 1.6 (1.6_0_17) to using JDK 1.5

Not sure if this is a bug with JDK6/Axis2 or not, but this fixed it



On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Thanks for the idea, however, the call

StAXUtils.getXMLInputFactory()

is the one that throws the initial exception, so I can't call anything
(getClass(), etc) off of that method

I'll have to play around with this more to figure it out, but if you have
any other ideas, let me know!


On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Thanks for the idea, however, the call

StAXUtils.getXMLInputFactory()

is the one that throws the initial exception, so I can't call anything
(getClass(), etc) off of that method

I'll have to play around with this more to figure it out, but if you have
any other ideas, let me know!


On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Thanks for the idea, however, the call

StAXUtils.getXMLInputFactory()

is the one that throws the initial exception, so I can't call anything
(getClass(), etc) off of that method

I'll have to play around with this more to figure it out, but if you have
any other ideas, let me know!


On Wed, May 19, 2010 at 11:57 AM, robert lazarski
<ro...@gmail.com>wrote:

> On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> > Robert,
> >
> > thanks for the adivce, however, after further testing, I don't think
> > I'm picking up another StAXUtils implementation.  I had been using
> > maven to build/run, but to be sure, I ran from command-line explicitly
> > declaring my jars: (with the versions taken out):
>
> Does running this show the expected result?
>
>
>  System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
> + " is loaded from " +
>
>  StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());
>
> If so, sorry but I'm out of easy answers.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> Robert,
>
> thanks for the adivce, however, after further testing, I don't think
> I'm picking up another StAXUtils implementation.  I had been using
> maven to build/run, but to be sure, I ran from command-line explicitly
> declaring my jars: (with the versions taken out):

Does running this show the expected result?

        	System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
+ " is loaded from " +
        			StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());

If so, sorry but I'm out of easy answers.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> Robert,
>
> thanks for the adivce, however, after further testing, I don't think
> I'm picking up another StAXUtils implementation.  I had been using
> maven to build/run, but to be sure, I ran from command-line explicitly
> declaring my jars: (with the versions taken out):

Does running this show the expected result?

        	System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
+ " is loaded from " +
        			StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());

If so, sorry but I'm out of easy answers.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> Robert,
>
> thanks for the adivce, however, after further testing, I don't think
> I'm picking up another StAXUtils implementation.  I had been using
> maven to build/run, but to be sure, I ran from command-line explicitly
> declaring my jars: (with the versions taken out):

Does running this show the expected result?

        	System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
+ " is loaded from " +
        			StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());

If so, sorry but I'm out of easy answers.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> Robert,
>
> thanks for the adivce, however, after further testing, I don't think
> I'm picking up another StAXUtils implementation.  I had been using
> maven to build/run, but to be sure, I ran from command-line explicitly
> declaring my jars: (with the versions taken out):

Does running this show the expected result?

        	System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
+ " is loaded from " +
        			StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());

If so, sorry but I'm out of easy answers.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 12:45 PM, Tom Herbert <tw...@gmail.com> wrote:
> Robert,
>
> thanks for the adivce, however, after further testing, I don't think
> I'm picking up another StAXUtils implementation.  I had been using
> maven to build/run, but to be sure, I ran from command-line explicitly
> declaring my jars: (with the versions taken out):

Does running this show the expected result?

        	System.out.println(StAXUtils.getXMLInputFactory().getClass().getName()
+ " is loaded from " +
        			StAXUtils.getXMLInputFactory().getClass().getProtectionDomain().getCodeSource().getLocation());

If so, sorry but I'm out of easy answers.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Robert,

thanks for the adivce, however, after further testing, I don't think
I'm picking up another StAXUtils implementation.  I had been using
maven to build/run, but to be sure, I ran from command-line explicitly
declaring my jars: (with the versions taken out):

java -cp axiom.jar;axis2.jar;commons-logging.jar;wstx.jar;stax.jar;test.jar
   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
  test.Main

I still get the same instantiation error when I call:

  XMLInputFactory sf = StAXUtils.getXMLInputFactory();

but, don't get an exception when I directly call:

  XMLInputFactory f = XMLInputFactory.newInstance();


any other possibilities? Are there some known errors with running with
JDK6 perhaps?

thanks
Tom



On 5/19/10, robert lazarski <ro...@gmail.com> wrote:
> On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
>> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
>> implementation file setting.
>>
>
> You most likely are picking up another StAXUtils implementation from
> another jar, often loaded from a AppServer (JBoss etc) classloader
> with a higher precedence. I'd look at the happy axis2 page shows the
> jars and their file paths.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Robert,

thanks for the adivce, however, after further testing, I don't think
I'm picking up another StAXUtils implementation.  I had been using
maven to build/run, but to be sure, I ran from command-line explicitly
declaring my jars: (with the versions taken out):

java -cp axiom.jar;axis2.jar;commons-logging.jar;wstx.jar;stax.jar;test.jar
   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
  test.Main

I still get the same instantiation error when I call:

  XMLInputFactory sf = StAXUtils.getXMLInputFactory();

but, don't get an exception when I directly call:

  XMLInputFactory f = XMLInputFactory.newInstance();


any other possibilities? Are there some known errors with running with
JDK6 perhaps?

thanks
Tom



On 5/19/10, robert lazarski <ro...@gmail.com> wrote:
> On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
>> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
>> implementation file setting.
>>
>
> You most likely are picking up another StAXUtils implementation from
> another jar, often loaded from a AppServer (JBoss etc) classloader
> with a higher precedence. I'd look at the happy axis2 page shows the
> jars and their file paths.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Robert,

thanks for the adivce, however, after further testing, I don't think
I'm picking up another StAXUtils implementation.  I had been using
maven to build/run, but to be sure, I ran from command-line explicitly
declaring my jars: (with the versions taken out):

java -cp axiom.jar;axis2.jar;commons-logging.jar;wstx.jar;stax.jar;test.jar
   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
  test.Main

I still get the same instantiation error when I call:

  XMLInputFactory sf = StAXUtils.getXMLInputFactory();

but, don't get an exception when I directly call:

  XMLInputFactory f = XMLInputFactory.newInstance();


any other possibilities? Are there some known errors with running with
JDK6 perhaps?

thanks
Tom



On 5/19/10, robert lazarski <ro...@gmail.com> wrote:
> On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
>> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
>> implementation file setting.
>>
>
> You most likely are picking up another StAXUtils implementation from
> another jar, often loaded from a AppServer (JBoss etc) classloader
> with a higher precedence. I'd look at the happy axis2 page shows the
> jars and their file paths.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Robert,

thanks for the adivce, however, after further testing, I don't think
I'm picking up another StAXUtils implementation.  I had been using
maven to build/run, but to be sure, I ran from command-line explicitly
declaring my jars: (with the versions taken out):

java -cp axiom.jar;axis2.jar;commons-logging.jar;wstx.jar;stax.jar;test.jar
   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
  test.Main

I still get the same instantiation error when I call:

  XMLInputFactory sf = StAXUtils.getXMLInputFactory();

but, don't get an exception when I directly call:

  XMLInputFactory f = XMLInputFactory.newInstance();


any other possibilities? Are there some known errors with running with
JDK6 perhaps?

thanks
Tom



On 5/19/10, robert lazarski <ro...@gmail.com> wrote:
> On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
>> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
>> implementation file setting.
>>
>
> You most likely are picking up another StAXUtils implementation from
> another jar, often loaded from a AppServer (JBoss etc) classloader
> with a higher precedence. I'd look at the happy axis2 page shows the
> jars and their file paths.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Tom Herbert <tw...@gmail.com>.
Robert,

thanks for the adivce, however, after further testing, I don't think
I'm picking up another StAXUtils implementation.  I had been using
maven to build/run, but to be sure, I ran from command-line explicitly
declaring my jars: (with the versions taken out):

java -cp axiom.jar;axis2.jar;commons-logging.jar;wstx.jar;stax.jar;test.jar
   -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory
  test.Main

I still get the same instantiation error when I call:

  XMLInputFactory sf = StAXUtils.getXMLInputFactory();

but, don't get an exception when I directly call:

  XMLInputFactory f = XMLInputFactory.newInstance();


any other possibilities? Are there some known errors with running with
JDK6 perhaps?

thanks
Tom



On 5/19/10, robert lazarski <ro...@gmail.com> wrote:
> On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
>> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
>> implementation file setting.
>>
>
> You most likely are picking up another StAXUtils implementation from
> another jar, often loaded from a AppServer (JBoss etc) classloader
> with a higher precedence. I'd look at the happy axis2 page shows the
> jars and their file paths.
>
> - R
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>

You most likely are picking up another StAXUtils implementation from
another jar, often loaded from a AppServer (JBoss etc) classloader
with a higher precedence. I'd look at the happy axis2 page shows the
jars and their file paths.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>

You most likely are picking up another StAXUtils implementation from
another jar, often loaded from a AppServer (JBoss etc) classloader
with a higher precedence. I'd look at the happy axis2 page shows the
jars and their file paths.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Andreas Veithen <an...@gmail.com>.
I would recommend to increase the log level of StAXUtils to DEBUG.
This should output some information about what is going on. Also you
should report which versions of Axiom you are using.

Andreas

PS: The mailing list for Axiom specific issues is
commons-dev@ws.apache.org (please prefix posts with [Axiom]).

On Wed, May 19, 2010 at 15:38, Tom Herbert <tw...@gmail.com> wrote:
> Hello,
>
> I am having a particular problem with the AXIOM classes and using
> AXIS2. I've tried to do a bit of research, but can't seem to find the
> problem
>
> The issue is when making the call:
>
>       org.apache.axis2.client ServiceClient sc = new ServiceClient();
>
> I'm getting an exception stating:
>
> Exception in thread "main" javax.xml.stream.FactoryConfiguration:
> Provider javax.xml.stream.XMLInputFactory could not be instatiated
>
> I am already setting the system property
> "javax.xml.stream.XMLInputFactory" to the implementation class
> "com.ctc.wstx.stax.WstxInputFactory"
>
> Right now, just running in standalone mode for testing.  I am able to
> directly call:
>
>       XMLInputFactory f = XMLInputFactory.newInstance();
>
> and the get the appropriate implementation class returned.  however, the call
>
>        XMLInputFactor sf = StAXUtils.getXMLInputFactory();
>
> fails (insternally when it calls the saem XMLInputFactory.newInstance() call)
>
>
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>
> I'm using JDK1.6.0_18 on Windows
>
> any help would be appreciated
>
> thank you
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>

You most likely are picking up another StAXUtils implementation from
another jar, often loaded from a AppServer (JBoss etc) classloader
with a higher precedence. I'd look at the happy axis2 page shows the
jars and their file paths.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>

You most likely are picking up another StAXUtils implementation from
another jar, often loaded from a AppServer (JBoss etc) classloader
with a higher precedence. I'd look at the happy axis2 page shows the
jars and their file paths.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Andreas Veithen <an...@gmail.com>.
I would recommend to increase the log level of StAXUtils to DEBUG.
This should output some information about what is going on. Also you
should report which versions of Axiom you are using.

Andreas

PS: The mailing list for Axiom specific issues is
commons-dev@ws.apache.org (please prefix posts with [Axiom]).

On Wed, May 19, 2010 at 15:38, Tom Herbert <tw...@gmail.com> wrote:
> Hello,
>
> I am having a particular problem with the AXIOM classes and using
> AXIS2. I've tried to do a bit of research, but can't seem to find the
> problem
>
> The issue is when making the call:
>
>       org.apache.axis2.client ServiceClient sc = new ServiceClient();
>
> I'm getting an exception stating:
>
> Exception in thread "main" javax.xml.stream.FactoryConfiguration:
> Provider javax.xml.stream.XMLInputFactory could not be instatiated
>
> I am already setting the system property
> "javax.xml.stream.XMLInputFactory" to the implementation class
> "com.ctc.wstx.stax.WstxInputFactory"
>
> Right now, just running in standalone mode for testing.  I am able to
> directly call:
>
>       XMLInputFactory f = XMLInputFactory.newInstance();
>
> and the get the appropriate implementation class returned.  however, the call
>
>        XMLInputFactor sf = StAXUtils.getXMLInputFactory();
>
> fails (insternally when it calls the saem XMLInputFactory.newInstance() call)
>
>
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>
> I'm using JDK1.6.0_18 on Windows
>
> any help would be appreciated
>
> thank you
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Andreas Veithen <an...@gmail.com>.
I would recommend to increase the log level of StAXUtils to DEBUG.
This should output some information about what is going on. Also you
should report which versions of Axiom you are using.

Andreas

PS: The mailing list for Axiom specific issues is
commons-dev@ws.apache.org (please prefix posts with [Axiom]).

On Wed, May 19, 2010 at 15:38, Tom Herbert <tw...@gmail.com> wrote:
> Hello,
>
> I am having a particular problem with the AXIOM classes and using
> AXIS2. I've tried to do a bit of research, but can't seem to find the
> problem
>
> The issue is when making the call:
>
>       org.apache.axis2.client ServiceClient sc = new ServiceClient();
>
> I'm getting an exception stating:
>
> Exception in thread "main" javax.xml.stream.FactoryConfiguration:
> Provider javax.xml.stream.XMLInputFactory could not be instatiated
>
> I am already setting the system property
> "javax.xml.stream.XMLInputFactory" to the implementation class
> "com.ctc.wstx.stax.WstxInputFactory"
>
> Right now, just running in standalone mode for testing.  I am able to
> directly call:
>
>       XMLInputFactory f = XMLInputFactory.newInstance();
>
> and the get the appropriate implementation class returned.  however, the call
>
>        XMLInputFactor sf = StAXUtils.getXMLInputFactory();
>
> fails (insternally when it calls the saem XMLInputFactory.newInstance() call)
>
>
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>
> I'm using JDK1.6.0_18 on Windows
>
> any help would be appreciated
>
> thank you
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by Andreas Veithen <an...@gmail.com>.
I would recommend to increase the log level of StAXUtils to DEBUG.
This should output some information about what is going on. Also you
should report which versions of Axiom you are using.

Andreas

PS: The mailing list for Axiom specific issues is
commons-dev@ws.apache.org (please prefix posts with [Axiom]).

On Wed, May 19, 2010 at 15:38, Tom Herbert <tw...@gmail.com> wrote:
> Hello,
>
> I am having a particular problem with the AXIOM classes and using
> AXIS2. I've tried to do a bit of research, but can't seem to find the
> problem
>
> The issue is when making the call:
>
>       org.apache.axis2.client ServiceClient sc = new ServiceClient();
>
> I'm getting an exception stating:
>
> Exception in thread "main" javax.xml.stream.FactoryConfiguration:
> Provider javax.xml.stream.XMLInputFactory could not be instatiated
>
> I am already setting the system property
> "javax.xml.stream.XMLInputFactory" to the implementation class
> "com.ctc.wstx.stax.WstxInputFactory"
>
> Right now, just running in standalone mode for testing.  I am able to
> directly call:
>
>       XMLInputFactory f = XMLInputFactory.newInstance();
>
> and the get the appropriate implementation class returned.  however, the call
>
>        XMLInputFactor sf = StAXUtils.getXMLInputFactory();
>
> fails (insternally when it calls the saem XMLInputFactory.newInstance() call)
>
>
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>
> I'm using JDK1.6.0_18 on Windows
>
> any help would be appreciated
>
> thank you
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: Post: Axis/StAX problem

Posted by robert lazarski <ro...@gmail.com>.
On Wed, May 19, 2010 at 10:38 AM, Tom Herbert <tw...@gmail.com> wrote:
> So, I'm not sure why the StAXUtils doesn't seem to be pickign up my
> implementation file setting.
>

You most likely are picking up another StAXUtils implementation from
another jar, often loaded from a AppServer (JBoss etc) classloader
with a higher precedence. I'd look at the happy axis2 page shows the
jars and their file paths.

- R

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org