Can TLD jar can access through EAR / APP-INF/lib folder
Hi All,
If I have a TLD files into jar file and their specific classes are also into jar file .
Now can access those jar through EAR file APP-INF/lib folder or else its must to access through WEB-INF/lib folder.
any pointer will be great.
Regards,
Kal.
I suggest you assume that's how it's supposed to work, and get that to work most efficiently. I have no idea what you were trying to achieve by putting the taglib jar in APP-INF/lib. Perhaps you have multiple webapps and you wanted to avoid multiple instances of the taglib jar? If that's the case, I believe you could use WebLogic "shared application libraries" (I don't think that's the correct term), where you deploy a jar file as an application library, and the weblogic.xml file in each webapp that uses it would specify the name of the application library it uses.
Similar Messages
-
How to load .jar files of subfolder in web-inf/lib folder?
Hi All,
In 'webapps\myappliction\WEB-INF\lib\myfolder' and in myfolder have some .jar files. How to load subfolder jar files in weblogic server 10.0?
Do I need to configure subfolder jar path in web.xml? Please help me.
Thanks & Regards,
GangadharClass loaders associated with a Web application can be configured to locate local classes first. To enable this we have to set the <prefer-web-inf-classes> to true in the deployment override weblogic.xml, for example
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
http://blog.transfer-solutions.com/2010/12/weblogic-class-loading/ -
Weblogic Server not picking the jar files in WEB-INF/lib folder
we are facing a strange problem where Weblogic App Server is not picking the jar files present inside the WEB-INF/lib folder if we update the jar file path in the classpath of the start script then the classes get loaded properly.
Is there any specific setting which I need to do in weblogic to pick these jars ?Class loaders associated with a Web application can be configured to locate local classes first. To enable this we have to set the <prefer-web-inf-classes> to true in the deployment override weblogic.xml, for example
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
http://blog.transfer-solutions.com/2010/12/weblogic-class-loading/ -
if the music that is on an iPod can no longer be accessed through iTunes because it was deleted, is there anyway to recover the music on the iPod if it wasn't purchased?
See this support article:
http://support.apple.com/kb/HT1848
You can also download at least some of your content (audiobooks being a notable exception) again from the iTunes Store:
http://support.apple.com/kb/ht2519
For additional instructions, particularly for content not purchased from the iTunes Store, check out this user tip from TuringTest:
https://discussions.apple.com/docs/DOC-3991
and this page on "How-to Geek":
http://www.howtogeek.com/104298/sync-your-ios-device-with-a-new-computer-without -losing-data/
Regards.
Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question. -
With OSX 10.9.1 I can no longer receive updates through the App Store?
With OSX 10.9.1 I can no longer receive updates through the App Store?
Check your settings in Preferences
AppleMenu()>System Preferences>App Store -
I used to look my photos in my tv using apple tv, now i can't when i access through apple tv/ computer/ my library photo option is not available, i check home sharing and which photos i'm sharing from my mac/itunes but i still can share photos w/apple tv
Morning JJFH,
Thanks for using Apple Support Communities.
If after setting up Home Sharing, you cannot access your shared iTunes library over your home network from your Apple TV, take a look at this article:
Troubleshooting Home Sharing
http://support.apple.com/kb/ts2972
Best of luck,
Mario -
Can i catch a virus through Teamviewer App (doing a remote session with other computer) in my iPad?
There are no viruses that can affect the iPad. And a teamviewer session is a remote connection to a computer. Anything you do in the teamviewer session is happening on the remote computer not on your iPad, so unless you manually transfer a file to the iPad there's no way for a virus to move through the session.
And as I said, even if you transferred an infected file from the remote machine, the virus can't run on an iPad so it would not affect it. -
Web application in EAR not finding class in APP=INF/lib jar file
Hi,
I have read some posts regarding this but am still not able to figure out anything.
I have a war file in my EAR along with some EJB jars. I have the common jars in the APP-INF/lib. The EJBs can find the classes in the common jars easily. But the Web app gives me a NoClassDefFoundError when trying to load a class from a common jar.
Here is the structure:
<pre>
EAR
|---WAR
|---WEB-INF
| |---lib
| |---a.jar (A.class)
|---APP-INF
|---lib
|---b.jar (B.class)
</pre>
Class A is trying to load class B and I get the NoClassDefFoundError for class B
Thanks for any help,
SameetI found the problem. The web-app was finding the class in the APP-INf/lib. But the problem was being caused due to a reference to another class that was being loaded by the webapp classloader which was not visible to the class inside the common jar. The solution was to make sure both classes were being loaded by one class loader.
Thanks anyway
Sameet -
Unable to load classes from jar files inside APP-INF/lib in EAR.
Weblogic version: 10.3.3
Platform: Linux x86-64 bit
We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
in 10.3.2 version of weblogic.
We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
Any pointers would be appreciated.try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
or using prefer-application-packages in the weblogic-application.xml file in your EAR. -
ClassNotFoundException from servelt inside app-inf/lib of an ear.
Hi,
I'm experiencing a ClassNotFoundException errors in WebLogic 9.1 running with JDK 1.5.0_04 when I try to start an ear application that has defined, in the web module, a servlet for which the base class is inside an ear library which in turns try to get a class defined in the web module using Class.forName(...) during it's initializzation.
I've made a test ear project with the following structure:
prova.ear
- APP-INF
---- test.jar
------- com.ServletProva
- META-INF
---- application.xml
- prova.war
---- WEB-INF
------- classes
---------- com.ClasseDaLeggere
---------- com.ServletProvaDue [extends com.ServletProva]
------- web.xml
the content of web.xml is the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<display-name>weblogic-prova_servlet</display-name>
<servlet>
<servlet-name>ServletProva</servlet-name>
<display-name>ServletProva</display-name>
<description></description>
<servlet-class>com.ServletProvaDue</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServletProva</servlet-name>
<url-pattern>/ServletProva</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
And the content of the com.ServletProva class is:
package com;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class ServletProva extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
public ServletProva() {
super();
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
public void init() throws ServletException {
try {
Class.forName("com.ClasseDaLeggere");
} catch (Exception e) {
throw new ServletException(e);
super.init();
Trying to start the application i get the following error:
<4-ago-2008 15.57.32 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: [HTTP:101216]Servlet: "ServletProva" failed to preload on startup in Web application: "/prova".
java.lang.ClassNotFoundException: com.ClasseDaLeggere
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:222)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:195)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:130)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.ServletProva.init(ServletProva.java:38)
at com.ServletProvaDue.init(ServletProvaDue.java:37)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:276)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:68)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:493)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1688)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1665)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1585)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2678)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:874)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:25)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:640)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:252)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:567)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:
131)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:101)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:126)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:329)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:845)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1246)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:432)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:161
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(Deployment
ReceiverCallbackDeliverer.java:181)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiv
erCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCal
lbackDeliverer.java:67)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:876)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:326)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: com.ClasseDaLeggere
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:222)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:195)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:130)
Truncated. see log file for complete stacktrace
Someone can help me to figure out this problem?Check out this recent thread:
Re: weblogic 10 ear problem-urgent
If you're still having issues, then I recommend using the IDE tooling for WebLogic to do this in WTP or Workshop, then Export the EAR/WAR which will give you the structure. -
Help with APP-INF/lib inside EAR
I have an EAR task in my ANT script, how do I add jars into APP-INF/
lib inside EAR ?
I dont want to create a folder structure in my project, only EAR
should have
<EAR root> /APP-INF/lib
Edited by: Taranfx_com on Oct 12, 2008 4:49 AMtry using prefer-web-inf-classes in the weblogic.xml file in your WAR file
or using prefer-application-packages in the weblogic-application.xml file in your EAR. -
EAR project facet and APP-INF/lib
Hello,
I have four Workshop 10.3 projects which comprise an EAR. The projects are like this:
- MyCommonLib (Project Facets: EAR 5.0, WebLogic EAR Extensions 5.0)
- MyCommonLibControls (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
- MyCommonLibSchemas (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
- MyCommonLibExtraControls (Project Facets: Utility Module 1.0, WebLogic Utility Module Extensions 10.3, ...)
Basically, I am bundling 3 utility-jars into an EAR to be deployed collectively as a shared library. The problem is that I need to define at least one module in application.xml, otherwise deployment fails. Workshop however places all the jars in APP-INF/lib and leaves the application.xml empty.
I tried to "hack my way around this" by creating an empty "dummy.jar" file and placing it in the EarContent folder of the "MyCommonLib" project and editing application.xml by hand. However, when I export an EAR, it does not make it into the archive (even if I add it to the J2EE Module Dependencies of the EAR project MyCommonLib) and therefore deployment fails because the dummy.jar referenced in my application.xml does not exist.
What project settings do I need to achieve what I need?
Edited by: akarypid on Nov 4, 2010 2:29 AMHello,
Thank you for your input; the WAR approach works, although I don't like the idea of publishing web pages by importing the shared library.
However, I was hoping for an approach that would use the "standard J2EE" jar packaging approach whereby a project that is marked as a utilitiy module is not placed in the APP-INF/lib (thisi is weblogic-specific) but rather placed in the EAR's root and published in the standard application.xml as:
<application ...>
<module>
<java>dummy.jar</java>
</module>
</application>This way I could bundle everything into the EAR, without having to include a web application in the shared library (and every app that uses it)... Could this be done using some project setup in Workshop? -
Weblogic 8.1 Classpath vs APP-INF/lib
I'm deploying an enterprise application on Weblogic 8.1. log4j 1.2.8 is on the classpath of Weblogic, while log4j 1.2.16 is in the APP-INF/lib of my EAR file. Unfortunately, my application seems to be binding to the older version of log4j, instead of the one in my EAR file, and I have no control over administration of the server.
Is there any way to work around this problem? Thanks.Hi,
You can try to set the value true for prefer-web-inf-classes element which will cause the classes which are located in the directory \WEB-INF\lib of a Web application to be loaded in preference to classes loaded in the application or system class loader. This way we can be sure that the classes from the lib folder would be picked and used for this application.
Things to do:
1) Place the Jars inside the “<APPLICATION_EAR>/APP-INF/lib” directory.
2) Add the following entries inside ”<APPLICATION_EAR>/META-INF/weblogic-application.xml” (You need to add the packages available in your JAR files which you want to be loaded from your application in Below)
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<weblogic-application xmlns=”http://www.bea.com/ns/weblogic/90″>
*<prefer-application-packages>*
<package-name>org.apache.*</package-name>
<package-name>org.apache.xerces.*</package-name>
<package-name>org.apache.xalan.*</package-name>
<package-name>org.apache.xmlcommons.*</package-name>
<package-name>org.apache.xerces.jaxp.*</package-name>
*</prefer-application-packages>*
</weblogic-application>
NOTE: if you Don’t have an EAR File (Enterprise Application) Then First place all the JARs in “<WEB_APPLICATION>/WEB-INF/lib” And then you can perform ClassLoader Filtering by Adding the Following Entry in “<WEB_APPLICATION>/WEB-INF/weblogic.xml”
<weblogic-web-app xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.bea.com/ns/weblogic/90″ xsi:schemaLocation=”http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd”>
<container-descriptor>
*<prefer-web-inf-classes>true</prefer-web-inf-classes>*
</container-descriptor>
</weblogic-web-app>
You can even go through the following link:
http://middlewaremagic.com/weblogic/?page_id=192
Few more links which might help you:
Search for: prefer-web-inf-classes
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html
Search for: Configuring a FilteringClassLoader
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1098468
Regards,
Ravish Mody
http://middlewaremagic.com/weblogic/
Come, Join Us and Experience The Magic… -
Hello,
I am migrating an ear from a j2ee1.4 websphere to javaee6 weblogic. As part of migrating from j2ee1.4 to javaee6, I made a change to the packaging. In j2ee1.4, our EAR had all the dependent jars for our 4 WARS in the root directory. I moved all the jars from root to APP-INF\lib.
I have been getting errors on classloading of hibernate/antlr jars. I would like to know if moving the jars to APP-INF/lib is right and non-problematic. Do I have to mandatorily use <library-ref> anywhere? Do I have to refer anywhere such as classpath in Manifest.mf or anyother place to tell weblogic about the location of jars?
Regards,
RajIf it's an archived EAR, you can find the exploded contents under the
server's .wlnotdelete directory.
APP-INF/lib jar files are also copied under the same directory.
-- Rob
Krish wrote:
If I have a jar file under APP-INF/lib in an EAR file, do the classes inside the
jar file get extracted to some place in the EAR staging directory? If so, where?
Thanks, Krish -
Revision: 1494
Author: [email protected]
Date: 2008-04-30 12:29:37 -0700 (Wed, 30 Apr 2008)
Log Message:
+ Copy jgroups.jar to qa-regress/WEB-INF/lib folder
+ Add a clustered destination to remoting-config.mods.xml for codecoverage
+ Add url-load-balancing,class and default attributes to cluster definition in services-config.mods.xml for codecoverage
checkintests: passed
Modified Paths:
blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/remoting-config.mods.xml
blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.xml
blazeds/trunk/qa/apps/qa-regress/build.xmlPlease see following Sun Alert.
http://sunsolve.sun.com/search/document.do?assetkey=1-26-101905-1
The document contains links to the patches that fix this problem.
Maybe you are looking for
-
jpeg photos sent to me in emails don't display -- just get a torn page type box. Prior emails saved in folders are also affected. If I forward the email to an email account in Explorer they work fine.
-
Setting "sap-client" parameter in mx:HTTPService object
Hi there, I am having problems setting the "sap-client" parameter on a HTTPService object due to the "-" in the parameter name. If I do it like... <mx:HTTPService id="vmsplan" url="http://mysaphost.domain.com/sap/bc/bsp/sap/yvms1/vmsdata.xml"> <
-
I am using Illustrator CS4 on a Macbook Pro with Mountain Lion...on to the issue. The first time I used the zig zag filter today I got exactly the effect I wanted: Then when edited it to to take it from 15 ridges to 14, this is what happened: I didn
-
Where is the "Photoshop Help Folder" located on the Mac?
Hi all, I am trying to install Strata 3D tryout and it is asking for the location of the "Additional How To Content" folder, inside the "Photoshop Help Folder". I cannot find the "Photoshop Help Folder"... can someone tell me where it is located? Tha
-
Error in running diags on fpga
hi all, i could successfully download the opensparcT1 on ml509 board and ran all my diags ending in good trap... i repeated the same by creating a buggy model which had given bad traps for my diags during simulation... i could synthesise and generate