Trace a java class
Hello!
How can I trace a java class (Logging) which has been created
and located inside src/packages/....
You can see these folders inside Web Dynpro Explorer
after "Dictionaries" node.
Regards
sas
Hi,
please read this articles:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/625fab90-0201-0010-0c9f-a1535bb00132
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8314cb90-0201-0010-f586-9155dba8934d
regards,
Markus
Similar Messages
-
hi all,
I had a terrible experience recently. There was a Java class which creates some reports and uses some libraries also. This program was developed very primitively and exceptions not handled properly. Last time I observed that program is running and but no output and but no error prompted. (because exception was catched but not handled no even a system out).
So I would like to know any method or technique to trace the situation of class execution and find what operations are blocked
Indiikalkr wrote:
hi all,
I had a terrible experience recently. There was a Java class which creates some reports and uses some libraries also. This program was developed very primitively and exceptions not handled properly. Last time I observed that program is running and but no output and but no error prompted. (because exception was catched but not handled no even a system out).
So I would like to know any method or technique to trace the situation of class execution and find what operations are blocked
IndiikaYou could use AspectJ to add logging, but a simple thread dump can give you information on blocked threads. -
Java class bean can not access to DB in JSP file
Hi, I wrote a java class bean in order to access to MySql database ,and this bean is used in a JSP file,so that the bean can query from DB and then display the queried information on the JSP file,but it can not work correctly,the following is the source code and error message popup by the system,
does anybody has experience in solving thus question,Please reply ,Thank you for your help.
%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import = "java.sql.*" %>
<jsp:useBean id="conn" scope="page" class="news.conn"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1</title>
<style>
<!--
A:link {
COLOR: #993399
.s {
FONT-SIZE: 13px; LINE-HEIGHT: 170%; FONT-FAMILY: "utf-8"
-->
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%">
<img border="0" src="images/ruanjian.jpg" width="770" height="154"></td>
</tr>
<tr>
<td width="100%">@</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="13%">@</td>
<td width="87%">
<img border="0" src="images/mid-rdxw2.gif" width="101" height="18"><p>
<%
ResultSet rs,rsNest;
String strSql=null;
strSql = "select * from news where TYPE=1";
rs = conn.executeQuery(strSql);
while (rs.next()){
%>
<span class="s"> <a href="newsContent.jsp?newsId=<%=rs.getInt(id")%">"><%=rs.getString("Title")%></a><br>
<%
%>
<p>
<img border="0" src="images/mid-hyxw2.gif" width="94" height="19"></p>
<%
strSql="select * from news where TYPE=2";
rs = conn.executeQuery(strSql);
while (rs.next()){
%>
<span class="s"> <a href="newsContent.jsp?newsId=<%=rs.getInt("id")%>"><%=rs.getString("Title")%></a><br>
<%
%>
<p>@</td>
</tr>
</table>
<p align="center">Study Online</p>
<p align="center">@</p>
</body>
</html>
Error message:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /newsMain.jsp:47
44: strSql = "select * from news where TYPE=1";
45: rs = conn.executeQuery(strSql);
46:
47: while (rs.next()){
48:
49: %>
50:
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause
java.lang.NullPointerException
org.apache.jsp.newsMain_jsp._jspService(newsMain_jsp.java:98)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 l</a>nogoodatcoding wrote:
Tolls wrote:
Is that Jasper Exception telling us where the problem is in the jsp, though?
If it is, then "rs" is null in the call rs.next()...which means conn.executeQuery() is returning null. Which means that whatever class conn is (news.conn?) has a problem maybe?That's possible. Though, it may just be the case that the 'conn' object itself is null! That line is the first place where it's being used and there are no checks that I can see...we'll have to wait for the OP to investigate and reply I guess.That's what I originally thought, then I noticed it was saying line 47, which is the rs.next() line. Assuming Jasper is correct in its choice of line, then it's the rs that's null. Which means the conn is doing strange things.
Edit: Now that I think about it, going by the previous thread the OP posted, I'm wondering whether news.conn class is their attempt to move the JDBC stuff out of the JSP page, and it's grabbing the "real" connection (java.sql.Connection) and getting the result set and returning it...or getting something wrong and returning null.
Edited by: Tolls on 11-Jun-2009 12:24 -
How to use java classes of DC1 in DC2
When I was trying to use a java-class from another DC, I stumbled into an error I didn't expect:
java.lang.NoClassDefFoundError: com/company/application/utils
This is what I did to get this far:
1. Created an empty Web Dynpro DC (DC1), to be used as a utilities library.
2. Added a Java class to the webdynpro project.
3. Added the class to a public part of type compilation.
4. Created a second Web Dynpro DC (DC2), which is supposed to consume the class from DC1.
5. Added a DC-usage relation, so that DC1 is in DC2's used DCs. In this usage-relation built-time and run-time were checked
5. Used DC1's class in DC2's component controller
6. Built both DCs and deployed them
7. Ran the application in DC2.
When I run the application, the application dumps a stack trace at the moment that and object is created based on the class in DC1.
Any idea how to get this working?Vincenzo, here is the real error message:
java.lang.IllegalAccessError: tried to access method nl.phoqus.pataut.Guid.getGuidString()Ljava/lang/String; from class nl.phoqus.pataut.PatientAuthorization
I have inserted a very simple GUID generator that I used in a previous project. Please find the class file below:
package nl.phoqus.pataut;
import java.util.Random;
public class Guid {
private static Guid guidFactory = new Guid();
static Random random = new Random();
* Allow global replacement of the GUID generator. Applications
* wishing to install their own GUID generators should sub-class
* Guid, override the getGuid() method, and use this method to
* install their generator.
public static void
setGuidImpl(Guid factory) {
guidFactory = factory;
* Return a GUID as a string.
public static String getString() {
return guidFactory.getGuidString();
* Return a GUID as a string. This is completely arbitrary, and
* returns the hexification of a random value followed by a
* timestamp.
protected String getGuidString() {
long rand = (random.nextLong() & 0x7FFFFFFFFFFFFFFFL) | 0x4000000000000000L;
return Long.toString(rand, 32) + Long.toString(System.currentTimeMillis()&0xFFFFFFFFFFFFFL, 32);
I'm calling the class using the following statements from the component controller of DC2:
Guid x = new Guid();
String y = x.getGuidString();
The component controller resides in package package nl.phoqus.pataut.
Would that be the problem? -
How to load a java class when application is at first time browsed.
Hi
How can i load a simple java class on application startup.
For servlet it could be done using "load on startup" tag in web.xml
but how could the same be achieved for a simple java class.
ThanksHi
Code is given below....
package com;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Test {
Test()
HttpServletRequest request=null;
HttpServletResponse response=null;
RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
try {
requestDispatcher.forward(request,response);
} catch (ServletException e) {
System.out.println("success");
e.printStackTrace();
} catch (IOException e) {
System.out.println("success 1");
e.printStackTrace();
finally
System.out.println("success 2");
System.out.println("success 3");
}Web.xml :
<servlet>
<servlet-name>simple</servlet-name>
<servlet-class>com.Test</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>simple</servlet-name>
<url-pattern>/init.do</url-pattern>
</servlet-mapping>Error Trace :
org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /DispatcherTest threw load() exception
java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class com.Test with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:344)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1069)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1162)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
at java.lang.Thread.run(Thread.java:595) -
Adding a java class code in BPEL 11g
Hi Friends ,
i m doing one simple example of calling a java class from bpel ,
1. first i created a java class
2. After that in my project i imported the jar file of the same class , and i am using JavaEmbedding
for creating one object of that class and calling one method which return me the string result and finally i am setting the result in bpel variable.
the application is build successfull but when i am deploying it i am getting following error
[02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
[02:31:19 PM] HTTP error code returned [500]
[02:31:19 PM] Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: JavaCallBPELProcess to service engine: implementation.bpel, for composite: JavaCall: ORABPEL-05250
Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/u04/FMW_HOME/user_projects/domains/Training_domain/servers/soa_server1/dc/soa_3e8c5747-aba0-49b7-91d4-56f74bec87b8"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of JavaCallBPELProcess
This error contained an exception thrown by the underlying deployment module.
Verify the exception trace in the log (with logging level set to debug mode).
[02:31:19 PM] Check server log for more details.
[02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
[02:31:19 PM] #### Deployment incomplete. ####
[02:31:19 PM] Error deploying archive file:/C:/JDeveloper/mywork/Trimble/JavaCall/deploy/sca_JavaCall_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
please tell me what is the problem.You have to use the below value there.
+2. After that in my project i imported the jar file of the same class ,+
There are 2 things, if you are not going to reuse the same code, its better to use Java Embedded component.
If you are going to reuse the same methods from the class then it make sense to import as jar file and use it.
Thanks,
Vijay -
Container Object in Java Class
Hello ,
I have a Mapping program using java class type (Java SAX in this case). I need to access some Runtime constants and the mapping trace object.
In message mapping is simple. We can use the container object that is pass to a UDF and the GlobalContainer Object.
But how can I access the Runtime constants and mapping trace without a container object ?.
Any ideas...?
Thanks in advance.
Yuvan D.in Your java mapping class
you should import import com.sap.aii.mapping.api.*;
public void execute(InputStream input, OutputStream output)
throws StreamTransformationException {
AbstractTrace trace = null;
String RESULT = new String();
trace =
(AbstractTrace) param.get(
StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo(doc.toString());
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm -
Java Class Mapping Program in BPM process
I have a scenario where I'm receiving an IDOC I then use a JAVA mapping program in my first transformation step. Immediately following I have a switch step but there is not data in from the mapping program.
1) Receive Step
2) Transformation IDOC to Table using Java class
3) Switch step based on Table field value
Problem is there is no values in the table.
This java class was not developed within NetWeaver but was used in our old process. We simply imported the jar file for accessing our existing java classes. Is there something else we need to do to utilize our java modules within the BPM process?Hi,
You must to have in the java class:
- You java have to be like:
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import java.util.HashMap;
import com.sap.aii.mapping.api. AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
public class JavaMapping implements StreamTransformation {
private Map param = null;
private AbstractTrace trace = null;
public void setParameter (Map param) {
this.param = param;
if (param == null) {
this.param = new HashMap();
public void execute(InputStream in, OutputStream out) {
try {
trace = (AbstractTrace)param.get(
StreamTransformationConstants.MAPPING_TRACE );
trace.addInfo(...);
String receiverName = (String)param.get(
StreamTransformationConstants.RECEIVER_NAME);
The method execute take the InputStream with the XML source. The out (OutputStream) have to be an XML like the IDOC structure.
Regards. -
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 a java class method from the jsp page.
Hi im a beginner with jsp and im trying to find a way to access a method of my java class file in jsp page. After searching through the forums i tried to use the usebean tag. Im using apache to host the jsp file.Below is an excerpt of my code and the error message i got. What am i doing wrong? anyone know?
<%@ page language="java" %>
<jsp:useBean id="movies" class="movie.Movie" />
<jsp:setProperty name="movies" property="*"/>
<%
movies.getStart("file:///C:/Video/Applications2/sun.mpg");
response.setContentType("text/xml");
%>
exception
org.apache.jasper.JasperException: Exception in JSP: /View.jsp:7
4: <jsp:setProperty name="movies" property="*"/>
5: <%
6:
7: movies.getStart("file:///C:/Video/Applications2/sun.mpg");
8: response.setContentType("text/xml");
9: %>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: javax/media/ControllerListenerHi thanks for responding. Ok i did look through and it was opening some gui. I still need the program to do server side processes so cant use an applet.but i dont need the gui so i revised it and removed the gui. also im using a servlet to call the class now yet i still have the same error. Any ideas?
Below is the vid2jpg code minus the gui.
import java.io.*;
import java.awt.*;
import javax.media.*;
import javax.media.control.*;
import javax.media.format.*;
import javax.media.protocol.*;
import java.awt.image.*;
import javax.imageio.*;
public class vid2jpg implements ControllerListener
Processor p;
Object waitObj = new Object();
boolean stateOK = true;
DataSourceHandler handler;
int imgWidth;int imgHeight;
Image outputImage;
String sep = System.getProperty("file.separator");
int[] outvid;
int startFr = 1;int endFr = 1000;int countFr = 0;
boolean sunjava=true;
* Static main method
public static void main(String[] args)
if(args.length == 0)
System.out.println("No media address.");
new vid2jpg("file:///C:/Video/applications2/sun.mpg"); // or alternative "vfw://0" if webcam
else
String path = args[0].trim();
System.out.println(path);
new vid2jpg(path);
* Constructor
public vid2jpg(String path)
MediaLocator ml;String args = path;
if((ml = new MediaLocator(args)) == null)
System.out.println("Cannot build media locator from: " + args);
if(!open(ml))
System.out.println("Failed to open media source");
* Given a MediaLocator, create a processor and start
private boolean open(MediaLocator ml)
System.out.println("Create processor for: " + ml);
try
p = Manager.createProcessor(ml);
catch (Exception e)
System.out.println("Failed to create a processor from the given media source: " + e);
return false;
p.addControllerListener(this);
// Put the Processor into configured state.
p.configure();
if(!waitForState(p.Configured))
System.out.println("Failed to configure the processor.");
return false;
// Get the raw output from the Processor.
p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
TrackControl tc[] = p.getTrackControls();
if(tc == null)
System.out.println("Failed to obtain track controls from the processor.");
return false;
TrackControl videoTrack = null;
for(int i = 0; i < tc.length; i++)
if(tc.getFormat() instanceof VideoFormat)
tc[i].setFormat(new RGBFormat(null, -1, Format.byteArray, -1.0F, 24, 3, 2, 1));
videoTrack = tc[i];
else
tc[i].setEnabled(false);
if(videoTrack == null)
System.out.println("The input media does not contain a video track.");
return false;
System.out.println("Video format: " + videoTrack.getFormat());
p.realize();
if(!waitForState(p.Realized))
System.out.println("Failed to realize the processor.");
return false;
// Get the output DataSource from the processor and set it to the DataSourceHandler.
DataSource ods = p.getDataOutput();
handler = new DataSourceHandler();
try
handler.setSource(ods); // also determines image size
catch(IncompatibleSourceException e)
System.out.println("Cannot handle the output DataSource from the processor: " + ods);
return false;
// setLayout(new FlowLayout(FlowLayout.LEFT));
// currPanel = new imgPanel(new Dimension(imgWidth,imgHeight));
// add(currPanel);
// pack();
//setLocation(100,100);
// setVisible(true);
handler.start();
// Prefetch the processor.
p.prefetch();
if(!waitForState(p.Prefetched))
System.out.println("Failed to prefetch the processor.");
return false;
// Start the processor
//p.setStopTime(new Time(20.00));
p.start();
return true;
* Sets image size
private void imageProfile(VideoFormat vidFormat)
System.out.println("Push Format "+vidFormat);
Dimension d = (vidFormat).getSize();
System.out.println("Video frame size: "+ d.width+"x"+d.height);
imgWidth=d.width;
imgHeight=d.height;
* Called on each new frame buffer
int nextframetime = 0;
private void useFrameData(Buffer inBuffer)
try
if(inBuffer.getData()!=null) // vfw://0 can deliver nulls
if(sunjava) // and with import javax.imageio.*;
int frametimesecs = (int)(inBuffer.getTimeStamp()/1000000000);
if(frametimesecs%10 == 0 && frametimesecs==nextframetime)
nextframetime+=10;
BufferedImage bi = new BufferedImage(outputImage.getWidth(null), outputImage.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics g = bi.getGraphics();
ImageIO.write(bi, "png", new File("images"+sep+"image_"+(inBuffer.getTimeStamp()/1000000000)+".png"));
catch(Exception e){}
* Tidy on finish
public void tidyClose()
handler.close();
p.close();
* Block until the processor has transitioned to the given state
private boolean waitForState(int state)
synchronized(waitObj)
try
while(p.getState() < state && stateOK)
waitObj.wait();
catch (Exception e)
return stateOK;
* Controller Listener.
public void controllerUpdate(ControllerEvent evt)
if(evt instanceof ConfigureCompleteEvent || evt instanceof RealizeCompleteEvent || evt instanceof PrefetchCompleteEvent)
synchronized(waitObj)
stateOK = true;
waitObj.notifyAll();
else
if(evt instanceof ResourceUnavailableEvent)
synchronized(waitObj)
stateOK = false;
waitObj.notifyAll();
else
if(evt instanceof EndOfMediaEvent || evt instanceof StopAtTimeEvent)
tidyClose();
* Inner classes
* A DataSourceHandler class to read from a DataSource and displays
* information of each frame of data received.
class DataSourceHandler implements BufferTransferHandler
DataSource source;
PullBufferStream pullStrms[] = null;
PushBufferStream pushStrms[] = null;
Buffer readBuffer;
* Sets the media source this MediaHandler should use to obtain content.
private void setSource(DataSource source) throws IncompatibleSourceException
// Different types of DataSources need to handled differently.
if(source instanceof PushBufferDataSource)
pushStrms = ((PushBufferDataSource) source).getStreams();
// Set the transfer handler to receive pushed data from the push DataSource.
pushStrms[0].setTransferHandler(this);
// Set image size
imageProfile((VideoFormat)pushStrms[0].getFormat());
else
if(source instanceof PullBufferDataSource)
System.out.println("PullBufferDataSource!");
// This handler only handles push buffer datasource.
throw new IncompatibleSourceException();
this.source = source;
readBuffer = new Buffer();
* This will get called when there's data pushed from the PushBufferDataSource.
public void transferData(PushBufferStream stream)
try
stream.read(readBuffer);
catch(Exception e)
System.out.println(e);
return;
// Just in case contents of data object changed by some other thread
Buffer inBuffer = (Buffer)(readBuffer.clone());
// Check for end of stream
if(readBuffer.isEOM())
System.out.println("End of stream");
return;
// Do useful stuff or wait
useFrameData(inBuffer);
public void start()
try{source.start();}catch(Exception e){System.out.println(e);}
public void stop()
try{source.stop();}catch(Exception e){System.out.println(e);}
public void close(){stop();}
public Object[] getControls()
return new Object[0];
public Object getControl(String name)
return null;
below is the servlet code.
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class ShowMovie extends HttpServlet {
String rootURL="http://127.0.0.1:8080/Video/";
public void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//String movie=request.getParameter("movie");
String movie ="son";
getStart(movie);
response.sendRedirect(rootURL+"View.jsp");
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
public void getStart(String url){
new vid2jpg(url);
this is the error from the server. Im using tomkat 5
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: javax/media/ControllerListener
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(Unknown Source)
java.security.SecureClassLoader.defineClass(Unknown Source)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
ShowMovie.getStart(ShowMovie.java:31)
ShowMovie.processRequest(ShowMovie.java:14)
ShowMovie.doGet(ShowMovie.java:22)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
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.17 logs. -
Hi
I'm doing single sign on via cookie and I able to get the cookie value and for decrypting I loaded java classes on the back end, When I called via form the jvm is crashing with some frm-92101 error.
First I want if anybody can help if I have to run any packages to execute java class from forms, I already created pl/sql wrapper class.
When I execute the function on the backend and got the decrypted value via pl/sql wrapper package but from forms the web servver is crashing, Can any body help.
Also where do I see the log file location.
Thanks in advance for the pro's for helping me
Thanks
MurthyDump from the application file.
08/06/23 14:21:58 formsweb: Forms session <10> exception stack trace:
java.io.IOException: FRM-93000: Unexpected internal error.
Details : No HTTP headers received from runform
at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
08/06/23 14:52:17 formsweb: Forms session <11> aborted: unable to communicate with runtime process.
08/06/23 14:52:17 formsweb: Forms session <11> exception stack trace:
java.io.IOException: FRM-93000: Unexpected internal error.
Details : No HTTP headers received from runform
at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
08/06/23 15:03:21 formsweb: Forms session <12> aborted: unable to communicate with runtime process.
08/06/23 15:03:21 formsweb: Forms session <12> exception stack trace:
java.io.IOException: FRM-93000: Unexpected internal error.
Details : No HTTP headers received from runform
at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
08/06/23 15:08:21 formsweb: lservlet: destroy
08/06/23 15:08:21 formsweb: Stopped
08/06/23 15:08:21 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost)) -
Can we call a workflow form a JSP and/or form a Java Class?
Is it possible to call a workflow form a JSP and/or form a Java Class?
Below is some xpress code I wrote once, used to dynamically lauch workflows from within a workflow. Since it basically uses java classes, you reuse these in your java program or jsp:
- create a new generic object
- call the setId, put, ... methods on it
- set the input variables for the workflow by putting them into the generic object
- call the checkinView method on a LighthouseContext object which launches your workflow.
If all you need is starting a workflow from a jsp, you might also want to take a look at the tasks/taskLaunch.jsp jsp. This is an out of the box jsp which allows launching of tasks. If I remember correctly you have to give an url parameter which specificies the name of task you want to start: tasks/taskLaunch.jsp?id=<workflow-name>
- Robin
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE TaskDefinition PUBLIC 'waveset.dtd' 'waveset.dtd'>
<TaskDefinition name="MVG_TD_LaunchWorkflow" taskType="Workflow" executor="com.waveset.workflow.WorkflowExecutor" suspendable="true" syncControlAllowed="true" execMode="sync" execLimit="0" resultLimit="0" resultOption="delete" visibility="runschedule" progressInterval="0">
<Extension>
<WFProcess name="MVG_TD_LaunchWorkflow">
<Variable name="workflowName" input="true"/>
<Variable name="taskInstanceName" input="true"/>
<Variable name="inputs" input="true"/>
<Variable name="processView"/>
<Activity name="start">
<Transition to="createProcessView"/>
</Activity>
<Activity name="createProcessView">
<Action>
<block trace="true">
<set name="processView">
<new class="com.waveset.object.GenericObject"/>
</set>
<invoke name="setId">
<ref>processView</ref>
<s>ProcessViewer</s>
</invoke>
<invoke name="put">
<ref>processView</ref>
<s>task.process</s>
<ref>workflowName</ref>
</invoke>
<invoke name="put">
<ref>processView</ref>
<s>task.taskName</s>
<ref>taskInstanceName</ref>
</invoke>
<if>
<notnull>
<ref>inputs</ref>
</notnull>
<then>
<invoke name="assimilate">
<ref>processView</ref>
<ref>inputs</ref>
</invoke>
</then>
</if>
</block>
</Action>
<Transition to="checkInProcessView"/>
</Activity>
<Activity name="checkInProcessView">
<Action>
<block trace="true">
<invoke name="checkinView">
<invoke name="getLighthouseContext">
<ref>WF_CONTEXT</ref>
</invoke>
<ref>processView</ref>
<new class="java.util.HashMap"/>
</invoke>
</block>
</Action>
<Transition to="end"/>
</Activity>
<Activity name="end"/>
</WFProcess>
</Extension>
<MemberObjectGroups>
<ObjectRef type="ObjectGroup" id="#ID#Top" name="Top"/>
</MemberObjectGroups>
</TaskDefinition> -
Hi,
I am in the midst of Installing SOLMAN on RHEL5-ORACLE
Have installed IBM JDK version 1.4.2_10
During the CREATE SECURE STORE PHASE I am getting the following error:
sapinst_dev log file O/P
WARNING[E] 2008-06-09 18:04:43.225
CJSlibModule::writeError_impl()
CJS-30050 Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
The java class is not found: com.sap.engine.offline.OfflineToolStart.
TRACE 2008-06-09 18:04:43.225 [iaxxejsbas.hpp:483]
EJS_Base::dispatchFunctionCall()
JS Callback has thrown unknown exception. Rethrowing.
TRACE 2008-06-09 18:04:43.243 [syuxctask.cpp:1382]
CSyTaskImpl::start(bool)
A child process has been started. Pid = 2529
TRACE 2008-06-09 18:04:43.281 [syuxctask.cpp:1382]
CSyTaskImpl::start(bool)
A child process has been started. Pid = 2530
ERROR 2008-06-09 18:04:43.310 [sixxcstepexecute.cpp:951]
FCO-00011 The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
TRACE 2008-06-09 18:04:43.317 [iaxxgenimp.cpp:752]
CGuiEngineImp::showMessageBox
<html> <head> </head> <body> <p> An error occurred while processing service SAP Solution Manager 4.0 Support Release 4 > SAP Systems > Oracle > Central System > Central System. You may now </p> <ul> <li> choose <i>Retry</i> to repeat the current step. </li> <li> choose <i>View Log</i> to get more information about the error. </li> <li> stop the task and continue with it later. </li> </ul> <p> Log files are written to /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS. </p> </body></html>
TRACE 2008-06-09 18:04:43.317 [iaxxgenimp.cpp:1255]
CGuiEngineImp::acceptAnswerForBlockingRequest
Waiting for an answer from GUI
SAPINST.LOG file O/P
WARNING 2008-06-09 18:04:43.224
Execution of the command "/opt/IBMJava2-amd64-142/bin/java -classpath /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/launcher.jar -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/lib:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/exception.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/logging.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/tc_sec_secstorefs.jar create -s SMD -f /sapmnt/SMD/global/security/data/SecStore.properties -k /sapmnt/SMD/global/security/data/SecStore.key -enc -p XXXXXX" finished with return code 1. Output:
The java class is not found: com.sap.engine.offline.OfflineToolStart
WARNING[E] 2008-06-09 18:04:43.225
CJS-30050 Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
The java class is not found: com.sap.engine.offline.OfflineToolStart.
ERROR 2008-06-09 18:04:43.310
FCO-00011 The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
SecurStoreCreate log O/P
The java class is not found: com.sap.engine.offline.OfflineToolStart
Pls suggest how to resolve this issue
Pls help to resolve this issue
Rgds,
AbhijeetHi All,
I Found the Solution.
The SAPinst tool was somehow not able to extracte the
J2EEINSTALL.SAR files from the JAVA Components DVD.
So I manually extracted the the file in the temporary install folder which the SAPinst creates in the /tmp filesystem (on LINUX by deafult) during the installation process.
The following command is used (I used this on Red Hat LINUX 5.2) to extract the J2EEINSTALL.SAR file:-
/sapmnt/SMD/exe/SAPCAR
-xvf /dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR
/sapmnt/SMD/exe/SAPCAR -->source directory of the file SAPCAR which is used to extarct CAR / SAR files on UNIX
/dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR--> destination dir. where the SAPinst tool will read and execute the file.
Rgds,
Abhijeet K -
I'm trying to use the Intermedia Java Classes for Servlets & JSPs (from http://technet.oracle.com/software/products/intermedia/htdocs/listing.htm#servelets_jsp) on a Sun machine with Apache/1.3.9 (Unix) ApacheJServ/1.1
It works quite fine, I'm just unable to upload any sort of image (the upload page gives me a java.lang.null pointer ex).
It becames funny because the same classes are perfectly working on my Win98 machine (on the same enviroment: Apache/1.3.19(Win32) ApacheJServ/1.1.2)
Anyone had a suggestion for me?
Thanks in advance.
Andrea
P.S. Please send any answer also to [email protected]
Thanks again
nullHi,
Someone else with a completely different configuration ran into what looks to be the same problem you are experiencing. As there is no obvious reason for this error, I posted some suggestions for modifications to the sample application to try to track this down. Please check the following URL for information on what to change and where: http://technet.oracle.com:89/ubb/Forum27/HTML/001043.html
Using the trace information from the log file, hopefully, we should be able to see what's happening.
Other pieces of information that would help would be the JDK version you are using, plus the stack traceback from log file, to ensure that the problems are the same.
Regards,
Simon
null -
Where does the java classes go?
I normally use IntelliJ which automatically puts the java class and the jsp where they are meant to go.
Can some help me.
Can someone please tell me where to put the java class, i have put the jsp pages in the webapps\ROOT but where does the java classes go?
Edited by: Tinkerbelle on Jul 24, 2008 1:46 AMTinkerbelle wrote:
sorry being stupid i do that sorry,
If i change the class to type (as someone said in a previous post)That would only work if you already put the bean in the session scope.
Did you try what PaulOckford wrote?
>
i get this error:
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:
An error occurred at line: 6 in the generated java file
Only a type can be imported. com.database.contactDB resolves to a packageDo you have a package structure that looks like this:
com
com/database/ <-- This is where contactDB.class is located
com/database/contactDB/
Because that is what the compiler is saying. Though it may be thrown off by case (see below)
P.S. If you use the jsp:useBean you do not need the import statement which appears to be where the error occurs. (One of the things that makes JSPs so hard to debug is the fact that the error line in the generated java file as referenced above is never the same as the line in the JSP file).
>
An error occurred at line: 3 in the jsp file: /login.jsp
database.contactDB cannot be resolved to a type
1: <%@ page import="com.database.contactDB" %>
2:
3: <jsp:useBean id='db'
4: scope='session'
5: type='database.contactDB'/>
6: <html>
And to be ultra clear - you did compile contactDB from a .java file to a .class file, and the class is called contactDB and not ContactDB correct? The class name is case sensitive and should be the exact same case in the useBean and import statements as in the real class name.
>
An error occurred at line: 3 in the jsp file: /login.jsp
database.contactDB cannot be resolved to a type
1: <%@ page import="com.database.contactDB" %>
2:
3: <jsp:useBean id='db'
4: scope='session'
5: type='database.contactDB'/>
6: <html>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
Apache Tomcat/5.5.26Edited by: stevejluke on Jul 24, 2008 7:33 AM
Fixed compile from .class file to a .java file to compile from a .java file to .class file
Maybe you are looking for
-
How to check SSO user from database?
Hi: I've posted this topic in Forms forum: How to check SSO user from database? then as I've been told, it's better to post it here, so ...... here is the question: I'm writing a "before delete trigger" to insert into log table before delete. Is ther
-
How can I align multiple titles in Premiere Pro?
We are working on a video (obviously) and we have a bullet list that we'd like to come up as the speaker is naming off specific items. So far we have created a separate title for each bullet point, so that we can control when the bullets fade in. The
-
I recently had a hard drive failure on my iMac. A new 1TB hard drive was installed along with OS X 10.6.8. Since restoring files from Time Machine, I am unable to open .docx files using MS Word 2011. I receive a 'convert file' dialog box. I can o
-
Need information on Dimension levels
Hello everyone specially Igor, Last time i asked about filling of Dimension and fact. And Mr. Igor explained well to me. Now i want to know that how many level must be in a hierarcy like Mr. Igor gave me an example that in a Customer dimension the cu
-
WE know that the OCCURS clause in the internal table statement creates the internal <b>table object</b> In the following statement is this possible:- TYPES <mt> TYPE| LIKE <linetype> OCCURS<n> . If not what else?