OC4J taglibs packaged in war in ear
I receive this in my browser
OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="struts-html" prefix="html" %>
Error: Unable to load taghandler class: struts-html
Inside my war i have the web.xml with the appropriate taglib section pointing to the tld files which are in the web-inf/lib directory. It appears that oracle is not picking up the taglib location in the web.xml files. Anyone experiencing this?
I place my taglib directly under WEB-INF directory and refer it as follows :
In JSP
<%@ taglib uri="http://mytaglib/wstaglib.tld" prefix="ws" %>
In web.xml
<web-app>
<taglib>
<taglib-uri>http://mytaglib/wstaglib.tld</taglib-uri>
<taglib-location>/WEB-INF/wstaglib.tld</taglib-location>
</taglib>
</web-app>
You should have the implementation class of tag library in classpath.
Hope this helps
Chandar
Similar Messages
-
Difference between .jar, .war and .ear file
Hi,
I am pretty new to J2EE technology.
I would like to know what is the difference between .jar, .war and .ear files and how they are deployed on webserver.
Thanks,Files with a .jar extension or JAR files, are essentially just a collection of files compressed using the ZIP/ZLIB compression format.
JAR (short for Java Archive) files were introduced in the early days of Java as a means to conveniently package and distribute Java applications and components. Since then, a number of additions to the Java platform have followed suit. The introduction of the EAR file is one such addition.
An EAR (Enterprise Archive) file is a JAR file that contains a J2EE application.
A J2EE application is a group of Web modules that collectively perform as a single entity.
A Web Module is an entity consisting of one or more resources such as HTML files, Java class files, XML files, etc. Web Modules are packaged in Web Archive (WAR) files.
Looking at it from a top-down view, EAR files contain JAR files and WAR files. Packaging resources in WAR files, JAR files and eventually EAR files, makes it easy to reuse and reassemble components as new J2EE applications and distribute them to new environments.
For example, Tomcat deals only with WAR files.
So, in order to auto-deploy a Web application to a Tomcat environment, you must place an application's WAR file in the appropriate directory or use Tomcat's deployment tools to manually deploy the file.
If you already have an EAR file that contains the WAR file, you can extract the WAR file and use it as is. If you do not have the EAR file or the WAR file, you can use any number of compliant tools to create the WAR file. Tomcat is a servlet/JSP container available from the jakarta.apache.org site. -
How to Create a jar war or ear--Probelms in deploying
I have the following dir structure. I am using Struts 1.1 and weblogic 7.0
APP
+jsp
+WEB-INF
+ ---lib
+--- classes
+----com
--ap
--action
--beans
--handler
--service
--client
--ejb
--valueobject
1> Do I need to create a ear file since i want both the ejb (under service folder) and war as reusable components. Whenever we have a EJB component do we always need to have an EAR file??
2> Whats the best way to create the jar, war or ear file. I am facing great difficulty in deploying the war.Do we need to set any classpath before we create the war and jar files except for the deployment descriptors.I have created the ejb descriptors correctly through ejbc.
3>I have kept struts.jar,log4j.jar under lib folder. However when i create the ear and try to deploy it under weblogic it deploys the war file but gives error in deploying the jar which has the ejb. I have aslo validated the jar using ejbc.
It gives error indicating that it requires struts.jar in classpath. If we give the classpath of struts.jar at system leve the Application deploys with ease..Can anyone tell whats the error.The jar does not use any strust component .
4>Also the valueobject which has some beans which are used to populate the jsp through Actionformbean. Is it ok if we give refrences in both ejb jar and war?
ie while creating jar and war folder have the valueobject in both the files or will it lead to any errors..
Thanks in Advance
....Yes, I have tried that. But, as the server is running and the jars are in use, it throws and EditFailedException
-
Jar, War or Ear file ?
Hi,
I am a total newbie in J2EE technology.
I am currently using Sun One Application. Using the sample application, it produces all the Jar, War and Ear files.
My understanding is Jar is produced to be a library-like usage.
War is for web application.
And Ear is for what?? oops EJB? Can someone tell me?
Anyway, my concern is, if I am to produce Ear, war, or Jar file after deploy, I have problems doing the testing. Let's say I want to modify the Jsp file, then I have to use ant to compile all, undeploy the instance and deploy again.
Any better way?your jar files contain your EJBs, your WAR file contains your web application (JSPs, servlets and support) and these are all bundled into your EAR file. All of these files are just zip-formatted archives, you can look at them all via the jar tool (or something like WinZip, if you are so inclined). Each of these will contain a descriptor file (in XML format) - check out the J2EE spec on it.
Lee -
hi,
I got a war and ear that share common classes. I would like to deploy both of them on the same application server.
I started with weblogic and it worked fine.
Now I am running it on Websphere - the problem is the ear application failed to start - it cant find one of it's property files even though it is in the class path.
I see that the jar containing all the properties is in the class path - the application can access all other properties files except this one.
The problematic properties file is my.commons.logging.properties which is a refactoring to the common.logging jar.
I also see that if the war is not deployed - the ear is deployed without a problem.
the war contains commons.logging.properties and because Websphere also had it's own common.logging i had to use "parent last" for the war deployment.
If i change the load order of the applications(the ear is loaded first) - the properties file is found.
I will be happy to hear any idea you got about this.
I don�t understand how two different applications affect each other that way.
Thanks!!!Sounds like a bug. You can report it to [email protected]
-- Rob -
Looking for a DAO\JDBC example to deploy as war or ear to see how it works
looking for a DAO\JDBC example to deploy as war or ear to see how it works can any one show me i have searched it but cant find it...
you should try searching in http://www.theserverside.com
-
I had to reinstall RAD recently and put back in the Flex plug-in (4.1). Then I wanted to export the WAR and EAR files, but not it isn't possible.
When the Web | War selection is made, the next screen doens't have the application filled in and you can't enter it. Same is true with the EAR export option.
How do I get these to work?When I create a new project "Dynamic Web" I can get a WAR, but I can't get a Release Build.
-
How to package a .war file for multiple locations...
Sorry if this is in the wrong section, but I wasn't sure where to place it.
We have a webapp (.war) that we would like to package to distribute to multiple remote locations. We have to assume that the people installing this webapp have no Java/J2EE experience and will not have the technical know-how to be able to handle packaging the .war file themselves.
They do, however, need to be able to make configuration changes to the JDBC settings in the web.xml, the logging settings in log4j.xml, and configuration changes in the context.xml.
Since these files reside inside the .war, what is the best way to package this application so they can make changes to those files and package it to deploy on their application servers?
Thanks!Well, the best way is to move that configuration out of those XML files and manage them directly from you application.
Then you can use the Java Preferences API to actually maintain the configuration data, and that data is stored outside of your application completely in some JRE dependent way (Registry on Windows, and the users home directory on Unix for Sun's JRE).
You can also modify your webapp to manage the configuration directly and have it rewrite the XML files itself. The Java Preferences API is better just because the config changes will survive if you happen to update the WAR file with a new version. Of course, you can still leverage the Preference API, get your "defaults" from the supplied XML files in the WAR, and then if your application detects a version change (the one in the Preferences is different from the one in the WAR), the app can update the XML files, and pop up a page telling the user to restart the application to see the new changes.
Finally, you can also write a Swing app that presents the few options that the user might need, and then it has the smarts to update the WAR file for them (it's simply a ZIP file and Java can read/write those). That way you have a simple wizard they can play with.
Also, for things like log4j, you can bundle that seperate from the WAR, and let them place it either on the CLASSPATH of their container, or in one of their shared directories (like shared/classes on Tomcat for example).
I'm fond of the Preferences technique with a Webapp configuration, as you can make your WAR almost plug and play. They plop in the war, app fires up, they hit the URL and there's a config page staring at them.
But all of these options require work outside of your application.
You can also perhaps get one of those Installer programs, and right an installer for them. You can explode the WAR in to any directory, and then have the container deploy it from there. -
Deploying war OR ear file in 10.1.3 standalone OC4J
I've read the several threads on how to deploy a war file and/or ear file for OC4J but haven't seen anyone having the same issue I'm having.
I've tried deploying manually, from the command line using admin.jar, as well as the enterprise manager. It appears that when OC4J is looking for a jar file containing EJB's. But my app has none and there is no jar file that it finds.
Here is what the console reports when I try to deploy using admin.jar ->
http://www.gordongridley.us/2007/02/oc4j-console-when-trying-to-deploy.html
OK - so I try to deploy using the Enterprise Manager instead to see if the UI has some options that I can change for not forcing an EJB jar file lookup. Here is a video of what I did ->
http://www.gordongridley.us/2007/02/attempting-to-deploy-war-using-oc4j.html
Do I really need to have a jar file with EJB's to deploy a WAR/EAR file?Hi Gordon,
The source of your ills is this entry in the application.xml descriptor:
<module>
<ejb>TomaxCMAdmin.jar</ejb>
</module>
Remove that, and you should be good to go (assuming you aren't referencing any other non-existent JARs).
Thanks
Dan Hynes -
Help to solve problem with packaging log4j in a EAR file
Hi All
i struggle hard to create a EAR composed of EJB JARs and WARs and the programs
in these JARs and WARs use log4j to log msg. Because i want all J2EE apps to have
their own version of log4j library, i package log4j.jar in the EAR file. Below
is my EAR package structure
EJB1.jar
EJB2.jar
SharedUtilities.jar
log4j.jar
log4j.properties
WEBAPP1.war
WEBAPP2.war
META-INF/manifest.mf
For both EJB1.jar and EJB2.jar's META-INF/manifest.mf, there is a below entries
Manifest-Version: 1.0
Class-Path: SharedUtilities.jar log4j.jar
However, my program always hit below runtime error.
[java] Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception:
: java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
But the program in EJB1.jar and EJB2.jar seem to have no such problem in loading
classes in SharedUtilities.jar. The problem can be eliminated if i put log4j.jar
at system classpath. Can anybody provide me with info on how to package a log4j
library within a EAR package ?
In addition, where should i put the log4j.properties so that it will be at search
path of log4j and automatically loaded by log4j lib
regards
DannyHi Slava Imeshev
I am a bit confused about your reply. As said, the log4j.jar was packaged in my
ear file. If the log4j.jar was not packaged in ear file, how come the ejb classloader
can locate it.
Secondly, if log4j.jar is included in system classpath, the ejb also can load
log4j classes by system classloader. No "NoClassDeffound" exception is thrown.
regards
dso
"Slava Imeshev" <[email protected]> wrote:
"dso" <[email protected]> wrote in message
news:[email protected]...
Hi Slava Imeshev
thanks for your response. I am a bit confused about your answer.
i can't understand why u said the classloader COULD loadorg/apache/log4j/PropertyConfigurator.
According to the error msg, it said
" java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator".
Seemingly,
this class in log4j.jar could not be located. But as i said in lastquestion,
i seemed to have properly
edit the "META-INF/manifest.mf" in EJB1.jar and EJB2.jar to includelog4j.jar
in "Class-path" attribute. And my EJB classes have no problem in loadingclasses
in SharedUtilities.jar. Would u please elaborate on it in more details?
Sure. NoClassDefFoundError means that a DEPENDING class
can not be loaded. If the classloader were not able to load the class
itself, it would give you ClassNotFoundException.
Just make sure that you don't have the same packages in
the ear and in the class path so that you don't have classes
loaded by system classloader trying to load classes loaded
by ejb classloaders.
regards
dso
"Slava Imeshev" <[email protected]> wrote:
First, this error means that classloader was able to load
org/apache/log4j/PropertyConfigurator, but cold not load
one of depending classes. I'd inspect the CLASSPATH
to see if there are any log4 classes there.
Second, you can package your log4.properties into
log4.jar itself.
Regards,
Slava Imeshev
"dso" <[email protected]> wrote in message
news:[email protected]...
Hi All
i struggle hard to create a EAR composed of EJB JARs and WARs and
the
programs
in these JARs and WARs use log4j to log msg. Because i want all
J2EE
apps
to have
their own version of log4j library, i package log4j.jar in the EARfile.
Below
is my EAR package structure
EJB1.jar
EJB2.jar
SharedUtilities.jar
log4j.jar
log4j.properties
WEBAPP1.war
WEBAPP2.war
META-INF/manifest.mf
For both EJB1.jar and EJB2.jar's META-INF/manifest.mf, there is
a below
entries
Manifest-Version: 1.0
Class-Path: SharedUtilities.jar log4j.jar
However, my program always hit below runtime error.
[java] Caused by: javax.ejb.TransactionRolledbackLocalException:EJB
Exception:
: java.lang.NoClassDefFoundError: org/apache/log4j/PropertyConfigurator
But the program in EJB1.jar and EJB2.jar seem to have no such problemin
loading
classes in SharedUtilities.jar. The problem can be eliminated if
i
put
log4j.jar
at system classpath. Can anybody provide me with info on how to
package
a
log4j
library within a EAR package ?
In addition, where should i put the log4j.properties so that it
will
be at
search
path of log4j and automatically loaded by log4j lib
regards
Danny -
Referencing Shared Java EE Libs in Weblogic from WAR inside EAR
We have a number of applications that need to reference to both Oracle and our own Shared Java EE Libraries on WebLogic. They are structured as folows:
Our own shared library, "framework", is packaged as a JAR inside an EAR, along with all non-Oracle, third-party libraries (JAR:s) and deployed as a shared library in WebLogic. This is it's manifest:
Manifest-Version: 1.0
Created-By: Apache Maven 3.0.4
Built-By: lajokon
Build-Jdk: 1.7.0_07
Implementation-Vendor: <organization>
Implementation-Title: Framework Lib
Implementation-Version: 15.0.2
Implementation-Vendor-Id: org
Specification-Vendor: <organization>
Specification-Title: Framework Lib
Specification-Version: 15.0.2
Extension-Name: framework-lib
All JAR:s are in APP-INF/lib
The applications are each packaged in a WAR inside its own EAR. The WAR weblogic.xml:
<wls:weblogic-web-app>
<wls:weblogic-version>10.3.6</wls:weblogic-version>
<wls:context-root>app-name</wls:context-root>
<wls:library-ref>
<wls:library-name>adf.oracle.domain.webapp</wls:library-name>
<wls:specification-version>1.0</wls:specification-version>
<wls:exact-match>false</wls:exact-match>
</wls:library-ref>
<wls:library-ref>
<wls:library-name>jsf</wls:library-name>
<wls:specification-version>2.0</wls:specification-version>
<wls:exact-match>false</wls:exact-match>
</wls:library-ref>
</wls:weblogic-web-app>
The EAR application.xml:
<application>
<display-name>app-name</display-name>
<module>
<web>
<web-uri>app-name.war</web-uri>
<context-root>/app-name</context-root>
</web>
</module>
</application>
The EAR weblogic-application.xml:
<weblogic-application>
<library-ref>
<library-name>adf.oracle.domain</library-name>
<specification-version>1.0</specification-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>coherence</library-name>
<specification-version>3.7</specification-version>
<exact-match>false</exact-match>
</library-ref>
<library-ref>
<library-name>framework-lib</library-name>
<specification-version>15.0</specification-version>
<exact-match>false</exact-match>
</library-ref>
</weblogic-application>
All libraries are deployed by default or deploy correctly in WL. As does the application EAR.
But, when I access the application i get runtime errors saying it can't load resources located in the WAR:s WEB-INF/classes dir!?
However, I can see, from log output, that it loads resources from the Framework EAR. Why does WL not seem to care about the contents of my WAR?If I use the Admin Server Console to view the shared library, I can see ecif-ear(1.0,1.0) in the Deployments list. Its State is shown as "Active", Type is "Library", Deployment Order is 100.
I deployed the shared library using the Admin Server Console but deployed the referencing application using WorkShop for WebLogic Platform by Run As -> Run on Server. The Eclipse error log shows the following Exception Stack Trace:
com.bea.workshop.wls.core.j2eelib.UnresolvableReferenceException: ecif-ear|1.0|1.0|true
at com.bea.workshop.wls.core.j2eelib.LibraryModuleRegistry.resolve(LibraryModuleRegistry.java:106)
at com.bea.workshop.wls.core.j2eelib.LibraryModulesSvc.resolve(LibraryModulesSvc.java:884)
at com.bea.workshop.wls.core.server.internal.J2EEDeploymentHelper.deployLibraryModules(J2EEDeploymentHelper.java:409)
at com.bea.workshop.wls.core.server.internal.J2EEDeploymentHelper.deployAllLibraryModules(J2EEDeploymentHelper.java:392)
at com.bea.workshop.wls.core.server.internal.J2EEDeploymentHelper.deploy(J2EEDeploymentHelper.java:198)
at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishModules(WeblogicServerBehaviour.java:893)
at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:459)
at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:334)
at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:862)
at org.eclipse.wst.server.core.internal.Server.publish(Server.java:850)
at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:142)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) -
WAR within EAR is using the same classloader as the EAR
Hi all,
From documentation, I understand that each WAR web application that are packaged within EAR should have a separate (child) classloader and should not be using the same classloader as the EAR. I have two WAR files and some JAR files all packaged and deployed as an EAR. Using the Classloader Analysis Tool, I think the two web applications (WARs) are actually using the same classloader as the EAR. I say this because:
1. The application class loader listed for the web apps has the same hashcode as the class loader listed for the EAR.
2. I tried to add the <prefer-web-inf-classes> element within the WAR's weblogic.xml file and it doesn't seem to work. The web app is still using classes loaded in the EAR. This is consistent with my observation that the classloader for the WARs has the same hashcode as the classloader for the EAR - therefore I think they are using the same classloader.
I don't understand this behavior. I thought WARs are supposed to be using different/child classloaders from the EAR by default. Do I have to specifically declare my own customer <classloader-structure> within weblogic-application.xml in order to have child classloaders for the WARs within my EAR?
Thanks for any help.We are doing it currently as we are switching over from Exchange 5.5 to OCS. We set up a profile using the Oracle connector and then go into properties and add the Exchange account. We used this method to move files from the Exchange server to the Oracle server by having both profiles running.
-
Creation of war ,jar ,ear usign ant
HI,
I have a three portal project. using Jdeveloper i create a ear file for deployment. this ear contains adfm.xml in meta-inf and a war.
this war contain all three project java compile code and jsf/jsp stuff in webinf . In webinf lib folder apart from other jar files , it also create two jar of one of the two project and put in lib folder..
I want to do all the above steps using ANT...
i tried that , I compile all the java code and copy in location and copy other jsp/jsf tooo... and able to create a ear file containing war and jar...
the difference i m seeing which is actaully a issue is runtime creation of some files and modification of some files when we create ear from Jdeveloper , which is not happening with ant....
life adfm.xml which is found in all three project and while creatiing it ear using JD it merge all threee and put one in ear metainf folder ..
same for jar creation , jar-adf-config.xml,jar-connections.xml which is not a part of source code and generate at the time of jar creation using JD....
same for MANIFEST.MF,oracle.adf.common.services.ResourceService.sva for jar creation and AutoGeneratedMar in ear creation
I don;t know how should i create /update these files using ANT..
Can some body please help,sugesst..
thank
anagh
Edited by: Anagh on Oct 11, 2011 12:18 AMfor better understanding on ant script to create and manage all war ,jar and ear activities-
follow the below links -
http://biemond.blogspot.com/2009/04/weblogic-jdeveloper-ant-tasks.html
http://www.google.co.in/url?sa=t&source=web&cd=6&ved=0CEkQFjAF&url=http%3A%2F%2Fone-size-doesnt-fit-all.blogspot.com%2F2007%2F02%2Fjdeveloper-script-mastery-with-ant.html&rct=j&q=jdeveloper%2011g%20ant%20&ei=HgqUTuvfEJDrrQed4pW6Bg&usg=AFQjCNH5Qe3luLFtC9YeT1DfF8R0qVaUjQ&cad=rja -
Is it possible to install ODSI 10.3g as a web application via a WAR or EAR?
I only know how to install it from the single .exe that installs WebLogic and ODSI in one shot. My customer has an automated process for rolling out WebLogic servers and would like to know if ODSI can be installed from an EAR or WAR. Does anyone here know if that's possible? Have any hints on where to start looking for something like this?
Thanks.
Edited by: user10592709 on Oct 6, 2009 12:28 PMIt is difficult to respond to questions that ask how to implement a specific (impossible) solution, rather than ask how to fulfill a particular requirement (scripted install). Please visit the "How to Ask a Question" announcement in this forum if you want more on that.
ODSI does not specify how it is implemented (war, ear, extension to WLS), and therefore there is no documentation on the subject.
For installation options, please refer to the installer documentation. I suspect there is no documentation describing how to install ODSI without using the installer.
Is there some reason they are not using the silent installer and then a template? ( "Because they have built their own Opsware installer" is not an acceptable answer)
How does the Opsware installer work? If it leverages the WLS silent installer, then it seems obvious that changing it to leverage the WLS+ODSI silent installer would work. If it uses a zipped-up WLS installation (or template), then it seems obvious that changing it to leverage a zipped-up WLS+ODSI installation would work. There really aren't any other possibilities, are there?
It seems unlikely that Opsware scripts that install WLS would somehow start installing WLS+ODSI without being modified. I don't know why there is any expectation that they would. I don't know why there is resistance to modifying the scripts. These are really customer questions - not ODSI questions.
There is nothing stopping you or your customer from installing WLS, then installing WLS+ODSI beside it, then doing a 'diff', and then scripting the changes. Except maybe that the WLS+ODSI installer already does this, and then you wasted your time building something that already exists. -
Hello all,
I am having an ear having 2 wars.I need that the unique context for both war.I have heard context name are war level not ear level.
Is it correct?
If that is the case then can it be possible that if a.war nad b.war in an EAR then URL:
http://ip:port/a/x.html for a.war
http://ip:port/a/b/y.html for b.war
means context root in hierarchy of other wars context name.
Please helpHello,
Your problem looks very interesting. I have never done such thing. But still I have one idea, which might be helpful for you. You can use virtual host for a that means your urls will look like:
http://a:port/x.jsp
http://a:port/b/y.jsp
I don't think that context inside a context is possible.
If you elaborate more why you need such context settings then may be I can try to suggest better.
Regards
Rishi Dev [ http://www.nastec.biz/ ]
Maybe you are looking for
-
GenericSortFilter.xsl unable to filter data in inline transformation.
Hi, I am working on MII 12.0 I need to filter an xml output of transaction. So I am using the inline transformation. I am passing filter column name, filter column value, filter exp and filter type. But the data is not getting filtere
-
What's the best way to store movies?
Hello, I have burned almost all of my videos to the iMac, and subsequently to iTunes and Apple TV. I'm now running out of disk space on the iMac, no surprise. I have a cloud based backup system (not iCloud), but it's not fast enough to support actu
-
How do you make folders directly in your email on an iPad
How do you make folders in your email on an iPad 2?
-
:: No Mamiya ZD support in Aperture 2.0?? ::
Just tried apple's latest attempt at an imaging program and it still requires far too much power to run. If anyone from Apple reads this can you please explain why the Mamyia ZD is still not supported?? Looks like it's back to the Lightroom for me.
-
Update to latest version of OSX? But I meet the iCloud requirements!
According to this page it says "Make sure your Mac is running OS X v10.7.4 or later for iCloud." Well, I am using just that, 10.7.4. When I try to turn on Mail in iCloud in the Preferences (so I can setup an email address and check it from within Mai