Accessing repository from a java app

Hi, I am trying to develop a java app that access a portal repository. I got
this error message when running the app:
java.lang.NoClassDefFoundError:
com/bea/content/manager/i18n/ManagerExceptionTextFormatter
at
com.bea.content.manager.internal.RepositoryManagerImpl.<clinit>(RepositoryMa
nagerImpl.java:31)
at
com.bea.content.manager.RepositoryManagerFactory.create(RepositoryManagerFac
tory.java:22)
at
com.bea.content.manager.RepositoryManagerFactory.connect(RepositoryManagerFa
ctory.java:35)
Anybody knows where that class is? Perhaps my approach was wrong.
tia
panji.a

Hi Greg, thanks for the confirmation. I think I'm going to access the
repository values in database directly, bypassing the repository API.
panji.a
"Gregory Smith" <[email protected]> wrote in message
news:[email protected]..
Whoops, I should have caught this in the first message.
The repository code is based upon local EJBs, so the api doesn't support
t3/rmi based access.
So, to write a non-server based application to access the repository,
you will need to construct a remoting piece which your application can
access. One good way would be to create .jws's which access the
repository code. .jws are WebServices, and I believe you can generate
client jars for them (I don't know the details about that). But, then
your client application would communicate via HTTP and SOAP to the .jws,
which would then communicate to the repository code. If you do this, you
won't need content_system.jar or wps_system.jar in your app's classpath.
Greg
Panji Aryaputra wrote:
Thanks for the prompt reply. It works, but now I'm getting another error
message: Repository configuration error
Looks like I missed something. That error comes from this piece of code:
RepositoryManagerFactory.connect()
"Gregory Smith" <[email protected]> wrote in message
news:[email protected]..
portal/lib/content_system.jar. You can just add server/lib/weblogic.jar
and portal/lib/wps_system.jar to your classpath to get most everything
portal at runtime.

Similar Messages

  • Opening a document from a Java app

    I need to open a document from my Java app. It is a .rtf file and I would like it to open with the system associated application for rtf files. How should I do that?
    I have tried to figure out the Runtime.exec(), but it doesn't do what I need. I have been able to open Notepad or WordPad (oh, yes, I am on a Win XT system) by specifying them in the exec function, but I can't find info on how to let the system choose the program.
    Thanks for your help.
    Wayne

    Take a look at the JDIC project
    https://jdic.dev.java.net/
    In particular the org.jdesktop.jdic.filetypes.AssociationService class
    https://jdic.dev.java.net/nonav/documentation/javadoc/0.9/index.html

  • Help me which JNDIFactory to use to access EJB from a java class of JAR

    I am confused in understanding the different JNDI factories
    RMIInitialContextFactory, ApplicationInitialContextFactory and ApplicationClientInitialContextFactory
    And the different namespaces like global, container local and component local.
    Especially is there any relationship between the JNDI factories and the namespaces?
    Or are they related to the deployment descriptors.
    Because in application specific deployment descriptors (orion-ejb-jar.xml), we just map the JNDI location with the object (or its reference from ejb-jar.xml). We dont specify it can be accessed from this factory or that.
    Shall we access an EJB from using any JNDI factory?
    Specifically, I am stuck with what Factory to use to access an EJB from a Java class in a library (jar). The JAR is packaged with the EAR which contains the EJB Jar that I am trying to access.
    THANK YOU

    Ed,
    As Robin said, I think you need code similar to this:
    Context c = new InitialContext();
    Object o = c.lookup("java:comp/env/Name");where Name is the name of your EJB as it appears in the "ejb-jar.xml"
    deployment descriptor XML file.
    Good Luck,
    Avi.

  • Starting notepad.exe from within Java app?

    Is it possible to start notepad.exe from within a java app to display a log file (for instance)?

    search the forum for Runtime.getRuntime()

  • Shell comands from a Java app

    Hi
    How can I run a shell command from within an Java app? For example I have a old executable sendEmail.exe on the file system and I am developing a Java GUI that should execute sendMail.exe when a user does something.
    Thanks
    Zeev Neumeier

    Runtime.getRuntime().exec("start//your file path");

  • Opening a file from a java app (not applet)

    My program can't find the text file I'm trying to open in my stand-alone java app. I am specifying it like this:
    File filename = new File("myfile.txt");
    FileReader = new FileReader(filename);
    It is in the same directly as the class files. It won't find it when it's in a jar file either. I had a similar problem with an applet a lont time ago, but that turned out to be a security issue, which I assume normal apps don't have.
    So, what's up with this?

    If system become larger, there are duplicated files
    can be found in different directories.
    Using classpath may cause problem, if there are
    duplicated file name.
    If you are coding, you should know exact location of
    the file to be opened.
    "system become larger" - huh? You control the classpath on a per-app basis, not one huge monolithic classpath containing all jars/folders for all apps.
    It's common, well-designed practice to use the classpath. It's bad practice to hard-code directory names and expect all deployments of the app to follow the same directory naming convention. I wouldn't want you to dictate to me where to put the file on my hard drive. I should be able to install it anywhere I want, and let it find it (via the classpath, in this instance).

  • From a Java app to a webpage

    Hi all
    Can anyone tell me how to do the following
    I have a Java app written in Jbuilder 7 that the user fills in.
    This is an order app. when the user sees the client they fill in all the detials of each order and saves it to there Hard drive. Now when they get back to the office they need to upload it to a webpage.
    Can anyone tell me where to start looking or show me how I can do this
    thanks for any comments
    Craig

    There is a number of free HTTP clients out there. Yuo can use one of them to post the information using http. If you are sending just a few fields, you can use just a URLConnection object.

  • Executing class files from a Java App dynamically

    Hi!, Is there any way i can execute java .class files from my Java Application dynamically. I know that java uses Dynamic method Invocation. Is that true of class files generated using some other language compiled for the JVM.
    In my case i would like to make a Web browser that interprets HTML and also java applets embeded in them. I would like to use the JRE of the platform execute the applets for me rather than writing the code for my Browser to interpret the class files.
    Thanks in Advance.

    You just need a custom class loader to bring these applets into your JVM.
    http://developer.java.sun.com/developer/onlineTraining/Security/Fundamentals/magercises/URLClassLoader/index.html
    Then you can use the methods of java.lang.Class to create an instance of such a class. As soon as you have it, you can just treat it as a regular Applet and invoke init(), stop() etc. appropriately.
    If you want to execute anything else than conventional Applets, you might consider reflection to find out about methods implemented:
    http://java.sun.com/docs/books/tutorial/reflect/index.html

  • Error while trying to access repository from Application Explorer

    Hi All,
    I am trying to access the targets which I had previously created from AE. Everything was working fine. When I tried running iwae.sh script and open the target from AE it throws below error today.
    com.iwaysoftware.iwrepository.RepositoryException
    at com.iwaysoftware.iwrepository.xml.XMLRepository.end(XMLRepository.java:272)
    at com.iwaysoftware.iwrepository.xml.file.FileRepository.end(FileRepository.java:436)
    at com.iwaysoftware.iwrepository.xml.XMLQuery.executeQuery(XMLQuery.java:863)
    at com.iwaysoftware.af.container.IWAFRepositoryOP.getConfigs(IWAFRepositoryOP.java:167)
    at com.iwaysoftware.af.container.IWAFRepositoryStorage.listConfigurations(IWAFRepositoryStorage.java:215)
    at com.iwaysoftware.af.container.ChannelManager.listConfigurations(ChannelManager.java:100)
    at com.iwaysoftware.af.container.IWAFContainer.listChannelConfigurations(IWAFContainer.java:360)
    at com.iwaysoftware.af.container.AEManager.buildChannelList(AEManager.java:252)
    Not sure what has changed? Is this a corruption with the repository.xml file ? Is there any way to get around this error.
    Regards
    Subhankar

    Hi all,
    The above mentioned solution is a good idea but in this context not appropriate as it aims at resolving an issue in the delivered Content Version of 0TCT_VC11.
    In your case, you already have 0TCT_VC11 activated and you can not read any data from this VirtualProvider in queries. Right?
    In that case, you have to:
    1. Check that the entire data flow is active for the InfoProvider (activation should occur for the MYSELF source system): 0TCT_VC11 with InfoSource 0TCT_IS11 with DataSource 0TCT_DS11
    2. Activate the direct access for the VirtualProvider (Context menu of 0TCT_VC_11 > Activate Direct Access > Source Syst. for InfoSource3.x > Mark the column with the MYSELF source system and Save).
    This corresponds to Installation "Step 5.) Activate direct access for virtual providers" that is mentioned in SAP Note 934848 "Collective note: (FAQ) BI Administration Cockpit".
    Best regards,
    Rudolf Hennecke
    SAP NetWeaver RIG BI

  • Issue in accessing EJB from plain java

    Hi,
    I am new to OAS. I am using OAS 10.1.2.
    I want to access EJB which runs inside OAS, through a plain java program which runs from outside the OAS environment (standalone java program).
    I am confused on what to use. RMIInitialContextFactory or ApplicationClientInitialContextFactory for the context in the java program.
    what should be the provide URL ?
    java.naming.provider.url","ormi://hostname:18140/
    is it "ormi" or something else? what is the port number should i use. there are many ports in this OAS. i see that in the console("Ports") link.
    also let me know what should i mention in the EJB xml descriptor.
    Is this lookup to be done by retrieving from jndi?
    pls help.
    Thanks,
    Sukumar
    with this confusion i developed an EJB with the following details
    ejb-jar.xml
    <ejb-ref>
         <ejb-ref-name>ejb/testDetails</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.xxx.xxx.testDetailsHome</home>
    <remote>com.xxx.xxx.testDetails</remote>
         </ejb-ref>
    orion-ejb-jar.xml
    <entity-deployment name="ejb/testDetails" location="ejb/testDetails"
    Client Java program
    public class testDetailsClient
    public static void main(String [] args)
    testDetailsClient testDetailsClient = new testDetailsClient();
    try
    Context context =getInitialContext();
    testDetailsHome testDetailsHome = (testDetailsHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/testDetails"), testDetailsHome.class);
    testDetails testDetails;
    catch(Throwable ex)
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    //env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url","ormi://host_name:18140/"); //23791 18140
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "abc123");
    InitialContext context = new InitialContext(env);
    return context;
    if i execute this, it says
    javax.naming.NameNotFoundException: java:comp/env/ejb/testDetails not found
    18140 is Application Server Control RMI port.
    if i run the same code with ApplicationClientInitialContextFactory, it throws exception saying
    java.lang.InstantiationException: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.administration.ApplicationResourceFinder.getEJBHome(ApplicationResourceFinder.java:268)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:161)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.testdetails.testDetailsClient.getInitialContext(testDetailsClient.java:89)
         at com.testdetails.testDetailsClient.main(testDetailsClient.java:20)
    pls help

    Hi,
    you do not have to package your EJB and PAR together! You can deploy them separately and then reference the J2EE Application from your PAR or vice versa to access it.
    For instance you can access the EJB from your PAR as described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    Or you can access a Portal application from J2EE like described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Even if you package your PAR in to the same EAR with your EJB they will result in two different containers on the J2EE Engine and you will have to reference them as described in the link above to access the functionality of one component from the other.
    Best regards,
    Stefan Brauneis

  • Automatic Creation of ODBC Data Source From Within Java App

    Good Day Good People :)
    I was wondering if it were possible for a java application to automatically set up an ODBC data source for a JDBC connection in a windows environment.
    This is the method I call to initialise a connection to my database:
    public void initialiseLocalConnection ()
    url = "jdbc:odbc:ICUDB";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    catch (Exception e)
    JOptionPane.showMessageDialog (null, "Error Creating Connection to ICU Database!\n" +
    "Please set up an ODBC data source pointing\n" +
    "to the icudb.mdb file located in the data\n" +
    "folder of the ICU directory and call the\n" +
    "connection 'ICUDB'.", "Database Connection Error", JOptionPane.ERROR_MESSAGE);
    Is it possible to create the ODBC data source ICUDB if it does not exist from within my application.
    All information regarding the possibilty and the application of doing this would be greatly appreciated.
    Kind Regards
    Matt

    Thank you.
    During my search I for dsn-less connections I found the soloution:
    url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" +
    System.getProperty ("user.dir") + System.getProperty ("file.separator") +
    "data" + System.getProperty ("file.separator") + "icudb.mdb";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    This works.
    Thanks for the replies.
    Matt :)

  • Access Price data form Java App

    Hi All,
    This is a question of can it be done.
    If a Java program runs from a website and is used to stream currency price data can I use another program to access the price data that is being streamed to the Java program?
    I do not have access to any API's just the GUI.
    Program is at http://fxtrade.oanda.com/fxgame/ but requires a login. Is free
    Thanks

    If a Java program runs from a website and is used to
    stream currency price dataI guess we are talking about an applet?
    can I use another program
    to access the price data that is being streamed to
    the Java program?No
    Kaj

  • Accessing JNDI from Standalone JAVA application

    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

    You can strip out the jndi related classes from the weblogic.jar which can be distributed
    to the client installation. I don't think you will be violating any bea licensing
    policies with this.
    Rajan Kumar <[email protected]> wrote:
    Hi,
    I want to access the JNDI tree from my
    standalone java application. (ie I have
    one weblogic server contains all my ejbs and client - swing - application
    which accesses that. )
    Here I don't want to ship weblogic.jar
    file to the client with swing application
    because it is of ~ 20 MP.
    Any other way to specify the INITIAL_CONTEXT_FATORY class.
    My code is
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, DTEConfig.PROVIDER_URL);
    But since I don't want to give the
    weblogic.jar bundle to my client, how he
    could manage this with out weblogic.jndi.WLInitialContextFactory
    with him to get the initialContext ?
    -Rajan Kumar

  • Accessing variables in non java apps like word, etc... in OSX and XP

    I need lots of help with this...
    http://forum.java.sun.com/thread.jsp?forum=54&thread=524137

    I think the answers that are in that thread are about all you're going to get from anyone else.
    Java is meant to be platform independent, and therefore would not have any way to hook into any mechanism to do what you want to do. That type of thing would be highly OS dependent for various reasons. This is not something that Java (except thru JNI, which at that point, isn't really Java) is going to be able to do. I could be wrong, but I'm inclined to believe it's not something you could do with any application either, only ones that provide an open API to hook into it which may or may not provide the functionality needed.
    Of course, there's aways screen capture and trying to read that way.

  • Compiling application (with several sub-packages) from another java app

    Hi,
    I'm writing my own build tool and need to be able to compile an external application (pulled from cvs, subversion, ...) from within this build tool.
    Probably I need to use com.sun.tools.javac.Main.compile ?
    But how do I pass classpath, output dir, etc to this class and how can I make it compile all files in all (sub)packages of the given folder ?
    thanks for any help.

    Never mind my previous post, I found a solution to the "the input line is too long" problem:
    Putting all the files in a temporary file and then providing that file as the source to compile, like this:
    javac -g:none -cp <classpath> -d classes @sourcefiles.txtwhere sourcefiles.txt is the name of the temporary file that contains the names of the source files (note the "@"-prefix)
    For some reason, this is not mentioned/documented in the java docs (at least not in my docs)
    Ok, so everything is compiling now, but I have one problem remaining:
    For each "module" that I compile (the application I use for my tests consists of several "modules", i.e. subpackages), I get an error stating that "The system cannot find the path specified"
    This seems obvious, because it is trying to write a file <package-name>\classes\<package-name>\<classname>.class
    But why is it trying to write that file ?
    -> Is this a known bug or something ?
    Let me explain a little more...
    For each compilation I do using the com.sun.tools.javac.Main.compile() method, it is giving this error.
    Everything is compiling correctly, but it seems it is trying to write an extra class file to a wrong path.
    Until now, it was always the first file in the row that gave the problem.
    Example:
    ** module 1:
    sources/com/example/module1/class1.java
    sources/com/example/module1/class2.java
    sources/com/example/module1/class3.java
    sources/com/example/module1/sub1/subclass1.java
    sources/com/example/module1/sub1/subclass2.java
    sources/com/example/module1/sub1/subclass3.java
    ** module 2:
    sources/com/example/module2/class1.java
    sources/com/example/module2/class2.java
    sources/com/example/module2/class3.java
    sources/com/example/module2/sub1/subclass1.java
    sources/com/example/module2/sub1/subclass2.java
    sources/com/example/module2/sub1/subclass3.java
    => My application will compile module 1, do some other things with it and the module 2 and again do some other things with it.
    The result would be:
    Application started.
    Loading configuration: OK
    Compiling sources for module module1: E:\temp\_User_\project\packaging\workingdir\source\com/example/module1\class1.java:12: error while writing com.example.module1.class1: com\example\module1\classes\com\example\module1\class1.class (The system cannot find the path specified)public class class1 extends Thread {
           ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    1 error
    OK
    Note: Contents of my classes directory for module1:
    classes/com/example/module1/class1.class
    classes/com/example/module1/class2.class
    classes/com/example/module1/class3.class
    classes/com/example/module1/sub1/subclass1.class
    classes/com/example/module1/sub1/subclass2.class
    classes/com/example/module1/sub1/subclass3.class
    => all class files are correctly compiled
    Compiling sources for module module2: E:\temp\_User_\project\packaging\workingdir\source\com/example/module2\class1.java:12: error while writing com.example.module2.class1: com\example\module2\classes\com\example\module2\class1.class (The system cannot find the path specified)public class class1 extends Thread {
           ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    1 error
    OK
    Application finished without errors.
    Note: Contents of my classes directory for module2:
    classes/com/example/module2/class1.class
    classes/com/example/module2/class2.class
    classes/com/example/module2/class3.class
    classes/com/example/module2/sub1/subclass1.class
    classes/com/example/module2/sub1/subclass2.class
    classes/com/example/module2/sub1/subclass3.class
    So, as you can see everything compiles as expected, but an error message is displayed related to each first file that is compiled.
    ==> Is this a known issue ?
    ==> What can I do about it ?
    Suggestions welcome

Maybe you are looking for

  • Error on Production Orders Add-on when 2 or more users at the same time.

    Hi. Our add-on creates special production orders (SAPbobsCOM.BoProductionOrderTypeEnum.bopotSpecial) with no problem when used by one user, but if there are two or more users  everyone on his own SAPBO session it starts to throw different errors, we

  • Convert integers to equivalent characters in string - NOT ASCII code character

    I have to output my data and associated string information to a string array and then to a spreadsheet file. I want to do this by converting integers (and other numbers) to an identical string of characters. I have tried Type Cast with a string const

  • Select is not working with date range .

    In my program doing a simple select from cdhdr table based on date range i have created but it fails . here is the code I am using. SELECT SINGLE *   FROM tvarv  INTO  wa_tvarv WHERE name EQ 'Z_SERVICE_CHANGE_DATE' . move wa_tvarv-low to v_date . mov

  • IPhone 5 time off by one hour.

    I just purchased a new Sprint iPhone 5 last week. This morning I woke up and the clock was off by exactly one hour. I tried turning the phone on and off and resetting it to no avail. Finally I went into settings > date & time and turned on and off th

  • Install itunes on pc

    after uninstalling Itunes in my PC now it won't download. how can I install itunes on my PC?