java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Found while working on ROO-2815 that if you run the following commands to embed a [Screenr|http://www.screenr.com] video: {code}project --topLevelPackage org.springsource.embedding persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE web mvc setup web mvc embed video --provider SCREENR --videoId DOOs --viewName Screenr{code} ... then the shell throws this error: {code}[Fatal Error] :1:1: Premature end of file. Could not open input stream java.lang.IllegalStateException: Could not open input stream at org.springframework.roo.support.util.XmlUtils.readXml(XmlUtils.java:109) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.getScreenrId(VideoEmbeddedProvider.java:94) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.install(VideoEmbeddedProvider.java:78) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedOperationsImpl.install(EmbeddedOperationsImpl.java:54) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedCommands.embedVideo(EmbeddedCommands.java:93) 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 org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:184) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:147) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:394) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158) at java.lang.Thread.run(Thread.java:680) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124) at org.springframework.roo.support.util.XmlUtils.readXml(XmlUtils.java:107){code}
    via by Andrew Swan,
  • Found while working on ROO-2815 that if you run the following commands to embed a [Screenr|http://www.screenr.com] video: {code}project --topLevelPackage org.springsource.embedding persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE web mvc setup web mvc embed video --provider SCREENR --videoId DOOs --viewName Screenr{code} ... then the shell throws this error: {code}[Fatal Error] :1:1: Premature end of file. Could not open input stream java.lang.IllegalStateException: Could not open input stream at org.springframework.roo.support.util.XmlUtils.readXml(XmlUtils.java:109) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.getScreenrId(VideoEmbeddedProvider.java:94) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.install(VideoEmbeddedProvider.java:78) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedOperationsImpl.install(EmbeddedOperationsImpl.java:54) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedCommands.embedVideo(EmbeddedCommands.java:93) 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 org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:184) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:147) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:394) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158) at java.lang.Thread.run(Thread.java:680) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124) at org.springframework.roo.support.util.XmlUtils.readXml(XmlUtils.java:107){code}
    via by Andrew Swan,
  • Getting Premature end of file Exception
    via Stack Overflow by ramesh
    ,
  • Error while parsing xml in java
    via Stack Overflow by bHaRaTh
    ,
  • Struts 2: Send XML data to server from client?
    via Stack Overflow by Zeck
    ,
    • java.lang.IllegalStateException: Could not open input stream at org.springframework.roo.support.util.XmlUtils.readXml(XmlUtils.java:109) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.getScreenrId(VideoEmbeddedProvider.java:94) at org.springframework.roo.addon.web.mvc.embedded.provider.VideoEmbeddedProvider.install(VideoEmbeddedProvider.java:78) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedOperationsImpl.install(EmbeddedOperationsImpl.java:54) at org.springframework.roo.addon.web.mvc.embedded.EmbeddedCommands.embedVideo(EmbeddedCommands.java:93) 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 org.springframework.roo.support.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy$1.callback(ProcessManagerHostedExecutionStrategy.java:49) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:184) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:147) at org.springframework.roo.process.manager.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:47) at org.springframework.roo.shell.AbstractShell.executeCommand(AbstractShell.java:204) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:394) at org.springframework.roo.shell.jline.JLineShell.run(JLineShell.java:158) at java.lang.Thread.run(Thread.java:680) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    tvrmsmithtvrmsmith
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,