Unable to read a resources file from my page
Hi,
I am trying to read a file from the project resources and I can't have access to the physical file. I have the following code in my page:
javax.faces.context.ExternalContext ec = this.getExternalContext();
URL url = ec.getResource("/resources/displayPassengers.xsl");
InputSource inputSourceXSL = new InputSource(url.toExternalForm());
InputStream inpStreamXSL = null;
if (inputSourceXSL.getByteStream() != null) {
log("Loading xml file: " + url.toExternalForm());
inpStreamXSL = inputSourceXSL.getByteStream();
} else {
log("Unable to extract URL from Page context: WEB-INF/displayPassengers.xsl");
The url is not null.
The inputSourceXSL is not null and inputSourceXSL.getByteStream() is always null.
Please let me know how to access the file.
Rgrds.
this should work
InputSource inputSourceXSL = new InputSource(url.openStream());
Similar Messages
-
my adobe elements version 12 is unable to read the raw files from my canon camera 70D.
You need Camera Raw 8.2 or higher.
Elements 12 shipped with 8.1.
Click Help > Updates to update Camera Raw -
Unable to read a .gif file from a jar
I have made an application which requires some .gif images.
I packed all the classes and .gif's in a jar file.
I have used no package statement in files, all are in one folder.
While retrieving the .gif file from the jar I have used..
Image img1 = Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource("Lock.gif"));
ImageIcon i1=new ImageIcon(img1,"No Users");
but this does not works and throws nullpointer exception.
I have also tried getClass().getResource() etc.
But none of the methods are working..
Plz. help.
NimeshIs the class that is loading the image contained in a package? If the resource name does not start with a forward slash, it is interpreted as relative to the package of your class(when doing getClass().getResource())
-
Camera RAW unable to read Nikon NEF files from D3X
I have just purchased a Nikon D3X and unable to open the Nikon NEF files with Photoshop
Mac OSX10.4 Photoshop CS4
I contacted Nikon support & was advised to instal ACR 5.2
downloaded the update Camera RAW v5.2 and installed as instructed after removing old plug in & clearing cache. Still wont open NEF files
I note on the Nikon website that the cameras supported by Camera RAW include D3 but not D3X>Mac OSX10.4
Make certain that is OS 10.4.11.
>contacted Nikon support & was advised to install ACR 5.2
Some support!
As Jao said, you need ACR 5.3. -
Hi All,
I have a painful problem with Oracle 10g Webgate. I am using Oracle_Access_Manager10_1_4_3_0_linux64_APACHE22_WebGate to procted Apache resource. I have some problem in Custom Authentication plugin. which is not still resolve(https://forums.oracle.com/thread/2549716).
Now I have apply patch BP9 (Oracle_Access_Manager10_1_4_3_0_BP09_Patch_linux64_APACHE22_WebGate) for Webgate, Now I have a new issue, I am unable to get the logon page of OAM when I try to access my Apache resource.
The Error Message in the browser is:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (Oracle) Server at apache.tigerit.com Port 80
In the error log file of Apache I have found
[Sun Jun 23 11:53:17 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
[Sun Jun 23 11:53:17 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
[Sun Jun 23 11:53:20 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
[Sun Jun 23 11:53:35 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
[Sun Jun 23 11:53:35 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
[Sun Jun 23 11:53:35 2013] [error] [client 192.168.1.156] Oblix_OBWebGate_AuthnAndAuthz: Error: /opt/netpoint/webgate/access/oblix/config/oblog_config_wg.xml - Unable to read log configuration file.
Can Anyone help me regarding this issue...
Thanks
Tamim KhanHi Colin,
Thanks for your help, You are right I have change the permission of /opt/netpoint/webgate/access/oblix/lib/libxmlengine.so.
Now I am able to access the logon page of the access manager.
But the problem as I mention in (https://forums.oracle.com/thread/2549716) my ObSSOCookie value is still loggedcontinue.
My Authentication return (ExecutionStatus.SUCCESS) Successful from the Java Code , and I am unable to login in the application. The thing is I can't manipulate ObSSOCookie from Java code.
I have apply Patch 12363955 to resolve this issue. But this patch is now to resolve this issue.
Have you any idea how to resolve this issue.
Thanks
Tamim Khan -
Unable to pick up the file from Receive Location
BizTalk is unable to pick up the files from receive location.
My admin console is working so slow.
It is showing the problem of snap-in as follows:
I have checked all my receive location and its masking,it is working fine.
Actually it is working fine in dev server(snap-in problem is not occuring in dev server ) but when I import MSI and binding in UAT server.
It is not picking up the file from receive location.
I want to know one more thing :if my message box database is not working fine,will it receive the files from receive location.
PrakashFor files not received by receive location. If the Receive Location is still enabled but files are not processed by Receive Location, then check whether the host instance configured with your receive location is running. If the host instance is in
running state, restart the host instance and try.
Regarding the error in the admin console as shown in the image, people started to see this issue with admin console from BizTalk 2009 onwards. This happens in cases like you have done some activity with console and before its been refreshed it you do more
activities like expanding the node you will see this error. Sometimes WMI is bit slowly to refresh your admin console screen. Just wait for few seconds untill the WMI screen is rendered completely. Ensure you have all the cumulative updates installed for your
version of BizTalk and also ensure the service pack for your OS is updated.
Obviously if message box is not working, files will not be received/processed. But if message box is not in healthy state this would affect all other application not just one and in-fact it would affect entire BizTalk not just Receive Locations.
To start analysing this file not been processed by Receive Location, start with checking the host instance as mentioned.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Problem in reading a resource file form JAR
Problem in finding a resource file from the jar.....
I have my code in the following directory structure
rootDir -
libDir -
XMLEntities.res
modelDir -
File1
File2
File3
Step1 - I create a jar file with root as modelDir and with all its files.
Step2 - I add XMLEntities.res also to the root of the jar
If I run my application using
java -classpath ;C:\aip_build\build_dm\rmi_server_files\dm.jar; model.data_model.ActivateDataManager
My application which uses Xalan.jar (lyong under ext directory in jdk) does not find XMLEntiries.res.
If I use my application as under without creating jar my application does find XMLEntites.res
Can anyone tell me why the application can not find the XMLEntities.res inside jar?Sorry I missed one line............
Problem in finding a resource file from the jar.....
I have my code in the following directory structure
rootDir -
----libDir -
--------XMLEntities.res
----modelDir -
--------File1
--------File2
--------File3
Step1 - I create a jar file with root as modelDir and
with all its files.
Step2 - I add XMLEntities.res also to the root of the
jar
If I run my application using
java -classpath
;C:\aip_build\build_dm\rmi_server_files\dm.jar;
model.data_model.ActivateDataManager
My application which uses Xalan.jar (lyong under ext
directory in jdk) does not find XMLEntiries.res.
If I use my application as under without creating jar
my application does find XMLEntites.res
java -classpath
;C:\aip_build\build_dm\rmi_server_files\;C:\aip_build\b
ild_dm\rmi_server_files\lib
model.data_model.ActivateDataManager
Can anyone tell me why the application can not find
the XMLEntities.res inside jar?try loading the resources as a InputStream
something like :
InputStream is = NameOfLoadingClass.class.getClassLoader().getResourceAsStream("XMLEntities.res");
Hope this might help you in some way. -
"Error: Final Cut Pro was unable to read the movie file just captured"
Hello everyone!
We had a computer crash while we were working on Final Cut Pro and backing up some media to a hard drive.
Since then, whenever we "capture' video footage and hit the escape key to stop capturing - we get -
"Error: Final Cut Pro was unable to read the movie file just captured"
We reinstalled the Final Cut Pro software all over again thinking that maybe the software got corrupted and we also rectified any disk permissions for the hard drives.
Any ideas?
Thanks
Efrain
G 5 Mac OS X (10.4.8)We had a computer crash while we were working on Final Cut Pro and backing up some media to a hard drive.< </div>
You eventually want to figure out how that happened and make sure you fix it.
Since then, whenever we "capture' video footage and hit the escape key to stop capturing - we get -
"Error: Final Cut Pro was unable to read the movie file just captured"
<
You reformatted the external drive, yes? You might not have used the correct initialization setting. Should be Macintosh HFS, journalling is optional. Or you have a drive formatted for Winderz.
Aside from incorrect drive formatting, we have seen this error if the capture is incomplete or improperly terminated.
It's not an FCP issue, it's hardware.
bogiesan -
Unable to read software component version from System Landscape Directory "
I've worked in past creating/importing SWCV, but this is new system PI7.0 and stuck.
A) Is my understanding on resolution correct?
Should I go and apply notes 940309 and create client copy of existing client 001
OR
change role of client 001; SXMB_ADMIN -> 'Integration Engine Configuration' to 'Integration Server'
I have no problem in using client 001 as Integration server, all I want is import of SWCV to work. Thanks. Appreciate the help.
B) Here is what I have done and the error:
1) Followed weblog below and created product, software component, technical system, business sytem in SLD.
/people/srinivas.vanamala2/blog/2007/02/05/step-by-step-guide-xml-file-2-xml-file-scenario-part-i
2) When I import the SWC from integration repository getting error
(Unable to read software component version from System Landscape Directory "server:5<system number>00").
C) Pointers used from the forum to debug the issue, but still no luck
Below are the points checked from the forum and all steps are correct, but still have issues with the import
1) check the RFCs SAPSLDAPI, LCRSAPRFC, connection test pass as the program ID registered with Jco
2) T-code SLDCHECK no errors (followed http://help.sap.com/saphelp_nw04/helpdata/de/78/20244134a56532e10000000a1550b0/content.htm)
3) T-code SLDAPICUST got user PIAPPLUSER, pwd is correct (reset the pwd)
4) logged using PIAPPLUSER http://server:port/sld and it works
5) One of the weblog SLD Check Failed (LCR_LIST_BUSINESS_SYSTEMS function doesn't work) referred to apply notes 940309
Notes: 940309
You are installing 'SAP NetWeaver 2004s SR1 ABAP+Java' Usage Type 'NetWeaver Process Integration (PI)'.
You don't want to use the default client 001, but another client as Integration Server.applied portion (PIPostInstallProcess) of OSS notes 940309 and it resolved.
Note:
I still retained client 001 and didn't do client copy as mentioned in the notes. The wizard based CTC tool helped. Here are the details if someone has similar issue and want to know further details:
A NetWeaver Process Integration (PI) Installation (ABAP+Java) has two parts: Installation and configuration. The former is done by the Installer, the latter by the 'Central Template Configuration' (CTC) Tool.
http://help.sap.com/saphelp_nw04s/helpdata/en/14/39084136b5f423e10000000a155106/frameset.htm
1. Call the wizard-based configuration tool as described in Configuration Wizard.
2. Select the scenario PI and the task PIPostInstallProcess.
3. Choose Execute.
A list of the steps to be executed by the wizard is displayed.
4. Choose Install. -
When I load Illustrator creative suit (5.5) on my new computer, it loads Then I put in the serial number, which is correct, but when i go to click on the program to use it it says ERROR: localized resource file from this program could not be loaded. please re install of repair the application and try again. I have done this and it's still not working
anomaly jade,
You only need to use the serial number during installation.
Have you, at least seemingly, been able to install, and then you are unable to start up?
If that is the case, you could try to reinstall using the full three step way:
Uninstall, run the Cleaner Tool, and reinstall.
http://www.adobe.com/support/contact/cscleanertool.html -
Unable to install "InstallESD.dmg" file from OS X Mounstain Lion?
Hi,
Unable to install "InstallESD.dmg" file from OS X Mounstain Lion, i've downloaded OS X Mavericks and installed on other machine. However, i took backup of "Show Package Contents" before installing.When i try to install ""InstallESD.dmg" file some other Mac machine. When i double click on it its open Packages folder instead of installer.
Please suggest me, how can i install OS X Mavericks for My Mac machines.
Thanks in Advance,
Suresh Balakrishnan.Unfortunately with OS X Mavericks you can't use the InstallESD.dmg file as an installer. You have to use either DiskMaker X 3.0.4 or Mavericks Bootable Disk Creation Tool or do an Internet search for the Terminal command that can be used to create a bootable Mavericks installer on an external drive (e,g, USB thumb drive).
You will need the Install OS X Mavericks.app from the Mac App Store to use with all of the above solutions. -
itunes unable to read/locate music files as they have been converted to HP Connected Music files - can anyone assist ?
You need to associate your music files to iTunes instead of HP.
Control Panel
Programs
Default Programs
Set Associations
Double click on the relevant item and select iTunes from the list. -
Hi
We are having trouble storing inventory scans from some workstations.
We have a windows ONLY environment, with middle tier servers. (ZEN65SP1,
W2KSP4).
Some workstations are storing fine. The Storer function is working and we
can see the storer functions for the 'good' workstations in the Inventory
service window.
However some workstations can't store to the inventory db, but DO populate
eDir ZENworks inventory 'minimal information' but show "Scanner(Warning) :
027: Unable to read the sequence number from the Workstation object." in
the Scan Status...
The Inventory service window shows no attempt by these workstations - it's
almost as though the scan file is not arriving (though eDir knows/displays
the scan file name)
How does the workstation access the scandir in Windows only/middle tier
environment? Does the scan xml stream get sent to the MT via http and then
on to the scandir via CIFS?
Any suggestions/explanations welcome!!
Many thanks
DavidDavid,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
- Check all of the other support tools and options available at
http://support.novell.com.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://support.novell.com/forums)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://support.novell.com/forums/faq_general.html
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
027: Unable to read the sequence number from the Workstation object
Environment:
NW 6.5 sp4
Zen 6.5 sp1
We had a problem with our inventory server processing .STR files a couple
months ago - had to turn off inv. policies on workstations while we resolved
it. Now it's resolved and we're running inventory again. We have a large
number of workstations reporting this error:
027: Unable to read the sequence number from the Workstation object
They have no data in the DB, although they do have minimal scan info, and
the last scan status date matches that of the sequence number error.
I've seen this sporadically in the past and have been able to resolve it by
initiating a full scan on the individual workstation. However, that does
not seem to be making a difference this time.
Novell's troubleshooting document basically says see if the server's
running, and see if there's data for the workstation in the db. Then call
tech support.
Any other ideas?
~~~Nicoya...Jared wrote:
> Nicoya Helm,
>
>> 027: Unable to read the sequence number from the Workstation object
>
> I am thinking that this can also mean a previous full scan was not
> found. Or maybe the STR file name is bad.
>
> This information is stored here
> HKEY_LOCAL_MACHINE\Software\Novell\Workstation
> Manager\InvScanner\"STRFileName"
The machines I'm troubleshooting have valid formats for their STR names,
but that doesn't necessarily mean they are valid STR sequence numbers.
Does removing the value in the reg key cause the STR file name to be
recreated?
>
> Because imaging is used, it's possible that this information is matching
> on some machines which could cause problems.
I've verified that none of our images contain the c:\zenworks history
folder, and we run a script that cleans up any zenworks items before
sysprep (i.e. makes sure there's no registration info on the
workstations, etc). Our imaging scripts also clear any ZIS info to
avoid any duplication as well, so I don't think imaging would be causing
this.
> I believe 6x also has a hist.ini file like 3x inventory does, you might
> delete the file also.
Good tip about the hist.ini file, I didn't know about that. It does not
solve the sequence number error, but it does seem to force a full scan
of the system and cause the new scan to be stored in the DB, which was
not happening before.
Thanks! -
Issue with reading a xml file from xsl
Hi,
When I am trying to read a xml file from xsl, I am getting unwanted output.
Following is the XSL:
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="XSD">
<schema location="../xsd/B2BMarketProperties.xsd"/>
<rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
</source>
</mapSources>
<mapTargets>
<target type="XSD">
<schema location="../xsd/B2BMarketProperties.xsd"/>
<rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
?>
<xsl:stylesheet version="1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns0="http://www.example.org"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:med="http://schemas.oracle.com/mediator/xpath"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
<xsl:template match="/">
<ns0:ReceipentIDType>
<xsl:for-each select="$ReceipentID">
<ns0:ReceipentID>
<xsl:value-of select="$ReceipentID"/>
</ns0:ReceipentID>
</xsl:for-each>
</ns0:ReceipentIDType>
</xsl:template>
</xsl:stylesheet>
Following is the XML ( B2BMarketProperties.xml)
<?xml version="1.0" encoding="UTF-8" ?>
<ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
xmlns="http://www.example.org">
<ReceipentID>123</ReceipentID>
<ReceipentID>345</ReceipentID>
</ReceipentIDType>
The output i am getting with this code is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
<ns0:ReceipentID>123345</ns0:ReceipentID>
</ns0:ReceipentIDType>
But, I need output in the following format
<ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
<ns0:ReceipentID>123</ns0:ReceipentID>
<ns0:ReceipentID>345</ns0:ReceipentID>
</ns0:ReceipentIDType>
Could you guys let me know what i am doing wrong. Any help would be appreciated.
Thanks,This worked for me :
<xsl:template match="/">
<ns0:ReceipentIDType>
<xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
<xsl:variable name="count" select="position()"/>
<ns0:ReceipentID>
<xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
</ns0:ReceipentID>
</xsl:for-each>
</ns0:ReceipentIDType>
</xsl:template>
Maybe you are looking for
-
Download Helper Screen Capture worked to capture video if the default "no audio" option is active. But, no audio. The "speakers" or "microphone" audio options are confusing....the audio to be captured is from the video, so what do you choose? With ei
-
Invoice Payment Using Current Day's Exchange Rate
Hello, The currency of our Mexico company code is peso. Sometimes, they enter invoices with a document currency of US dollar. The invoice will pick up the exchange rate applicable on the posting date of the invoice. So far, so good. On the day of pay
-
Why do we do this to our selves? Having thought that this was a great move this has now made me wish i never heard of OS Lion. Its pants taking away CS2 photo shop and now all i want to do is revert back to how i was how the **** do i do this? And if
-
Hi, I need to add a new button in the extended search functions tab in RMWB transaction. When you run tansaction RMWB the initial screen will come with Recipe,Substance, Packaging, Material & Favourites in the navigation area of the screen. And when
-
IPhoto Mac and PhotoStream on iOS7
My friends and I just came back from a vacation trip. We all have iPhone's, and created a shared photostream (iOS7) so we all can add our photos to one place. I would like to use iPhoto on my mac to create some photo books, presentations, etc. But