Refering to jars from Java Embedding  and Spring Context

Hi BPEL Experts
I have been trying to create a Agile PLM session and get data from Agile PLM using two jars AgileAPI.jar and agileclasses.jar. I have placed the jar in following location
C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext
then run build.xml, my MANIFEST.MF as follows
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 20.10-b01 (Sun Microsystems Inc.)
Implementation-Vendor: Oracle
Implementation-Title: Oracle SOA EXT
Implementation-Version: 11.1.1
Product-Name: Oracle SOA EXT
Product-Version: 11.1.1.4.0
Specification-Version: 11.1.1
Extension-Name: oracle.soa.ext
Class-Path: ext/AgileAPI.jar ext/agileclasses.jar ext/log4j-1.2.17.jar
  classes/
Then I updated BpelcClasspath From EM Console as follows
C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\AgileAPI.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\agileclasses.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\log4j-1.2.17.jar
Then Restarted the server, but seems the jars not loading to classpath, and the bpel is unable to refer to the jar. Please find the logs from server during the start up
** Setting up SOA specific environment for win...
PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
JAVA_OPTIONS= -Xverify:none
** End SOA Specific environment setup  for win.
** SOA specific environment is already set. Skipping ...
"Rijesh CLASSPATH value is =  C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C
:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORAC
LE~2\MIDDLE~1\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\ser
ver\lib\weblogic_sp.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~
2\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.ja
r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Midd
leware\Oracle_SOA1\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessag
ing-config_11.1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0
.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\
soa\modules\fabric-url-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle
.soa.fabric_11.1.1\oracle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\
Oracle_SOA1\soa\modules\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\
ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\
lib\xqrl.jar"
"Rijesh Classpath end"
JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
WLS Start Mode=Development
CLASSPATH=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C:\OracleSOA\Middlewa
re\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\patch_
ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.
jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.
3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\ORACLE~2\MIDDLE
~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Middleware\Oracle_SOA1\s
oa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessaging-config_11.1.1.ja
r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0.jar;C:\OracleSOA\Mi
ddleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\fabric-u
rl-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\o
racle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modu
les\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\ORACLE~2\MIDDLE~1\OR
ACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\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.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
Starting WLS with line:
C:\ORACLE~2\MIDDLE~1\JDK160~1\bin\java -client   -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\ORAC
LE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy  -Xverify:none  -da -Dplatform.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\se
rver -Dweblogic.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server  -Dcommon.components.home=C:\ORACLE~2\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging
.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Djrockit.optfile=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules
\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\servers\AdminServer -Doracle.domain.
config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1  -Digf.arisidbeans.carmlloc=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\
carml  -Digf.arisidstack.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\ORACLE~2\MIDDLE~1\USER_P~
1\domains\SOA_DO~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\servers\AdminServer\tmp\_WL_user -Doracle
.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.oamp
rovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.common.uddiurl.handler"|"oracle.bpm
.io.fs.protocol  -Dweblogic.jdbc.remoteEnabled=false -Doracle.security.jps.policy.migration.validate.principal=false  -da:org.apache.xmlbeans... -Dsoa.archives.dir=C
:\OracleSOA\Middleware\Oracle_SOA1\soa -Dsoa.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dsoa.instance.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Dtan
gosol.coherence.clusteraddress=227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.
MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\ORACLE~2\MIDDLE~1\WLSERV~1
.3\server\lib\DemoTrust.jks -Dem.oracle.home=C:\OracleSOA\Middleware\oracle_common -Djava.awt.headless=true -Dbam.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Du
ms.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.e
xt.dirs=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath  w
eblogic.Server
<Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this chec
k, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this
change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<Sep 22, 2014 7:13:12 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems I
nc.>
<Sep 22, 2014 7:13:12 PM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
<Sep 22, 2014 7:13:13 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Sep 22, 2014 7:13:13 PM IST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320400> <The log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\logs\
AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\OracleSOA\Middleware\user_projects\domains\soa_domain\serve
rs\AdminServer\logs\AdminServer.log00064. Log messages will continue to be logged in C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\log
s\AdminServer.log.>
<Sep 22, 2014 7:13:14 PM IST> <Notice> <Log Management> <BEA-170019> <The server log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServe
r\logs\AdminServer.log is opened. All server side log events will be written to this file.>
<Sep 22, 2014 7:13:17 PM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>

again, another unanswered question.
BTW I'l keep bumping these until I get an answer that works. I have been up 3 hours now trying to get this sorted and it's something that netbeans is supposed to do on its own!?!?!?!?!
Hello, SUN, is there anyone there???
No, didn't think so.

Similar Messages

  • Executing jar from java code, then kill parent java code

    Please suggest if there is any best way around on executing jar from java code then killing parent java code.
    a) I have desktop based java application say "Monitor.java" which runs every 5 minutes.
    b) How can I START external java application say "execute.jar" from Monitor.java THEN EXIT Monitor.java
    I tried various options using "ProcessBuilder" and calling bat file but I need Monitor (parent application to EXIT, immediately after calling child (execute.jar)
    Try1) ProcessBuilder builder = new ProcessBuilder("java -jar execute.jar");          
    Process process = builder.start();
    Try2) Runtime r = Runtime.getRuntime();
    Process p = null;
    p = r.exec(new String[] { "cmd", "/c", "start C:/temp/Test.bat" });

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • Reading files from Java embedding.

    Dear All,
    My BPEL process has a Java embedding node, and it invokes a Java class, in which an xsl file is being read for transformation.
    I deploy the xsl files directory together with BPEL package (the jar). In the package, I put the file dir at the root level, which means the jar structure looks like the following:
    /BPEL-INF
    /META-INF
    /xsd
    /xsl
    *.wsdl
    *.bpel
    bpel.xml
    The java class is package in /BPEL-INF dir, it's supposed to read files from /xsl dir.
    My question is, how should I put the file path?
    I tried "/xsl/***.xsl" and "../xsl/***.xsl", neither works. Although "/xsl/***.xsl" worked when testing in JDeveloper, but FileNotFound after deployment.
    Thanks,
    Haibo

    I solved this issue by putting the files dir in /BPEL-INF/classes/. and use ClassLoader to read in those files.

  • Add & use custom jars in "Java embedding" component

    I need to generate pdf file in process.
    So I included "Java embedding" component, and write my code. For clarity example:
    com.itextpdf.text.Document document = new com.itextpdf.text.Document( 
                        com.itextpdf.text.PageSize.A4, 50, 50, 50, 50); 
              try { 
                   com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter 
                             .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf")); 
                   document.open(); 
                   document.add(new com.itextpdf.text.Paragraph("This is test message")); 
                   catch (com.itextpdf.text.DocumentException de) { System.err.println(de.getMessage());  }
                   catch (Exception de) { System.err.println(de.getMessage());}
              document.close();Im using external jar file, of course I add it to classpath (right click soa project -> properties -> libraries and classpath ->add jar).
    But I get folowing error (no during compilation, but during deploying):
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "SimpleProcess" of composite "default/SOAProject!1.0*soa_9f8e80a4-346d-424e-9e12-1b69e2024e58"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    [04:35:23 PM] Check server log for more details.
    [04:35:23 PM] Error deploying archive sca_SOAProject_rev1.0.jar to soa_server1 [[fe80:0:0:0:5968:cb45:2001:f6ce]:8001] 
    [04:35:23 PM] ####  Deployment incomplete.  ####
    [04:35:23 PM] Error deploying archive file:/C:/Projects/SOAProject/deploy/sca_SOAProject_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)where ist the problem???
    Edited by: user1175491 on Nov 2, 2010 4:39 PM

    Ajaykumar, can u please write me what exactly append to bpel:exec part (which classes include?)? it looks now:
    <bpelx:exec name="GeneratePDF" version="1.5" language="java">
    <![CDATA[
                  com.itextpdf.text.Document document = new com.itextpdf.text.Document(  
                        com.itextpdf.text.PageSize.A4, 50, 50, 50, 50);  
              try {  
                   com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter  
                             .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf"));  
                   document.open();  
                   document.add(new com.itextpdf.text.Paragraph("This is test message"));  
                   catch (com.itextpdf.text.DocumentException de) {System.err.println(de.getMessage());}
                   catch (java.lang.Exception de) {System.err.println(de.getMessage());}  
              document.close();]]>
    </bpelx:exec>Edited by: user1175491 on Nov 2, 2010 5:07 PM
    Edited by: user1175491 on Nov 2, 2010 5:08 PM

  • Trouble creating jar from java applet in eclipse

    I have a java applet in eclipse which I can run, however, I need to be able to view the applet in IE, because certain pieces wont work when I run within eclipse. When I attempt to export the project to a jar it asks for a main class, which does not exist. Can someone please help as to how I can launch my applet from eclipse into IE, or how I can export it as a jar?
    Thanks!

    Don't you just use copy the class from your workspace and embed it in your HTML by pointing to it's new location. Eclipse only asks for the main class when exporting an executable Jar anyways. Why don't you just get the class and putting in your directory with your HTML?

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Call stored function / stored procedure from JAVA/JPA and pass array

    I fail calling a plsql function from java with jpa - it works perfect without the array but its not working with the array:
    PLSQL Function:
    function getHtml(pWhere VARCHAR2 DEFAULT NULL,
    pColSort HTP.STRINGARRAY) return clob is
    begin
    errorhndl.Log(pMessage => 'called');
    htp.prn('das ist der test
    for i in 1 .. pColSort.count loop
    htp.p('
    pColSort['||i||']: '||pColSort(i));
    end loop;
    htp.prn('
    <table> <tr> <td> max1.0 </td> <td> max2.0 </td> </tr>');
    htp.prn('<tr> <td> max1.1 </td> <td> max2.1 </td> </tr> </table>');
    htp.prn('test ende');
    return htp.gHtpPClob;
    exception
    when others then
    null;
    end getHtml;
    PLSQL TYPE: (in HTP package - self created - but could be anywhere else too)
    type STRINGARRAY is table of varchar2(256) index by binary_integer;
    JAVA DOA:
    public class ShowReportDOAImpl implements ShowReportDOA {
    private JdbcTemplate jdbcTemplate;
    private SimpleJdbcCall procShowReport;
    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
    this.jdbcTemplate = jdbcTemplate;
    procShowReport = new SimpleJdbcCall(this.jdbcTemplate)
    .withCatalogName("Show_Report")
    .withFunctionName("getHtml")
    .withoutProcedureColumnMetaDataAccess()
    .declareParameters(
    new SqlParameter("pWhere", Types.VARCHAR),
    new SqlParameter("pColSort", Types.ARRAY, "HTP.STRINGARRAY"),
    new SqlOutParameter("RETURN", Types.CLOB)
    public String readReport(Long id, ParameterHelper ph) {
    String[] sortCol = {"max", "michi", "stefan"};
    String pWhere = "fritz";
    MapSqlParameterSource parms = new MapSqlParameterSource();
    parms.addValue("pWhere", pWhere);
    parms.addValue("pColSort", sortCol, Types.ARRAY, "HTP.STRINGARRAY");
    parms.addValue("pColSort", Arrays.asList(sortCol), Types.ARRAY, "HTP.STRINGARRAY");
    Clob clob = procShowReport.executeFunction(Clob.class, parms);
    String clobString = "";
    try {
    System.out.println("length: "+new Long(clob.length()).intValue());
    clobString = clob.getSubString(1, new Long(clob.length()).intValue());
    } catch (SQLException e) {
    e.printStackTrace();
    return clobString;
    EXCEPTION IS:
    org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{? = call SHOW_REPORT.GETHTML(?, ?)}]; SQL state [null]; error code [17059]; Konvertierung zu interner Darstellung nicht erfolgreich: [max, michi, stefan]; nested exception is java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich: [max, michi, stefan]
    org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:969)
    org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1003)
    org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:391)
    org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:354)
    org.springframework.jdbc.core.simple.SimpleJdbcCall.executeFunction(SimpleJdbcCall.java:154)
    at.ontec.cat.config.doa.ShowReportDOAImpl.readReport(ShowReportDOAImpl.java:47)
    at.ontec.cat.http.ShowReport.doGet(ShowReport.java:80)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    root cause
    java.sql.SQLException: Konvertierung zu interner Darstellung nicht erfolgreich: [max, michi, stefan]
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
    oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:860)
    oracle.sql.ARRAY.toARRAY(ARRAY.java:209)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7767)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7448)
    oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7836)
    oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4586)
    org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166)
    org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166)
    org.springframework.jdbc.core.StatementCreatorUtils.setValue(StatementCreatorUtils.java:356)
    org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:216)
    org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:127)
    org.springframework.jdbc.core.CallableStatementCreatorFactory$CallableStatementCreatorImpl.createCallableStatement(CallableStatementCreatorFactory.java:212)
    org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:947)
    org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1003)
    org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:391)
    org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:354)
    org.springframework.jdbc.core.simple.SimpleJdbcCall.executeFunction(SimpleJdbcCall.java:154)
    at.ontec.cat.config.doa.ShowReportDOAImpl.readReport(ShowReportDOAImpl.java:47)
    at.ontec.cat.http.ShowReport.doGet(ShowReport.java:80)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    Please help!!
    Please help!!

    user8374822 wrote:
    PLSQL Function:
    function getHtml(pWhere VARCHAR2 DEFAULT NULL,
    pColSort HTP.STRINGARRAY) return clob is
    begin
    end getHtml;
    PLSQL TYPE: (in HTP package - self created - but could be anywhere else too)
    type STRINGARRAY is table of varchar2(256) index by binary_integer;
    JAVA DOA:
    new SqlParameter("pColSort", Types.ARRAY, "HTP.STRINGARRAY"),I don't know much (??) java and can't understand your error messages as they are not in english.
    But I have a feeling that the error is because either
    a) "Types.ARRAY" in Java world probably does not map to an index-by table in oracle or
    b) the array must be created as a SQL TYPE and not as a package variable or
    c) both of the above
    You may want to try following approaches
    1) Change the array type declaration to nested table i.e. use "type STRINGARRAY is table of varchar2(256)"
    2) If the above does not work, then create a sql type (using CREATE TYPE statement) to create STRINGARRAY as a SQL type of varchar2(256)
    Hope this helps.

  • Is restoration possible from java export and offline db backup

    Hi,
    We patched our sandbox from sps9 to sps11, but unfortunately we did not
    success doing it in prodcution. We have production servers CI export
    and offline backup ( we do not have DB export ) of SPS9, Please suggest
    can we reproduce our production system in to sandbox using CI export
    and offlinebackup of SPS9.
    If it is, then please suggest the way through which we proceed and get
    it as early as possible.
    Thanking your for your eraliest help and response.
    Regards,
    Nizam

    edit:  ok, I was confused by what you said before.  I think you are asking "how to create a sandbox from backup of production".
    First, I'm not sure if SAP has a tool to simpily change the SID, server names, system number, etc.
    To do this, you'll have a lot of fun (sarcastic):
    1. Restore offline backup from production to sandbox.
    2. Make sure your database permission fro SAP<sandboxSID>DB is set right.  Manually copy the permissions from the production database server just to be sure.
    3. Change all objects in the database from SAP<productionSID>DB schema to SAP<sandboxSID>DB.
    4. If the user SAP<productionSID>DB exists in the database, you can drop it at this time.  All object schemas should've been converted to SAP<sandboxSID>DB
    5. Run the config tool, click no when asked to use default DB credentials.  In the DB login information page, change the server from production to sandbox.  Change the user from SAP<productionSID>DB to SAP<sandboxSID>DB.
    4. Close config tool and open again, try to connect.  This is the first step, you MUST be able to connect successfully.
    5.  You now need to go through ALL entries in Java Administrator and Config Tool, to ...
      - Change all references to the production application server name to the sandbox server name.
      - Change all references to the production database server name to sandbox server name.
      - Change all reference to SAP<prodcutionSID>DB schema to SAP<sandboxSID>DB schema.
      - If the system number is different, you must locate all port, system number, etc. and change them too.
    6.  Lastly, there are some .config and .properties file in the cluster folder in the kernel directories.  You must ...
      - Change all references to the production application server name to the sandbox server name.
      - Change all references to the production database server name to sandbox server name.
      - Change all reference to SAP<prodcutionSID>DB schema to SAP<sandboxSID>DB schema.
      - If the system number is different, you must locate all port, system number, etc. and change them too.
    Gripe to SAP:  What the H guys ... ABAP = 4 places where I have to change when I shuffle systems around.  JAVA = like 4 million places.  Why why why why why why!!!!! Bang head on table
    Edited by: Kevin Lin on Aug 26, 2008 10:33 AM

  • Create a web service from java bean and map exceptions to SOAP faults

    Hi,
    We have to expose our Session stateless EJB3 as web services. I've tried to use annotations and jdev wizard "java bean to web service" and it works fine.
    Our problem now is that our methods can throw a business exception that contains a list of error message strings to be presented on the client.
    I did not find any way to use annotations to make it build a wsdl with soap fault mapped to our exception class. Neither I could to make the wizard to create wsdl with faults.
    As we are exposing already designed and implemented classes as web services, I think the bottom-top (java->wsdl) approach is better that top->botton (wsdl->java). Therefore, I'm looking for a possibility to generate the web services from the java beans and have the exception be mapped to a soap fault message.
    We are using jdev 10.1.3.1 and OAS 10.1.3.1., is there a way to map exceptions to soap faults using bottom->top approach?
    thank you

    A couple of links that may be of help:
    http://www.netbeans.org/servlets/ReadMsg?listName=nbj2ee&msgNo=1218
    My last question concerning web services:
    I have already written a session bean and I'd like to add some methods
    as a web service to it, how do I do that?
    Or I can only create another bean for a webservice and cannot modify the
    original one?You might create web service with existing sources and select you bean. New web services with appropriate lookup method will be generated.
    All web service method, that will be exposed in web service, you
    should add itself (Pop-up menu Web Service -> Add operation)
    http://usersguide.netbeans.org/files/documents/40/73/Chapter9-WebServices.pdf

  • Creating and running JARs from Java programs

    OK, I have been googling and searching, but this is something I cannot work out, so I raelly need some help.
    Basically, I am building a GUI app that would generate, compile and run java programs. And I also want to enable the users to create JARs they can later double-click if they want to run the program.
    I am using Runtime to compile programs and it works just fine. When I click on a button to create a JAR, my application creates one, but when I double-click on it, it can't find main and it exits. Now that is not so much unusual, but I am positive that my manifest file is OK, because when I run the same command from the command line, then I can click on the JAR file to run it.
    So what is the deal here? I mean, why would a JAR file created from the command line run and the one created through a GUI app using the very same command could not find main?
    Any help would be graetly appreciated.

    again, another unanswered question.
    BTW I'l keep bumping these until I get an answer that works. I have been up 3 hours now trying to get this sorted and it's something that netbeans is supposed to do on its own!?!?!?!?!
    Hello, SUN, is there anyone there???
    No, didn't think so.

  • Extract a jar  from one place and put extracted files in another place

    Hi,
    I need to extract a jar file from one location ie source and to keep the extracted in another place ie destination directory.Is there any command in jar or can any one give java codings to perform this.
    Thanks in advance
    Vindo

    Do you mean....
    cd directory/to/place/extracted/files
    jar xf full/path/to/yourjarfile.jar

  • Gif file not found in JAR from Java Application

    Hello Forumers,
    Could some one please explain how to create a JAR file from where I can get a GIF file. I have tried a number of different ways but it allways fails. (I have tried to add the GIF files using the jar command and I have tried to add it using WinZip after the jar is created).
    To isolate the problem I created this very simple program, the program works very well when the gif file resides on the directory from where I run the Application, but when I remove it from the directory it fails. I have tried to put the GIF file in the JAR in a number of different ways but it allways fails. (I have also tried with and without slash before the name of the GIF). I guess the problem is the way I create the JAR file
    import java.io.*;
    public class GifTest
    { public static void main(String args[])
    { InputStream in = GifTest.class.getResourceAsStream("/open.gif");
    if (in==null)
    System.out.println("Null returned");
    else
    System.out.println("OK");
    Any Hints appreciated
    /Kjell

    Hi,
    here is a small application using my own class GetImageIcon.
    Normally I have this "help-class" in a utility-package to use it from all my projects without copying. For this example I copied the code in the test application. Feel free to use the code of the class like you want. For me it works fine.
    Do the following:
    1. Create a folder called /meta-inf under the folder where the class-files are. Use a text-editor and create a file saved as "manifest.mf".
    manifest.mf tells the jar-file which is the main-class from where the application will start when double-clicked.
    It only has to contain one line:
    Main-Class: GifTest
    2. Compile and create the jar file. I made a bat-file containing:
    javac -verbose GifTest.java
    %pause
    REM Create Jar-File
    jar cmf meta-inf/manifest.mf GifTest.jar *.class *.gif
    REM Show Table of Content of the Jar-File
    jar tf GifTest.jar
    %pause
    So you can see what's in the jar-file.
    3. When you double-click on the jar-file the application is executed. So it is easier to use for the users. They don't have to type in anything on the command-line. You can deploy this jar-file to any client and run it. The only thing you have to do, is to install the JRE on the clients.
    I develop with JDK 1.3.1 and JRE 1.3.1 is installed on the clients of the company I work for.
    //Begin of the code
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.jar.*;
    public class GifTest extends JFrame
            protected JLabel m_title;
            protected ImageIcon m_image;
            static File file;
            //You have to define the name of the jar-file
            static String jarFile = "GifTest.jar";
            //Instance of the class GetImageIcon
            protected GetImageIcon gii = new GetImageIcon();
            public GifTest()
                    super("GifTest");
                    setSize(400,200);
                    //the name of the image and the name of the jar-file the image resides in
                    m_image = gii.getImageIcon("orb.gif", "GifTest.jar");
                    m_title = new JLabel(null, m_image, SwingConstants.CENTER);
                    getContentPane().add(m_title, BorderLayout.NORTH);
            public static void main(String argv[]) {
                    GifTest frame = new GifTest();
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    frame.setVisible(true);
    public class GetImageIcon{
    * @param fileName the full qualified name of the file
    * from the root of your application. use a "/" before the
    * fileName, eg. /images/warning.gif
        public ImageIcon getImageIcon(String fileName, String jarName) {
            int counter, c, i = 0;
            byte buffer[];
            JarFile  jfile;
            JarEntry jentry;
            InputStream in;
            ImageIcon m_image;
            try{
                    // Create Jar-File object from JarFile
                    jfile = new JarFile(jarName);
            catch(Exception ex){
                    System.out.println("JarFile-Problem " + "\n" + ex);
                    return null;
            try{
                    // create Jar-Entry object from File-Name in JarFile
                    jentry = jfile.getJarEntry(fileName);
            catch(Exception ex){
                    System.out.println("JarEntry-Problem " + "\n" + ex);
                    return null;
            try{
                    // create InputStream from JarEntry
                    in = jfile.getInputStream(jentry);
            catch(Exception ex){
                    System.out.println("JarEntry-Problem " + "\n" + ex);
                    return null;
            try{
                    //get uncompressed size of entry data in Jar-File and create byte-array with this size
                    buffer = new byte[(int)jentry.getSize()];
                    //write int-value 'c' (casted to byte) with read() and while-loop in byte-Array
                    while((c = in.read()) != -1){
                            buffer[i] = (byte)c;
                            i++;
            catch(Exception ex){
                    System.out.println("in.read()-Problem " + "\n" + ex);
                    return null;
            try{
                    //create ImageIcon with byte-Array 'buffer'
                    m_image = new ImageIcon(buffer);
            catch(Exception ex){
                    System.out.println("ImageIcon-Problem " + "\n" + ex);
                    return null;
            // return the created ImageIcon
            return m_image;
    }

  • Java, Maven and Spring (Classpath)

    Hello everybody,
    after having created a maven java-project (using eclipse Ganymed), I try to access a text file resource (that I already saved in src/main/resources) using the spring framework 3.0. For that I write the following:
    Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt);
    But this intstruction fails with a File Not Found Exception. That probably means that the folder *src/main/resources* is not on the classpath??
    The .classpath file generated by Maven looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="src" output="target/classes" path="src/main/java"/>
    <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
    <classpathentry kind="output" path="target/classes"/>
    </classpath>
    1- One can see that the src/main/resources is not in the classpath.
    Therefore trying to access to a resource in src/main/resources is not possible like this:
    Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt);
    So my question: Is this a maven problem or a spring one? How should I solve this problem?
    2- In the following instruction:
    Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt);
    Does the classpath keyword refers to the classpath generated by maven or to another one??
    3- What I also do not understand is, if the folders target/classes and target/test-classes are kind of aliases for src/main... and src/test...? In which hierarchy do they stand one another?
    Please tell me if you do not undesrtand my question. I could then try to better explain it Any help would be appreciated.
    Regards,

    Hi,
    First of all you need to check whether the '.txt' file is added in the resource folder under the build folder in you Spring project directory. As fas I understand, the text file is never added to the build folder.
    1. try using the build folder path to access the resource. Add the .txt to "target/classes" or some other folder under /targert and then try to access the file.
    2. the classpath is the defined for you spring project. Maven is a tool which assists in build process only. So whatever you find in maven xml files is nothing but the configuration of your spring project
    3. This question is not clear. please clarify.
    Thanks.

  • Read item from Java class and call to stored function/procedure of database

    Hi,
    I am looking solution that I was trying to find becasue of I am not expert and novice of ADF so I am getting problem to do. I am trying migrating from oracle forms to JDeveloper[ADF].
    I want to call database stored function from JSF pages by java bean class of a button press event (manually created) and after button event I have called java class which I created manually. But I can not read that values what I given into jsp page.
    question1: How can I read jsp pages items value to java class ?
    question2: How can I call to database stored function/procedure with that parameter?
    question3: How can I use return value of that stored function/procedure ?
    Please reply me .
    Thanks,
    zakir
    ===
    Edited by: Zakir Hossain on Mar 29, 2009 10:22 AM

    ---

  • How to invoke a JAR from Java Swing application?

    Hi,
    I am trying to start a jar file from the swings application.
    I am trying the following code,
    String cmd[] = new String[]{"cmd", "java -jar TestJFreeChart.jar"};
    try
           Process run = Runtime.getRuntime().exec(cmd);
    catch(Exception e)
    {}Is anything wrong in the usage?

    First try:
    "cmd /c java -jar app.jar" or cmd start, because it can't jsut run java.exe, it needs to be
    passed to the cmd interpretor witch further calls java.exe, etc
    Also read what stevejluke suggested. Its important to know if .waitFor or not.
    You wont understand these until you read the tutorial.

Maybe you are looking for