BC4J, Classpath: Unnecessary dependency?

Hi,
I've put a similar post on the 9i J2EE Containers forum, but I feel it belongs here rather than there.
BC4J relies, as far as I understood, on the classpath to find its meta-data and bc4j.xcfg. However, when used in a common J2EE web container, such as the OC4J, we are required to not only put our classes in the "classes"/"lib" directories, but ALSO add the above meta data into the system classpath (this is due to the fact that the J2EE servers load classes from the WEB-INF directory but they do not consider it part of the standard classpath).
This means that each BC4J application has to be put in the system/web server's classpath!
I think BC4J should find a more elegant, and less error-prone way to find its meta-data (maybe through runtime properties, for example).
BTW, this topic came to mind when I tried deploying a BC4J app into OC4J (still trying) and come across the bug: "Cannot find the configuration file xxx/common/bc4j.xcfg in the classpath". Even though I manually added the directory containing the above file to the classpath (by using the -cp switch of the JVM).
null

Hi,
I've put a similar post on the 9i J2EE Containers forum, but I feel it belongs here rather than there.
BC4J relies, as far as I understood, on the classpath to find its meta-data and bc4j.xcfg. However, when used in a common J2EE web container, such as the OC4J, we are required to not only put our classes in the "classes"/"lib" directories, but ALSO add the above meta data into the system classpath (this is due to the fact that the J2EE servers load classes from the WEB-INF directory but they do not consider it part of the standard classpath).
This means that each BC4J application has to be put in the system/web server's classpath!
I think BC4J should find a more elegant, and less error-prone way to find its meta-data (maybe through runtime properties, for example).
BTW, this topic came to mind when I tried deploying a BC4J app into OC4J (still trying) and come across the bug: "Cannot find the configuration file xxx/common/bc4j.xcfg in the classpath". Even though I manually added the directory containing the above file to the classpath (by using the -cp switch of the JVM).
null

Similar Messages

  • [svn:bz-trunk] 14752: Remove the unnecessary dependency of blazeds-team app on data project.

    Revision: 14752
    Revision: 14752
    Author:   [email protected]
    Date:     2010-03-14 13:29:27 -0700 (Sun, 14 Mar 2010)
    Log Message:
    Remove the unnecessary dependency of blazeds-team app on data project.
    Modified Paths:
        blazeds/trunk/development/eclipse/projects/java/blazeds-team.war/.classpath

    I like it so far, good job I'll still always stick to the CLI for my package management most likely, but it's nice to have good GUIs out there, I always keep my eye out for them, and this is good so far. One small suggestion is for the AUR package, I don't think it should automatically add stuff to the daemons line in rc.conf, just my opinion. The install script should tell you to do it, but not actually do it, in my opinion, that's how every other package I see does it, but that's a minor issue

  • Are JDev9i UIX and BC4J application server dependent?

    Are UIX and BC4J application server dependent?
    If I use JDeveloper9i to build an application using UIX XML + BC4J + Java, then can this be deployed on IBM Websphere, Web Logic, Oracle 9iAS, etc...?

    BC4J and UIX are not tied to any application server. They are "just" a collection of jar files that you can deploy to any application server.
    Check out the how-to section to see the doc about deploying BC4J to other application servers at:
    http://otn.oracle.com/products/jdev/howtos/content.html
    (more info in the online help).
    Also check out otn's home page later today for a daily feature about BC4J openness.

  • How to use the classpath defined in a manifest file when debugging

    Using Jdeveloper 10.1.3.3.0 (or any version)
    I'd like to be able to debug using an executable jar which specifies my classpath and main class, without having to manually add all the jars to my debug configuration. Is there a way the debugger can extract that information from the manifest?
    The set of jar files included in my classpath varies depending on which client configuration the client wants to run and we could potentially have a hundred different configurations so there isn't an easy way to manage static libraries. Currently I have to open the jar, extract the manifest and manually add the jars so I can debug. Which is really painful when the configuration can change each time I run. The manifest and jar file are created at runtime based on what client configuration the user is trying to run and there can be multiple versions of a jar file in the directory with mangled names - so I can't just include all the jars.
    Any ideas?

    Run the program from command line, this way you will see the errors, if any.
    example.: java -jar theJarfile.jar
    I was successful in creating a comm application. I placed the win32com.dll in the same directory of my application jar file and all worked.
    I also extracted the comm.jar , and jar'd my app with the extracted comm files to make one jar.
    I also had a fileWriter() to get the clients jre path and my app would write the javax.properties file to the correct place.
    It took me severel weeks and late nights to accomplish this, but it was all necessary to be able to install only my app, and not a bunch of api's that were needed.

  • Setting CLASSPATH and PATH properly how?

    I have set PATH=c:\jdk_install_directory\bin which works fine. However, for example when I create an app or small program for example, simply to print out a line on the screen, it works when I compile in NetBeans. However, if I copy the java file to another directory, my C: root for example, I can compile it, but when I run the class file it gives me errors saying it can't find certain classes. So, I figure its something with the classpath variable that I have to fix. How can I do this properly for both J2SE and J2EE using default install directories for each.
    Thanks so much!!

    Your PATH is exactly what it should be.
    The CLASSPATH answer depends on where you're compiling and running.
    If you're doing things on the command line, I think the right answer is to use the -classpath option on javac.exe and java.exe.
    If you're using NetBeans or another IDE, the right answer is to add JARs and paths according to the idiom demanded by the IDE. Each one is different, and all the ones I know of ignore the system CLASSPATH environment variable. I don't have one set on my machine.

  • How do I disable the setting of the jbo.ApplicationCookie

    Hi,
    I am using BC4J with struts and have all my action mappings set to "stateless" releasemode. A cookie is still being set with the name "jbo.ApplicationCookie" and a value of "-1".
    The problem I'm having is that I'm working in an environment with mulitiple servers being loadbalanced by a hardware device, so there's no gaurantee that an individual user will land on the same server from request to request. I'm getting the error:
    oracle.jbo.common.ampool.ApplicationPoolException: JBO30006: The cookie for session A50D3FE5149C50CC0280FE083D3C4866 and application AccountService is not a valid handle for application pool, AccountServiceLocal. The cookie may not be used to access this pool instance.
    at oracle.jbo.common.ampool.ApplicationPoolImpl.validateSessionCookieInPool(ApplicationPoolImpl.java:2477)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2034)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:398)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:369)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:364)
    at oracle.jbo.html.BC4JContext.getApplicationModule(BC4JContext.java:152)
    ...and so on...
    can I just disable the setting of the jbo.ApplicationCookie altogether as I'm operating in stateless mode anyway??

    Ok, so the long identifier appears like it might be the Tomcat session identifier, which may very well be timed out as we have our session timeout parameter set very low. However, why should this foul up the Application Module pool when I'm running in "Stateless" mode?..Seems like an unnecessary dependency.
    oracle.jbo.common.ampool.ApplicationPoolException: JBO-30006: The cookie for session 1A6D244B9C1E0EBA88A2FDF8DAB2957E and application AccountService is not a valid handle for application pool, AccountServiceLocal. The cookie may not be used to access this pool instance.
    at oracle.jbo.common.ampool.ApplicationPoolImpl.validateSessionCookieInPool(ApplicationPoolImpl.java:2477)
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2034)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:398)
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:230)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:369)
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:364)
    at oracle.jbo.html.BC4JContext.getApplicationModule(BC4JContext.java:152)

  • [svn:bz-trunk] 16967: Bug: BLZ-549 - cyclic dependencies between core and remoting projects

    Revision: 16967
    Revision: 16967
    Author:   [email protected]
    Date:     2010-07-19 00:41:00 -0700 (Mon, 19 Jul 2010)
    Log Message:
    Bug: BLZ-549 - cyclic dependencies between core and remoting projects
    QA: Yes
    Doc: No
    Checkintess: Pass
    Details:
    -Removed the unnecessary dependency between core module tests and remoting module. Code module, including its tests, should not depend on any other module other than common module.
    -Remove blazeds-unittests project, instead added a test folder to blazeds-core project.
    -Fixed a minor bug in MessageDestination that I found during JUnit testing.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-549
    Modified Paths:
        blazeds/trunk/development/eclipse/projects/java/blazeds-core/.classpath
        blazeds/trunk/development/eclipse/projects/java/blazeds-core/.project
        blazeds/trunk/modules/core/src/flex/messaging/MessageDestination.java
        blazeds/trunk/modules/core/test/src/flex/messaging/DestinationTest.java
        blazeds/trunk/modules/core/test/src/flex/messaging/MessageBrokerTest.java
        blazeds/trunk/modules/core/test/src/flex/messaging/services/AbstractServiceTest.java
        blazeds/trunk/modules/core/test/src/flex/messaging/services/ServiceAdapterTest.java
    Removed Paths:
        blazeds/trunk/development/eclipse/projects/java/blazeds-unittests/.classpath
        blazeds/trunk/development/eclipse/projects/java/blazeds-unittests/.project

  • HOWTO deploy a JClient App in a 3tier Environment : Road Map needed.

    I've a JClent App and I need to run it in a 3tier environment.
    I mean I need to have as less code as possible running onto the client, distributed via Web Start, and as much code as possible running onto the Application Server (OC4J) in orer to take advantage of all Application Server facilities.
    OC4J does it, BC4J does it, JDeveloper does it but I don't understand how.
    I read the documentation but wasn't able to find my solution.
    I need a conceptual roadmap wich helps me to select the right components as well as a step by step instruction to create all deployments needed.
    Could someone help me ?
    Could Oracle provide such roadmap (I suspece it would be usefull for many JDev users) ?
    Tks
    Tullio

    Broadly the steps are
    1. Create a JNLP file which describes
    a) the list of jar files required
    b) specify main entry point in the application
    c) specify the security permissions required to run
    The JCLient WebStart wizard creates a jnlp file to
    perform the above.
    a) The jar files required to run the JClient app includes
    the BC4J runtime jars, JDBC jars, XML Parser jar etc.,
    and Project specific jar (client and middle tier). All
    these jar files are listed in the resources section
    of local.jsp and localmt.jsp
    <resources>
         <jar href="client.jar" />
         <jar href="mymt.zip" />
    b) the main entry point is specified in local.jsp
    <application-desc main-class="mypackage2.Panel1"/>
    c) security permission should be requested in local.jsp
    and localmt.jsp. The <security> tag should be child
    element of <jnlp> tag
         <security><all-permissions/></security>
    2) Sign the jar files
    Since we request all permission in the jnlp we should also
    sign the jar files that we use in the JClient application.
    This includes JClient Project specific jar files, BC4J
    Project specific jar files and then the BC4J runtime libraries.
    Since the BC4J runtime jars and other dependent jar files can
    be used in more than one client project they could be signed
    once and can be reused.
    BC4J\bin\create_jclient_ear.bat sign performs this step.
    To archive Project specific class and sign them, JClient Wizard
    creates an Ant script and adds it to your project. The file ctbuild.xml
    includes targets to and sign the classes in the JClient project.
    It also archives the BC4J Project which the JClient project is
    dependent on.
    3) Deploy the webstart application so that it can be accessed
    by the end user.
    a) deploy BC4J runtime and dependent jars to your web server.
    For ease of deployment to OC4J, JClient wizard adds a ear
    deployment profile to the project
    b) deploy project jar files using the client deployment war
    profile added to the project

  • Editing autoexec.bat when setting up j2sdk

    I have grown tired of entering the full location of the Java executables, so I attempted to edit my autoexec.bat as documented on the j2sdk instructions. When I entered my sysedit, the autoexec.bat file had a message stating that that particular file was "created as a placeholder and the actual autoexec.bat file was stored under a file named autoexec.tsh." Does anyone know how to edit the path for this kind of file? Where do I find this file?
    Thanks in advance for the help.
    Frank

    Now, can I do the same for the classpath, since it is not declared? If so, what should my statement look like for the >classpath?The following is from an old response of mine re classpath.
    CLASSPATH contents depend totally on what you establish as your Java environment.
    A classpath value tells Java to look "here" for the files that you create and for the files that your files need during compiling and running. (Java knows where it's "own" files and jars are, we don't any longer have to tell it where to find them.)
    If no classpath variable is set. Java uses a default CLASSPATH of the current directory. Many people can run this way.
    If you set a classpath it cancels the default setting. Therefore, it's necessary to start it with a period, which represents the current directory. Use a semicolon to separate this and subsequent entries.
    Follow that with directory paths that point to directories that you want Java to search to find files and jars that you create or that applications need to use. Do NOT quote directory paths that include spaces, the quotes cause a problem.
    If Java needs a file or jar and it can't find it in one of the classpath entries, it will complain with a "classpath not found" error.
    Here's my SET CLASSPATH statement:
    SET CLASSPATH=.;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_01lib\tools.jar;C:\mnrx;C:\NetRexx\NrxRedBk
    The subject has quite a bit more meat to it. If you're interested, here's reading:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html

  • Setting setNeedsDisplay or setNeedsDisplayInRect properly

    I have a Utility App which puts up a UIView which displays correctly the first time from the nib. Then I float several additional UIViews above that layer and manipulate them. Each of those is issued a setNeedsDisplay whenever I change the underlying type which either needs a new image, or to set the current image with self.hidden = YES;
    I also have a routine which updates a counter which resides as a graphic on the main UIView. For that, the initial image shows up just fine, but all updates, set by a single update routine that changes the image in a small rectangle (36x16) and then calls [self setNeedsDisplayInRect:myRect];as soon as the update has drawn the new images.
    In both cases, the updates do not seem to be happening.
    Am i missing something?
    I thought not, since the redrawing of the UIViews which are layered above the main UIView and are subviews of the mainView work just fine.
    As a last ditch thing to try, I decided to remove mainView from its superview (the window) and immediately add it back to the window as a subview. Maybe i should also do a retain in between just to make sure it doesn't go away on me, but the current code is
    UIView* mySuper = mainView.superview;
    // [mainView retain]; // is this needed?
    [mainView removeFromSuperview];
    [mySuper addSubview:mainView];
    // [mainView release]; // in case retain is needed
    So, what gives? Why does the setNeedsDisplay code work on the subview UIViews, but seems to be ignored on the main MainView UIView?
    In an early test case, I tried using setNeedsDisplay instead of setNeedsDisplayInRect for the counter, and it started drawing the counter at the wrong place on the screen, and only updating every so many increments at the correct location. Hence, the change to setNeedsDisplayInRect.

    Your PATH is exactly what it should be.
    The CLASSPATH answer depends on where you're compiling and running.
    If you're doing things on the command line, I think the right answer is to use the -classpath option on javac.exe and java.exe.
    If you're using NetBeans or another IDE, the right answer is to add JARs and paths according to the idiom demanded by the IDE. Each one is different, and all the ones I know of ignore the system CLASSPATH environment variable. I don't have one set on my machine.

  • Scatter plots / graphs

    We have not yet tried Flex, but we are interested using it
    for its charting capabilities. Does it have built-in charting
    components that allow scatter plots? If not, can anyone recommend
    third party products that produce scatter plots from dynamic
    data?

    Let's say JFreeChart is the simplest approach to do so, even though it actually might need a bit of documentation. My guess would be that you didn't include the jcommons library in your classpath, JFreeChart depends on it.
    http://www.jfree.org/jcommon
    You can always use Java's native drawing operations for simple plots, too, but i just would not recommend it. It might, however, be a good idea to just use the NumberAxis classes (located in JFreeChart lib) and design your own plot if you're not willing to invest too much time in this stuff. Those classes are fairly easy to use (although also poorly documented!).

  • Drawing window help

    can some one please help me i am trying to do my courswork on windows i need to use the drawing window but everytime i try to compile my code through command promt i get a message saying
    D:\>javac DrawLine.java
    DrawLine.java:1: package element does not exist
    import element.*;
    ^
    DrawLine.java:7: cannot find symbol
    symbol : class ConsoleWindow
    location: class DrawLine
    ConsoleWindow c = new ConsoleWindow();
    ^
    DrawLine.java:7: cannot find symbol
    symbol : class ConsoleWindow
    location: class DrawLine
    ConsoleWindow c = new ConsoleWindow();
    ^
    DrawLine.java:8: cannot find symbol
    symbol : class DrawingWindow
    location: class DrawLine
    DrawingWindow d = new DrawingWindow();
    ^
    DrawLine.java:8: cannot find symbol
    symbol : class DrawingWindow
    location: class DrawLine
    DrawingWindow d = new DrawingWindow();
    ^
    DrawLine.java:9: cannot find symbol
    symbol : class Pt
    location: class DrawLine
    Pt pressPoint, releasePoint;
    ^
    DrawLine.java:16: cannot find symbol
    symbol : class Line
    location: class DrawLine
    d.draw(new Line(pressPoint,releasePoint));
    ^
    7 errors
    and this is the code that i am using
    import element.*;
    public class DrawLine
    public static void main(String args[])
    ConsoleWindow c = new ConsoleWindow();
    DrawingWindow d = new DrawingWindow();
    Pt pressPoint, releasePoint;
    c.out.println("Press the mouse, drag out a line, and release!");
    d.awaitMousePress();
    pressPoint = d.getMouse();
    d.awaitMouseRelease();
    releasePoint = d.getMouse();
    d.draw(new Line(pressPoint,releasePoint));
    }

    Re: getting the name right: check the documentation and make sure you have it right!
    Re: the classpath, it depends on BlueJ. I have no idea how that works. But if it's like any other IDE I've ever seen, you have some kind of "project" attribute (to your IDE or project, not to the classes you're writing) or tab or menu item, and from there you can configure the project. One of the things you can configure is the class path. The element.* classes probably are in a jar file. So the IDE probably has a way to add that jar file to the class path.
    Check your documentation.

  • Database Matching in Php

    Hi I was wondering if any one could help me with a database matching code in php. I am trying to get the age and gender of a logged in user and matching it to another database that has pictures and content. I need the content echoed at the second database query to fit the users logged in age and gender.
    //Lets presume I have connected to the database and I have a session start enabled.
    $id=$_SESSIOIN['id'];
    //This uses the logged in session as a query to find out their age.
    $person=mysql_query("SELECT * FROM users  WHERE  id= '$id' ");
    while($row = mysql_fetch_assoc($person))
    // collecting data from database and turning it into variables.
    $age=$row['age'];
    $gender=$row['gender'];
    //This is a query to second database matching information from the first database
    $notel=mysql_query("SELECT * FROM content WHERE id=' ' , Ages='$age ', Genders='$gender' , pictures=' ', content=' '");
    while=($rows=mysql_fetch_assoc($notel))
    //here I try to echo all the pictures or content that  matches the echoed users age  and gender from the first database.
    echo " $rows=['pictures'];
              $rows=['content'];";
    PLease br welcome to change the code. I believe I am doing some thing wrong because I get errors when debug. The erros I usually related with the second database notel while loop.

    That's not quite what I was looking for but I think I have it right.  You only need to use one query:
    SELECT t1.age, t1.gender, t2.pictures, t2.content FROM users AS t1 INNER JOIN content AS t2 ON (t1.age = t2.age AND t1.gender = t2.gender) WHERE t1.id = $id;
    The one thing that I am still questioning is your second query where id, picture and content are = to null, or no value whatsoever.  I'm not sure why you had that in your second query and if those same columns existed in this content table as it does in the user table.  Again this will only select the age and gender from the users table and pictures and content from the content table because you did not state whether more rows are necessary for the page load and if they are unnecessary, depending on traffic and memory it is better practice to just select what you need when you need it rather than to return everything.  And actually if you don't need the age and gender printed on the page they could be removed from the select portion of the statement.

  • Launch Java App from Windows Desktop

    What's the best way to launch a Java application from a Windows XP desktop without the console showing?

    If your class Main.class is part of a package, you cannot invoke Main directly without providing the package. You may have to include the -classpath option (depending of the working directory). The default value for -classpath is "."
    You should try:
    javaw myPackage.Main
    (if the working directory is parent to directory 'myPackage')
    or
    javaw -classpath .;c:\xxx\xxx\. myPackage.Main
    "c:\xxx\xxx\" is your root package's parent directory. Note that you may have to double quote the specified path.
    For details:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html

  • The JSP Tag Exception

    I have a Struts V 1.1 application that uses Tiles Pluginn also. I have a layout file in which I have Header, Left Navigation Body, and footer. The body is tiles:insert page ="....". In the body I have a fmt:parseDate tag. If the date format in that tag is invalid the JSP somehow does not redirect to the error page. I do have the error page directive as <%@ page errorPage="/error.jsp" %>. It just shows ServletException right in the jsp text redered on a client browser. I have no clue why it would not process the error page JSP directive. Any help is appreciated

    It's complaining with a NoClassDefFoundError.
    Most likely you have something in your $CLASSPATH that depends on a
    class in your WEB-INF/lib. I'd start by removing anything you've added
    to the $CLASSPATH.
    Not sure why it's working when TwoPhase is false. There should not be
    any difference. Difficult to say without more info.
    You might find this eworld presentation helpful:
    https://www.bea-eworld2004.com/published/1144/1144_woollen_AG.pdf
    -- Rob
    Shyam wrote:
    Hi,
    I am seeing this strange problem - When I deploy an application using the weblogic
    console, it sets the attribute "TwoPhase" to "true" and I get a servlet exception
    which looks like one of the jsp tag classes isn't found in classpath.(I have tried
    putting the required jar in the web-inf/lib folder & had tried using the Manifest.mf
    classpath entry of the "war" file too). The same "ear" file gets deployed fine
    if I set this "TwoPhase" to "false". I will appreciate if anyone can explain what
    going on with this attribute and why weblogic doesn't seem to be able to find
    the class in one case but not in the other.
    The error message is something like this
    javax.servlet.ServletException: org/displaytag/tags/TableTag
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:452)
    Thanks,
    Shyam.

Maybe you are looking for

  • While installing sap netweaver pi 7.3 error occurred

    Hi, Experts. Hope all are doing good !!!!!!!!! Please help me how to solve below mentioned error.....  while installing sap nw pi 7.3 error occurred..... Here is the log file TRACE      2014-06-23 10:43:31.276 [synxcchapp.cpp:653]            CSyChild

  • Can I buy an iMac and pay in dollars and send it to Belguim?

    I will buy an iMac and pay in dollars. Can i send this imac (paid in dollars) to belguim with the apple store? Please answer ;)

  • Text missing from iCal

    Hi Everyone, I recently typed in a lot of text in my iCal giving details on specific events that take place for several hours. When I came back in today and opened my iCal I found that half of the longer explanations in calendar events was gone and r

  • Regd. ESS and CATS in ABAP webdynpro

    Hi Friends, Currently we are under ECC6.0 with the following SP13. SAP_BASIS     700     0013     SAPKB70013     SAP Basis Component SAP_ABA                     700     0013     SAPKA70013     Cross-Application Component And iam looking is the ESS an

  • Logitech mouse scroll fails to work why?

    Using OS X 10.8.4 I find suddenly my Logitech Nano Wireless Mouse is behaving strangely. The most notable being that the scroll wheel no longeer functions properly. I've varied speed and settings in System preferences but all to no avail. Can anybody