You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Gregor Kiddie <Gr...@channeladvisor.com> on 2010/05/21 15:09:45 UTC

Stream Closed when parsing definitions.xml

I ran into this while adding in a policy for authorisation to a
binding.ws

Everything was running fine until adding the requires into the
composite, and the definitions.xml to satisfy it.

Version 1.6

 

Definitions.xml

<?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"

 
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"

                   targetNamespace="com.mycompany.myproduct.policy" >

      

      <policySet name="MyCompanyPolicySet" provides="authentication"
appliesTo="sca:binding.ws">

            <tuscany:basicAuthentication>

                  <tuscany:userName>someusername</tuscany:userName>

                  <tuscany:password>some-password</tuscany:password>

            </tuscany:basicAuthentication>

      </policySet>

</definitions>

 

The exception is

 

Caused by: java.io.IOException: Stream closed

                at java.io.BufferedInputStream.getBufIfOpen(Unknown
Source)

                at java.io.BufferedInputStream.fill(Unknown Source)

                at java.io.BufferedInputStream.read(Unknown Source)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInput
Stream.read(Unknown Source)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEnt
ity(Unknown Source)

 

Take out the file (or rename it ) and comment out the requires in the
composite makes it work again.

 

Does the policy stuff require a different XML parser?

 

Gk.


Re: Stream Closed when parsing definitions.xml

Posted by Simon Laws <si...@googlemail.com>.
On Fri, May 21, 2010 at 3:14 PM, Gregor Kiddie
<Gr...@channeladvisor.com> wrote:
> Ok, forget about this one, it missing the sca namespace.
>
>
>
> However I copied it from Tuscany In Action, so I’m blaming Simon anyway ;)
>
>
>
> Gk.
>
>
>
> From: Gregor Kiddie [mailto:Gregor.Kiddie@channeladvisor.com]
> Sent: 21 May 2010 14:10
> To: user@tuscany.apache.org
> Subject: Stream Closed when parsing definitions.xml
>
>
>
> I ran into this while adding in a policy for authorisation to a binding.ws
>
> Everything was running fine until adding the requires into the composite,
> and the definitions.xml to satisfy it.
>
> Version 1.6
>
>
>
> Definitions.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
>
>                    xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
>
>                    targetNamespace="com.mycompany.myproduct.policy" >
>
>
>
>       <policySet name="MyCompanyPolicySet" provides="authentication"
> appliesTo="sca:binding.ws">
>
>             <tuscany:basicAuthentication>
>
>                   <tuscany:userName>someusername</tuscany:userName>
>
>                   <tuscany:password>some-password</tuscany:password>
>
>             </tuscany:basicAuthentication>
>
>       </policySet>
>
> </definitions>
>
>
>
> The exception is
>
>
>
> Caused by: java.io.IOException: Stream closed
>
>                 at java.io.BufferedInputStream.getBufIfOpen(Unknown Source)
>
>                 at java.io.BufferedInputStream.fill(Unknown Source)
>
>                 at java.io.BufferedInputStream.read(Unknown Source)
>
>                 at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(Unknown
> Source)
>
>                 at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown
> Source)
>
>
>
> Take out the file (or rename it ) and comment out the requires in the
> composite makes it work again.
>
>
>
> Does the policy stuff require a different XML parser?
>
>
>
> Gk.

Thanks Gregor;-) I'll fix the text.

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

RE: Stream Closed when parsing definitions.xml

Posted by Gregor Kiddie <Gr...@channeladvisor.com>.
Ok, forget about this one, it missing the sca namespace.

 

However I copied it from Tuscany In Action, so I'm blaming Simon anyway
;)

 

Gk.

 

From: Gregor Kiddie [mailto:Gregor.Kiddie@channeladvisor.com] 
Sent: 21 May 2010 14:10
To: user@tuscany.apache.org
Subject: Stream Closed when parsing definitions.xml

 

I ran into this while adding in a policy for authorisation to a
binding.ws

Everything was running fine until adding the requires into the
composite, and the definitions.xml to satisfy it.

Version 1.6

 

Definitions.xml

<?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"

 
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"

                   targetNamespace="com.mycompany.myproduct.policy" >

      

      <policySet name="MyCompanyPolicySet" provides="authentication"
appliesTo="sca:binding.ws">

            <tuscany:basicAuthentication>

                  <tuscany:userName>someusername</tuscany:userName>

                  <tuscany:password>some-password</tuscany:password>

            </tuscany:basicAuthentication>

      </policySet>

</definitions>

 

The exception is

 

Caused by: java.io.IOException: Stream closed

                at java.io.BufferedInputStream.getBufIfOpen(Unknown
Source)

                at java.io.BufferedInputStream.fill(Unknown Source)

                at java.io.BufferedInputStream.read(Unknown Source)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInput
Stream.read(Unknown Source)

                at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEnt
ity(Unknown Source)

 

Take out the file (or rename it ) and comment out the requires in the
composite makes it work again.

 

Does the policy stuff require a different XML parser?

 

Gk.