Error when I import classes using directive JSP page
Hi all!
I have installed JDeveloper 11g (11.1.1.3.0)
My applications are located in the C:\dir (JDEV_USER_DIR = C:\dir)
I Created application "Appliation1". In it i created 2 projects (Project1, in it beans session entity and other java classes; Project2, in it JSP).
I want import classes from Project1 to Project2 using next directive:
<%@ page contentType="text/html;charset=windows-1252"
import="project1.*"%>
so in Project properties of Project2 set the way to classes in Project1.
When i run JSP an error occurred:
Error(4,9): The import project1 cannot be resolved
Maybe i'm not set correctly the way to the classes
Thanks in advance.
angelr, thanks, it helped me)
In jdeveloper 10g i set address in Project Properties->Libraries and Classpath->Add JAR/Directory;
and set the way to my classes;
and it worked.
in the 11 version seems different
Similar Messages
-
Error when working with TableView using JCA
Hi sdns,
I am getting an iview rutnime error when working with Tableview using JCA. Here i am putting all my code, go thorugh it and tell me if any error is there.One more thing is Usermappping and all properties are set to system object.
Now you can throught he code which is followed by error also.
<u>Java file.</u>
public class DisplayComponent extends PageProcessorComponent {
public DynPage getPage() {
return new DisplayComponentDynPage();
public static class DisplayComponentDynPage extends JSPDynPage {
private JCATviewBean bean;
public void doInitialization() {
IPortalComponentProfile profile =
((IPortalComponentRequest) getRequest())
.getComponentContext()
.getProfile();
Object o = profile.getValue("myBean");
if (o == null || !(o instanceof JCATviewBean)) {
bean = new JCATviewBean();
profile.putValue("myBean", bean);
} else {
bean = (JCATviewBean) o;
// fill your bean with data here...
IPortalComponentRequest request =
(IPortalComponentRequest) this.getRequest();
doJca(request);
public void doProcessAfterInput() throws PageException {
public void doProcessBeforeOutput() throws PageException {
this.setJspName("Report.jsp");
private IConnection getConnection(
IPortalComponentRequest request,
String alias)
throws Exception {
IConnectorGatewayService cgService =
(IConnectorGatewayService) PortalRuntime
.getRuntimeResources()
.getService(
IConnectorService.KEY);
ConnectionProperties prop =
new ConnectionProperties(
request.getLocale(),
request.getUser());
return cgService.getConnection(alias, prop);
public void doJca(IPortalComponentRequest request) {
IConnectionFactory connectionFactory = null;
IConnection client = null;
String rfm_name = "BAPI_COMPANYCODE_GETLIST";
try {
try {
// pass the request & system alias
// Change the alias to whatever the alias is for your R/3 system
client = getConnection(request, "MyIDES");
} catch (Exception e) {
System.out.println(
"Couldn't establish a connection with a target system.");
return;
Start Interaction
IInteraction interaction = client.createInteractionEx();
IInteractionSpec interactionSpec =
interaction.getInteractionSpec();
interactionSpec.setPropertyValue("Name", rfm_name);
CCI api only has one datatype: Record
RecordFactory recordFactory = interaction.getRecordFactory();
MappedRecord importParams =
recordFactory.createMappedRecord(
"CONTAINER_OF_IMPORT_PARAMS");
IFunctionsMetaData functionsMetaData =
client.getFunctionsMetaData();
IFunction function = functionsMetaData.getFunction(rfm_name);
if (function == null) {
System.out.println(
"Couldn't find " + rfm_name + " in a target system.");
return;
How to invoke Function modules
System.out.println("Invoking... " + function.getName());
MappedRecord exportParams =
(MappedRecord) interaction.execute(
interactionSpec,
importParams);
How to get structure values
IRecord exportStructure = (IRecord) exportParams.get("RETURN");
String columnOne = exportStructure.getString("TYPE");
String columnTwo = exportStructure.getString("CODE");
String columnThree = exportStructure.getString("MESSAGE");
System.out.println(" RETURN-TYPE = " + columnOne);
System.out.println(" RETURN-CODE = " + columnTwo);
System.out.println(" RETURN-MESSAGE =" + columnThree);
How to get table values
IRecordSet exportTable =
(IRecordSet) exportParams.get("COMPANYCODE_LIST");
exportTable.beforeFirst();
// Moves the cursor before the first row.
while (exportTable.next()) {
String column_1 = exportTable.getString("COMP_CODE");
String column_2 = exportTable.getString("COMP_NAME");
System.out.println(
" COMPANYCODE_LIST-COMP_CODE = " + column_1);
System.out.println(
" COMPANYCODE_LIST-COMP_NAME = " + column_2);
// create the tableview mode in the bean
bean.createData(exportTable);
Closing the connection
client.close();
} catch (ConnectorException e) {
// app.putValue("error", e);
System.out.println("Caught an exception: \n" + e);
} catch (Exception e) {
System.out.println("Caught an exception: \n" + e);
<u>Bena file</u>
package com.sap.JCA.bean;
import java.util.Vector;
import com.sapportals.connector.execution.structures.IRecordSet;
import com.sapportals.htmlb.table.DefaultTableViewModel;
import com.sapportals.htmlb.table.TableViewModel;
public class JCATviewBean {
public DefaultTableViewModel model;
public TableViewModel getModel() {
return this.model;
public void setModel(DefaultTableViewModel model) {
this.model = model;
public void createData(IRecordSet table) {
// this is your column names
Vector column = new Vector();
column.addElement("Company Code");
column.addElement("Company Name");
// all this logic is for the data part.
Vector rVector = new Vector();
try {
table.beforeFirst();
while (table.next()) {
Vector data = new Vector();
data.addElement(table.getString("COMP_CODE"));
data.addElement(table.getString("COMP_NAME"));
rVector.addElement(data);
} catch (Exception e) {
e.printStackTrace();
// this is where you create the model
this.setModel(new DefaultTableViewModel(rVector, column));
<b>JSP File:</b>
<%@ taglib uri="tagLib" prefix="hbj" %>
<jsp:useBean id="myBean" scope="application" class="com.sap.JCA.bean.JCATviewBean" />
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
<br>
<hbj:textView id = "tv1" text = "<b>TableView Example Using JCA</b> <br>"/>
<hbj:tableView
id="myTableView1"
model="myBean.model"
design="ALTERNATING"
headerVisible="true"
footerVisible="true"
fillUpEmptyRows="true"
navigationMode="BYLINE"
selectionMode="MULTISELECT"
headerText="TableView example1"
visibleFirstRow="1"
visibleRowCount="30"
width="500 px"
/>
</hbj:form>
</hbj:page>
</hbj:content>
<b>Error when Executing this component:</b><u></u>
Portal Runtime Error
<b>An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
com/sapportals/portal/htmlb/page/PageProcessorComponent.
Exception id: 12:21_28/10/05_0173_94105150
See the details for the exception ID in the log file</b>
If anybody find the error please reply to this post.
Regards,
sireesha.Thanks for your response Martin,
I have already seen the log file but im couldn't findout anything from that since it is so long here im putting some part of please see this.if u able to find it clarify me,
<b>Here the log file:</b>
1.5#001321FD6213005D0000907100001CB000040419258FBF4E#1130405957843#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
#1.5#001321FD6213005D0000907200001CB00004041925916735#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
#1.5#001321FD6213005D0000907300001CB0000404192591688D#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
#1.5#001321FD621300650000120E00001CB00004041925C953D7#1130405961625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
#1.5#001321FD6213005D0000907400001CB000040419275B24FC#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
#1.5#001321FD6213005D0000907500001CB000040419275B25D9#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
#1.5#001321FD6213005D0000907600001CB000040419275B2E27#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
#1.5#001321FD6213005D0000907700001CB000040419275B2EFA#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
#1.5#001321FD6213005D0000907800001CB0000404192924ED59#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
#1.5#001321FD6213005D0000907900001CB0000404192924EE36#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
#1.5#001321FD6213005D0000907A00001CB0000404192924F652#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
#1.5#001321FD6213005D0000907B00001CB0000404192924F710#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
#1.5#001321FD621300650000120F00001CB000040419295CCD8B#1130406021625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
#1.5#001321FD6213005D0000907C00001CB0000404192AEEB1E2#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
#1.5#001321FD6213005D0000907D00001CB0000404192AEEB2C0#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
#1.5#001321FD6213005D0000907E00001CB0000404192AEEBAD8#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
#1.5#001321FD6213005D0000907F00001CB0000404192AEEBB9E#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job# -
Dear all,
Do we have any extra things to execute the Java mapping using the Sax Parser?
When I am executing the interface mapping ,I am getting the" Linkage error when loading the class" error.
Kindly let me know your personnel maildId so that I can mail you the screen shots.
Thanks,
SrinivasaDear sunil,
Find the File.
Source:
<MTO_FTP_MAT_DETAILS>
<MATDETAILS>
<MAKTX>
<MATNR>
<WERKS>
<LABST>
<MEINS>
<PERCNT>
TARGET
MTI_FTP_MAT_DETAILS
<MATDETAILS>
<MAKTX>
<MATNR>
<WERKS>
<LABST>
<MEINS>
<PERCNT>
Source:
<MTO_FTP_MAT_DETAILS>
<MATDETAILS>
<MAKTX>
<MATNR>
<WERKS>
<LABST>
<MEINS>
<PERCNT>
TARGET
MTI_FTP_MAT_DETAILS
<MATDETAILS>
<MAKTX>
<MATNR>
<WERKS>
<LABST>
<MEINS>
<PERCNT>
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import com.sap.aii.mapping.api.StreamTransformation;
class Echo {
public static OutputStream out;
public class myEcho extends DefaultHandler implements StreamTransformation {
private Map map;
public void setParameter(Map param) {
map = param;
public void execute(InputStream in, OutputStream out) {
DefaultHandler handler = this;
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser saxParser = factory.newSAXParser();
Echo.out = out;
saxParser.parse(in, handler);
} catch (Throwable t) {
t.printStackTrace();
public void startDocument() throws SAXException {
try {
Echo.out.write("<?xml version='1.0' encoding='UTF-8'?>".getBytes());
} catch (IOException e) {
e.notify();
public void endDocument() throws SAXException {
try {
Echo.out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startElement(String namespaceURI, String sName, // simple name
String qName, // qualified name
Attributes attrs) throws SAXException {
String eName = sName; // element name
if ("".equals(eName))
eName = qName; // not namespace-aware
if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
try {
Echo.out.write(("<MTI_FTP_MAT_DETAILS>").getBytes());
} catch (Exception e) {
e.printStackTrace();
} else {
try {
Echo.out.write(("<" + qName + ">").getBytes());
} catch (Exception e) {
e.printStackTrace();
public void endElement(String namespaceURI, String sName, // simple name
String qName // qualified name
) throws SAXException {
String eName = sName; // element name
if ("".equals(eName))
eName = qName; // not namespace-aware
if ("ns0:MTO_SAP_MAT_DETAILS".equals(qName)) {
try {
Echo.out.write(("</MTI_FTP_MAT_DETAILS>").getBytes());
} catch (Exception e) {
e.printStackTrace();
} else {
try {
Echo.out.write(("</" + qName + ">").getBytes());
} catch (Exception e) {
e.printStackTrace();
public void characters(char buf[], int offset, int len)
throws SAXException {
String s = new String(buf, offset, len);
try {
Echo.out.write(s.getBytes());
} catch (Exception e) {
e.printStackTrace(); -
How to use self-defined class in a jsp page
Hello:
I defined a class for displaying purpose, which is in the different folder(WEB-INF/classes) from my JSP page.
In my JSP page, I want to create an instance of my class and display something, while I get the following error: "
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /htmls/templateIntro.jsp
Generated servlet error:
[javac] Compiling 1 source file
/home/jiao/jsp_webserver/tomcat/work/Standalone/localhost/syllabus/htmls/templateIntro_jsp.java:72: cannot resolve symbol
symbol : class Display
location: class org.apache.jsp.templateIntro_jsp
Display display=new Display(out);"
How can I solve this problem? Should I redefine my classpath or there are some other actions I should take.
T.I.A.
Oriental SpiritHere is what I have done:
1) in Display.java, add one line "package tools;" on the top, and compile it to
create Display.class.
2) create a new folder at
/home/jiao/jsp_webserver/tomcat/webapps/syllabus/WEB-INF/classes
named tools and then put the Display.class into the newly created folder.
3) in my jsp page, add " import="tools.*"
But it still doesn't work.
Any ideas? T.I.A. -
I always get an ERROR when I import avi videos in After Effects !!
Hi There
As I said in the title ,,
I always get an error when I import an (avi) video into After Effects CS5.5 ,,
and I don't Know why ,
in other hand I can open the same video I imported it in many media programs like : Windows Media Player-Quike Time-Windows Media Center- Real Player ,, except After Effect !
Although the same Program I used before Formatting the computer ,, but after Formatting the Projects file for Adobe After Effect didn't Open as well !!
The Picture I attached shows the Error ,,
Note:
the question marks in the pictures are for the Arabic name of the avi video ,,and this version of Adobe After Effect CS5.5 is trail ,,
I hope to find a solution for my problem ,,
and I'll Be ThankfulIt worked , both what you said worked ,,
First I placed them on the desktop ,
Second I changed the names of the videos ,,
and both of them worked ,,
thanks a lot for your help ,
Mr. TimeRemapper & Mr. Mylenium
have a good day -
ORA-00054 error when loading Oracle table using Data Services
Hello,
we are facing ORA-00054 error when loading Oracle table using BO Data services
(Oracle 10g database, BODS Xi 3.2 SP3)
Test Job performs
1- truncate table
2- load table (tested in standard and bulk load modes)
Scenario when issue happens is:
1- Run loading Job
2- Job end in error for any Oracle data base error
3- When re-running the same Job, Job fails with following error
ORA-00054: resource busy and acquire with NOWAIT specified
It seems after first failure, Oracle session for loading the table stays active and locks the table.
To be able to rerun the Job, we are forced need to kill Oracle session manually to be able to run the Job again.
Expected behaviour would be : on error rollback modifications made on table and BODS stops Oracle session in a clean way.
Can somebody tell me / or point me to any BODS best practice about Oracle error handling to prevent such case?
Thanks in advance
Paul-Mariethe ora-0054 can occure depending how the job failed before. If this occures you will need the DBA to release the lock on the table in question
Or
AL_Engine.exe on The server it creates the Lock. Need to Kill Them. Or stop it..
This Problem Occurs when we select The Bulkloading Option in orclae We also faced the same issue,Our admin has Killed the session. Then everything alright. -
TS4020 I get "server error" when I try to use icloud on my Windows 7 pc
I get "server error" when I try to use icloud.1 on my Windows 7 pc
How do I resolve this problem?Hi doggywag,
Yes, you must have an iOS device or a Mac to create an iCloud account.
Cheers,
GB -
I'm getting an "invalid column name" error when I try to use the xmlelement() function (and the like). Is this function only available on 9i Release 2? How do I find the SQLX functions and/or load them up for use? Hopefully someone will see this as a quick question and answer it for me!
Cheers,
FishReply
Sorry. These are not loadable they are core database functionality only available with 9.2.0.1.0 and later.. -
Extend a Java Class Inside a JSP Page?
Hello all. I'm not sure if I am thinking about this right. But what I have is a BaseClass that all of my other classes Extend. I'm inside a JSP page and want to use all of the functionality of that BaseClass. Is there anyway I can EXTEND A CLASS INSIDE A JSP PAGE or am I smoking crack?
Its an attribute of the page directive
"extends="package.class"
The fully qualified name of the superclass of the Java class this JSP page will be compiled to. Use this attribute cautiously, as it can limit the JSP container's ability to provide a specialized superclass that improves the quality of the compiled class. "
http://java.sun.com/products/jsp/tags/12/syntaxref1210.html#15653 -
Window error when publishing Muse change, can't pubish page update
Window error when publishing Muse change, can't pubish page update. Any suggestions?
It happens after I updated my website payment page with a new Paypal html. That html is below with x's put in to the code. Why doesn't Muse or Windows like this code in Muse?
<script type="text/javascript" data-pp-pubid="9xxxxx6cec" data-pp-placementtype="540x200"> (function (d, t) {
"use strict";
var s = d.getElementsByTagName(t)[0], n = d.createElement(t);
n.src = "//paypal.adtag.where.com/merchant.js";
s.parentNode.insertBefore(n, s);
}(document, "script"));
</script>Window error when publishing Muse change, can't pubish page update. Any suggestions?
It happens after I updated my website payment page with a new Paypal html. That html is below with x's put in to the code. Why doesn't Muse or Windows like this code in Muse?
<script type="text/javascript" data-pp-pubid="9xxxxx6cec" data-pp-placementtype="540x200"> (function (d, t) {
"use strict";
var s = d.getElementsByTagName(t)[0], n = d.createElement(t);
n.src = "//paypal.adtag.where.com/merchant.js";
s.parentNode.insertBefore(n, s);
}(document, "script"));
</script> -
How can i call java class file in jsp page
Hai,
i wants to call .class file in jsp page.
my class file is in C:\jsdk\bin.
ThanksI'm not entirely sure what you mean by "calling a class file", but I'm going to assume that you want to do something like the following in your page:
<%
MyClass myClass = new MyClass();
myClass.someMethod();
%>etc
If that's the case, then all you have to do is make sure that the class is in the servlet engine's classpath. You'll probably also need to include an appropriate import statement at the top of the page.
Hope that helps. -
AES Algorithm error when trying to encrypt using stored Java class.
Dear All,
We have a specific reuirement where in we cannot use DBMS_CRYPTO package to encrypt/decrypt data using AES Algorithm
So I am trying to use a stored Java class and I am getting "AES algorithm not available".
I am using Oracle 10gR2 standard edition.
Below is my code
1. Stored Java class
2. Stored function to access the above Java class.
3. Test anonymus PL/SQL to test above code.
Please help me finding the problem why I am getting "AES algorithm not available" error when I call stored Java class in Oracle.?
**** If I use "DES" algorithm, it works. Also the Java code works well if I execute it as normal Java class from Eclipse.
I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
The jre version in Oracle is 1.4.2.
I appreciate your help.
Thanks,
Priyanka
Step1: Stored java class to encrypt and decrypt data
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "EncryptUtil" AS
import java.security.Key;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
public class EncryptUtil
public static String encrypt(String inStr)
String outStr = "Test data 123";
try
KeyGenerator kgen = KeyGenerator.getInstance("AES");
kgen.init(128);
SecretKey skey = kgen.generateKey();
byte[] raw = skey.getEncoded();
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
Cipher cipher = Cipher.getInstance("AES");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
byte[] encrypted =
cipher.doFinal(inStr.getBytes());
outStr =new String(encrypted);
catch (Exception e)
outStr = outStr + "exception thrown::" + e.getMessage();
e.printStackTrace();
return outStr;
Step2: Stored function to access above stored java class.
CREATE OR REPLACE FUNCTION SF_ENCRYPTUTIL(
pKey1 VARCHAR2
) RETURN VARCHAR2 AS
LANGUAGE JAVA NAME 'EncryptUtil.encrypt(java.lang.String ) return java.lang.String';
Step3: Test encryption and descryption
DECLARE
outstr VARCHAR2(2000);
BEGIN
DBMS_OUTPUT.PUT_LINE('outstr-->' || SF_ENCRYPTUTIL('12345'));
END;
Below code example using DBMS_CRYPTO. This works, but we do not want to use this.
declare
l_in_val varchar2(2000) := 'Test data 123';
l_mod number := dbms_crypto.ENCRYPT_AES128
+ dbms_crypto.CHAIN_CBC
+ dbms_crypto.PAD_PKCS5;
l_enc raw (2000);
l_enc_key raw (2000);
l_dec raw (2000);
begin
l_enc := dbms_crypto.encrypt
UTL_I18N.STRING_TO_RAW (l_in_val, 'AL32UTF8'),
l_mod,
HEXTORAW('156ae12300ccfbeb48e43aa016febb36'),
HEXTORAW('001122230405060708090a0b0c0d0e0f')
dbms_output.put_line ('Encrypted='||l_enc);
end;
Edited by: user5092433 on Sep 10, 2009 12:26 AMI guess I'd be a bit curious about why you can't use a DBMS_CRYPTO solution that provides identical output. It seems odd to want to have a procedure running inside Oracle and then dictate that it has to be Java and not PL/SQL...
I verified the java.security file in jre/lib/security and I see that there is provider entry for SunJCE.
The jre version in Oracle is 1.4.2.Which java.security file are you talking about? The JVM that is inside the Oracle database does not and can not use configuration files that are outside the database. I suspect when you talk about files and paths that you're looking at a JVM outside the database, which is not the JVM that your Java stored procedure would be using.
Looking at the error, my assumption is that some JAR file needs to be loaded into the internal JVM in order for the AES algorithm to be available. But I'm unfortunately not familiar enough with these classes to say what that would be.
Justin -
Importing class in a jsp using Tomcat
Hello All,
Using Tomcat:
I have class here:
examples/WEB-INF/classes/ package/myclass.class
I have a .jsp here:
examples/JSPFolder/myjspfile.jsp
I want to import the class into the jsp.
I have tried the following combinations of importy lines based on previous posts on these boards and each have failed with same error:
Unable to load class for JSP
<%@ page import="myclass" %>
<%@ page import="myclass.*" %>
<%@ page import="package.myclass" %>
<%@ page import="package.myclass.*" %>
<%@ page import="WEB-INF/classes/package/myclass%>
I have seen a number of posts for this same problem, and have tried those solutions as well, but none work. I am sure that this is simply a problem of finding the right directory, as I can successfully run the .jsp file iwhen I remove the import line.
Can someone please help?There is a folder for shared packages
tomcat_root\lib; or
tomcat_root\common
also most versions have a lib or common folder for each webapp for packages that are not to be shared.
tomcat_root\webapps\appname\web-inf\lib
Agreed that it is strange to allow servlets to import from the classes foler but not JSPs. It should make no difference but it is convension to place single classes in the same folder as the app's directory and packages (especially jar's) in the lib directory. -
Using an imported class in a JSP file
When you import a class you wrote into a JSP file, is there a way to submit values from forms to the entire class, or can you only use the methods within the class??
When you import a class you wrote into a JSP file, is
there a way to submit values from forms to the entire
class, or can you only use the methods within the
class??Yes, there is a way in JSP. You can use,
<jsp:useBean id="your_bean_id" scope="page or request etc" class="your_class">
<jsp:setProperty name="your_bean_id" property="*"/>
</jsp:useBean>
So, <jsp:setProperty> sets all the values inside your request object into the bean, if the class is having the properties (variables) with same name as of request object's parameters. You must have coded set method for all the properties whatever you want your jsp to set the values in the bean.
if your request is .../yourjsp?name=xxxx&age=25
then <jsp:setProperty> method will set the name and age inside bean if you have,
public class YourBean {
String name;
int age;
public void setName(String name) {
this.name=name;
public void setAge(int age) {
this.age=age;
Hope this helps.
Sudha -
Importing Custom Classes into a JSP page
Hello,
I have created custom package com.srjgroup.report. It sits in C:\workspace\src\com\srjgroup\report directory. I have java files as well as compiled classes there. No jar files there.
did amend classpath to point to this directory.
In my JSP page I have the import statement as following
import="java.sql.*, java.util.*, java.text.SimpleDateFormat, com.srjgroup.report.*"It imports all the packages without any errors. However, when I try to use one of the classes in the package, I get error
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /SQLServer.jsp
Generated servlet error:
SRJReports cannot be resolved to a type
SRJReports is one of the classes that I am trying to use in that package. When I comment out all references to the class, everything is fine.
So, to fix this I moved the entire package to
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\lib direcory, preserving the hierarhy. So, now my custom package is located here:
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\lib\com\srjgroup\report again there are no jar files, only java and classes here. Still, no go.
What am I doing wrong ?Put the class in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\com\srjgroup\report
One more thing, there is no subdirectory in lib directory. You may look at the example within tomcat for reference. I start from there.
Maybe you are looking for
-
Is it possible to display subtitles without Apple TV?
I do not have Apple TV but I watch movies a lot on my iTouch. I have hearing loss and cannot always tell what is being said on movies. Is there a way to have subtitles on movies without Apple TV? I have switched the Closed Captioning from off to on a
-
How convert powerpoint presentation so can be opened on pc
What do I need to do to make sure a powerpoint presentation created on my macbook pro with the microsoft for apple software can be read and opened on a pc? Currently PC users do not seem to be able to open it? Thanks
-
WSCOMPILE java.lang.ClassNotFoundException error
Hi there. I know this is something simple but I can't figure out where i'm going wrong. I'm getting the java.lang.ClassNotFoundException error when running the WSCOMPILE utility. Here is my config.xml: <?xml version="1.0" encoding="UTF-8"?> <configur
-
W3.2: What is 3.2 doing with Sysdeo DevLoader?
"Automatic Sysdeo installation and configuration for Tomcat. " What is it doing? Is there a relationship to .#webclasspath? What does it mean? We are having trouble referencing an .jar application into a web application, and we have the feeling that
-
Can i get a desk top notification when an icloud email drops in
can i get a desk top notification when an icloud email drops in