How to run war file using oc4j

hi to all..

i'm new to oc4j .. i used to work on tomcat..

i deployed the war file and all i have to do is to run the app. but i guess oc4j has different way in this ..

you may say google for it, or read the oc4j tutorial i read it before but i just can't understand it..

somebody pls can expalin the way simply...

[346 byte] By [QussayNajjara] at [2007-11-27 11:38:28]
# 1

At the OC4J main page [1] I can find a descriptive HOWTO [2], having a Servlet section [3]. Don't you even understand it? What exactly don't you understand?

[1] http://www.oracle.com/technology/tech/java/oc4j/index.html

[2] http://www.oracle.com/technology/tech/java/oc4j/11/how_to/index.html

[3] http://www.oracle.com/technology/tech/java/oc4j/11/how_to/how-to-web-servlet-intro/doc/how-to-web-servlet-intro.html

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

>Don't you even understand it?

no one is allowed to speak to me that way .. what were you thinking of when you wrote this..

The Source for Sun Developer Solutions

this is the title of this whole forum.. we are here not to tease each other, just to help if we know..

you didn't like the question, you just pass it, ignore it, and read another one, ok..

please, don't think that you're mr.perfect and that you know the hell everything ...

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Chill dude. Just tell what exactly you don't understand and which step is failing, then we can help you further.

I have never said that I know everything, but I can find almost everything using just Google.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

it's ok ..

really i use google alot..

the thing man is that my english is not that well and i'm hardly managing it...so that's why i always ask for simple answers..

my question here is that i need 1,2,3,... steps that can help me in running my application, and i just can't find that simplicity with the oracle site or any other site,,

so if you can help pls..

before when i used to run my app on tomcat, all i used to do is to put the war file in the webapp folder and then open an explorer window:

http://localhost:port/appname

but sure here with oc4j is different and i just can't find the way..

again excuse my anger..

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

If you find English hard to understand, try to find someone who can translate the link behind [3] to your native language. Especially the part "How to Build the Application?" is all what you need to know.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

as i understood from the site:

that there's three enviorment variables to be created :

JAVA_HOME, ORACLE_HOME, (web-app-name)_HOME

i created them, and started oc4j container correctly...

after that i understand that i should go the explorer and reach the app at its root and the index.html will work (or the sat welcome-file page)

and i'm trying that but it's just not working...

the next error is appearing ...

2007-07-26 11:28:23.453 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page

: Exception:oracle.jsp.parse.JspParseException: /Timing/timesheetmain.js

p: Line # 4, <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

Error: "http://java.sun.com/jsf/html" is not a registered TLD namespace.

am really confused and i need to work it today, my manager wants the project tomorrow..

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7

You're using JSF?

That error message means that the given taglib cannot be found in the classpath of the running environment. If it is actually present, then there may be a version conflict.

Please list here the JAR's from WEB-INF/lib and <OC4J_HOME>/lib.

You need at least jsf-api.jar and jsf-impl.jar in the WEB-INF/lib to fix those errors.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

yes i'm using JSF,

i'm working on JDeveloper 10.1.3 and the oc4j inside jdev is working perfectly with the project..

but now i got oc4j 10.1.3 alone to put it on the server and run the application from it..

so how the version conflict happening ?

the JAR's i have in my WEB-INF/lib are:

commons-beanutils.jar

commons-collections.jar

commons-digester.jar

commons-logging.jar

commons-logging-api.jar

jsf-api.jar

jsf-impl.jar

jstl.jar

so, what is next...

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9

after adding the libraries to the (ORACLE_HOME)/lib and to WEB_INF/lib

and now i'm having a new error

500 Internal Server Error

Servlet error: An exception occurred.

The current application deployment descriptors do not allow for including it in this response.

Please consult the application log for details.

any information what this might be.

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 10

Please consult the application log for details.The cause is in there.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 11

in the oracle web site they said that this problem happens when you use standalone oc4j after doing you project on jdeveloper, just like i did,,and they said that there's three workarounds for this..

1- Use the separately packaged standalone OC4J

2- Stop and restart the server

3- Set jsp-cache-tlds=false and redeploy again

well the first two i understand and did..

but what is the third one...

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 12

Don't do that if you don't know the cause.

Or do you? Please post it here.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 13

the reason is a NullPointerException this is what was written in the log file...

and while i was searching for this error i found that someone before had the same problem and he wrote:

"the problem was jar directory I wrongly added, I removed it and it works fine!"

he didn't say what this jar file is .. and i don't know what is this jar...

QussayNajjara at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 14

I see.

http://forums.oracle.com/forums/thread.jspa?messageID=1963262

Start removing the commons-logging-api.jar from WEB-INF/lib as well as the appserver/lib and see if it solves the problem. This JAR is in facto unusual.

If it doesn't solve the problem, remove any commons JAR from the appserver/lib (but not from the WEB-INF/lib) and try again.

BalusCa at 2007-7-29 17:20:22 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 15

two things...

which WEB_INF/lib i should delete from ...

MyProject/WEB_INF/lib

or

OC4J/WEB_INF/lib

and the second thing.. can you tell me please what is this appserver/lib

i couldn't find it..

QussayNajjara at 2007-7-29 17:20:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 16

It's the /lib directory of the application server's root where you also have put those JAR's. You alteady have mentioned that it is ORACLE_HOME.

BalusCa at 2007-7-29 17:20:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...