ReadOnly files in iFS
Hi Folks,
I just installed and using iFS 9.0.2.1.0 on Windows platform. users experience their files read-only sometimes and could not work with their files.
they use mapped-drive into iFS as their storage device.
iFS installed on Oracle 9i Relase 2 database.
Regards,
*
Hi Matt,
All users connected as authenticated domain users.
Database server and Application server computers are members of domain and also users' computers.
each user must login into domain and use a network drive that mapped into iFS on Application Server machine.
Regards,
*
Similar Messages
-
How to call jsp in PLSQL code (to upload a file in IFS)
Hello,
We develop our PORTAL (9.0.2) with PL/SQL way.
We want to make a form to upload file in IFS.
We create a form like that :
htp.formOpen(cmethod =>'post',
cenctype => 'multipart/form-data',
curl => '/pls/ptlcollab/ptlcollab.GestionDoc_screenbuilder.manipTableIFS',
cattributes => 'name="ifs"') ;
htp.TableData(htf.FORMFILE(cname=>'file', cattributes => 'size="25"')) ;
The manipTableIFS procedure calls a loaded java procedure which called a servlet which work with IFS.
BUT, modplsql seems to want we directly upload the doc in a table but we want to upload the doc in iFS !!!
So, the solutiuon seems to call a jsp (or a servlet directly from our plsql code).
BUT, how could I do that ???
Any help would be greatly appreciated.
Regards.
Luc.Something along these lines ought to do what you want:
<html>
<body>
<form name='foobar' action='foobar.jsp'>
<script language='Javascript'>
function askim() {
if (confirm('Is you sure?')) {
document.foobar.submit();
} else return false;
</script>
<input type='button' value='Submit' onClick='askim()'>
</form>
</body>
</html>
Your mileage may vary.
But the idea here is that the Javascript merely submits the form if the user clicks "OK" on the confirmation pop-up. Otherwise, nothing happens. The form is submitted to a JSP file which accepts the request, does something (such as call your Java class), then prints out some HTML in response. -
Direct access to a file in IFS from Portal using SSO
Hi,
we need to be able to access a file in IFS directly from a link in Portal using SSO.
I take it is possible. Has anybody done it? Any tips?
thanks,
IngaHi,
If u want to increase the speed of reading then u can try this.
If each line of the file is almost the same length then u can fix a particular size for each record.
For example each record will occupy 50 bytes. If u want to access the 10th record u can just use skip method to skip 450 bytes and read 50 bytes from that location.
In this method there will be wastage of space, but memory consumed when running the app will be less since u dont store full content of the file in memory(vector) -
Does anyone know how I would programmatically move a file in ifs from one folder into another. Would it be done with the use of Library objects?
Here is conceptually how to do what you're asking. You have to provide a bit more, like establishing a connection to iFS, finding the file you want to move and the source and destination folders (perhaps by path or with a search):
// connect and get initial items
LibrarySession session = obtainSession();
Folder source = getSourceFolder();
Document file = getDocumentToMove();
Folder destination = getDestinationFolder();
String newNameForMovedFile = determineNewName(file);
// using ADK FileSystem class:
IfsFileSystem ifs = new IfsFileSystem(session);
ifs.move( source, destination, file, newNameForMovedFile, null, true );
// using API directly:
PublicObjectDefinition poDef = new PublicObjectDefinition();
poDef.setName(newNameForMovedFile);
// remove from source folder
PublicObjectDefinition poFreeDef = new PublicObjectDefinition();
poFreeDef.setFreeIfLastFolderReferenceOption(false);
parentFolder.removeItem(file, poFreeDef);
// add to destination folder
poDef.setAddToFolderOption(destination);
file.update(poDef); -
Opening .doc files from IFS
Hi,
I have a question about some functionality in the default web package with ifs. It is probably quite basic, but I am having difficulty with it. In the out of the box web ui, if I click on an uploaded .doc file, Microsoft Word gets loaded in my browser with the file openned.
I am using the JAVA API, and I have uploaded and foldered a .doc file. When I click on it, href="//computer/path/file.doc" word opens, but I get the file was not found.Any ideas?? Thank you.
IanIan
The decision on which application the browser runs is taken by the browser based on information supplied in the HTTP response.
Here's an updated version of the RenderContent method that gives you some degree of control over this process...
// $Header$
* Please complete these missing tags
* @author
* @rref
* @copyright
* @concurrency
* @see
package ifs.pm.common.jsp;
import oracle.ifs.adk.http.HttpUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletInputStream;
import oracle.ifs.beans.Selector;
import oracle.ifs.beans.Format;
import java.util.Enumeration;
import java.util.Locale;
import java.net.URLEncoder;
import java.lang.Class;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import oracle.ifs.adk.security.IfsHttpLogin;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.File;
import ifs.pm.common.trace.Alert;
import oracle.ifs.beans.LibraryObject;
import oracle.ifs.beans.ClassObject;
import oracle.ifs.beans.Document;
import oracle.ifs.beans.LibraryObjectDefinition;
import oracle.ifs.beans.Attribute;
import oracle.ifs.common.AttributeValue;
import oracle.ifs.beans.PublicObject;
import oracle.ifs.beans.FolderPathResolver;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.IfsException;
import oracle.ifs.beans.LibraryService;
import oracle.ifs.beans.LibrarySession;
import oracle.ifs.common.CleartextCredential;
import oracle.ifs.common.ConnectOptions;
import java.util.Hashtable;
import java.util.Date;
import java.text.SimpleDateFormat;
public class JspHelper extends Object
public static final String ACTION = "Action";
public static final String OPERATION = "Operation";
public static final String POLICY = "Policy";
public static final String MIMETYPE = "MimeType";
public static final String OPEN = "Open";
public static final String DOWNLOAD = "Download";
public static final String RENDER = "Render";
public static final String WEBLOGON = "/Login";
public static final String USERNAME = "username";
public static final String PASSWORD = "password";
public static final String SERVICE = "service";
public static final String SCHEMA_PASSWORD = "schemapassword";
public static final String IFSHTTPLOGIN = "IfsHttpLogin";
public static final String IFSWEBROOT = "/ifs/webui";
public static final String IFSTIMEOUT_URL = "/html/timeout.html";
private static String m_ServletPath = null;
private static final boolean DEBUG = true;
private static final String OPEN_SAVEAS_DIALOG = "oracleifs/download";
* Please complete the missing tags for JspHelper
* @param
* @return
* @throws
* @pre
* @post
private static Hashtable characterEncoding = new Hashtable();
static {
characterEncoding.put("+","%2B");
characterEncoding.put("#","%23");
characterEncoding.put("&","%26");
characterEncoding.put(" ","%20");
characterEncoding.put("'","%27");
characterEncoding.put(":","%3A");
characterEncoding.put("(","%28");
characterEncoding.put(")","%29");
characterEncoding.put("-","%2D");
private static String getServletPath()
return m_ServletPath;
public static String generateURL(Long id)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
url = url + "/";
url = url + (String) characterEncoding.get(":");
url = url + id.toString();
return url;
public static String generateURL(String path)
// Creates an Encoded URL from a Docid
String url = "";
if (getServletPath() != null) {
url = getServletPath();
if (!path.startsWith("/")) {
url = url + "/";
url = url + encodePath(path);
return url;
private static void setupServletPath(HttpServletRequest req)
// If never initialized, get the servlet path and store
// in the static
if ( null == m_ServletPath )
String contextPath = null;
String servletPath = "";
// Start with an empth string
m_ServletPath = "";
//let's figure out whether we're running under Servlet API 2.2
//or an earlier version
Class c = req.getClass();
try
//getContextPath() is first defined in 2.2
Method m = c.getMethod("getContextPath", null);
contextPath = (String)m.invoke(req, null);
catch (NoSuchMethodException e1)
catch (InvocationTargetException e2)
catch (IllegalAccessException e3)
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): contextPath = " + contextPath);
servletPath = req.getServletPath();
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): servletPath = " + servletPath);
if ( null != contextPath )
m_ServletPath = contextPath;
if ( null != servletPath )
m_ServletPath += servletPath;
else
if (DEBUG) {
Alert.log("JspHelper.setupServletPath(): not first time through.");
if (DEBUG) {
Alert.log ("JspHelper.setupServletPath(): m_ServletPath = " + m_ServletPath);
private static String getReposPath( HttpServletRequest request )
String result = null;
String path = request.getParameter(DOCUMENT_PATH);
if (null == path) {
path = request.getParameter(ALTERNATIVE_PATH);
return getReposPath(path);
public static String getReposPath(String path)
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Initial Path = " + path);
if (path != null) {
if ( ( null != getServletPath() ) && path.startsWith(getServletPath())) {
path = path.substring(getServletPath().length());
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Stripped Path = " + path);
path = undoSubstitutions(path);
if (DEBUG) {
Alert.log ("JspHelper.getReposPath(request): Converted Path = " + path);
if (DEBUG) {
Alert.log("JspHelper.getReposPath(request) Final Path = " + path);
return path;
public static String encodePath(String path)
// Substitute '%', then everything else
path = replaceString(path,"%","%25");
return doSubstitutions(path);
public static String decodePath(String path)
path = undoSubstitutions(path);
return replaceString(path,"%25","%");
public static String doSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,source,target);
return encodedPath;
public static String undoSubstitutions(String path)
String encodedPath = path;
Enumeration keys = characterEncoding.keys();
while (keys.hasMoreElements()) {
String source = (String) keys.nextElement();
String target = (String) characterEncoding.get(source);
encodedPath = replaceString(encodedPath,target,source);
return encodedPath;
public static String getReposPath( HttpServletRequest request )
return HttpUtils.getIfsPathFromJSPRedirect(request);
public static String generateURL(HttpServletRequest request, Long id)
return HttpUtils.getURLFromIfsPath(request,":" + id.toString());
public static String generateURL(HttpServletRequest request, String path)
return HttpUtils.getURLFromIfsPath(request,path);
public JspHelper()
IfsException.setVerboseMessage( true );
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( Object arg )
if( null == arg )
return "";
else
return arg.toString();
* Please complete the missing tags for getArgumentAsString
* @param
* @return
* @throws
* @pre
* @post
public static String getArgumentAsString( String formatMask, Date arg )
if( null == arg )
return "";
else
SimpleDateFormat sdf = new SimpleDateFormat( formatMask );
return sdf.format( arg );
* Please complete the missing tags for getSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession getSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "getSession(request,response): Entering Method." );
dumpServletParameters( request );
// setupServletPath(request);
LibrarySession ifsSession = null;
HttpSession httpSession = request.getSession( true );
if( null != httpSession )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
ifsSession = ifsLogin.getSession();
if( null == ifsSession )
try
// String timeoutPath = generateURL(request,getTimeOutURL());
String timeoutPath = HttpUtils.getURLFromIfsPath( request, getTimeOutURL() );
if( DEBUG )
Alert.log( "getSession(request,response): Unable to get a valid Session = assuming Timeout problem. Redirecting to " + timeoutPath );
response.sendRedirect( timeoutPath );
catch( IOException ioe )
throw new IfsException( 9999, ioe );
return ifsSession;
* Please complete the missing tags for getObject
* @param
* @return
* @throws
* @pre
* @post
public static PublicObject getObject( HttpServletRequest request, HttpServletResponse response )
throws IfsException
// Will return null and set a Redirect to the Timeout Page if the Sesssion
// is null.
String path = null;
PublicObject po = null;
LibrarySession ifsSession = getSession( request, response );
if( null != ifsSession )
// path = getReposPath(request);
path = HttpUtils.getIfsPathFromJSPRedirect( request );
if( path.charAt( 1 ) == ':' )
Long docId = new Long( path.substring( 2 ) );
po = ifsSession.getPublicObject( docId );
else
FolderPathResolver fpr = new FolderPathResolver( ifsSession );
fpr.setRootFolder();
po = fpr.findPublicObjectByPath( path );
if( DEBUG )
Alert.log( "getObject(request,response): Object is a " + po.getClassname() );
po = po.getResolvedPublicObject();
return po;
* Please complete the missing tags for getExtendedAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getExtendedAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getExtendedClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getEffectiveAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getEffectiveAttributeValues( LibraryObject lo, HttpServletRequest request )
throws IfsException
// Returns a Library Object Definition containing the Attribute Values for each
// Extended Attribute which appears as a parameter in the request obvject.
ClassObject co = lo.getClassObject();
Attribute [] attributes = co.getEffectiveClassAttributes();
return getAttributeValues( attributes, request );
* Please complete the missing tags for getAttributeValues
* @param
* @return
* @throws
* @pre
* @post
public static LibraryObjectDefinition getAttributeValues( Attribute [] attributes, HttpServletRequest request )
throws IfsException
LibraryObjectDefinition def = new LibraryObjectDefinition();
if( attributes != null )
for( int i = 0; i < attributes.length; i++ )
AttributeValue av = getAttributeValue( attributes [ i ], request );
if( av != null )
def.setAttribute( av );
return def;
* Please complete the missing tags for getAttributeValue
* @param
* @return
* @throws
* @pre
* @post
public static AttributeValue getAttributeValue( Attribute attribute, HttpServl etRequest request )
throws IfsException
AttributeValue av = null;
String name = attribute.getName();
String newValue = request.getParameter( name );
if( newValue != null )
if( newValue.equals( "" ) )
av = AttributeValue.newNullAttributeValue( attribute.getDataType() );
else
av = AttributeValue.newAttributeValue( newValue );
av.setName( name );
return av;
* Please complete the missing tags for downloadContent
* @param
* @return
* @throws
* @pre
* @post
public static void downloadContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
boolean download = false;
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
Alert.log( "JspHelper.downloadContent(): download = " + download );
try
Document doc = ( Document ) JspHelper.getObject( request, response );
OutputStream os = response.getOutputStream();
if( download )
response.setContentType( OPEN_SAVEAS_DIALOG );
response.setHeader( "Content-Disposition", "attachment; filename=" + doc.getName() );
else
response.setContentType( doc.getFormat().getMimeType() );
response.setHeader( "Content-Disposition", "inline; filename=" + doc.getName() );
response.setContentLength( ( int ) doc.getContentSize() );
InputStream is = doc.getContentStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpServletParameters
* @param
* @return
* @throws
* @pre
* @post
public static void dumpServletParameters( HttpServletRequest request )
// setupServletPath(request);
Enumeration parmList = request.getParameterNames();
Alert.log( "Parameter List:" );
while( parmList.hasMoreElements() )
String parmName = ( String ) parmList.nextElement();
Alert.log( " " + parmName );
Alert.log( "Parameter Processing Completed." );
* Please complete the missing tags for obtainSession
* @param
* @return
* @throws
* @pre
* @post
public static LibrarySession obtainSession( HttpServletRequest request, HttpServletResponse response )
throws IfsException
if( DEBUG )
Alert.log( "obtainSession(request,response): Servlet Parameters = " );
dumpServletParameters( request );
// setupServletPath(request);
HttpSession httpSession = request.getSession( true );
if( httpSession != null )
IfsHttpLogin ifsLogin = ( IfsHttpLogin ) httpSession.getValue( IFSHTTPLOGIN );
if( ifsLogin != null )
LibrarySession ifsSession = ifsLogin.getSession();
if( ifsSession != null )
return ifsSession;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Unable to get Session. - Attempting to create new Session" );
LibrarySession ifs = null;
String username = "guest";
String password = "welcome";
String service = "IfsDefault";
String schemaPassword = "manager";
String suppliedUsername = request.getParameter( USERNAME );
String suppliedPassword = request.getParameter( PASSWORD );
String suppliedService = request.getParameter( SERVICE );
String suppliedSchemaPassword = request.getParameter( SCHEMA_PASSWORD );
if( suppliedUsername != null )
username = suppliedUsername;
if( suppliedPassword != null )
password = suppliedUsername;
if( suppliedService != null )
service = suppliedService;
if( suppliedSchemaPassword != null )
schemaPassword = suppliedSchemaPassword;
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Creating new Session." );
Alert.log( " Username = " + username );
Alert.log( " Password = " + password );
Alert.log( " Service = " + service );
Alert.log( " Schema Password = " + schemaPassword );
LibraryService ifsService = new LibraryService();
CleartextCredential me = new CleartextCredential( username, password );
ConnectOptions connect = new ConnectOptions();
connect.setLocale( Locale.getDefault() );
connect.setServiceName( service );
connect.setServicePassword( schemaPassword );
LibrarySession ifsSession = ifsService.connect( me, connect );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Session Created." );
JspLogin login = new JspLogin();
login.setSession( ifsSession );
httpSession.putValue( IFSHTTPLOGIN, login );
if( DEBUG )
Alert.log( "JspHelper.obtainSession: Login Object Saved." );
return ifsSession;
* Please complete the missing tags for replaceString
* @param
* @return
* @throws
* @pre
* @post
public static String replaceString( String string, String string1, String string2 )
int offset = string.indexOf( string1 );
switch( offset )
case - 1 :
return string;
case 0 :
return string2 + replaceString( string.substring( string1.length() ), string1, string2 );
default:
return string.substring( 0, offset ) + string2 + replaceString( string.substring( offset + string1.length() ), string1, string2 );
* Please complete the missing tags for printLink
* @param
* @return
* @throws
* @pre
* @post
public static void printLink( javax.servlet.jsp.JspWriter out,
String name,
String url,
String color )
throws java.io.IOException
if( null != url )
if( url.indexOf( "http://" ) != 0 )
url = "http://" + url;
out.println( "<BR><A HREF=\"" + url + "\"><FONT COLOR=\"" + color + "\"><B>" + name + "</B></FONT></A>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
String dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
out.println( "<FONT COLOR=\"" + titleColor + "\">" + titleValue + ": </FONT> <FONT COLOR=\"" + dataColor + "\"><B>" + dataValue + "</B></FONT><BR>" );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Integer dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Boolean dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for printItem
* @param
* @return
* @throws
* @pre
* @post
public static void printItem( javax.servlet.jsp.JspWriter out,
String titleValue,
Date dataValue,
String titleColor,
String dataColor )
throws java.io.IOException
if( null != dataValue )
printItem( out, titleValue, dataValue.toString(), titleColor, dataColor );
* Please complete the missing tags for renderContent
* @param
* @return
* @throws
* @pre
* @post
public static void renderContent( HttpServletRequest request, HttpServletResponse response )
throws IfsException
Document doc = ( Document ) JspHelper.getObject( request, response );
boolean download = false;
boolean renderedOutput = false;
String mimeType = null;
// Determine if we are opening or Downloading Content based on Action
String action = request.getParameter( ACTION );
if( action != null )
if( action.equals( DOWNLOAD ) )
download = true;
if( DEBUG )
Aler t.log( "JspHelper.downloadContent(): download = " + download );
// Determine is we want Raw or Rendered Content. For Rendered Content both
// Operation and Policy must be supplied.
String operation = request.getParameter( OPERATION );
String policy = request.getParameter( POLICY );
if( ( null != operation ) && ( null != policy ) )
renderedOutput = true;
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): renderedOutput = " + renderedOutput );
// Determine if contentType comes from Document or is supplied explicity.
mimeType = request.getParameter( MIMETYPE );
if( null == mimeType )
mimeType = doc.getFormat().getMimeType();
if( DEBUG )
Alert.log( "JspHelper.downloadContent(): mimeType = " + mimeType );
// Process as Requested.
try
response.setContentType( mimeType );
String filename = doc.getName();
String fileExtension = filename.substring( filename.lastIndexOf( '.' ) + 1 );
filename = filename.substring( 0, filename.lastIndexOf( '.' ) - 1 );
Selector mySelector = new Selector( getSession( request, response ) );
mySelector.setSearchClassname( Format.CLASS_NAME );
mySelector.setSearchSelection( Format.MIMETYPE_ATTRIBUTE + "='" + mimeType + "'" );
if( mySelector.getItemCount() > 0 )
Format f = ( Format ) mySelector.getItems( 0 );
fileExtension = f.getExtension();
filename = filename + '.' + fileExtension;
if( DEBUG )
Alert.log( "JspHelper.RenderContent(): Filename = " + filename );
if( download )
response.setHeader( "Content-Disposition", "attachment; filename=" + filename );
else
response.setHeader( "Content-Disposition", "inline; filename=" + filename );
InputStream is;
if( renderedOutput )
is = doc.renderAsStream( operation, policy, null );
else
is = doc.getContentStream();
response.setContentLength( ( int ) doc.getContentSize() );
OutputStream os = response.getOutputStream();
byte [] bytesRead = new byte [ 1024 ];
for( int byteCount = is.read( bytesRead, 0, bytesRead.length );
byteCount > 0;
byteCount = is.read( bytesRead, 0, bytesRead.length ) )
os.write( bytesRead, 0, byteCount );
catch( Exception e )
throw new IfsException( 9999, e );
* Please complete the missing tags for dumpInputStream
* @param
* @return
* @throws
* @pre
* @post
public static void dumpInputStream( ServletInputStream sis )
throws IOException
FileOutputStream fos;
if( File.separator.equals( "\\" ) )
fos = new FileOutputStream( "C:\\temp\\request.txt" );
else
fos = new FileOutputStream( "/tmp/request.txt" );
byte [] bytes = new byte [ 1024 ];
for( int bytesRead = sis.readLine( bytes, 0, bytes.length );
bytesRead > 0;
bytesRead = sis.read( bytes, 0, bytes.length ) )
Alert.log( "JspHelper.dumpInputStream() BytesRead = " + bytesRead );
fos.write( bytes, 0, bytesRead );
fos.close();
* Please complete the missing tags for getTimeOutURL
* @param
* @return
* @throws
* @pre
* @post
private static String getTimeOutURL()
Locale locale = Locale.getDefault();
String country = locale.getCountry();
String language = locale.getLanguage().toLowerCase();
String localizedFolder = language;
if( country != null )
if( ( ! language.equalsIgnoreCase( "en" ) ) | |
( ( language.equalsIgnoreCase( "en" ) ) && ( ! country.equalsIgnoreCase( "US" ) ) ) )
language = language + "_" + country.toUpperCase();
return IFSWEBROOT + "/" + language + IFSTIMEOUT_URL;
null -
Dirty flag set for readonly file page
We are using BDB 4.8.26 transactional data store on Windows 2008 R2.
DB is logging the message "dirty flag set for readonly file page" to the error log ... this entry was logged 17 times in a 24 hr period. The system processes about 3-5 requests a second.
We also are having an incorrect "SECONDARY inconsistent with primary" error reported - this used to be very rare but has increased with increased concurrency. But the dirty flag error is recent - after we dropped a secondary and added a new one - there was no error during the secondary drop and rebuild process.
Appreciate any help on this.
Thanks
Kimman BalakrishnanHi Kimman,
I assume you are not opening your databases with the DB_RDONLY flag. This could be cause by not running recovery after a system or application failure. Make sure you run recovery correctly, single threaded, after each system or application failure; review the Architecting Transactional Data Store applications documentation section.
Regards,
Andrei -
Read open file from IFS system
Hi,
The special programm create a new file on the IFS-volume and write some data in to this file. The program doesn`t closing this file (working some hours).
Can I read data from this file immediatly (stream access)?
System:
Oracle 9.0.1 WinNT
IFS 9.0.1
regards,
AntonHi,
First you need to upload the PDF file from FTP server. For that you can refer the following link
Re: acess file on FTP server
Once you upload the PDF file, you can convert the PDF to OTF and OTF to Text. But I am not sure on the function modules that will do this. -
NIPING LOG File in IFS with CCSID(500) not readable in Windows Explorer
Hi together,
if we made logfiles with NIPING logfiles or saprouter logfiles, this logfiles will be created in IFS with CCSID(500).
How can I read this files with Windows Explorer?
Because all CCSID(500) files looks like jam, when we open that files.
best regards,
Carsten SchulzHi Carsten,
do you use a binary share when accessing the file from a Window PC, or did you configure text conversion? In the System i Navigator, you open the Propertis of the share in question and check the "Text Conversion" tab. If you enable text conversion, you can also limit that to certain file extensions. Make sure the log files that you are viewing use one of the extensions that is specified here, or that you have specified * for the extensions to convert.
If that does not help, there may be a mismatch between the CCSID tagging on the file and the contents in the file. This will be shown if you look at the file through WRKLNK option 5 (DSPF).
Kind regards,
Christian Bartels. -
How to recover from readonly file system?
hi
we are using EBS R12 RUP 6.is it possible to recover one of our instance from read only file system partition?
scenario is :
Had a conference with customer and found the below :
Unable to start/run any "AD" scripts under $ADMIN_SCRIPTS_HOME". For example : Unable to start the concurrent manager using adcmctl.sh script. Below error can be seen :
Permission denied: Could write in "adcmctl.txt" : read only file system.
We have tried to change the permission but the same "read only file system was coming". To confirm the issue we tried to create a directory or file using "mkdir" and "touch" command respectively but got the same error. Customer has confirmed that it was 15 days back they found it working after that its not working.
Explained to customer that the issue is not with EBS but with some other operating system related. Please check with your OS administrator and make sure that this read only file system error will not come.
Action Plan
================
1.) Check with your OS administrator and resolve the "Read only file system error". It is a OS permission error. Update the SR once it got resolved.rgrdsnew2appsdba wrote:
what do you suggest certain and immediate disaster recovery option (till date work and setup + data) in EBS R12 ??
bsically asking it for future planing ....Working, well-tested, and frequently-tested backups. :-)
Sorry to be glib, but there's a lot we don't know about the architecture of your system, which makes it difficult to provide specific advice. You haven't indicated how much of your system is hosted on the filesystem that has been set readonly. Is it just the INST_TOP? Full applications techstack? Database? I'm guessing not the database, or you wouldn't be asking about starting apps tier components, you'd be asking about database recovery, and the problem wouldn't have gone unnoticed for 15 days. If you're just looking at the apps tier filesystem, or a portion of it (such as INST_TOP, which is sometimes separated from the rest of the apps install), you need to decide if you want to:
1) Roll back your entire system to the point when the filesystem was set readonly, or
2) Accept the loss of log files, etc. on the apps tier side, decide that what's in the database is more valuable, and move on from there. Assuming the fsck and subsequent filesystem repair is successful, of course. ;-)
These posts from Steven Chan might help you to plan DR and availability for EBS:
Maximum Availability Architecture: Oracle E-Business Suite Release 12
Maximum Availability Architectures and the E-Business Suite
Regards,
John P.
http://only4left.jpiwowar.com -
I am looking for confirmation that I am properly adding objects to our repository through a Java application that uses the iFS API.
We have an Oracle 8.17 database accessed by iFS 1.1. There is already a customization of the oracle.ifs.beans.Document, GraphicDocument, defined in iFS. I have a graphics file on the iFS server's file system, that I want to save as a GraphicDocument Object in the repository. I dont want to create a new (custom) type of object, just save data as an existing type of object.
The steps I follow are:
1. Create a new DocumentDefinition class
2. Get the GraphicDocument ClassObject
3. Set the DocumentDefinition Object Class
4. Set the DocumentDefinition name
5. Set the DocumentDefinition content stream to a stream of data from the file on the server.
6. Set the DocumentDefinition format based on the files extension.
7. Use the LibrarySession.createPublicObject(DocumentDefinition) method to add this object to the repository.
At this point I found out that you need to set Administrator Mode to true. To do this the user connected to the iFS server must be admin enabled. Is this correct? I was confused by the fact that I needed administrator authority to save data to the repository. Am I doing the right thing?
Thank you,
CindyM
nullin wich folder are trying yo save this object?
maybe you don't have permission to create this object under this folder -
Dear Members,
I am trying to upload files from my local disk to the IFS. There is no problem about uploading txt files. But i could not upload the image files like ".tif".
Is there anyone who can help me urgently please?
Here is the part of my source code..
DocumentDefinition newDocDef = new DocumentDefinition(ifsSession);
newDocDef.setName(filename);
newDocDef.setContentPath(localpath);
newDocDef.setAddToFolderOption(runtime);
Document doc = (Document)ifsSession.createPublicObject(newDocDef);Dear Sir,
This topic is very urgent for me, and I will be very happy for your help.
I have changed my code like this.
ClassObject co = classUtils.lookupClassObject("DOCUMENT");
Collection c = ifsSession.getFormatExtensionCollection();
Format f = (Format) c.getItems("tif");
DocumentDefinition newDocDef = new DocumentDefinition(ifsSession);
newDocDef.setContentPath(localpath);
newDocDef.setAddToFolderOption(runtime);
newDocDef.setName(filename);
newDocDef.setClassObject(co);
newDocDef.setFormat(f);
TieDocument doc = (TieDocument)ifsSession.createPublicObject(newDocDef);
And the error message is here.
oracle.ifs.common.IfsException:
IFS-30002: Unable to create new LibraryObject oracle.ifs.common.IfsException:
IFS-32225: Error storing reference to content object 22,432 in media InterMediaBlob java.sql.SQLException:
ORA-00911: invalid character
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int) DBError.java:187 void oracle.jdbc.ttc7.TTIoer.processError() TTIoer.java:241 void oracle.jdbc.ttc7.Oall7.receive() Oall7.java:543 void oracle.jdbc.ttc7.TTC7Protocol.doOall7(byte, byte, int, byte[], oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int, oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int) TTC7Protocol.java:1477 int oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(oracle.jdbc.dbaccess.DBStatement, byte, byte[], oracle.jdbc.dbaccess.DBDataSet, int, oracle.jdbc.dbaccess.DBDataSet, int) TTC7Protocol.java:888 void oracle.jdbc.driver.OracleStatement.executeNonQuery(boolean) OracleStatement.java:2004 void oracle.jdbc.driver.OracleStatement.doExecuteOther(boolean) OracleStatement.java:1924 void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout() OracleStatement.java:2562 int oracle.jdbc.driver.OraclePreparedStatement.executeUpdate() OraclePreparedStatement.java:452 boolean oracle.jdbc.driver.OraclePreparedStatement.execute() OraclePreparedStatement.java:526 boolean oracle.ifs.server.S_LibrarySession.execute(java.sql.PreparedStatement) S_LibrarySession.java:14518 oracle.sql.BLOB oracle.ifs.server.S_MediaBlob.createBlobReference(java.lang.Long, java.lang.String) S_MediaBlob.java:398 java.io.OutputStream oracle.ifs.server.S_MediaBlob.getOutputStream(java.lang.Long, java.lang.String) S_MediaBlob.java:240 java.io.OutputStream oracle.ifs.server.S_MediaBlob.getOutputStream(java.lang.Long) S_MediaBlob.java:225 java.lang.Long oracle.ifs.server.S_Media.setContentStream(java.io.InputStream) S_Media.java:1741 void oracle.ifs.server.S_Media.setContent(oracle.ifs.server.S_LibraryObjectDefinition) S_Media.java:1680 void oracle.ifs.server.S_ContentObject.setContent(oracle.ifs.server.S_LibraryObjectDefinition) S_ContentObject.java:402 void oracle.ifs.server.S_ContentObject.extendedPreInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_ContentObject.java:239 void oracle.ifs.server.S_LibraryObject.preInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibraryObject.java:1644 oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibraryObject.createInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibraryObject.java:2711 oracle.ifs.common.AttributeValue oracle.ifs.server.S_LibrarySession.createSystemObjectInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibrarySession.java:8365 void oracle.ifs.server.S_Document.setContentObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition, oracle.ifs.server.S_ContentQuota, boolean) S_Document.java:475 void oracle.ifs.server.S_Document.extendedPreInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_Document.java:313 void oracle.ifs.server.S_LibraryObject.preInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibraryObject.java:1644 oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibraryObject.createInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibraryObject.java:2711 oracle.ifs.server.S_LibraryObject oracle.ifs.server.S_LibrarySession.newLibraryObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibrarySession.java:8159 oracle.ifs.server.S_PublicObject oracle.ifs.server.S_LibrarySession.newPublicObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition) S_LibrarySession.java:8200 oracle.ifs.server.S_PublicObject oracle.ifs.server.S_LibrarySession.newPublicObject(oracle.ifs.server.S_LibraryObjectDefinition) S_LibrarySession.java:8182 oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibrarySession.DMNewPublicObject(oracle.ifs.server.S_LibraryObjectDefinition) S_LibrarySession.java:7841 oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewPublicObject(oracle.ifs.server.S_LibraryObjectDefinition) LibrarySession.java:8015 oracle.ifs.beans.PublicObject oracle.ifs.beans.LibrarySession.NewPublicObject(oracle.ifs.beans.PublicObjectDefinition) LibrarySession.java:5373 oracle.ifs.beans.PublicObject oracle.ifs.beans.LibrarySession.createPublicObject(oracle.ifs.beans.PublicObjectDefinition) LibrarySession.java:2985 Process exited with exit code 0. -
At a recent demo, Oracle showed how IFS automatically expanded the contents of a zip file uploaded into the db. Now that I have 9iFS, I can't find how to do it... any help?
Chris, Portal 3.0.9 can do this, but I wasn't aware that IFS could as well.
-
Microsoft Word and Excel files in iFS
I'm having the following problem. I have my own renderer to render the content of my uploaded documents. When I render the content of a PDF file, I get the content directly, but when I want to render the content of a .doc or a .xls file, the system is asking me for authentication information. When I click on ok, without filling anything in, I get the same message. After 3 times, I just get the content of the document. When I click on cancel, I imidiatelly get the content of the document. So the system is asking me to authenticate myself, but when I press cancel (so I don't authenticate myself), I still get the content. The documents all have ACL published (or public). So my question is: why do I get this authentication inputbox when I'm trying to open word or excel documents? (and not with for example a pdf or a txt file).
Thanks
Rob ReekmansI'm also suffering the same issue. I checked the Mime Types in ifsmgr but they appear to be correct.
I'm a little bemused as to the cause. -
Delete IFS file with sql command
Hi
Is it possible to remove a file from IFS using an sql command? If so, what is it?
Thanks
HugoNo, this is not possible, nor is it supported. You may use the Java API to delete a file.
-
Searching without viewing internal iFS files
I have a question regarding searching files
in iFS.
How can i make sure that when a regular user
searches for files in the repository, they
don't get a list of iFS internal files also?
I tried changing the ACL for the iFS mountp point folder to private and the system blew up.
Any suggestions?
Thanx, Elvis...When you refer to internal files, are you refering to the iFS documentation and the WebUI components?
Are you writing a custom search application, or are you using the out-of-the-box clients such as WebUI or WinUI?
If you are writing custom search code, do you still want to give users access to the WebUI?
There are several ways to avoid the files under /ifs/ (which is were all the internal files are).
1) You could specify in your custom search code to do a "Folder Restricted Query", and only include folders which are not "/ifs/".
2) You could have your custom search code remove any items which are foldered in /ifs/ before they are displayed to the end-user.
3) You could change the ACL on the objects to private (but this would disable the WebUI, etc.)
null
Maybe you are looking for
-
Dbms_output.put_line does not write to stdout
I expect the following code to fail and to write 'ERRORE' to stdout: ------------------- mm.sql set serveroutput on BEGIN select 1/0 from dual; exception when others then dbms_output.put_line('ERRORE'); END; I execute this from the command line sqlpl
-
Hi, Anyone how to add a checkbox to every item in a tree? I wanted to implement something that looks like what is found when you install software and get that grey check meaning not all the of the children items are not checked. I am not an expert wi
-
Can I open a tab with a different page (of my choice) than my homepage?
I dont think its possible but maybe someone can tell me Im wrong. I wanted to open a tab with a different page than I open a new Safari window. I would think this would be easy to do and I could just type in the URL I want, but Safari doesnt give m
-
Identify and delete duplicates
What´s the easiest way to identify and delete duplicate pictures in the iphoto library? (And no - doing it manually is not an option! )
-
Moving image from one project to another
Hi all. I'm sorry if this is simple to do, but I can't figure it out. I have recently purchased Aperture 3 and am trying to figure out how to move an image from one project to another. I had several photos on my camera, and imported them this morning