Error in accessing Java Class?
I got an error when accessing JavaClass,
The Java Class is following,
packages mypack;
public class myParentClass{
public myParentClass{
public String doAct(String act){
return act;
public static act class {
public static final String ADD="ADD";
public static final String DELETE="DELETE";
And I am using JavaBean as the following,
<%@ page import="mypack.*"%>
<jsp:useBean id="mybean" scope="page" class="myParentClass"/>
<%
String act=mybean.doAct(mybean.act.ADD);
%>
The error I got is "No variable act defined in class myParentClass"
I don't know why! How can I solve it?
Thanks in advance!
hi, you lose a semicolon ";" .
you should add ";" at the end of the definition of "act" as:
public class myParentClass{
public myParentClass{
public String doAct(String act){
return act;
public static act class {
public static final String ADD="ADD";
public static final String DELETE="DELETE";
}; // this is the error .
Similar Messages
-
Getting errors in accessing java class through procedures
Hello,
I have written a java stored procedure to execute an exe file, which works fine when compiled.The class code is given below.
create or replace and resolve java source named "CommandExection"
as
import java.io.*;
import java.util.*;
public class CommandExection1 {
public static void Command(String commandline) {
try {
String line;
Process p = Runtime.getRuntime().exec(commandline);
BufferedReader input =
new BufferedReader
(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
input.close();
catch (Exception err) {
err.printStackTrace();
Through a stored procedure i am acessing the class which is given below,
create or replace procedure Exe_cmd(path in varchar2)
as
language java
name 'CommandExection1.Command(path)';
I am able to create stored procedure sucessfully.But when I run it I am getting the following error.
SQL> exec EXE_cmd('D:exeapp.exe');
BEGIN EXE_cmd('D:exeapp.exe'); END;
ERROR at line 1:
ORA-29531: no method CommandExection1 in class CommandExection1
ORA-06512: at "HGUSER.EXE_CMD", line 1
ORA-06512: at line 1
Please go through the code and help me.
ThanksMichael,
I did that but I am getting following errors.
java.security.AccessControlException: the Permission (java.io.FilePermission
D:/exeapp.exe execute) has not been granted to SYSTEM. The PL/SQL to grant this
is dbms_java.grant_permission( 'SYSTEM', 'SYS:java.io.FilePermission',
'D:/exeapp.exe', 'execute'
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:280
at java.security.AccessController.checkPermission(AccessController.java:429)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:528)
at
oracle.aurora.rdbms.SecurityManagerImpl.checkPermission(SecurityManagerImpl.java
:192)
at java.lang.SecurityManager.checkExec(SecurityManager.java:775)
at java.lang.Runtime.exec(Runtime.java:563)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at CommandExection.Command(CommandExection:12)
PL/SQL procedure successfully completed.
I tried to set the privileges using,
EXEC DBMS_JAVA.grant_permission('SCHEMA-NAME', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
EXEC Dbms_Java.Grant_Permission('SCHEMA-NAME', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
EXEC Dbms_Java.Grant_Permission('SCHEMA-NAME', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
but I couldn't. and got some errors like,
SQL> EXEC DBMS_JAVA.grant_permission('HCT', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write,
execute, delete');
oracle.aurora.vm.IdNotFoundException: -1 is not the number of a user or role
at oracle.aurora.rdbms.SystemSchema.getId(SystemSchema.java:76)
at oracle.aurora.rdbms.SystemSchema.getId(SystemSchema.java:54)
at
oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java:
412)
at
oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java:432
at
oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
:456)
at
oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java:50
3)
BEGIN DBMS_JAVA.grant_permission('HCT', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, exe
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.aurora.vm.IdNotFoundException: -1 is not the number of a user or role
ORA-06512: at "SYS.DBMS_JAVA", line 313
ORA-06512: at line 1.
What should I do to set the privileges?
Please help me. -
Accessing java classes from javascript
Hi,
I have the following javascript function
function testjava {
var myString = new java.lang.String("Hello world"); // line 1
alert("len:"+myString.length()); // line 2
}It gives me a error at line 1 saying "'java' is undefined" in IE browser 5.5 sp2. But, both the lines execute correctly in netscape 6.
Can someone please help..
Thanks,
Vijay.It seems that IE 5.5 doesn't support accessing java classes in JavaScript, so try to install IE 6 to see if it works or maybe, you doesn't have installed propertly support for JVM in IE.
-
Error while compiling java class (ora-29535 source requires recompilation)
Hello. I`m new with oracle and i`m having a problem with java classes. Few days ago i loaded java classes (loadjava) from jar file(biojava3-structure-3.0.2.jar) and compiled ( everything compiled with status valid). Now i`m writing my own class and i can`t import classes from biojava3. I`m getting error:
Projekt:7: cannot access org.biojava.bio.structure.Atom
bad class file: null
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import org.biojava.bio.structure.Atom;
I have tryed to change jdk version in netbeans from 1.7 to 1.6. I created java class in sql plus That still not resolved my problem.
Please help me.consider posting in Java forum instead of Database forum
https://forums.oracle.com/forums/category.jspa?categoryID=285 -
Accessing java class in JSP on Tomcat 5.5 server
Just i want to use a java class in JSP.
Explanation in following steps :
a. MY JSP Code - SimpleBean.jsp
b. My Java file - test.java
c. Path ( Root, jdk, jre , myfiles-test.java, SimpleBean.jsp )
d. Environment Variables
e. Error Message faced
Now Brief explanation.
a. MY JSP Code :
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,test" errorPage="" %>
<td>
<%! test obj = new test();
obj.setAge(32); %>
<%= obj.getAge(); %>
</td>
b. My Java file - test.java
package test;
class test
private int age;
public int getAge()
return age;
public void setAge(int intage)
this.age = intage;
c. Path ( Root, jdk, jre , myfiles-test.java, SimpleBean.jsp )
Tomcat Root : c:\Program Files\apache\tomcat5.5\webapps\ROOT
jdk : C:\Program Files\Java\jdk1.5.0\bin;
jre : C:\Program Files\Java\jre1.5.0\bin;
test.java : c:\Program Files\apache\tomcat5.5\webapps\ROOT\NRMS\test\test.java
SimpleBean.jsp : c:\Program Files\apache\tomcat5.5\webapps\ROOT\NRMS\test\SimpleBean.jps
d. Environment Variables :
PATH :
C:\Program Files\Java\jdk1.5.0\bin; C:\Program Files\Java\jre1.5.0\bin;
CLASSPATH :
.;C:\Program Files\Java\jre1.5.0\bin;
e. Error Message Faced : ( on accessing url http://localhost:8080/NRMS/SimpleBean.jsp )
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
The import test cannot be resolved
An error occurred at line: 26 in the jsp file: /NRMS/test/SimpleBean.jsp
Generated servlet error:
test cannot be resolved (or is not a valid type) for the field SimpleBean_jsp.obj
An error occurred at line: 26 in the jsp file: /NRMS/test/SimpleBean.jsp
Generated servlet error:
test cannot be resolved or is not a type
An error occurred at line: 26 in the jsp file: /NRMS/test/SimpleBean.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)
An error occurred at line: 26 in the jsp file: /NRMS/test/SimpleBean.jsp
Generated servlet error:
Syntax error on token "32", delete this token
An error occurred at line: 28 in the jsp file: /NRMS/test/SimpleBean.jsp
Generated servlet error:
Syntax error on token ";", delete this token
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:389)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.4 logs.
Apache Tomcat/5.5.4
Please explain where i am doing the mistake.
Thanks in advance.
Regards,
Lax.>
<%@ page contentType="text/html; charset=iso-8859-1"
language="java" import="java.sql.*,test" errorPage=""
%>Your class is test.test.The compiler wouldnt know what test is from your import.
Change import as
java.sql.*,test.test
<%! test obj = new test();
obj.setAge(32); %>The symbol '!' ? -
Accessing Java Classes from Webservice Stubs
So far I have been able to call a web service and copy the appropriate directories and files to the designated class path. I can also successfully access a class file like this:
MyObject = CreateObject("java", "ca.x.y.z.TestCollection.TestItem");
However, whenever I try to do something with that variable, I get a white screen. Any text that should have appeared before the command, will appear, but nothing appears afterwards, not even debugging info. Here are a couple of commands that will cause this to happen.
<cfdump var = "#MyObject#">
MyObject = CreateObject("java", "ca.x.y.z.TestCollection.TestItem").init();
x = MyObject.init();
Anybody have any ideas?Ah, nothing like a fresh set of eyes to remind of the fundamentals. Thank you for that.
I actually could create a normal error by calling a method incorrectly. I would see the grey box and my debgging info would appear. However, if I did something I expected to succeed, it would seem to stop. Any text above that command would appear. No error message, no de-bugging.
But I didn't think to look in our error log. I see things like:
Could not initialize class com.microsoft.schemas._2003._10.Serialization.Arrays.ArrayOfstring
or
org.apache.axis.description.TypeDesc.(Ljava/lang/Class;Z)V
At least it's not a mystery anymore. Thanks again for suggesting the error log. -
No Class Found Error on invoking java class from PL/SQL
Hi There,
I have followed instructions on how to create a java proc in the DB to invoke it from PL/SQL.
I get a 'java.lang.NoClassDefFoundError' error because it cannot access 'org.apache.axis.description.TypeDesc' in this case. The instuctions say to add the supporting jars which contain the additional classes to the project's Additional Classpath's which I have done.
I deploy the java classes and create the java stored proc using JDev.
Can someone please tell me how to go about resolving this?
I can see 'org.apache.axis.description.TypeDesc' in the DB via JDev's Databse connection in the Java Classes tree?
Thanks,
AnthonyHi There,
I have followed instructions on how to create a java proc in the DB to invoke it from PL/SQL.
I get a 'java.lang.NoClassDefFoundError' error because it cannot access 'org.apache.axis.description.TypeDesc' in this case. The instuctions say to add the supporting jars which contain the additional classes to the project's Additional Classpath's which I have done.
I deploy the java classes and create the java stored proc using JDev.
Can someone please tell me how to go about resolving this?
I can see 'org.apache.axis.description.TypeDesc' in the DB via JDev's Databse connection in the Java Classes tree?
Thanks,
Anthony -
Error when accessing Java and JVM section
I'm getting the following error when accessing the Java and
JVM section of the CF Administrator:
"Element JDKPATH is undefined in FORM"
I've searched a lot and there's very little on the topic. On
this forum there are two posts and one got no answer, on the other
it was suggested it might be the jvm.config file. I've looked at
mine but I really have no idea what could be wrong. Also, there are
two jvm.config files in my install, one in jrun4/bin and another in
jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/runtime/bin
folder (I did multiserver installation).
I've already tried a bunch of things and no luck, any help is
appreciated on this.quote:
Originally posted by:
ke4pym
What is your path? Make sure you're using forward slashes.
ie: d:/java/jdk1.6.0_12/bin/blah/blah/blah
What path are your referring to? My actual PATH environment
variable? Or are you referring to something else. Btw, here's what
my config file looks like right now.
# VM configuration
# Where to find JVM, if {java.home}/jre exists then that JVM
is used
# if not then it must be the path to the JRE itself
java.home=C:/JRun4/jre
# If no java.home is specified a VM is located by looking in
these places in this
# order:
# 1) bin directory for java.dll (windows) or
lib/<ARCH>/libjava.so (unix)
# 2) ../jre
# 3) registry (windows only)
# 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
# Arguments to VM
java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false
-XX:MaxPermSize=192m -XX:+UseParallelGC
-Dcoldfusion.rootDir={application.home}/
# commas will be converted to platform specific separator and
the result will be passed
# as -Djava.ext.dirs= to the VM
java.ext.dirs={jre.home}/lib/ext
# where to find shared libraries
java.library.path={application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusi on/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra /bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra/b in/international
system.path.first=false
# set the current working directory - useful for Windows to
control
# the default search path used when loading DLLs since it
comes
# before system directory, windows directory and PATH
java.user.dir={application.home}/../lib
# JVM classpath
java.class.path={application.home}/servers/lib,{application.home}/lib -
Error while importing java class into oracle forms 10g
Hi
I have generated a web service client using jdeveloper 10g. It consists of complex type methods. I am trying to import the class files using java importer in oracle form 10g. I am able import all of them successfully except one. That one is the main method. Please see the error and suggest me how to overcome this error.
Exception occurred: java.lang.NoClassDefFoundError: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
Thanks in advanceDo you see oracle/jdeveloper listed in "Import Java Classes" when you try to import?
If not, make sure you add C:\DevSuiteHome_1\jdev\lib\jdev.jar to FORMS_BUILDER_CLASSPATH in registry
Also excetion indicates: oracle/jdeveloper/webservices/runtime/WrappedDocLiteralStub
If you typing it - type: oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub -
PI 7.1 Enhancement pack 8: still error when referencing java class in xslt
Hi
I am getting an error in PI 7.1 EP 8 Repository when I try to use an xslt in which I make a reference to a java class. The error is:
Transformer Configuration Exception occurred when loading XSLT XCBL_invoice_stylesheet.xsl; details: Could not compile stylesheet
I use this xslt:
<xsl:template match="/" xmlns:util="dk.dongenergy.pi.mapping.Utilities_datetime">
<html>
<B><xsl:text>Received: </xsl:text><xsl:value-of select="util:getCurrentDateTimeFormatted()"/>
I have imported the java archive successfully and it is working in XI 3.0 and it is working if I comment out the reference to the java class in the xslt.
the java class looks like this:
package dk.dongenergy.pi.mapping;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Utilities_datetime {
* public static String getCurrentDateTimeFormatted() {*
* Date now = new Date();*
* SimpleDateFormat formatter = new SimpleDateFormat("dd MMM yyyy HH:mm:ss");*
* return formatter.format(now);*
We have applied enhancement pack 8 on PI 7.1 as suggewsted in this note, but that has not done the trick:
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_xi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31333235363833%7d
Any suggestions?
BR
MikaelHi Raj
That gives me this error log:
<br/>
<br/>
javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:100) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1104.execute(Unknown Source) 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:585) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:355) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314) Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:664) at java.lang.ClassLoader.defineClass(ClassLoader.java:509) at com.sap.aii.ib.server.mapping.execution.MappingLoader.findClass(MappingLoader.java:184) at java.lang.ClassLoader.loadClass(ClassLoader.java:350) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:63) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:99) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:77) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:273) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:470) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:438) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:395) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:397) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:239) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransformer.java:174) at com.sap.aii.ib.server.mapping.execution.XSLTMapping.executeStep(XSLTMapping.java:79) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:54) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:139) at com.sap.aii.ibrep.server.mapping.exec.ExecuteIfMapCommand.execute(ExecuteIfMapCommand.java:33) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) 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:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) ... 32 more javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:100) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy1104.execute(Unknown Source) 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:585) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:355) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314) Caused by: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file ... 33 more Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:664) at java.lang.ClassLoader.defineClass(ClassLoader.java:509) at com.sap.aii.ib.server.mapping.execution.MappingLoader.findClass(MappingLoader.java:184) at java.lang.ClassLoader.loadClass(ClassLoader.java:350) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at com.sap.engine.lib.xsl.xpath.JLBLibrary.<init>(JLBLibrary.java:33) at com.sap.engine.lib.xsl.xpath.LibraryManager.getFunction(LibraryManager.java:63) at com.sap.engine.lib.xsl.xpath.ETFunction.evaluate(ETFunction.java:99) at com.sap.engine.lib.xsl.xpath.XPathProcessor.innerProcess(XPathProcessor.java:56) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:43) at com.sap.engine.lib.xsl.xpath.XPathProcessor.process(XPathProcessor.java:51) at com.sap.engine.lib.xsl.xslt.XSLValueOf.process(XSLValueOf.java:77) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLElement.process(XSLElement.java:249) at com.sap.engine.lib.xsl.xslt.XSLNode.processFromFirst(XSLNode.java:296) at com.sap.engine.lib.xsl.xslt.XSLTemplate.process(XSLTemplate.java:273) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:470) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:438) at com.sap.engine.lib.xsl.xslt.XSLStylesheet.process(XSLStylesheet.java:395) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:397) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:239) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransformer.java:174) at com.sap.aii.ib.server.mapping.execution.XSLTMapping.executeStep(XSLTMapping.java:79) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:54) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:139) at com.sap.aii.ibrep.server.mapping.exec.ExecuteIfMapCommand.execute(ExecuteIfMapCommand.java:33) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) 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:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) ... 32 more
Edited by: mikael lund on Oct 26, 2009 10:51 AM -
Accessing Java Classes from Forms
Is is possible to access a Java class from Forms? I have been
creating an Active X control that returns a Java object, and from
that I can call methods on that object, but I would really like
to do that without having and Active X control in the mix. Any
suggestions?
nullOracle Developer Team wrote:
: Robert Nocera (guest) wrote:
: : Oracle Developer Team wrote:
: : : hey robert -
: : : Developer 6.0 provides this ability for web deployment.
You
: : can
: : : insert your own custom Java components into your
application
: : and
: : : they will appear in the application when it is run via the
: web.
: : : If you look at the documentation for 6.0, there are a few
: : : section son Pluggable Java Components and JavaBeans that
: : : describes what is provided and how you use the interfaces
: and
: : : classes we provide.
: : : A whitepaper on this topic will be posted to the OTN
: shortly,
: : as
: : : well as some samples that illustrate how to go about doing
: it.
: : : cheers!
: : : -Oracle Developer Team-
: : Thanks for the quick response. Is there any way to access
: those
: : classes without being in a web deployment. That's probably
: not
: : totally out of the question, but what we had in mind was
: adding
: : some Java Functionality (actually connectictivity to some
EJBs
: : that we have) to existing forms. Currently there forms are
: not
: : deployed in a "web" environment and are just run from the
: forms
: : runtime engine.
: : -Rob
: hey again robert -
: there's no easy way (yet!) to call out from forms runtime
: process to a Java application.
: We've played around some with creating an ORA_FFI interface to
: JNI and then wrappering this with PL/SQL code. We've been able
: to make calling into an EJB running in 8i from a forms runtime
: work using this approach.
: Let me know if this is of interest to you and I can post the
: stuff we've currently got. It's no more than a simple demo and
: is not complete. It requires quite a bit of manual coding on
: the PL/SQL side since the interface emulates JNI (FindClass,
: GetMethodID, CallMethodID, etc.).
: cheers!
: -the Oracle Developer Team-
I'd be interested in this ORA_FFI doc you've been playing with.
Would you please email it to me or post it.
null -
Error when using java class in php
dear all
when i am using my java class in php page
i am getting below error
Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:e24PaymentPipe]]->performPaymentInitialization. Cause: java.lang.NullPointerException Responsible VM: 1.6.0_01@http://java.sun.com/" at: #-9 e24PaymentPipe.performPaymentInitialization(e24PaymentPipe.java:341) #-8 sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) #0 [internal function]: Java->__call('performPaymentI...', Array) #1 /home/comhtdocs/hdfcpay/HostedPaymentBuy.php(31): Java->performPaymentInitialization() #2 {main}] thrown in /home/comhtdocs/hdfcpay/HostedPaymentBuy.php on line 31
Edited by: arun240 on Jul 25, 2008 8:47 AMarun240 wrote:
dear all
when i am using my java class in php page
i am getting below error
Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:e24PaymentPipe]]->performPaymentInitialization. Cause: java.lang.NullPointerException Responsible VM: 1.6.0_01@http://java.sun.com/" at: #-9 e24PaymentPipe.performPaymentInitialization(e24PaymentPipe.java:341) #-8 sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) #0 [internal function]: Java->__call('performPaymentI...', Array) #1 /home/comhtdocs/hdfcpay/HostedPaymentBuy.php(31): Java->performPaymentInitialization() #2 {main}] thrown in /home/comhtdocs/hdfcpay/HostedPaymentBuy.php on line 31
Edited by: arun240 on Jul 25, 2008 8:47 AMWell, it seems there's an object (perhaps a PaymentPipe?) pointing to null which you're trying to invoke a method (performPaymentInitialization()?) on. Needles to say: you can do that.
SomeObject so = null;
// ... some more code ...
so.someMethod(); // No can do! A NPE will be thrown! -
Error when generating java classes from object types
Hi,
I'm using JDeveloper version 10.1.3.0.2
I created an object type in the database, the definition is:
TYPE domain_cls IS OBJECT (
domain_idx NUMBER(3)
) NOT INSTANTIABLE NOT FINAL
I tried to create a java class for this object using JDeveloper, by using generate java menu item.
I got the following error:
oracle.jpub.JPubException: Warning: Cannot determine what kind of type is OBJMOI. DOMAIN_CLS. The following error occurred: ORA-06550: line 1, column 13:
PLS-00103: Encountered the symbol "SYS" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "SYS" to continue.
at oracle.jpub.sqlrefl.SqlReflector.addSqlType(SqlReflector.java:519)
at oracle.jpub.sqlrefl.SqlReflector.addSqlUserType(SqlReflector.java:707)
at oracle.jpub.publish.Publisher.addTypeOrPackage(Publisher.java:209)
at oracle.jpub.publish.IntypeParser.TypeDeclaration(IntypeParser.java:238)
at oracle.jpub.publish.IntypeParser.CompilationUnit(IntypeParser.java:75)
at oracle.jpub.Doit.main(Doit.java:257)
at oracle.jpub.Doit.main(Doit.java:102)
at oracle.jdevimpl.cm.dt.jpub.JPubModel.publish(JPubModel.java:1047)
at oracle.jdevimpl.wizard.jpub.JPubPanel.publish(JPubPanel.java:516)
at oracle.jdevimpl.cm.dt.jpub.JPubAddin._doJPub(JPubAddin.java:174)
at oracle.jdevimpl.cm.dt.jpub.JPubAddin.handleEvent(JPubAddin.java:81)
at oracle.ide.IdeAction.performAction(IdeAction.java:661)
at oracle.ide.IdeAction$2.run(IdeAction.java:889)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
any body can hlep in that pleaseI would recommend using JAXB instead of the Oracle class generator. This will give a standards based object-to-XML platform.
Oracle provides two JAXB implementations: one in the TopLink product, and the other in the XDK.
For an example of using TopLink JAXB see:
http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxb/index.htm
TopLink also provides the ability to map existing Java objects to an existing XML Schema, for an example of this see:
http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
-Blaise -
Error when generating Java Classes from XSD
I'm getting the following error when using oragc to generate Java classes from a schema:
Error: Schema Class Generator failed to generate classes. oracle.xml.parser.schema.XSDException: Invalid facet 'pattern' in element 'simpleType'
Any thoughts?
Here's the part where it is getting the error:
+111 <!-- Timestamp Type - Timezone portion is required and fractional seconds are prohibited -->
+112 <xsd:simpleType name="TimestampType">
+113 <xsd:annotation>
+114 <xsd:documentation>Base type for a date and time stamp</xsd:documentation>
+115 </xsd:annotation>
+116 <xsd:restriction base="xsd:dateTime">
+117 <xsd:pattern value="[1-9][0-9]{3}\-.+T[^\.]+(Z|[\+\-].+)" />
+118 </xsd:restriction>
+119 </xsd:simpleType>I would recommend using JAXB instead of the Oracle class generator. This will give a standards based object-to-XML platform.
Oracle provides two JAXB implementations: one in the TopLink product, and the other in the XDK.
For an example of using TopLink JAXB see:
http://www.oracle.com/technology/products/ias/toplink/technical/tips/jaxb/index.htm
TopLink also provides the ability to map existing Java objects to an existing XML Schema, for an example of this see:
http://www.oracle.com/technology/products/ias/toplink/technical/tips/ox/index.htm
-Blaise -
Scheduled job throws Class Not Found error when executing Java class
Hi,
I have written a java class to carry out a file upload to an external site and put the class on our server.
I also wrote a script to call this java class, passing inthe relevant parameters.
If i call the script using the ./ syntax from SSH it runs file logged in as Root and Oracle.
I the setup a scheduled job to call this script but the job fails with the error...
STANDARD_ERROR="Exception in thread "main" java.lang.NoClassDefFoundError: HttpsFileUpload Caused by: java.lang.ClassNotFoundException: HttpsFileUpload at java.net.URLClassLoader$1.run(URLClassLoader.java:"I cannot understand why it is raising the error if it runs from SSH.
O/S = Red Hat Enterprise Linux ES, oracle version = 10.2.0.1.0
Any help or guidance would be appreciated
Thank you in advance
Graham.
Edited by: gpc on Feb 4, 2009 12:46 PMHi,
See this link for some tips if you haven't yet :
Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
I can think of two things. Your script may not be able to run as the nobody user (by default external jobs run as the nobody user). Or your script might require that some environment variable be set (by default environment variables are not set in external jobs).
Maybe you need to set the CLASSPATH variable in your script before calling java ?
Hope this helps,
Ravi.
Maybe you are looking for
-
F-44: The Re-document not appear available to do the clearing.
Hi Experts Hi, We need help to understand what hapen with the consult of vendor XXXXX When we consult this vendor on transaction FK10N we see the information detailed on the attached file. But when I try to do the clearing and try the transaction F-4
-
HTTPS Guest Portal Redirection
Dears, We have Guest Portal on ISE server, when our guests connect to Guest SSID they automatically redirected to WEB portal it works only with http websites if user writes in his browser for example facebook.com or some websites with https redirecti
-
The common language runtime could not be loaded.
The common language runtime could not be loaded error in receiving while opening excel file in windows 7.
-
Pushing more than 1 .me email account??
I have 3 .me accounts on my phone. The main account is our family account which includes calenders, bookmarks, contacts. This is set to push. The 2nd and 3rd accounts are my personal accounts that I forward outside email addresses to. I am doing OK p
-
Hi, I am trying to configure CPH for the first time in my central Solution manager...I used RZ23N and it asked me to activate the CPH..after selecting yes it schedules SAP_CCMS_CPH_REORG job......is there something else to be done I see error when I