While upgrading sun application server 8.2 to a new patch level an exception occurred and I don't know why. Following a code snippet from a servlet:
public void init() throws ServletException
{
Properties reqProperties = new Properties();
try
{
reqProperties.load( this.getClass().getResourceAsStream( "/someFile.properties" ) );
}
catch( IOException e )
{
e.printStackTrace();
}
.......
The file does exists on the classpath and in previous patch versions it worked just fine. but now when deploying this result in a exception. The stack trace:
[#|2010-04-14T16:43:48.208+0200|WARNING|sun-appserver-ee8.2|javax.enterprise.system.core.classloading|_ThreadID=11;|loader.InputStreams with no valid reference is closed java.lang.Throwable at com.sun.enterprise.loader.EJBClassLoader$SentinelInputStream.(EJBClassLoader.java:1172) at com.sun.enterprise.loader.EJBClassLoader.getResourceAsStream(EJBClassLoader.java:858) at java.lang.Class.getResourceAsStream(Class.java:1998) at a.package.TestServlet.init(TestServlet.java:44) at javax.servlet.GenericServlet.init(GenericServlet.java:261) 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:592) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1093) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:931) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4183) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4535) at com.sun.enterprise.web.WebModule.start(WebModule.java:241) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086) at org.apache.catalina.core.StandardHost.start(StandardHost.java:847) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:483) at org.apache.catalina.startup.Embedded.start(Embedded.java:894) at com.sun.enterprise.web.WebContainer.start(WebContainer.java:741) at com.sun.enterprise.web.HttpServiceWebContainer.startInstance(HttpServiceWebContainer.java:963) at com.sun.enterprise.web.HttpServiceWebContainerLifecycle.onStartup(HttpServiceWebContainerLifecycle.java:50) at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300) at com.sun.enterprise.server.PEMain.run(PEMain.java:308) at com.sun.enterprise.server.PEMain.main(PEMain.java:221) |#]
I've no idea what could be the problem anyone have any idea? (note that I changed some names in the code and stacktrace)