Thread: Problem deploying tutorial application to standalone oc4j server


Permlink Replies: 2 - Pages: 1 - Last Post: Aug 14, 2008 2:08 AM Last Post By: user9529745
user9529745

Posts: 3
Registered: 08/01/08
Problem deploying tutorial application to standalone oc4j server
Posted: Aug 13, 2008 3:12 AM
Click to report abuse...   Click to reply to this thread Reply
I was advised to post my thread (http://forums.oracle.com/forums/thread.jspa?threadID=693624&tstart=0) in this forum as it is more relevant to Jdeveloper.

Hi.

We have Jdeveloper 10.1.3.4 running on windows xp and the standalone oc4j server 10.1.3.3 running on Solaris 10. I've just gone through the tutorial on deploying to a standalone oc4j server (http://www.oracle.com/technology/obe/obe1013jdev/10131/deployment/deployment.htm) and it all worked fine after I used Jdeveloper on Solaris to install the ADF runtime.

I just stepped through the tutorial to build a web app using jdeveloper (http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm) and it works fine on the embedded oc4j server in jdeveloper.

I tried to use the same techniques from the first tutorial to deploy this application to my standalone oc4j install on Solaris. I created the deployment project, created the .jar, .war and .ear and deployed to oc4j. This was successful according to jdeveloper but i get "500 internal server error" when visiting the page (http://oursite:8888/HR_EJB_App/faces/deptEmployees.jspx):

oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: javax.naming.NameNotFoundException, msg=HRFacade not found
at oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:177)
at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
at oracle.adf.model.BindingContext.get(BindingContext.java:457)

etc... etc...

I also noticed that when I started up my oc4j standalone server on Solaris I was given an error several times, seemingly for each class in my application:

bash-3.00# java -jar oc4j.jar
08/08/12 16:14:45 Java Accessibility Bridge for GNOME loaded.

2008-08-12 16:14:59.090 NOTIFICATION property toplink.server.platform.class.name is deprecated, property toplink.target-server should be used instead.
2008-08-12 16:14:59.830 WARNING oracle.classloader.util.AnnotatedClassNotFoundEx ception:

Missing class: datamodel.HRFacadeBean

Dependent class: oracle.toplink.essentials.ejb.cmp3.persistence.Persiste nceUnitProcessor
Loader: oracle.persistence:1.0
Code-Source: /export/home/OC4J/toplink/jlib/toplink-essentials.jar
Configuration: <code-source> in /export/home/OC4J/j2ee/home/config/ser ver.xml

This load was initiated at HR_EJB_AppApplication.root:0.0.1 using the loadClass( ) method.

The missing class is not available from any code-source or loader in the system. was thrown on attempt of PersistenceLoadProcessor to load class datamodel.HRFac adeBean. The class is ignored.

I'm sure this is a simple config problem but as I am very new to Oracle/JSF/ADF/OC4J I can't seem to find how to fix it. It is strange that it works on the embedded server but does not work when deployed to my standalone server. what do I need to change on the standalone server to get it to work?

It does look like it cant find any of the datamodel classes as I get "Missing Class: datamodel.XXXXX" for each class in datamodel. The JAR file has all the files checked in the "JAR deployment profile properties" so I'm not sure how to fix this.

thanks a lot,
James
Shay Shmeltzer

Posts: 9,964
Registered: 03/08/01
Re: Problem deploying tutorial application to standalone oc4j server
Posted: Aug 13, 2008 8:08 AM   in response to: user9529745 in response to: user9529745
Click to report abuse...   Click to reply to this thread Reply
Have a look into the EAR and WAR file you created and see if the missing classes are in there.
If not check that under project properties->dependencies the JSF project is dependent on the model project.
user9529745

Posts: 3
Registered: 08/01/08
Re: Problem deploying tutorial application to standalone oc4j server
Posted: Aug 14, 2008 2:08 AM   in response to: Shay Shmeltzer in response to: Shay Shmeltzer
Click to report abuse...   Click to reply to this thread Reply
The WAR file (for some reason 28mb) contains the "datamodel" folder within "classes" along with all the required .xml .class .dcs files.

The JSF project (UserInterface) is dependent on the model project (EJBModel) according to the "project properties->dependencies" page.

I tried adding in a class path to "ModelArchive.jar" during deployment of the EAR manually via the web interface and this seemed to fix a lot of the errors shown during deployment like:

Missing class: datamodel.HRFacadeBean

Dependent class: oracle.toplink.essentials.ejb.cmp3.persistence.Persiste nceUnitProcessor
Loader: oracle.persistence:1.0
Code-Source: /export/home/OC4J/toplink/jlib/toplink-essentials.jar
Configuration: <code-source> in /export/home/OC4J/j2ee/home/config/ser ver.xml

I still get a lot of other warnings such as:

com.sun.faces.config.rules.ConverterRule end
WARNING: ConverterRule{faces-config/converter} Merge(javax.faces.Short,null)

and then after these:

WARNING: Code-source /export/home/OC4J/j2ee/home/applications/HRapp/ViewArchive/WEB-INF/lib/oc4j-internal.jar (from WEB-INF/lib/ directory in /export/home/OC4J/j2ee/home/applications/HRapp/ViewArchive/WEB-INF/lib) has the same filename but is not identical to /export/home/OC4J/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in /export/home/OC4J/j2ee/home/oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader HRapp.web.ViewArchive:0.0.0.

I tried going to the page again and still get the 500 error. I did notice in my Solaris oc4j terminal when i visit the page i get:

NOTIFICATION oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
WARNING J2EE JNDI-00009 EJB Reference "ejb/local/HRFacade" could not be resolved. Allowing J2EEContext creation to continue anyway
ERROR Exception:

What is puzzling is that the "ERROR Exception:" line doesn't give any information. It just ends abruptly like that.

The application logs say the same thing:

oracle.jbo.JboException: JBO-29000: Unexpected exception caught: javax.naming.NameNotFoundException, msg=HRFacade not found

Why can it not find these classes? Why is it running fine on the Jdeveloper embedded oc4j server but not on my Solaris one?
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums