Loading java file in a java file

Hi everyone,
Sorry this is probably a really simple question, but i'm getting a bit stuck and i can't find anywhere that helps explain how to do it.
I've got two files that represent two questionnaires (questionaire 1 and questionnaire 2), depending on their results to the questions they are given a score of a or b at the end of each questionnaire file. The different combinations of a's and b's result in one of four files needing to loaded (file c, d, e and f). I know i need to use an if statement, but don't know how to execute the loading of the other files.
This means that if the user scores:
questionnaire 1 = a
questionnaire 2 = a
file c needs to be run
questionnaire 1 = a
questionnaire 2 = b
file d needs to be run
questionnaire 1 = b
questionnaire 2 = a
file d needs to be run
questionnaire 1 = b
questionnaire 2 = b
file e needs to be run
Would this be best achieved having one central "control file" that contains a big if statement to achieve this? or should i put both questionnaires in one file? then have the if statement at the bottom of this file and execute the chosen c,d,e,f file when the resuts are generated?
Sorry if i've made this really confusing in the way i've written it!
Any suggestions would be really appreciated!

i don't really know what you're aiming at but what you possibly could do is the "files" that you are talking about, you can extend them with JPanel, and then make one main class which extends JFrame, so you can load the extern panels you've made with an actionlistener, into the main class, but the problem there is that you need to find some way to dispose the current panel first, because else, things can be messed up
OR
instead of working with extern panels, you can just work with one main class with several panels, and display the panels true or false, which will work perfect but i don't know if this is an option for you as you were talking about extern classes

Similar Messages

  • Loading large files in Java Swing GUI

    Hello Everyone!
    I am trying to load large files(more then 70 MB of xml text) in a Java Swing GUI. I tried several approaches,
    1)Byte based loading whith a loop similar to
    pane.setText("");
                 InputStream file_reader = new BufferedInputStream(new FileInputStream
                           (file));
                 int BUFFER_SIZE = 4096;
                 byte[] buffer = new byte[BUFFER_SIZE];
                 int bytesRead;
                 String line;
                 while ((bytesRead = file_reader.read(buffer, 0, BUFFER_SIZE)) != -1)
                      line = new String(buffer, 0, bytesRead);
                      pane.append(line);
                 }But this is gives me unacceptable response times for large files and runs out of Java Heap memory.
    2) I read in several places that I could load only small chunks of the file at a time and when the user scrolls upwards or downwards the next/previous chunk is loaded , to achieve this I am guessing extensive manipulation for the ScrollBar in the JScrollPane will be needed or adding an external JScrollBar perhaps? Can anyone provide sample code for that approach? (Putting in mind that I am writting code for an editor so I will be needing to interact via clicks and mouse wheel roatation and keyboard buttons and so on...)
    If anyone can help me, post sample code or point me to useful links that deal with this issue or with writting code for editors in general I would be very grateful.
    Thank you in advance.

    Hi,
    I'm replying to your question from another thread.
    To handle large files I used the new IO libary. I'm trying to remember off the top of my head but the classes involved were the RandomAccessFile, FileChannel and MappedByteBuffer. The MappedByteBuffer was the best way for me to read and write to the file.
    When opening the file I had to scan through the contents of the file using a swing worker thread and progress monitor. Whilst doing this I indexed the file into managable chunks. I also created a cache to further optimise file access.
    In all it worked really well and I was suprised by the performance of the new IO libraries. I remember loading 1GB files and whilst having to wait a few seconds to perform the indexing you wouldn't know that the data for the JList was being retrieved from a file whilst the application was running.
    Good Luck,
    Martin.

  • Error while loading java file in Oracle

    Hi,
    I am facing error while loading java class into oracle . Can you please help
    -bash-3.2$ cd /export/home/sacuser/
    -bash-3.2$ loadjava -user sacuserdb/sacuserdb@BLM - resolve Oracle_Validator/src/com/nec/blm/oracle/validator/Validate.java
    unrecognized or badly formed option -
    loadjava: Usage: loadjava [-definer] [-encoding encoding] [-force] [-genmissing] [-genmissingjar jar] [-grant grant                                          s] [-help] [-nousage] [-noverify] [-oci8] [-order] [-resolve] [-resolver resolver] [-schema schema] [-synonym] [-th                                          in] [-tableschema schema] [-user user/password@database] [-verbose] classes..jars..resources..properties...
    -bash-3.2$ loadjava -user sacuserdb/sacuserdb@BLM -resolve Oracle_Validator/src/com/nec/blm/oracle/validator/Validate.java
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x0
    Function=[Unknown.]
    Library=(N/A)
    NOTE: We are unable to locate the function name symbol for the error
          just occurred. Please refer to release documentation for possible
          reason and solutions.
    Current Java thread:
            at oracle.jdbc.driver.T2CConnection.t2cCreateState(Native Method)
            at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:346)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
            at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:131)
            at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:77)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
            at java.sql.DriverManager.getConnection(DriverManager.java:512)
            - locked <0xf5fdc448> (a java.lang.Class)
            at java.sql.DriverManager.getConnection(DriverManager.java:140)
            - locked <0xf5fdc448> (a java.lang.Class)
            at oracle.aurora.server.tools.loadjava.DatabaseOptions.getConnection(DatabaseOptions.java:180)
            at oracle.aurora.server.tools.loadjava.DatabaseOptions.connect(DatabaseOptions.java:123)
            at oracle.aurora.server.tools.loadjava.LoadJavaState.getConnection(LoadJavaState.java:409)
            at oracle.aurora.server.tools.loadjava.LoadJavaState.getOldMD5(LoadJavaState.java:696)
            at oracle.aurora.server.tools.loadjava.ClientSchemaObject.getOldMD5(ClientSchemaObject.java:52)
            at oracle.aurora.server.tools.loadjava.SchemaObject.doCreate(SchemaObject.java:172)
            at oracle.aurora.server.tools.loadjava.SchemaObject.process1(SchemaObject.java:215)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:532)
            at oracle.aurora.server.tools.loadjava.LoadJava.addSource(LoadJava.java:574)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:439)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:380)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:349)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:652)
            at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(LoadJava.java:617)
            at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:818)
            at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:251)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.java:103)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.java:28)
    Dynamic libraries:
    0x8050000       /opt/oracle/product/10g/jdk/jre/bin/java
    0xfef80000      /lib/libthread.so.1
    0xfef40000      /lib/libdl.so.1
    0xfee10000      /lib/libc.so.1
    0xfea00000      /opt/oracle/product/10g/jdk/jre/lib/i386/client/libjvm.so
    0xfedd0000      /usr/lib/libCrun.so.1
    0xfedb0000      /lib/libsocket.so.1
    0xfe960000      /lib/libnsl.so.1
    0xfed90000      /lib/libm.so.1
    0xfedc0000      /usr/lib/libsched.so.1
    0xfe900000      /lib/libm.so.2
    0xfed40000      /lib/libscf.so.1
    0xfe8e0000      /lib/libdoor.so.1
    0xfe8b0000      /lib/libuutil.so.1
    0xfe890000      /lib/libgen.so.1
    0xfe870000      /lib/libmd.so.1
    0xfe850000      /lib/libmp.so.2
    0xfe830000      /opt/oracle/product/10g/jdk/jre/lib/i386/native_threads/libhpi.so
    0xfe3d0000      /opt/oracle/product/10g/jdk/jre/lib/i386/libverify.so
    0xfe3a0000      /opt/oracle/product/10g/jdk/jre/lib/i386/libjava.so
    0xfe380000      /opt/oracle/product/10g/jdk/jre/lib/i386/libzip.so
    0xf9e80000      /opt/oracle/product/10g/lib32/libocijdbc10.so
    0xf0e00000      /opt/oracle/product/10g/lib32/libclntsh.so.10.1
    0xf0c60000      /opt/oracle/product/10g/lib32/libnnz10.so
    0xf9e60000      /lib/libkstat.so.1
    0xf9e30000      /lib/libaio.so.1
    0xf1b60000      /lib/librt.so.1
    Heap at VM Abort:
    Heap
    def new generation   total 576K, used 237K [0xf1e00000, 0xf1ea0000, 0xf22e0000)
      eden space 512K,  45% used [0xf1e00000, 0xf1e3a058, 0xf1e80000)
      from space 64K,   8% used [0xf1e90000, 0xf1e915c0, 0xf1ea0000)
      to   space 64K,   0% used [0xf1e80000, 0xf1e80000, 0xf1e90000)
    tenured generation   total 1408K, used 204K [0xf22e0000, 0xf2440000, 0xf5e00000)
       the space 1408K,  14% used [0xf22e0000, 0xf23130f0, 0xf2313200, 0xf2440000)
    compacting perm gen  total 4096K, used 2662K [0xf5e00000, 0xf6200000, 0xf9e00000)
       the space 4096K,  65% used [0xf5e00000, 0xf6099a38, 0xf6099c00, 0xf6200000)
    Local Time = Mon Jun 17 16:29:08 2013
    Elapsed Time = 0
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
    # An error report file has been saved as hs_err_pid27805.log.
    # Please refer to the file for further information.
    Abort (core dumped)

    Please try to compile your java source file with jdk avaiable in ORACLE_HOME\jdk\bin\javac.
    load the compiled class file in oracle DB using loadjava utility.
    loadjava -user scott/tiger javafile.class

  • Error: Failed to load script file; java.lang.ArrayIndexOutOfBound.Exception: 3184

    Script editor was working find when I last used it last week.  Tried to open a script today to make some changes and now I'm getting this error message.  I have uninstalled and re-installed editor, checked the compatibility mode and it wont open the script.  any ideas out there what the problem could be? need some trouble shooting help.
    Error:
    failed to load script file: java.lang.ArrayIndexOutOfBound.Expception: 3184
    Thanks
    Lora

    Hmmm....   I haven't seen that, but I can tell you what I would do if I were you.  This is kind of drastic, but the alternative may be a workstation reimage.
    Open the windows control panel, and open the add/remove programs snap in.
    Uninstall the CRS editor.
    Uninstall all the JRE instances you have.  They may be listed as something like Java (TM) update....   or they may appear as J2SE Runtime....   Check in the J's (it's alphabetical) and uninstall all of them.
    Reboot the machine.
    Download and reinstall Java 1.6.0.17   (This is what's running on my workstation right now, and it works with the editor).
    Reinstall the CRS editor
    Reboot the machine
    Try it and see if it behaves.  If it doesn't, you may need to rebuild the whole thing.

  • Help! cant load Java due to missing file

    I have tried to load Java on my pc which is running XP and I get this error message.can anyone help please........
    it says this file is missing.
    http://jdl.sun.com/webapps/download/getfile/1.5.0_02-bo9/windows-i586//jp150020.cab.
    without this I am unable to download the Java and am ready to rip my hair out!
    Thanks

    M'am,
    Eh?
    You are having problems downloading or installing Java. Is that the issue?
    If you are having problems installing then I would suggest you uninstall whatever you do have and get download again and install the new download.
    If you are having problems downloading... well that sounds like a browser issue.
    If you need more help then consult this page
    http://java.sun.com/j2se/1.5.0/download.jsp
    There are Installation Instructions for each download which may be of assistance.
    Sincerely,
    Slappy

  • How to load CAD files like .prt, . stp  in JAVA

    How to load CAD files like .prt, . stp files which can be generated by UG and Pro/E etc in JAVA. I am appreciated that you will give any comments.

    Hi,
    as far as I know there is no Java 3D loader for CAD files available. You have to export your files into a format like "3ds ", "obj ", or "wrl". See thread 'JAVA 3D max files and VrmlLoader' on java.net: [http://forums.java.net/jive/thread.jspa?messageID=231564&#231564|http://forums.java.net/jive/thread.jspa?messageID=231564&#231564]
    August

  • Loading jar files at execution time via URLClassLoader

    Hello�All,
    I'm�making�a�Java�SQL�Client.�I�have�practicaly�all�basic�work�done,�now�I'm�trying�to�improve�it.
    One�thing�I�want�it�to�do�is�to�allow�the�user�to�specify�new�drivers�and�to�use�them�to�make�new�connections.�To�do�this�I�have�this�class:�
    public�class�DriverFinder�extends�URLClassLoader{
    ����private�JarFile�jarFile�=�null;
    ����
    ����private�Vector�drivers�=�new�Vector();
    ����
    ����public�DriverFinder(String�jarName)�throws�Exception{
    ��������super(new�URL[]{�new�URL("jar",�"",�"file:"�+�new�File(jarName).getAbsolutePath()�+"!/")�},�ClassLoader.getSystemClassLoader());
    ��������jarFile�=�new�JarFile(new�File(jarName));
    ��������
    ��������/*
    ��������System.out.println("-->"�+�System.getProperty("java.class.path"));
    ��������System.setProperty("java.class.path",�System.getProperty("java.class.path")+File.pathSeparator+jarName);
    ��������System.out.println("-->"�+�System.getProperty("java.class.path"));
    ��������*/
    ��������
    ��������Enumeration�enumeration�=�jarFile.entries();
    ��������while(enumeration.hasMoreElements()){
    ������������String�className�=�((ZipEntry)enumeration.nextElement()).getName();
    ������������if(className.endsWith(".class")){
    ����������������className�=�className.substring(0,�className.length()-6);
    ����������������if(className.indexOf("Driver")!=-1)System.out.println(className);
    ����������������
    ����������������try{
    ��������������������Class�classe�=�loadClass(className,�true);
    ��������������������Class[]�interfaces�=�classe.getInterfaces();
    ��������������������for(int�i=0;�i<interfaces.length;�i++){
    ������������������������if(interfaces.getName().equals("java.sql.Driver")){
    ����������������������������drivers.add(classe);
    ������������������������}
    ��������������������}
    ��������������������Class�superclasse�=�classe.getSuperclass();
    ��������������������interfaces�=�superclasse.getInterfaces();
    ��������������������for(int�i=0;�i<interfaces.length;�i++){
    ������������������������if(interfaces[i].getName().equals("java.sql.Driver")){
    ����������������������������drivers.add(classe);
    ������������������������}
    ��������������������}
    ����������������}catch(NoClassDefFoundError�e){
    ����������������}catch(Exception�e){}
    ������������}
    ��������}
    ����}
    ����
    ����public�Enumeration�getDrivers(){
    ��������return�drivers.elements();
    ����}
    ����
    ����public�String�getJarFileName(){
    ��������return�jarFile.getName();
    ����}
    ����
    ����public�static�void�main(String[]�args)�throws�Exception{
    ��������DriverFinder�df�=�new�DriverFinder("D:/Classes/db2java.zip");
    ��������System.out.println("jar:�"�+�df.getJarFileName());
    ��������Enumeration�enumeration�=�df.getDrivers();
    ��������while(enumeration.hasMoreElements()){
    ������������Class�classe�=�(Class)enumeration.nextElement();
    ������������System.out.println(classe.getName());
    ��������}
    ����}
    It�loads�a�jar�and�searches�it�looking�for�drivers�(classes�implementing�directly�or�indirectly�interface�java.sql.Driver)�At�the�end�of�the�execution�I�have�found�all�drivers�in�the�jar�file.
    The�main�application�loads�jar�files�from�an�XML�file�and�instantiates�one�DriverFinder�for�each�jar�file.�The�problem�is�at�execution�time,�it�finds�the�drivers�and�i�think�loads�it�by�issuing�this�statement�(Class�classe�=�loadClass(className,�true);),�but�what�i�think�is�not�what�is�happening...�the�execution�of�my�code�throws�this�exception
    java.lang.ClassNotFoundException:�com.ibm.as400.access.AS400JDBCDriver
    ��������at�java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    ��������at�java.security.AccessController.doPrivileged(Native�Method)
    ��������at�java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    ��������at�java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    ��������at�sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    ��������at�java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    ��������at�java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    ��������at�java.lang.Class.forName0(Native�Method)
    ��������at�java.lang.Class.forName(Class.java:140)
    ��������at�com.marmots.database.DB.<init>(DB.java:44)
    ��������at�com.marmots.dbreplicator.DBReplicatorConfigHelper.carregaConfiguracio(DBReplicatorConfigHelper.java:296)
    ��������at�com.marmots.dbreplicator.DBReplicatorConfigHelper.<init>(DBReplicatorConfigHelper.java:74)
    ��������at�com.marmots.dbreplicator.DBReplicatorAdmin.<init>(DBReplicatorAdmin.java:115)
    ��������at�com.marmots.dbreplicator.DBReplicatorAdmin.main(DBReplicatorAdmin.java:93)
    Driver�file�is�not�in�the�classpath�!!!�
    I�have�tried�also�(as�you�can�see�in�comented�lines)�to�update�System�property�java.class.path�by�adding�the�path�to�the�jar�but�neither...
    I'm�sure�I'm�making�a/some�mistake/s...�can�you�help�me?
    Thanks�in�advice,
    (if�there�is�some�incorrect�word�or�expression�excuse�me)

    Sorry i have tried to format the code, but it has changed   to �... sorry read this one...
    Hello All,
    I'm making a Java SQL Client. I have practicaly all basic work done, now I'm trying to improve it.
    One thing I want it to do is to allow the user to specify new drivers and to use them to make new connections. To do this I have this class:
    public class DriverFinder extends URLClassLoader{
    private JarFile jarFile = null;
    private Vector drivers = new Vector();
    public DriverFinder(String jarName) throws Exception{
    super(new URL[]{ new URL("jar", "", "file:" + new File(jarName).getAbsolutePath() +"!/") }, ClassLoader.getSystemClassLoader());
    jarFile = new JarFile(new File(jarName));
    System.out.println("-->" + System.getProperty("java.class.path"));
    System.setProperty("java.class.path", System.getProperty("java.class.path")+File.pathSeparator+jarName);
    System.out.println("-->" + System.getProperty("java.class.path"));
    Enumeration enumeration = jarFile.entries();
    while(enumeration.hasMoreElements()){
    String className = ((ZipEntry)enumeration.nextElement()).getName();
    if(className.endsWith(".class")){
    className = className.substring(0, className.length()-6);
    if(className.indexOf("Driver")!=-1)System.out.println(className);
    try{
    Class classe = loadClass(className, true);
    Class[] interfaces = classe.getInterfaces();
    for(int i=0; i<interfaces.length; i++){
    if(interfaces.getName().equals("java.sql.Driver")){
    drivers.add(classe);
    Class superclasse = classe.getSuperclass();
    interfaces = superclasse.getInterfaces();
    for(int i=0; i<interfaces.length; i++){
    if(interfaces[i].getName().equals("java.sql.Driver")){
    drivers.add(classe);
    }catch(NoClassDefFoundError e){
    }catch(Exception e){}
    public Enumeration getDrivers(){
    return drivers.elements();
    public String getJarFileName(){
    return jarFile.getName();
    public static void main(String[] args) throws Exception{
    DriverFinder df = new DriverFinder("D:/Classes/db2java.zip");
    System.out.println("jar: " + df.getJarFileName());
    Enumeration enumeration = df.getDrivers();
    while(enumeration.hasMoreElements()){
    Class classe = (Class)enumeration.nextElement();
    System.out.println(classe.getName());
    It loads a jar and searches it looking for drivers (classes implementing directly or indirectly interface java.sql.Driver) At the end of the execution I have found all drivers in the jar file.
    The main application loads jar files from an XML file and instantiates one DriverFinder for each jar file. The problem is at execution time, it finds the drivers and i think loads it by issuing this statement (Class classe = loadClass(className, true);), but what i think is not what is happening... the execution of my code throws this exception
    java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.marmots.database.DB.<init>(DB.java:44)
    at com.marmots.dbreplicator.DBReplicatorConfigHelper.carregaConfiguracio(DBReplicatorConfigHelper.java:296)
    at com.marmots.dbreplicator.DBReplicatorConfigHelper.<init>(DBReplicatorConfigHelper.java:74)
    at com.marmots.dbreplicator.DBReplicatorAdmin.<init>(DBReplicatorAdmin.java:115)
    at com.marmots.dbreplicator.DBReplicatorAdmin.main(DBReplicatorAdmin.java:93)
    Driver file is not in the classpath !!!
    I have tried also (as you can see in comented lines) to update System property java.class.path by adding the path to the jar but neither...
    I'm sure I'm making a/some mistake/s... can you help me?
    Thanks in advice,
    (if there is some incorrect word or expression excuse me)

  • Error in loading big file

    Hi All,
    I have an application on WL8.1 with sp3, the database is SQL Server 2000. I have code below to load local file into database. The data type in database is image.
    PreparedStatement pStatement = null;
    InputStreammyStream myStream = new InputStream();
    myStream.setEmbeddedStream( is );
    pStatement.setBinaryStream( 1, myStream, -1 );
    pStatement.executeUpdate();
    pStatement.close();
    pStatement = null;
    is is InputStream from a local file and the sql statement is
    insert into file_content(content) values(?)
    This workes fine for the files with size less than 150M, but for those big files (>150M), it doesn't work and I got error message as below:
    <Feb 11, 2005 12:00:41 PM PST> <Notice> <EJB> <BEA-010014> <Error occurred while attempting to rollback transaction: javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver]Object has been closed.))
    javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver]Object has been closed.))
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:396)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:362)
    Any body can help? Thanks in advance.

    Fred Wang wrote:
    Hi All,
    I have an application on WL8.1 with sp3, the database is SQL Server 2000. I have code below to load local file into database. The data type in database is image.
    PreparedStatement pStatement = null;
    InputStreammyStream myStream = new InputStream();
    myStream.setEmbeddedStream( is );
    pStatement.setBinaryStream( 1, myStream, -1 );
    pStatement.executeUpdate();
    pStatement.close();
    pStatement = null;
    is is InputStream from a local file and the sql statement is
    insert into file_content(content) values(?)
    This workes fine for the files with size less than 150M, but for those big files (>150M), it doesn't work and I got error message as below:
    <Feb 11, 2005 12:00:41 PM PST> <Notice> <EJB> <BEA-010014> <Error occurred while attempting to rollback transaction: javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver]Object has been closed.))
    javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver]Object has been closed.))
    at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:396)
    at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:362)
    Any body can help? Thanks in advance.I already answered this as to the cause, in the ms newsgroups... It's the DBMS choking so
    bad on the size of your image file that it actually kills the connection. Note that the DBMS
    has to save the whole image to log as well as to the DBMS table. The fundamental response is
    to get DBA help to configure the DBMS to be able to do what you want. If you want and can,
    you could split your image column into multiple image columns, and split your data into
    100meg chunks, and then enter an empty row and then update it column by column, and then
    concatenate the data again in the cleint when you get it out, etc, but much better to post
    to the MS server newsgroups for ideas.
    Joe

  • Error while loading WSDL File in Eclipse

    Hi Experts
    We are getting the following Error while Loading WSDL File in Eclipse.
    IWAB0399E Error in generating Java from WSDL:  WSDLException (at /wsdl:definitions/wsdl:portType/wsp:Policy): faultCode=INVALID_WSDL: Encountered unexpected element 'Policy'.:
    Please advice how to resolve it.
    Regards
    Prashant

    It seems that your WSDL is not well defined, you need to test your wsdl via WS-I compliance in order to check if the wsdl is well created, you can do this via soapui, just create a new project, import the wsdl file or set the URL, left click in the project and select check WS-I compliance, this tool will test your wsdl and gives you a detailed report of what might be the problem.

  • Issue in calling webdynpro for loading flat file in IP

    Hello,
    We have implemented the How-To load flat files in IP paper and we are facing an issue in that. The generated webdynpro runs on ABAP Application server but we need to call this from a Web template which runs on portal server.
    These two servers are different and we don't want to hardcode the url in webtemplate as the server names will change in Q & P for webdynpro. Can anyone advise how we can read the ABAP Application server details in WAD may be using javascript and then generate the URL for webdynpro dynamically.
    Regards,
    Deepti

    Hi Deepti,
    We have also facing the same challenge. Could you please post the solution in which URL path change dynamically.
    I have created the ABAP function module based on the below link.
    http://wiki.sdn.sap.com/wiki/display/Snippets/BICustomWebItemtoLaunchanABAPWeb+Dynpro
    But not sure how to call the function module using custom web item & java script. Coould you please explain the steps on the same ?
    Thanks,
    Gopi R

  • Error loading *.bin file

    i have a certain requirement like if plugin1 is down plugin2 has to be called,
    both plugin1 and plugin2 uses same 3rd party api for plugin implementation.But when my plugin1 is down i am getting error with plugin2 like
         "Error loading resource file: challenge.bin"
    This challenge.bin is in 3rd party api used for plugin1 and plugin2 implementation.
    Error loading resource file: challenge.bin
    java.lang.NullPointerException
    at java.io.FilterInputStream.available(Unknown Source)
    at ymsg.network.ChallengeResponseV10.<clinit>(ChallengeResponseV10.java:71)
    at ymsg.network.Session.receiveAuth(Session.java:1331)
    at ymsg.network.Session$InputThread.process(Session.java:2839)
    at ymsg.network.Session$InputThread.run(Session.java:2797)
    Did anybody had such problem earlier loding *.bin files earlier.

    Hussein,
    Thanks for your reply.
    I already checked these 2 docs from oracle support and verified the compat-db rpm version.My current version of the rpm is higher than the document mentioned version.
    FYR,
    [root@apps ~]# rpm -qa compat*
    compat-db-4.2.52-5.1
    compat-readline43-4.3-3
    compat-gcc-32-c++-3.2.3-47.3
    compat-gcc-34-3.4.6-4
    compat-dapl-utils-2.0.25-2.el5
    compat-libcom_err-1.0-7
    compat-dapl-devel-2.0.25-2.el5
    compat-dapl-static-2.0.25-2.el5
    compat-glibc-headers-2.3.4-2.26
    compat-libstdc++-33-3.2.3-61
    compat-gcc-34-g77-3.4.6-4
    compat-libstdc++-296-2.96-138
    compat-glibc-2.3.4-2.26
    compat-dapl-2.0.25-2.el5
    compat-gcc-32-3.2.3-47.3
    compat-libgcc-296-2.96-138
    compat-openldap-2.3.43_2.2.29-12.el5
    compat-libf2c-34-3.4.6-4
    compat-slang-1.4.9-27.2.2
    compat-gcc-34-c++-3.4.6-4
    compat-oracle-rhel4-1.0-5
    [root@apps ~]#
    Please check and suggest me to preceed further.
    Vijay.

  • Exception occurred while loading _WL_TIMESTAMP FILE

    Hi all,
    I have an application packaged in a EAR file, but when I deploy through the Weblogic Server Administration console, i get a strange error:
    <Error> <EJB> <BEA-010003> <Exception occurred while loading WLTIMESTAMP FILE.
    java.io.FileNotFoundException: /opt/bea/domains/bpm/servers/BPMServer/cache/EJBCompilerCache/1bscgreimm37w/_WL_GENERATED (Too many open files)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.(FileInputStream.java:106)
    at weblogic.ejb.container.deployer.EJBDeployer.getFileHash(EJBDeployer.java:464)
    at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:586)
    at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1154)
    Truncated. see log file for complete stacktrace
    &gt;
    java.lang.NullPointerException
    at weblogic.utils.FileUtils.remove(FileUtils.java:274)
    Searching over the Oracle/BEA documentation i found this :
    BEA-010003 Error: Exception occurred while loading WLTIMESTAMP FILE.
    Description Exception occurred while loading WLTIMESTAMP FILE. Forcing recompilation: ioException
    Cause      The container generates WLGENERATED file, which stores the server version of the appc compiler. if the current server version is different from the version specified in WLGENERATED file, appc recompiles the beans. There was an error reading this file.
    Action The container will automatically recompile the beans.
    But if the container compiles the beans again, why in the deployments view, it doesn't work, and the application is never at Active state?
    Any help is appreciated!
    Thiago

    Looking at your stack trace, I don't believe the issue is directly related to the WLTIMESTAMP file but rather it looks like you have hit the limit on the number of open file descriptors for your process (note that the stack trace says "Too many open files" immediately after reporting what file it failed to open). Looks like you either have an FD leak or your OS/shell limit on the number of open file descriptors allowed per process may be set too low for what you are trying to accomplish.

  • Weblogic 10.0 Parsing Failure in config.xml: failed to load java type

    Hello,
    I've just installed a Weblogic 10.0 on a Linux server and when i try to start it, by :
    bash$ : sudo -u weblogic ./startWebLogic.sh
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=128m
    WLS Start Mode=Production
    CLASSPATH=:/opt/weblogic/10.0/patch_wls1002/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/patch_cie640/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/opt/weblogic/10.0/jdk150_15/lib/tools.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic_sp.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.jar:/opt/weblogic/10.0/modules/features/weblogic.server.modules_10.0.2.0.jar:/opt/weblogic/10.0/modules/features/com.bea.cie.common-plugin.launch_2.1.2.0.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/webservices.jar:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/lib/ant-all.jar:/opt/weblogic/10.0/modules/net.sf.antcontrib_1.0b2.0/lib/ant-contrib.jar::/opt/weblogic/10.0/weblogic10.0/common/eval/pointbase/lib/pbclient51.jar:/opt/weblogic/10.0/weblogic10.0/server/lib/xqrl.jar::
    PATH=/opt/weblogic/10.0/weblogic10.0/server/bin:/opt/weblogic/10.0/modules/org.apache.ant_1.6.5/bin:/opt/weblogic/10.0/jdk150_15/jre/bin:/opt/weblogic/10.0/jdk150_15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http://hostname:port/console *
    starting weblogic with Java version:
    java version "1.5.0_15"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
    Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
    Starting WLS with line:
    /opt/weblogic/10.0/jdk150_15/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=128m -da -Dplatform.home=/opt/weblogic/10.0/weblogic10.0 -Dwls.home=/opt/weblogic/10.0/weblogic10.0/server -Dweblogic.home=/opt/weblogic/10.0/weblogic10.0/server -Dwli.home= -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/opt/weblogic/10.0/patch_wls1002/profiles/default/sysext_manifest_classpath:/opt/weblogic/10.0/patch_cie640/profiles/default/sysext_manifest_classpath -Dweblogic.security.providers.authentication.LDAPDelegatePoolSize=50 -Dweblogic.management.username=system -Dweblogic.management.password=admin9424 -Dweblogic.Name=AdminServer -Djava.security.policy=/opt/weblogic/10.0/weblogic10.0/server/lib/weblogic.policy weblogic.Server
    <Jun 7, 2010 9:49:12 AM CEST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    /opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n-schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/p13n_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/p13n/wlp_services.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_common.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_schemas.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/netuix_system.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-client.jar:/opt/weblogic/10.0/weblogic10.0/platform/lib/wlp/wsrp-common.jar>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Server VM Version 1.5.0_15-b04 from Sun Microsystems Inc.>
    <Jun 7, 2010 9:49:13 AM CEST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.0 MP2 Sat Apr 25 01:45:38 EDT 2009 1213942 >
    i got the following error messages :
    *<Jun 7, 2010 9:49:14 AM CEST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing Failure in config.xml: failed to load java type corresponding to e=domain@http://www.bea.com/ns/weblogic/920/domain>*
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
    <Jun 7, 2010 9:49:14 AM CEST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
    <Jun 7, 2010 9:49:14 AM CEST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    If i start the server as root, it boots but i cant deploy anything.
    Any idea about this behavior ?

    Hi,
    It is the problem in prasing the DTD of config.xml file
    It look like this
    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://www.bea.com/ns/weblogic/920/domain" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90/security/xacml http://www.bea.com/
    ns/weblogic/90/security/xacml.xsd http://www.bea.com/ns/weblogic/90/security http://www.bea.com/ns/weblogic/90/security.xsd http://www.bea.com/ns/weblogic/92
    0/domain http://www.bea.com/ns/weblogic/920/domain.xsd http://www.bea.com/ns/weblogic/90/security/wls http://www.bea.com/ns/weblogic/90/security/wls.xsd">
    Please change your DTD to this lines and start the server.
    Regards
    Ravi D

  • How to load jar files from remote location

    Hi all,
    I am trying to load jar files from remote server, from a servlet which is running on OC4j.
    For doing this,First I am getting ClassLoader by using ClassLoader.getSystemClassLoader() and then type casting it to URLClassLoader.
    But by doing it I am getting ClassCastException,because oc4j returns oracle.classloader.PolicyClassLoader instead of java.net.ClassLoader.
    Appreciate if anyone can tell me how to load remote jar files using oracle.classloader.PolicyClassLoader .
    Thanks
    Harish

    Hi,
    I suppose you know about this, but just in case.
    I have used jnpl to load jar files from remote location.
    Rowan

  • "Attempted to load Java content, but Java is unavailable or not installed"

    Got a weird error message "[web window name] attempted to load Java content, but Java is unavailable or not installed". This came when -immediately after having done a shutdown and restart- Safari tried to open a web page that had never caused any problems before.
    What worked for me was:
    Make sure that an alias named "JavaPluginCocoa.bundle" was located in [StartupDisk]/Library/Internet Plug-ins.
    That alias should link to its original file by that exact same name located in [StartupDisk]/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources.
    The version of the JavaPluginCocoa.bundle should be 12.3.0 - that is: when using OSX 10.5.7 and Safari 4.0.2. (Check the version number by selecting that file and Get Info / press Cmd-I.)
    That 12.3.0 version comes, as I understand it, as part of either the Safari 4, or of the Java update that came out simultaneously (I think it was Java 5.2 but don't recall the exact version number).
    From other web posts I understand that older versions of the JavaPluginCocoa.bundle may sometimes be left around in various other locations after the Safari 4.0.2 and Java updates, and may cause Safari to get confused about which one it should use. Anyway, the JavaPluginCocoa.bundle setup I mentioned above should be the correct one.

    Other threads have suggested to update Java. There is now an update "6".
    http://www.apple.com/downloads/macosx/apple/application_updates/javaformacosx105 update6.html
    I already had this. The notes for Update 6 mentions " J2SE 1.4.2 is no longer being updated to fix bugs or security issues and is therefore disabled by default in this update. "
    I went into /applications/utilities/Java Preferences.app and:
    1) turned 1.4.2 back on.
    2) made 1.4.2 first (by dragging to top)
    3) I also switched Run applets to Within the browser process (which should be the Default but was not set)
    I am not sure which of these are needed, but doing all of them made it work. On the web page in question.

  • Cannot load Java plug-in and access R12 Oracle form from client

    Hi, one of my user cannot open Oracle form when accessing R12 environment using IE6. After selecting responsibility and menu, it got stuck after 50% processing when trying to load Java applet. It never got completed even after waiting for 2-3 hours.
    Is there any browser setting that needs to be modified? I checked popup blocker and activeX setting. All seem to be in order. Kindly assist. Thanks.

    Hi,
    What is the difference between this client and other clients?
    Delete the browser cache/history files and check then. If this does not help, enable trace for JRE (as per Note: 549423.1 - How to enable tracing and logging for Sun JRE (Native Plug-in)) and see if it shows any errors when you encounter this issue.
    Regards,
    Hussein

Maybe you are looking for

  • Highest speed for a loop in the microprocessor of my CRIO?

    Hello: Im trying to develop a control system for an inverter with with my CRIO 9022, the speed of my system is 10 kHz(the switching frequency for the inverter is 10 kHz). Im trying to develop the controller using the microprocesor, but I was reading

  • Connecting Nintendo products?

    I'm trying to connect our Nintendo DS's and our Wii for downloads and Wifi play using our AEBS. I'm also set up with a Linksys VPN router (since I can't use my AEBS for VPN right now... grrr). Any suggestions on how to do this? Thanks. iMac   Mac OS

  • Using my laptop to watch TV from a satalite receiver

    Can i use the eyetv hybrid to watch satalite tv on my new macbook?

  • Attach multiple docs in an email

    I am trying to send two or more PDF files in a single email as opposed to two emails each with one PDF file.  Can anyone help? Thanks,

  • Macbook Pro for PhotoShop CS5.. help configuring.

    Hi, I am purchasing a 15" Macbook Pro for my first year of University and would like some advice configuring it (without going overboard price-wise.) The catch is I would also like to use Photoshop CS5 on it, and have it run good and fast. My current