Accessing file directory objects in 9.1 and /WEB-INF/classes zip

It appears that in WebLogic 9.1 that the contents of the /WEB-INF/classes directory is being zipped up and placed in the /WEB-INF/lib directory under some arbitrary name.
Is there a way to tell weblogic not to do this, but leave the /WEB-INF/classes directory expanded as it was in weblogic 8?
Is there a particular reason, developers should be aware of, to why this is being done in 9.1 (9.x?)?
Background :
This particular app has a set of several hundred xml files that describe all of the screens (and thus the forms) of the app. They are used not only in the generation of the actual jsps (and believe it or not the action class as well as other supporting class, the app is really an interface to a legacy backend) but are also packaged within the WAR for the dynamic configuration of plugins used for complex validation; a quasi 'rules' engine.
While there are several different versions of the app, and thus several different versions of xml files, there is only one version of the rules engine.
The problem that has arised when running on 9.1 is the plugins access to those xml files.
The plugin attempts to load the xml files by creating File object for the directory containing the xml files, and then iterating through the contents of that directory.
The xml files are packaged within the /WEB-INF/classes directory and are thus accessible using a simple resource look-up (in actuality, a 'token' xml file is specified, looked-up as a resource and then used to determine the parent file directory's url).
This has worked well enough as 'most' servers deploy the contents of /WEB-INF/classes directory in an expandable fashion. Obviously, this strategy readly breaks when those same contents are jar'd and placed in the /lib directory.
It is prefered to not have to maintain a cataloge or index of the xml files because of the volume of xml files, the multiple versions of the xml files, and of course the volitility of the xml files, although this is an obvious option.
I personally have mixed feelings about using a parent directory reference to load a set of resource files within a j2ee app. If anyone has any other suggestions, I would greatly appreciate it!
Thanks
Andrew

Hi,
Usually, the best approach would be to just to load the resources as InputStream and have a catalog (and I know this is what you do not want to do :-) So the only hacky workaround that I can think of would be to use something like Jakarta Commons Virtual File System (http://jakarta.apache.org/commons/vfs/) and read the .zip
Regards,
LG

Similar Messages

  • Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name

    In our current application we have the following source directory structure:
              src -
              - com
              - edeploy
              - subdirs ... (many directories here)
              - jsp
              -subdirs ... (many directories here)
              In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              files). I would like to modify my build.cmd script to copy the *.gxq files
              into the same directory as the class files.
              Here's my script so far:
              @REM Create list of files to compile
              DIR /S /B /A:-D src\com\*.java >class.list
              @REM Create list of query files
              DIR /S /B /A:-D src\com\*.gxq >query.list
              @REM Compile
              javac -d stage\WEB-INF\classes @class.list
              @REM Copy query files into class directory
              .......... code needed here ......
              Can anyone help me with this?
              Thanks,
              Matt
              

    You may want to check out:
              http://jakarta.apache.org/ant/index.html
              Gary
              "Matt Raible" <[email protected]> wrote in message
              news:[email protected]..
              > In our current application we have the following source directory
              structure:
              >
              > src -
              > - com
              > - edeploy
              > - subdirs ... (many directories here)
              > - jsp
              > -subdirs ... (many directories here)
              >
              >
              > In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              > files). I would like to modify my build.cmd script to copy the *.gxq
              files
              > into the same directory as the class files.
              >
              > Here's my script so far:
              >
              > @REM Create list of files to compile
              > DIR /S /B /A:-D src\com\*.java >class.list
              >
              > @REM Create list of query files
              > DIR /S /B /A:-D src\com\*.gxq >query.list
              >
              > @REM Compile
              > javac -d stage\WEB-INF\classes @class.list
              >
              > @REM Copy query files into class directory
              > .......... code needed here ......
              >
              > Can anyone help me with this?
              >
              > Thanks,
              >
              > Matt
              >
              >
              

  • WAR file fails to deploy WEB-INF/classes

    Hi All
    I am attempting to get a simple JPA on JSE app running on WLS 9.1. I can deploy my WAR file and access the jsps no problem, however the WEB-INF/classes directory is empty on deployment. How can I tell if the classes are being deployed correctly? I have tried using autodeploy and console deployment, always with the same result. My war file is structured as follows:
    WEB-INF/
    WEB-INF/faces-config.xml
    WEB-INF/weblogic.xml
    WEB-INF/web.xml
    WEB-INF/classes/
    WEB-INF/classes/my/test/package/{all classes}
    WEB-INF/lib/{all reqd libs}
    index.jsp
    When I run the jsp, there are no errors, the classes just don't appear to be doing anything. The logs have absolutely nothing to help with this, I turned on app logging in weblogic.xml and it has nothing other than the initialization in it either.
    I've deployed and run the exact same app (less the weblogic.xml file) successfully on Tomcat and OC4J, any ideas out there? Am I looking in the right place for the deployed class files (Checking the WL_HOME/samples\domains\wl_server\servers\examplesServer\tmp\_WL_user\jpa-example\xb6q08)?

    Hi,
    I've faced the same issue in WLS9.2, and but it didn't affect my web application running, I guess that the classes are read from the WAR file directly, so for me to overcome this issue, I've changed the technique of how to install web application by selecting extracted war installation instead, and from the WLS Console selected
    "I will make the deployment accessible from the following location" and selected the folder that contains the extracted WAR.
    Hope this will help,
    Issa

  • prefer-application-packages and prefer-web-inf-classes not working

    Hi,
    I'm upgrading to Weblogic 10.3.2 an application that was running quite fine in Weblogic 8. But I don't manage to get it working in WL 10. I'm getting a Class Not Found error (javax/xml/stream/XMLStreamWriter) but that class is in one of the jar files of my application: "<war-file>/WEB-INF/lib"
    It seems a class loading problem but I'm using both <prefer-application-packages> and <prefer-web-inf-classes> and it's still not working. This is my weblogic-application.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application>
    <prefer-application-packages>
    <package-name>javax.xml.stream.*</package-name>
    </prefer-application-packages>
    </weblogic-application>
    I'm deploying using an ear file wich contains a war file.
    Logs:
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 57 more
    Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:344)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:301)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:42)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 70 more
    Caused by: java.lang.ClassNotFoundException: javax.xml.stream.XMLStreamWriter

    Hi!
    We have the jar xbean-2.2.0.jar in APP-INF/lib. That one contains the class javax.xml.namespace.NameSpaceContext. I saw that the same class was in another jar as well. I've removed it from the second jar and now it's only in the xbean-2.2.0.jar. But I still get the same error. Maybe there is something wrong in my application.xml? I have all the jars in APP-INF/lib and in <war-file>/WEB-INF/lib
    Application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
    <application id="Application_ID">
    <display-name>RaadgiverPM</display-name>
    <module>
    <web>
    <web-uri>rpm.war</web-uri>
    <context-root>/raadgiverPM</context-root>
    </web>
    </module>
    <library-directory>lib</library-directory>     
    </application>
    2010-09-06 11:05:07,856 735360 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient - [DELFI] Failed to initialize client at http://172.16.10.113:8090/mockRpmGrpMemberRltnpLSvo_Binding?wsdl
    java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
         at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.newInstance(DynamicClientFactory.java:132)
         at groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:198)
         at groovyx.net.ws.WSClient.initialize(WSClient.java:107)
         at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:47)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient$0.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:37)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.<init>(DRWebServiceClient.groovy:33)
         at no.delfidata.dr.wsclients.drwsclients.GenericWebServiceClient.<init>(GenericWebServiceClient.groovy:12)
         at no.delfidata.dr.drintstd.channel.GenericWSClientManager.getClient(GenericWSClientManager.java:28)
         at no.delfidata.dr.drintstd.channel.impl.WSChannelImpl.getData(WSChannelImpl.java:46)
         at no.delfidata.dr.drintstd.integrationadapter.impl.AdapterWSImportRpmGrpMemberRltnpLSvo.getDataFromChannel(AdapterWSImportRpmGrpMemberRltnpLSvo.java:74)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getDataImportFromChannel(AbstractIntegrationAdapter.java:232)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getData(AbstractIntegrationAdapter.java:173)
         at no.delfidata.dr.drintstd.integrationengine.impl.IntegrationEngineImpl.importData(IntegrationEngineImpl.java:113)
         at no.delfidata.dr.drsvcstd.integration.impl.IntegrationServiceImpl.importCustomerData(IntegrationServiceImpl.java:117)
         at no.delfidata.dr.drsvcstd.integration.impl.StartUpService.openAndImportCustomer(StartUpService.java:81)
         at no.delfidata.dr.drstdgui.gui.control.ReceivingServletAction.execute(ReceivingServletAction.java:135)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.dr.drbasis.gui.filter.MenuFilter.doFilter(MenuFilter.java:78)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.common.gui.filter.SecurityFilter.doFilter(SecurityFilter.java:265)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation
    in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>)
    for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 48 more
    Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 61 more

  • WorkShop 3.2.0 - WEB-INF/classes not included in war file

    I've created the "Faces Example" project in Workshop Studio 3.2.0 and it's running fine. However, when I export the war file to run it on another server the class files located at "WEB-INF/classes" are not included with the war.
    Any suggestions on what I may be doing wrong would be greatly appreciated.
    thks!

    Unfortunately no, the issue with output folder being ignored occurs only with example apps bundled with Workshop product.
    You can try the following workaround:
    - In Workshop, Project > Properties - Java Build Path, switch to Source tab - "Remove the source folder listing" - Click OK and dismiss Properties window.
    - Project > Properties - Java Build Path > Source Tab, add the same source folder entry - Click OK
    - Export as WAR
    With this you should see the class files bundled under output directory structure (Ex: WEB-INF/classes).

  • WLS 8.1 SP4 and web-inf/lib ClassNotFoundExceptions

    Hi
    Is anyone else having problems with this issue ?
    I saw it was resolved (CR161884 & CR173695) in the 8.1 SP3 release, but I'm unable to deploy a web app (either through the console or in the applications directory of the domain) in SP4 as the classloader can't see my JAR file in WEB-INF/lib.
    <30-Dec-2004 15:51:47 o'clock GMT> <Error> <Deployer> <BEA-149201> <Failed to co
    mplete the deployment task with ID 7 for the application appsdirdp-application
    -1.0-SNAPSHOT_war.
    weblogic.management.DeploymentException:
    Exception:weblogic.management.ApplicationException: start() failed.
            Module: dp-application-1.0-SNAPSHOT     Error: weblogic.management.Deplo
    ymentException: org/picocontainer/gems/StaticFactory - with nested exception:
    [java.lang.NoClassDefFoundError: org/picocontainer/gems/StaticFactory]Inside my WAR file, I have a WEB-INF\lib directory, containing picocontainer-gems-1.1-SNAPSHOT.jar which contains the org.picocontainer.gems.StaticFactory class.
    I've tried deploying the app both with and without a weblogic.xml file declaring prefer-web-inf-classes set to true.
    Rgs
    Erik

    Just as a check, I moved the JAR files to a common lib directory on the server and added them to the system classpath specified in startWeblogic.cmd, and the application starts fine.
    Maybe not related, but yesterday I was tried deploying an EJB that was dependent on a JAR file NOT included within its JAR file, but specified with the Class-path entry in the manifest.
    The behaviour I saw was WLS swallowed the ClassNotFoundException silently, the admin console reported that the EJB was deployed successfully but inside the ejbCreate method - I had two print line statements, one prior to calling the missing class, and one after. Only the one prior appeared on the system console, suggesting that the ejbCreate method wasn't completing, yet no exception is thrown ?

  • Accessing classes in web-inf/classes within JSP

    hi,
    i know this is probably a very basic question..or nobody would ever do something like this..but I'mn curious:
    i have a class Car.class in the WEB-INF/classes directory and I want to access it from withing JSP : <% Car c = new Car(); %>
    the problem is that the server tries to load the class from the package : org.apache.jsp.Car ! when putting car into an own package like my.Car then it works.. but how do i get it working without putting it into a separate package?!
    thx

    You could try packaging it in a jar, and placing the jar in WEB-INF/lib... I have no idea if that will help, but when you're debugging, you have to be willing to try anything.. :)

  • Classes are not loading from WEB-INF/classes directory

    Hi All,
    I am in a deep troble because the class files in the WEB-INF/classes directory are not loading.
    I have deployed the application in Tomcat 6 server. And stored all class files under WEB-INF/classes dirctory. But when I execute a JSP page, I am getting following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    JSP FileName:/hello.jsp
    An error occurred at line: 1 in the jsp file: /hello.jsp
    com.flt.Test cannot be resolved to a type
    1: <%=new com.flt.Test().hello()%>
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:98)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)The classes are available in the WEB-INF/classes directory and the folder name and package name of the classes are correct. I have also tried to execute the application by creating a jar file and put it in the WEB-INF/lib directory. But I am getting same result.
    Is it the problem with Tomcat configuration? When I gone through Tomcat documentation, I get to know that the WebAppX class loader in Tomcat, loads application specific classes for a web application. Is it possible to start/stop WebAppx classloader manually?
    Please help me to solve this issue.
    Many Thanks,
    Francis Lukose
    Edited by: francis_ on May 13, 2008 10:03 AM

    Thanks for your reply, Soultech2012.
    <%=new com.flt.Test().hello()%>is the only code in the JSP page. Just a single line. Nothing more than that.
    The code in Test.java is as follows:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.flt;
    * @author Francis Lukose
    public class Test {
        public static String hello()    {
            return "hello";
    }Many Thanks,
    Francis
    Edited by: francis_ on May 13, 2008 6:45 PM

  • Compiling class file to WEB-INF/classes

    I have created 2 source files, viz: DatabaseConnectionBean.java and Agent.java. They both exist in the source directory. In the DatabaseConnectionBean.java I instantiate the Agent.class. When I compile at the Command prompt ... I type javac -d ..\WEB-INF\classes\ Agent.java ... it compiles fine. But when I compile the DatabaseConnectionBean.java by typing javac -d ..\WEB-INF\classes\ DatabaseConnectionBean.java it throws an error.....it cannot resolve symbol 'Agent'.
    I have included the package name, viz: smeyl, in both files.
    A strange thing happens when I type: javac -d ..\WEB-INF\classes\ *.java; at the command prompt...It doesn't throw an error....it compiles both source files....still though my jsp doesn't work properly..so this isn't a solution.
    Please help.
    any help will be appreciated....
    luv
    ushanta

    I'm not to sure myself. I've been using eclipse too long to remember all the intracacies of command line stuff. I know the theory, but am out of practice. :-)
    If you compile DatabaseConnectionBean on its own, I don't think it looks in the destination directory for supporting classes unless you tell it to:
    something like this
    javac -d ..\WEB-INF\classes\ -classpath ..\WEB-INF\classes\;%CLASSPATH% DatabaseConnectionBean.java
    If I'm talking complete rubbish here, someone will kindly (or unkindly for that matter) correct me I am sure

  • Meta-inf and web-inf

    Im using Tomcat 5.5 server...
    Ik Ive got a page that manages some user databaze. But whats bad is that the databaze is in tomcatHome/webapps/userData/users.xml
    and everybody can access this file only by entering host/userData and then choose the users.xml.. I would like to place it in meta or web-inf so that only the web can access the file. How can i access web or meta inf in java or jsp?

    hmm that was very useful but id didnt work on my computer
    ive got 2 files:
    processLogon.jsp:
    boolean verif = new UserHandler().verifyUser( user.getUser(), user.getPassword(), "/WEB-INF/users.xml", getClass());//the important part
    and a UserHandler.java:
    public boolean verifyUser( String user, String password, String url, Class clas)
    boolean verif = false;
    Document document = null;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    try
    InputStream inputXML = clas.getResourceAsStream("users.xml");
    //Build document:
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(inputXML);
    } catch etc.......
    the users.xml is placed in tomcat_home/webapps/myapp/web-inf/classes
    so what am i doing wrong!?!?

  • Is web-inf/classes like a exploded jar file?

    ie, can it make sense to have an ejb-jar.xml in the web-inf/classes directory of a war file?
    Petstore has one!
    Thanks
    Martin

    Unless I'm mistaken, yes, you could think of it this way.
    In development, I usually compile things to WEB-INF/classes (and put .xml and .properties files there too) and when everything works, make a .jar of it.
    Hope this helps.
    Patrick

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

  • Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml

    Hi  All,
    we are not able to connect to Live office to our server . URL is  not authenticated in Excel and  if we place same url in browser ,we are getting below error message.
    "Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
    we couldn't able to rest the same after changing settings in axis2 file also.
    Any solution where we can configure in CMC or any files
    Regards
    Mahesh

    Hi Mahesh,
    As mentioned by Abhilasha, this is the expected behavior.
    In order to validate you could place the following URL in the browser.
    http://servername:portno/dswsbobje. you would see Tomcats home page which will display the list of Services.
    As far as the Live office in Excel is concerned , If you are getting a yellow  exclamation mark stating (Web service not correct) next to Session URL, try changing the servername to IPaddress of the server.
    Eg: http://ipaddress:portno/dswsbobje/services/Session
    While inserting the Session URL in the Live Office settings confirm the URL as per above.
    If the issue still persists, you could configure the host file entry in you client machine.
    Let me know if the information is helpful.
    Regards,
    Noopur

  • File (Directory) object problem?

    Hi there. My problem is as follows. The method below is supposed to access an pre-existing directory with five previously saved test files, read in those files as account objects, add the objects to an ArrayList, then return the ArrayList. It seems to be able to create a file object representing the directory alright but it then insists that there are no files in the directory! Have I fouled up or is there some subtlety that I'm unware of? I was wondering if the fact that the account files have a .bac extenstion had something to do with it.
    Here's the method, with the two lines of code where I think the problem might lie in bold print:
    public ArrayList retrieveAccounts()throws IOException{
    ArrayList accounts = new ArrayList();
    File accDir = new File("C:" + File.separator + "accounts"); //creates a directory object
    //The following S.o.p statements are for test and maintenance purposes rather than user feedback
    System.out.println("Directory " + accDir.getCanonicalPath() + " opened");
    System.out.println("Confirm Accounts directory exists: " + accDir.exists());
    System.out.println("Directory: " + accDir.isDirectory());
    String [] accFiles = accDir.list(); //gets a list of files in the directory and saves it as a String array
    System.out.println("Number of files in directory: " + accDir.length());
    while(i < accDir.length()){
    filename = accFiles;
    try{
    //open layered input Streams to access the next account file in line
    ObjectInputStream in = new ObjectInputStream(new FileInputStream("C:"+ File.separator + "accounts" + File.separator + filename));
    account = (Account)in.readObject();
    accounts.add(account);
    in.close(); //closes Streams for that particular file
    }catch(IOException e){System.out.println("Filing error as follows: " + e);
                }catch(ClassNotFoundException e){System.out.println("Class not Found. Details: " + e); }
    filename = null; //frees up reference for next file
    i++;//counter increments by one
    return accounts;

    This is what I was trying to do minus the comments and maintence and test code:
    public ArrayList retrieveAccounts()throws IOException{
    ArrayList accounts = new ArrayList();
    File accDir = new File("C:" + File.separator + "accounts");
    String [] accFiles = accDir.list();
    while(i < accDir.length()){
    filename = accFiles;
    try{
    ObjectInputStream in = new ObjectInputStream(new FileInputStream("C:"+ File.separator + "accounts" + File.separator + filename));
    account = (Account)in.readObject();
    accounts.add(account);
    in.close();
    }catch(IOException e){System.out.println("Filing error as follows: " + e);
    }catch(ClassNotFoundException e){System.out.println("Class not Found. Details: " + e); }
    filename = null;
    i++;
    return accounts;
    By the way, your the first Java programmer that I've met that doesn't like comments! :)
    NOTE: Think I may have spotted where I went wrong in my code.
    filename = accFiles;
    Forgot to point it at the specific element of the array, like so:
    filename = accFiles[i];
    Thanks for your help!

  • Random access file with object stream

    Hi All,
    I have saved some objects in a file using object stream. While reading the sequential read is possible for me. I want to reduce the overhead of reading whole file for getting one specific object details. Is there any way in which we can implement RandomAccessFile with object stream? or is there any other alternative of reaching specific object in the file without seqential read?

    is there any
    other alternative of reaching specific object in the
    file without seqential read?Write the objects to a database.

Maybe you are looking for