Another file browse issue - ORDS, SODA & JSON in the Database

Hi! Searched through Known Issues but haven't found anything like this:
Apex Listener 1.10.179.10.43. Tested on both Tomcat and Glassfish.
My Apex 3.2 application works with russian-language DB, so all pages are with cyrillic chars.
Initially all pages display fine in utf-8.
But when I try to submit page with File Browse Item in it, the encoding of all subsequent data posted or fetched from DB is in wrong character set (cp1251 instead of utf-8).
If I submit normal page with text items and cyrillic data all workes fine, but not when there's File Browse(
I've tried to fix it with filter (described in Re: Accentuated characters problem but no success(((
Any suggestions?? 

solved with setting Server java parameter
-Dfile.encoding=UTF-8 

Hi,
sorry for asking but ... how exactly did you do this? 

Hi,
just pass the parameter along with the start of the JVM. If you use the standalone mode to run the APEX Listener, you could simply type
java -Dfile.encoding=UTF-8 -jar apex.warIf you plan to deploy the APEX Listener to an existing J2EE Container, you may change the parameters for the JVM that container is started with. Where you may change it depends on the J2EE Container you use (OC4J, WLS, GlassFish, Tomcat, ...).
-Udo

Related

Servlet running problem

Hi, I'm new to servlet. I implement a very simple Hello World program and compiled without any error. Then run it in Tomcat 4.1 server (W2k) in my own laptop using localhost:8080/testing/indexpage. It's shown in my IE 6.0 browser. However, when I modify the servlet and compiled it, I got the same result of my previous servlet. I have to stop and start my Tomcat 4.1 to see the new result each time I modify the servlet. Would anyone help me to solve this problem? 
Hi,
Refer the following link
http://forum.java.sun.com/thread.jsp?thread=299942&forum=33&message=1188459
-Amol 
Automatic servlet reloading is disabled in Tomcat by default.
Open the <tomcat>/conf/server.xml configuration file and insert the following instruction:
<DefaultContext reloadable="true"/>
Put this instruction before the first <Context> tag. 
Just a warning to be careful when using this approach.
We use a well-known text index software vendors product which requires a WIN32 or Linux native library. If you don't stop and start the Tomcat container, you get 2 instances of the libraries loaded and that causes the webpages to crash if used.

no images when using Embedded Web Container

followed the instructions ..
http://rangers.au.oracle.com:8081/i/oracle.gif shows the Oracle gif ok but http://rangers.au.oracle.com:8081/apex/f?p=4550:1 has nothing.
Same APEX install is working fine for the PL/SQL Gateway http://rangers.au.oracle.com:8080/apex/f?p=4550:1
used java -Dapex.port=8081 -Dapex.images=/u01/app/oracle/product/11.2.0/dbhome_1/apex/images/ -jar apex.war to start the listener
I've installed jdk-6u24. how do I tell if the machine satisfies the 'Java Servlet Specification 2.3 or higher' requirement .. if it doesn't what do I need to do to get that fixed? .. are there any ENV settings required? 
Hello Adam,
the required version of the Java Servlet Specification concerns the implementation within the J2EE Container you use. Since you chose the embedded Container that ships with the APEX Listener, this requirement is (obviously) fulfilled.
If the oracle.gif is served correctly, you probably have an error in your APEX Listener configuration. Are you able to run http://rangers.au.oracle.com:8081/apex/listenerConfigure or if you've already done that, are you able to grab a look into the error log provided in +/apex/listenerAdmin+ below the "Status" tab? Or do you see any stack trace or error message in the console output of the Listener?
-Udo 
Hi .. the only error msg I can find is HTTP Status Code: 404 Requested url http://rangers.au.oracle.com:8081/apex/i/apex_version.txt is not allowed. which I got when I first tried to view a file in the images directory .. I created that txt file .. obviously something wrong with that as the .gif files in the same directory displayed fine when I use the http://rangers.au.oracle.com:8081/i/vertical_bar.gif method ...
I checked the output being generated in nohup.out .. nothing in there that indicates a problem with images ..
are there any other log files?
btw, this is the version 1.0 I'm trying to get going 
Does the nohup.out hint on any other error, any repeating message?
The Listener really should work if you actually followed the instructions of the APEX Listener Guide and the APEX Installation Guide (concerning installations with APEX Listener: http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#BABJJAGF ). If everything is setup as described in these documents, the only reason I could currently think of would be a network issue, e.g. the Listener's host does not allow connections to the database host and port you configured.
-Udo 
ok .. got it going ..
looks like the images directory I originally referenced was not up to date. It was sitting under the DB11GR2 home .. I guess its the one that comes with that DB version. I had been using the pl/sql gateway and so the images had been uploaded into the XML DB repository when I installed 4.0.1
I deleted the DB11GR2 images directory and copied the new images directory from the 4.0.2 patch ... it all worked after that.
So the interesting thing is that I had created an images directory where the APEX_Listener was installed and when I started the listener I pointed to that directory. The Listener still looked at the DB11GR2 image directory .. which was ok when I copied the images over to it .. here are the two startup commands I used .. one worked, the other failed .. even though they both have the same image files ..
java -Dapex.port=8081 -Dapex.images=/u01/app/oracle/product/apex_lsnr/images -Dapex.erase=true -jar apex.war
rm -rf /u01/app/oracle/product/11.2.0/dbhome_1/apex/images
cp -r /u01/app/oracle/product/apex_lsnr/images /u01/app/oracle/product/11.2.0/dbhome_1/apex
the I refreshed the browser and it worked ..
(could it be ignoring the -Dapex.images or perhaps is the images directory location stored somewhere and not erased .. clutching at straws here to explain it .. ) 
The Embedded Container maintains a property file named apex.properties in the config folder that records the location of the images file (so that it doesn't prompt you for this location repeatedly), remove this file if you change the location of your images folder. 
AdamC wrote:
(could it be ignoring the -Dapex.images or perhaps is the images directory location stored somewhere and not erased .. clutching at straws here to explain it .. )I had to setup a new environment for testing the new XE 11.2 beta with the current APEX Listener release and made a typo in the parameter for apex.images at the first start of the Listener. Unfortunately, the correction in the command line didn't change anything in the result - the images weren't displayed. Only after deleting the properties file (or editing the value in that file), the Listener referenced the corrected location.
#Colm: Is that the intended behaviour or a bug? I expected that the command line argument would overrule any previous setup, but apparently that's not the case. It would be desirable to have some console output telling me that my parameter had been ignored and the previous setting from apex.properties is effective.
-Udo

How to change apex-listener.xml directory using container start options?

The option suggested in the thread Re: Change the APEX listener URL (second post by Udo) looks attractive, but, not being Glassfish pro, I don't know how to do it.
Can anyone indicate in which succession of Glassfish menus should I go to evoke -Dconfig_dir=... parameter?
I run Apex Listener 1.1 on Glassfish 3.1
Igor 
Hello Igor,
the parameter -Dconfig_dir= is an option for the JVM, used similar to a shell environment parameter.
You can set this parameter for GlassFish by editing the startserv.bat or the startserv shell script, depending on the OS you use.
Note that you could use any name, as config_dir is a arbitrarily chosen name for the parameter that I introduced for the config file.
-Udo 
Thakn you very much, Udo!
Igor

Cannot Login to APEX

Dear all,
I success to configue our APEX and APEX Listener on Standalone Mode ( APEX and Apex Listerner is in the same maching)
Anyway, I need to separate APEX and APEX Listener to other machine.
I already follow the step to install APEX Listener on new machine, everything is fine , I can configue listener connection ( http://localhost:8081/apex/listenerConfigure ) .
The problem is when I access the apex page such as http://localhost:8081/apex , I cannot be able to login, after I click connect , it seem like no thing happen.
I also tried to do not fills both namespace username/password and then click login, result is the same , nothing happen .
Any suggestion for this case?
Regards,
zenoni 
Hello zenoni,
I also tried to do not fills both namespace username/password and then click login, result is the same , nothing happen .Do you receive any error output on your console?
Did you configure the static contents ("images direcotry") on the new machine correctly?
-Udo 
Hello Udo,
For the static contents ("images direcotry") , I configure with this step.
1. create and move images folder to the same path with the old machine.
2. use old script for starting my apex listener to connect to old apex engine on old machine.
I do not receive any error output on my console, but I got the error about javaScript For example
Message: 'jQuery' is undefined
Line: 1
Char: 85
Code: 0
URI: http://newServer:8081/i/javascript/apex_4_0.js
Message: Object doesn't support this property or method
Line: 1
Char: 47228
Code: 0
URI: http://newServer::8081/i/javascript/apex_widget_4_0.js
Message: Object doesn't support this property or method
Line: 1
Char: 27067
Code: 0
URI: http://newServer::8081/i/javascript/apex_4_0.js
zenoni 
Sounds like you have an outdated version of jQuery in your images path. This indicates that either something went wrong during your copy, e.g. you copied the wrong images, or you connect to a different instance using a different (probably more recent) APEX version.
Could it be you actually didn't use the APEX Listener but the Embedded PL/SQL Gateway served by the database internal web server (XDB HTTP Server), so you would have had the same problem on the old machine?
You could try to download the installation package for the exact APEX version you have installed in your database instance and take the images directory out ouf that package to make sure everything fits perfectly.
-Udo 
Hi Udo
I used the same version for both new and old machine because I copied from the apex_4.0.2.zip and apex_listener.1.1.2.131.15.23.zip from old machine.
And I do not have the same problem on the old machine.
zenoni 
I have some questions.
In case that I want to separate the apex listener and apex, Should I install any j2ee application server to new machine ?
Now, I just unzip the apex listener on the new machine and move the image directory to the same pattern floder and then use the same start script in the old server.
java -Dapex.images=/apex/tmp/apex/images -Dapex.port=8081 -Dapex.erase -jar /apex/apex.war
zenoni 
Hi zenoni,
I used the same version for both new and old machine because I copied from the apex_4.0.2.zip and apex_listener.1.1.2.131.15.23.zip from old machine.That's odd. The error message really indicates that you have some problem with the images. Could it be the some files aren't readable for the user that runs the APEX Listener? Or could it be you copied a subdirectory too much?
In case that I want to separate the apex listener and apex, Should I install any j2ee application server to new machine ?For production use of the APEX Listener, it is always recommended to use a JEE container. The Standalone Mode is aimed at development use...
java -Dapex.images=/apex/tmp/apex/images -Dapex.port=8081 -Dapex.erase -jar /apex/apex.warIf you always set apex.erase you have to reconfigure the APEX Listener every time. I assume you use it just for the first startup, right?
Either way, you should also set apex.home and let it point to a persistent directory. The default directory is located in the users TEMP, in your case probably +/tmp/apex+ , so it's likely you'll lose your confguration unexpectedly.
-Udo

Apex Listener Setup Issues

Hi,
I'm hoping someone can help with setting up the listener for my APEX installation.
I have APEX 4.2 running on an 11g database, and can access the application directly, no problems.
I've set up the listener running standalone on my windows machine, I get the following results.
Go to http://localhost:8085/apex/
Browser goes to http://localhost:8085/apex/f?p=4550:1:5614682097186 and displays a blank page
Go to http://localhost:8085/apex/f?p=100
Browser goes to http://localhost:8085/apex/f?p=100:LOGIN:14764949035472 which is our application's login page.
The page is displayed, but it looks like the theme is not applied, white background etc, but it does contain the logo images which are defined on the page.
The login button/link does nothing, and I can't get any further.
Firebug reports the following error when attempting to login
ReferenceError: apex is not defined
The HTML for the button is as follows:
<span>OK</span>
So, what I need to understand is:
1: Why is the default URL going to somewhere that doesn't load a page?
2: Why, when I manually go to an actual page does it load without a theme?
3: Why can't I log in? I'm suspecting a missing javascript file, probably related to question 2 here.
Is there any way I can enable some more logging on the listener to help try and figure this out.
Many Thanks
Jas 
Hello, and welcome to the OTN forums,
Browser goes to http://localhost:8085/apex/f?p=4550:1:5614682097186 and displays a blank pageThat's usually the case when you didn't configure your APEX "images" (static contents) properly...
Did you setup your APEX Listener to use the images that where provided by the APEX installation package for your APEX 4.2?
1: Why is the default URL going to somewhere that doesn't load a page?The page is usually loaded, but you don't get usable content because your static contents can't be served as needed, so you miss all css, js, images and stuff needed to render your page. Take a look at the page source (contents) - you'll probably see more than you have on your screen.
2: Why, when I manually go to an actual page does it load without a theme?
3: Why can't I log in? I'm suspecting a missing javascript file, probably related to question 2 here.It is related: It's because the static contents for the theme is not there. (see above)
Is there any way I can enable some more logging on the listener to help try and figure this out.I guess you won't need to.
-Udo 
Hi,
Thanks for the detailed reply.
Can you tell me how I can get the static content from the database server?
We have some custom themes used in our application, so I'm assuming the best way to get these is to get the current set of files from the server.
I've tried getting the directory $ORACLE_HOME/apex/images and passing the path to a local copy of this directory to the standalone listener, but I get the same result.
Many Thanks
Jas 
Are you missing this step?
     
.) Move the images:
          Still connected as SYS/SYSDBA at /tmp
          Run apex_epg_config.sql ( SYS as SYSDBA )
          SQL> #apex_epg_config.sql /tmp 
>
Can you tell me how I can get the static content from the database server?
We have some custom themes used in our application, so I'm assuming the best way to get these is to get the current set of files from the server.
I've tried getting the directory $ORACLE_HOME/apex/images and passing the path to a local copy of this directory to the standalone listener, but I get the same result.Your question can be answered easier if you knew where your current web "static files" are located.
If you are currently using EPG (embedded PLSQL gateway) - the apex files can be loaded into the DB with the script BillC.
If your "CUSTOM THEMES" had static files you (or your team) personally uploaded, to the EPG (XMLDB) static files, you can get them back, but may also have them off line.
More likely - you just need the IMAGES directory from the APEX installation (not the apex listener).
Assumption - you are trying to run the listener in STAND ALONE  (test mode).
If you try to use the $ORACLE_HOME/apex/images syntax, my guess would be that it won't understand the $ORACLE_HOME substitution at runtime. Use the whole path.
Regards
-- Tim St.

Categories

Resources