Negative Ranges, Java Scrollbars and Java2D.
Hiya all. I have a bit of an odd problem. Im working on graph animation. Graphs tend to be laid out with an initial random seed which tends to give a good smattering of negative values as well as postive ones. Now, I tend to shift all the nodes by a certain amount so that all are visible. However, once the user starts playing with the graph, there is no guarantee that all the values will still be positive. This means another shift is required which means a lot of jerky screen movements which is the last thing we need.
I was wondering. If i create a JPanel of say, size 1000 x 1000 and perform one Java2D affine translate of 500 by 500, that should center my graph on the JPanel. If i place this JPanel within a JScrollPane can I then set the scrollbars to appear halfway along their tracks, i.e, have the viewport lined up on center 500 by 500?
If anyone else has had a problem like this, i'd be most obliged if someone could post it here. Actually, probably the best thing would be some kind of canvas grow function such as the one in photoshop. When the canvas needs resizing, you can resize in one of 4 directions cant you? Yet the view remains constant. I imagine something like this isnt easy.
then you may recalculate the bounds and adjust the
scrollbars consquenlty? for example, minimum -7,
maximum 10 then set the scrolbar to have a maximum of
17, etc. and you can always modify the scrollbars to
have a right size so the user can scroll the graphsHuh? Here's a demo where the component just resizes in a JScrollPane:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SampleComponent extends JPanel{
private int minX=-100, maxX=100, minY=-100, maxY=100;
public Dimension getPreferredSize() {
return new Dimension(maxX-minX, maxY-minY);
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g.create();
g2.translate(-minX, -minY);
g2.drawLine(minX, 0, maxX, 0); //x axis
g2.drawLine(0, minY, 0, maxY); //y axis
g2.dispose();
public void rescale(float scale) {
minX=(int)(scale*minX);
maxX=(int)(scale*maxX);
minY=(int)(scale*minY);
maxY=(int)(scale*maxY);
invalidate();
revalidate();
repaint();
public static void main(String[] args) {
final SampleComponent app = new SampleComponent();
JScrollPane sp = new JScrollPane(app);
JPanel south = new JPanel();
JButton zoomIn = new JButton("zoom in");
south.add(zoomIn);
zoomIn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
app.rescale(1.5f);
JButton zoomOut = new JButton("zoom out");
south.add(zoomOut);
zoomOut.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent evt) {
app.rescale(.75f);
final JFrame f = new JFrame("SampleComponent");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(sp, BorderLayout.CENTER);
f.getContentPane().add(south, BorderLayout.SOUTH);
f.pack();
SwingUtilities.invokeLater(new Runnable(){
public void run() {
f.setLocationRelativeTo(null);
f.setVisible(true);
}Especially when you zoom in, you can get an unpleasant dislocation.
Similar Messages
-
Whats the difference between ABAP stack, ABAP+Java stack and Java stack
Hello,
I have a nagging doubt about the difference between the ABAP stack, ABAP+Java stack & the Java only stack. I believe that the method of applying the kernel for all the 3 types is different.
Also can we apply the ABAP support packs through JSPM.
Please put some light on this.
Thank youHi Zaheer
ABAP Stack
AS ABAP is used to provide the ABAP foundation of SAP NetWeaver.
Part of AS ABAP is the Search Engine Service (SES), which enables users to search for
business objects using Search and Classification (TREX). SES accesses Search and
Classification (TREX) functions through the Search and Classification (TREX) ABAP
client. SES replicates the business objects from the ABAP application to Search and
Classification (TREX), so that it can apply Search and Classification (TREX) search
functions to them. When a user enters a search query, the Search and Classification
(TREX) system responds to it, not the database for the ABAP application. For more
information, see the document Installation Guide SAP NetWeaver TREX Single Hosts /
Multiple Host.
Java stack
AS Java is used to provide the Java foundation of SAP NetWeaver. Among the key
capabilities of AS Java are:
J2EE Engine a J2EE 1.3-compliant application server for running enterprise
applications. In addition to the pure J2EE standard technologies, the J2EE
Engine implements complementary technologies, such as Web Dynpro or Web
Services, that are targeted at supporting large-scale, real-business application
development projects.
SAP Composite Application Framework Core (CAF Core) is a service-oriented
architecture for building and deploying composite applications. It enables
modeling of different service types entity services that represent a domain
model, application services that implement business logic, and external
services that offer connectivity to back-end services by means of remote
function calls (RFCs) or Web services. Usage type AS Java comprises the CAF
Core runtime environment, while design time tools are part of the SAP
NetWeaver Developer Studio.
Web Dynpro is the user interface technology for developing professional
business applications for mobile as well as for desktop clients. Web Dynpro
applications can easily be integrated into SAP NetWeaver Enterprise Portal,
providing a unified layout for the end user as well as enhanced navigation
support. Web Dynpro also allows, for example, the development of interactive
forms using the Adobe document services.
Adobe document services is a set of runtime services that provide a range of
form and document creation and manipulation functions such as:
Converting XML form templates (created using Adobe LiveCycle Designer)
to PDF and various print formats
Setting Adobe Reader rights to enable users to fill in and annotate forms,
save and print them locally, and include digital signatures for authentication
using the free Adobe Reader software
Extracting data from SAP applications into Interactive Forms and transferring form data
back into SAP applications using XML
ABAP + Java Stack
Contains both functionalities.
I hope this helps
Regards
Chen -
Java Platform and Technologies Take Center Stage at GIDS 2010
Great Indian Developer Summit 2010 u2013 India's Biggest Polyglot Conference and Workshops for IT Software Professionals
Bangalore, April 9, 2010: The GIDS.Java Conference and Workshops has announced the complete program of over 50 sessions on the present and future of the Java language and VM, how they are evolving to meet the community's ever-changing needs, and some of the cutting-edge tools, technologies & techniques used for building robust enterprise Java applications today. The GIDs.Java track at Great Indian Developer Summit takes place 22 and 23 April 2010, at the Indian Institute of Science in Bangalore.
As one of the longest running independent developer conferences in India, GIDS.Java at the Great Indian Developer Summit 2010 is uniquely positioned to provide a blend of practical, pragmatic and immediately applicable knowledge and a glimpse of the future of technology. During 22 and 23 April 2010, GIDS.Java offers a multi-track conference, workshops, expo show floor, and networking opportunities.
The first keynote at GIDS.Java "Pointy Haired Bosses and Pragmatic Programmers" is led by Dr. Venkat Subramaniam. He speaks about how each of us has a professional responsibility to be objective and make decisions that will help us and our teams be productive and deliver results. Venkat will pick on some fallacies, lay down facts, and discuss how to stay professional and objective in our daily efforts.
The second keynote of the day explains the practical features that make the Cloud so interesting, and why everyone should start using it in their everyday life. Simone Brunozzi, Amazon Web Services Technology Evangelist, will detail technical examples, business details all mixed with a lot of Italian humor to ensure audience enjoy this talk without a single line of code.
The third keynote of the day gives an exciting overview of directions in the Java space for Oracle, featuring concrete signs of Oracles heavy investment, a clear concise strategy overview, and deep dives into some of the most interesting pieces of technology being developed in the Java Platform Group today; such as JavaEE, JDK7, JavaFX, and our exciting new visual tools. Featuring demos by a Java evangelism team star, Simon Ritter, this talk takes you top to bottom in Java Technology.
Featured talks at GID.Web include:
Good, Bad, and Ugly of Java Generics, Venkat Subramaniam
Pure Java Ajax: An Overview of GWT 2.0, Marty Hall
How JPA 2.0 Makes a Good Thing Even Better, Mike Keith
Building Enterprise RIAs with Adobe Flex and Java, Sujit Reddy G
Integrated Ajax Support in JSF 2.0, Marty Hall
Design Patterns in Java and Groovy, Venkat Subramaniam
A Gentle Introduction to iPhone and Obj-C for Java Developers, Matthew McCullough
Cloud Computing: Azure for Java Developers, Janakiram MSV
Ajax Support in the Prototype JavaScript Library, Marty Hall
First steps to IT Heaven Through the Cloud. Part III: .Java, Simone Brunozi
Building Web 2.0 User Interfaces for Web Service Models using JSF, Frank Nimphius and Jobinesh P
Acceptance Test Driven Development, John Tobin and Mohammed Mohsinali
Architecting Your Java Applications for the Cloud, Praveen Srivatsa
Effective Java, Venkat Subramaniam
The Amazing Groovy Weight-loss Plan, Scott Davis
Enterprise Modeling - from Conceptual Planning to Technical Blueprints, J Sripad
Java Collections Renaissance, Donald Raab and Vlad Zakharov
Power 7 and IBM J9VM, Himanshu Goyal
A Whistle-stop Tour of Maven 3.0, Matthew McCullough
Mass Volume Opportunities for Java Developers, Jouko Nuottila
Emerging Technology Complex Event Processing, Duvvuri Srinivas
Agile ALM for Distributed Development, Karthi Swaminathan
Dim Sum Grails - A Sampler of Practical Non Database-Driven Grails Applications, Scott Davis
Diagnosing Performance Bottlenecks in J2EE, Deepak Kaul
Business Driven Identity Management, Suneet Agera
Combining Java EE with OSGi using Eclipse Gemini, Mike Keith
Workshop: Essence of Functional Programming, Venkat Subramaniam
Workshop: Agile Development, Tools, and Teams and Scrum Certification, Stephen Forte
Workshop: Cloud Computing Boot Camp on the Google App Engine, Matthew McCullough
Workshop: Building Your First Amazon App, Simone Brunozzi
Workshop: The 180-min AJAX and JSON Spike Class, Scott Davis
Workshop: PHP + Adobe Flex = Killer RIA, Shyamprasad P
Workshop: User Expereince Evaluation Model Walkthrough, Sanna Häiväläinen
Workshop: Building Data Centric Applications using Adobe Flex and Java, Prashant Singh
Workshop: Monetizing your Apps with PayPal X Payments Platform, Khurram Khan, Praveen Alavilli
Sponsors of Great Indian Developer Summit 2010 include: Platinum sponsors Microsoft, Oracle Forum Nokia and Adobe; Gold sponsors Intel and SAP; Silver sponsors Quest Software, PayPal, Telerik and AMT.
About Great Indian Developer Summit
Great Indian Developer Summit is the gold standard for India's software developer ecosystem for gaining exposure to and evaluating new projects, tools, services, platforms, languages, software and standards. Packed with premium knowledge, action plans and advise from been-there-done-it veterans, creators, and visionaries, the 2010 edition of Great Indian Developer Summit features focused sessions, case studies, workshops and power panels that will transform you into a force to reckon with. Featuring 3 co-located conferences: GIDS.NET, GIDS.Web, GIDS.Java and an exclusive day of in-depth tutorials - GIDS.Workshops, from 20 April to 24 April at the IISc campus in Bangalore.
At GIDS you'll participate in hundreds of sessions encompassing the full range of Microsoft computing, Java, Agile, RIA, Rich Web, open source/standards, languages, frameworks and platforms, practical tutorials that deep dive into technical skill and best practices, inspirational keynote presentations, an Expo Hall featuring dozens of the latest projects and products activities, engaging networking events, and the interact with the best and brightest of speakers from around the world.
For further information on GIDS 2010, please visit the summit on the web http://www.developersummit.com/
A Saltmarch Media Press Release
E: info AT saltmarch dot com
Ph: +91 80 4005 1000
Edited by: wonkim785 on Apr 14, 2010 8:23 AMIm not sure if this is the right place to post this, but anyway thanks for the info :)
-
Analytic Windowing - Positive/Negative Range
Hi,
In analytic functions, we can say
RANGE BETWEEN x PRECEDING
AND y PRECEDINGwhere x and y are expressions (not necessarily literals), as long as x and do not evaluate to negative numbers. If we know when we write the code that x and/or y is negative, ithen we can use FOLLOWING instead of PRECEDING, and if we don't know until run-time whether x or y will be negative, we can compute the function both ways, and use a CASE expression to choose one or the other. I was just wondering if there was a more elegant way do RANGE BETWEEN when x and/or y might be negative.
Here's a specific example:
Yesterday, there was a question {message:id=10868410} about how to find how many children (immediate children, not descendants 2 or more levels down) each node in a tree has. OP specifically asked for an analytic solution. I don't believe analytic functions are the best solution to this particular problem, but I've been trying to find an analytic solution anyway, just for curiosity.
So, again, the problem is, using the standard scott.emp table (where empno is a unique postive number, and NULL mgr indicates no parent), is there a purely analytic query that can get the same results as
SELECT ename -- Query 1: no analytics
, empno
, mgr
SELECT COUNT (*)
FROM scott.emp
WHERE mgr = m.empno
) AS children
FROM scott.emp m
ORDER BY mgr NULLS FIRST
, empno
;Output:
ENAME EMPNO MGR CHILDREN
KING 7839 3
SCOTT 7788 7566 1
FORD 7902 7566 1
ALLEN 7499 7698 0
WARD 7521 7698 0
MARTIN 7654 7698 0
TURNER 7844 7698 0
JAMES 7900 7698 0
MILLER 7934 7782 0
ADAMS 7876 7788 0
JONES 7566 7839 2
BLAKE 7698 7839 5
CLARK 7782 7839 1
SMITH 7369 7902 0I would love to do something like this:
SELECT ename -- Query 2: ***** WRONG ! ***** raises ORA-01428
, empno
, mgr
, COUNT (*) OVER ( ORDER BY mgr
RANGE BETWEEN empno - NVL (mgr, 0) PRECEDING
AND empno - NVL (mgr, 0) PRECEDING
) AS children
FROM scott.emp
ORDER BY mgr, empno
;but negative RANGEs aren't allowed, so the best I could do using this approach was
SELECT ename -- Query 3
, empno
, mgr
, CASE
WHEN empno < mgr
THEN COUNT (*) OVER ( ORDER BY NVL (mgr, 0)
RANGE BETWEEN ABS (empno - NVL (mgr, 0)) PRECEDING
AND ABS (empno - NVL (mgr, 0)) PRECEDING
ELSE COUNT (*) OVER ( ORDER BY NVL (mgr, 0)
RANGE BETWEEN ABS (empno - NVL (mgr, 0)) FOLLOWING
AND ABS (empno - NVL (mgr, 0)) FOLLOWING
END AS children
FROM scott.emp
ORDER BY NVL (mgr, 0), empno
;Is there a more efficient and/or more elegant way to handle possibly negative ranges?
Can you think of other analytic solutions to this particular problem?
OP in {message:id=10868481} had one idea, that involved a CONNECT BY query.
I posted a soltuion using the aggregate COUNT function. Any query that uses an aggregate function (such as COUNT) which has an analytic twin can be re-written to use the analytic twin, and SELECT DISTINCT instead of GROUP BY.
Any other ideas?
I'm interested in any version of Oracle.
Thanks.Hi,
I don't have a database at the moment but to solve the preceding or folowing problem, I think you can use one of the two always, and just sort ascending or descending as applicable.
So some thing like: (not tested)
SELECT ename -- Query 3
, empno
, mgr
, COUNT (*) OVER ( ORDER BY case when empno < mgr then NVL (mgr, 0) else -NVL (mgr, 0) end
RANGE BETWEEN ABS (empno - NVL (mgr, 0)) PRECEDING
AND ABS (empno - NVL (mgr, 0)) PRECEDING
AS children
FROM scott.emp
ORDER BY NVL (mgr, 0), empno
;Regards,
Peter -
Differnet Charting behaviour between Java 7 and Java 8
Hi I've developed an application with charts in Java FX and Java 7. Everything works fine, but now I've tested it with Java 8. There I can see, that something must have changed in the way a chart wil be painted.
The following code will describe the problem. Execute it with Java 7 and Java 8 and you will see what I mean.
package linechartsample;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.AreaChart;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.stage.Stage;
public class LineChartSample extends Application {
@Override
public void start(Stage stage) {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Month");
final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
xAxis, yAxis);
lineChart.setTitle("Stock Monitoring");
lineChart.setCreateSymbols(false);
XYChart.Series series1 = new XYChart.Series();
series1.setName("Portfolio 1");
series1.getData().add(new AreaChart.Data(1, 10));
series1.getData().add(new AreaChart.Data(2, 20));
series1.getData().add(new AreaChart.Data(3, 10));
series1.getData().add(new AreaChart.Data(2, 5));
series1.getData().add(new AreaChart.Data(1, 10));
Scene scene = new Scene(lineChart, 800, 600);
lineChart.getData().addAll(series1);
StringBuilder builder = new StringBuilder();
// builder.append("-fx-stroke: ");
// builder.append("#");
// builder.append(Integer.toHexString(115));
// builder.append(Integer.toHexString(115));
// builder.append(Integer.toHexString(115));
// builder.append(Integer.toHexString(100));
builder.append("-fx-fill: ");
builder.append("#");
builder.append(Integer.toHexString(215));
builder.append(Integer.toHexString(115));
builder.append(Integer.toHexString(115));
builder.append(Integer.toHexString(100));
series1.getNode().setStyle(builder.toString());
stage.setScene(scene);
stage.show();
public static void main(String[] args) {
launch(args);
What happens here in Java 8???
Additionally I've tried to draw a simple AreaChart with a series of negative values. In Java 7 the area between the line and the X-Axis will be filled. In java 8 the area between the line and the bottom of the chart will be filled. Are there any new properties which have to set to draw it in the correct way? I've checked it with the stackedAreaChart. Here everything is fin in Java7 and Java8.
Can somebody explain me that change in the behaviour of the charts in JavaFX 8?? Or is this a Bug??
Kind regardsYour code is really weird.
Applying a fill to the line path in a line chart is a strange thing to do. Usually a line chart is for drawing lines not filled areas. For filled areas, JavaFX has an AreaChart.
Setting multiple y values for a given x value in a series is also a very strange thing to do. Usually for a LineChart plot, the x values in the series are unique.
I haven't tried your code on Java 7 as I don't have Java 7 installed and your code doesn't really seem like a valid test case to me anyway. That your code got you a result you wanted in Java 7 would be more a fluke than anything else, I would guess.
For your area chart question, please ask that as a separate question with reproducible source code and test case.
If you really think there are bugs or regressions in JavaFX, then report them in the bug tracker after running your tests on the latest development JDK at: https://jdk8.java.net/download.html -
I'm working on a sheet that I want to use to select a specific part based on values created by the sum of values in other cells. I am down to the point where I need to select a low range of numbers
If the sum of cell D5 equals any sum between 1-15 will equal = part 1
If the sum of cell D5 equals any sum between 16-23 will equal = part 2 ,
If the sum of cell D5 equal antsy sum between 24-32 will equal part 3.
I'm at a loss how to make one formula or combination of formulas do this.
Thanks in advance.
Big Al HurHi Al,
The confusion arises from your having asked two separate questions, one in the subject line, the other in the body of your initial post.
1.
How do I sum only the values greater than zero and less than 7 in a range of cells?
This formula supplied by SGIII does what you have asked there:
=SUMIFS(A,A,">0",A,"<7")
The syntax is:
SUMIFS(sum-values, test-values, condition, test-values, condition…)
sum-values ( A ) is the range of cells containing the values to be summed (all the body cells in column A)
test-values and condition come in pairs. the first names the range of values to be tested, the second names the condition that must be met.
In this formula, the test-values in each pair are the same as the sum values.
condition ( ">0" ) is the first condition that must be met by these values. (greater than zero)
the second condition ( "<7" ) is the second condition that must be met (less than seven)
To be included in the sum, a value in the list must meet both conditions: It must be greater than 0 AND less than 7. IN SG's example, there are two values that meet both conditions, 2 in A2 and 6 in A5, that meet both conditions. Their sum, 8, is shown in A10, whch is the cell containing the formula.
2
If the sum of cell D5 equals any sum between 1-15 will equal = part 1
If the sum of cell D5 equals any sum between 16-23 will equal = part 2 ,
If the sum of cell D5 equals any sum between 24-32 will equal part 3.
This formula supplied by SGIII, and the Lookup table that goes with it, does what you have asked here.
=VLOOKUP(D5,Lookup::A:B,2,close-match)
Close-match means 'the largest value that is less than or equal to' the search-value.
The search-value is the value in D5
VLOOKUP searches in the leftmost column (A) of the lookup table (columns A and B of the table named Lookup).
With "close-match" specified:
any value that is equal to or greater than 0 and less than 16 will be matched by the 0 in A2. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 1"
any value that is equal to or greater than 16 and less than 24 will be matched by the 16 in A3. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 2"
any value that is equal to or greater than 24 will be matched by the 24 in A4. VLOOKUP will return the value in the same row of column 2 (B) of the table: "Part 3"
While this is not an exact match with your description above, it will perform exactly as you requested IF the value in D5 is never less than 1 and never greater than 32.
If the possible range is greater than that, I would suggest the changes shown below to the formula and to the lookup table. The column containing numbers is column D, and represents values in D5. Column E shows the result for each value using the given formula and lookup table (LU A). Column F shows results for the same values using the revised formula and lookup tble (LU B):
Original =VLOOKUP(D,LU A :: A:B,2,1)
Revised formula: =IFERROR(VLOOKUP(D,LU B :: A:B,2,1),"N//A")
In the revision, IFERROR takes care of the negative values in D2 and D3. The zero value in D4 and in the last row of column D and the overflow values (greater than 32) are handled by the revisions to the lookup table.
Regards,
Barry -
I searched a lot about java card and rfid, but don't have a clear idea about the relationship between the two. Please help me....
They have NO common grounds.
A java card needs a real "smart" processor because it contains a Java Virtual Machine, can do crypto and other stuff. The cost to produce one is in the multi dollar range. Some java cards can communicate contactless by "radio".
RFID is the term to describe a very primitive device, all it can do is report a unique identification (ID) and it does this contactless (RF). the cost to produce one is in the cent range. You can use it to track products or containers or other stuff.
Since RFID is also a very popular buzzword these days, the exact meaning of RFID varies.
Of course, you could use a java card to play RFID tag, but that would be
very expensive. Java cards are usually used for bank cards and similar applications. -
Whats is difference between Java JRE and Java SDK
Hi,
what is the difference between Java JRE and Java SDK...
i think both of them have the same set of files to be installed...
I am not able to understand where they differThe JRE (Java runtime Environment) contains just the stuff necessary to run Java and the SDK (System Development Kit) contains the extra stuff necessary (and also helpful) to develop in Java.
-
This is a repeat of this post: Java SSO and IIS
Noone answered there.
Hello,
my organization uses Java SSO authentication in Oracle Application Server. Now we want to "expand" SSO so that our IIS applications can benefit from Oracle SSO and user needn't print user name / password again. Is there any way to use Java SSO in IIS? In this project we use Java SSO, not Oracle Identity Management.
Thanks in advanceHi ,
I was installed and configured policy agent successfully.while i am trying to access the application url i am getting following error.
I am using IIS6.0 and access manager 7.1.
Error 2824:15b9918 AuthService: AuthService::processLoginStatus() Exception message=[Application user ID is not valid.] errorCode='107' templateName=login_failed_template.jsp.
2009-03-10 00:03:05.828 Error 2824:15b9918 PolicyEngine: am_policy_evaluate: InternalException in AuthService::processLoginStatus() with error message:Exception message=[Application user ID is not valid.] errorCode='107' templateName=login_failed_template.jsp and code:3
2009-03-10 00:03:05.828 Warning 2824:15b9918 PolicyAgent: am_web_is_access_allowed()(http://fcs-ylwkuzfoz1q.ramesh.com:99/website.html, GET) denying access: status = Access Manager authentication service failure
2009-03-10 00:03:05.828 Debug 2824:15b9918 PolicyAgent: am_web_is_access_allowed(): Successfully logged to remote server for GET action by user unknown user to resource http://fcs-ylwkuzfoz1q.ramesh.com:99/website.html.
2009-03-10 00:03:05.828 Info 2824:15b9918 PolicyAgent: am_web_is_access_allowed()(http://fcs-ylwkuzfoz1q.ramesh.com:99/website.html, GET) returning status: Access Manager authentication service failure.
2009-03-10 00:03:05.828 Debug 2824:15b9918 PolicyAgent: HttpExtensionProc(): status after am_web_is_access_allowed = Access Manager authentication service failure (3)
2009-03-10 00:03:05.828 Error 2824:15b9918 PolicyAgent: HttpExtensionProc(): status: Access Manager authentication service failure (3)
2009-03-10 00:03:05.828 Debug 2824:15b9918 PolicyAgent: OnSendResponse(): HTTP Status code is 500
can any one please help me to resolve this.
Thanks
Ramesh Kumar GV -
I am a IT graduate and I still need some clarification on the relationship between Java SE and Java EE API. Does EE include SE?
For application development, I know I can use only SE without the EE, but can I use EE alone without SE?
Any good articles addressing my questions?
Thank you very much
RJava EE in fact extends java SE, its primarily aim is to simplify developing multitier enterprise applications (Java SE provides all the necessary basic libraries etc.)
Because Java EE is an extension of Java SE, you cant use EE without SE - without SE there is no EE. -
Compatibility between Java crypto and open ssl
Hello
I have some question about compatibility between java crypto and openssl library.
This is my case:
1.I created DESede key and stored it to file:
SecretKey key = KeyGenerator.getInstance("TripleDES").generateKey();
File f = new File("c:\\key.dat");
DataOutputStream dos =new DataOutputStream(new FileOutputStream(f));
dos.write(key.getEncoded());
dos3.close();2.I encrypt some file "c:\\normal.dat" through:
ecipher.init(Cipher.ENCRYPT_MODE, key2);
byte[] enc = ecipher.doFinal(normalData);
File f2 = new File("c:\\enc.dat");
DataOutputStream dos =new DataOutputStream(new FileOutputStream(f2));
dos.write(enc);
dos.close();You have carefully left out some critical java code, namely the Cipher.getInstance() method. You'll notice in the documentation for this method that there 3 components to the "transform" argument of this method, the algorithm, the mode, and the padding. All of these must match exactly with the what openssl is using. Furthermore, if you are using one of the modes which require an IV, like CBC mode, then this must match exactly too. If you don't explicitly specify some of these parameters, you might get default values supplied. It is up to you to find out what these are.
-
Problem with java look and feel
Hi! This is my first time posting here. Do apologize me if I am not familiar with the regulations here. Thanks!
Currently, I am developing a project using NetBeans IDE. It is using RMI, and some basic UI. I am facing the following error when I tried applying the java look and feel code. Please see below for the code used and the error message.
try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception e) { }
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.plaf.ColorUIResource cannot be cast to java.util.List
at javax.swing.plaf.metal.MetalUtils.drawGradient(MetalUtils.java:196)
at javax.swing.plaf.metal.MetalInternalFrameTitlePane.paintComponent(MetalInternalFrameTitlePane.java:384)
at javax.swing.JComponent.paint(JComponent.java:1027)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paint(JComponent.java:1036)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
at javax.swing.JComponent.paintChildren(JComponent.java:864)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5129)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
at javax.swing.JComponent.paint(JComponent.java:1013)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1797)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:734)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Java Result: 1Thanks for everyone's help!
Below is the executable code generated using NetBeans which is enough to generate the error message. Sometimes you can get the error message just by running the program. Sometimes the error will occur when you go into the Menu and click on Item.
* NewJFrame.java
* Created on January 8, 2008, 1:11 PM
package client;
import javax.swing.UIManager;
* @author Yang
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jDesktopPane1 = new javax.swing.JDesktopPane();
jInternalFrame1 = new javax.swing.JInternalFrame();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
jInternalFrame1Layout.setHorizontalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 190, Short.MAX_VALUE)
jInternalFrame1Layout.setVerticalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 95, Short.MAX_VALUE)
jInternalFrame1.setBounds(80, 40, 200, 130);
jDesktopPane1.add(jInternalFrame1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jMenu1.setText("Menu");
jMenuItem1.setText("Item");
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem1ActionPerformed(evt);
jMenu1.add(jMenuItem1);
jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE)
.addGap(20, 20, 20))
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jDesktopPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
pack();
}// </editor-fold>
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
jInternalFrame1.setVisible(true);
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
// Variables declaration - do not modify
private javax.swing.JDesktopPane jDesktopPane1;
private javax.swing.JInternalFrame jInternalFrame1;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
// End of variables declaration
}Edited by: Boxie on Jan 7, 2008 11:23 PM -
Problem with Java 5 and Oracle 10g JDBC driver
Hi All,
Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
Thanks,sounds like a database problem...
Are you using a driver version that's supported for your database engine?
What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
So it's either your database, your driver, your network (dropping packets???), or your application.
The upgrade may just have exposed something that was already there. -
Hi APO Experts,
In our project, we have received more sales order inconsistencies which is not clearing by CCR program and it is clearing by program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, So We have decided to schedule the background job on daily basis for program /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow, performing the testing in our quality system and observed the below strange behavior.
When I am running the program /SAPAPO/SDRQCR21 with Range of products and some location range with option as Build Reqmts from Doc. Flow, in Background job. In output it is suggesting to delete one sales order. If I checked that Sales order in ECC, it is for an different location, that is not part of my selection and the order is open. In MD04 the Qty is showing 1 ( as per sales order) but in APO RRP3 view the order qty is showing Zero. I have run the CCR, it is coming in different in content and if I push, the different is not going to APO.
I have tried running the program /SAPAPO/SDRQCR21 with plant which is mentioned in that sales order with option as Build Reqmts from Doc. Flow, in Background job , it is suggesting this sales order under update option correctly.
Can you please help me understand why it is behaving differently like the location is not part of my selection and why it is suggesting the wrong action. And also whether is it advisable to run the /SAPAPO/SDRQCR21 with option as Build Reqmts from Doc. Flow at plant range and material range in background job.
Thanks & Regards,
Sundaram RadhakrishnanSundaram,
It sounds to me like the sales document records in the OLTP and in APO were created at different times. This is common in Dev and Qual environments when the systems are commonly created at two different times, and each was a copy of an existing system that contained sales data. The order number you see in //rrp3 is somewhat irrelevant; system generally uses the guid for many activities.
FYI during Dev and Qual refreshes, if you are copying from a production environment that contains data, it is always best to create the OLTP and SCM images at the same time, and to copy them both to the Dev and Qual systems at the same time. If you don't do this, you are faced with the additional tasks associated with getting the copied systems back into synch.
If this is Dev or Qual, I suggest that you just completely wipe out all sales orders in APO and rebuild them using the CIF.
If this is a mature production environment, the only time I have ever seen this issue is due to improperly created CIF enhancements. Speak to your developers to find the root cause, and correct this problem. Then, wipe out all sales orders and rebuild with CIF.
Best Regards,
DB49 -
Hello All!
I'm looking for a little help on an exact problem that seems to have been solved here before (but doesn't work for me).
Here's the original archived thread:
https://discussions.apple.com/thread/2631967?start=0&tstart=0
The question asked is exactly the same....
I have a java app for a Speco Technologies DVR. After opening the app, you must type in a rather long url and then click connect. If you enter the url, then quit the app, when you relaunch it, it does not remember the url that had been entered the previous time.
I would like to create a script that will launch the Java app and then input the url (text string). I cannot get this to work.
I've gotten as far as this:
on run
tell application "Finder" to activate open document file "DVRVIEWER(DO_NOT_DELETE).jar" of folder "Applications" of startup disk
delay 5
set myString to "192.168.0.118"
repeat with currentCharacter in every character of myString
tell application "system events"
keystroke currentCharacter
end tell
delay 0.25
end repeat
tell application "system events"
keystroke return
end run
AppleScript has a Syntax Error of "Expected end of line, etc. but found command name."
Does anyone ( taylor.henderson where are you! ) have a fix, or even a better way to do this? Can I edit the existing .jar to have the info directly in there?
I would actually love to add another section in there that fills in the username and password after entering in the IP address!
Just for clarification on how this goes:
Launch .jar.
Window Launches and prompts for IP address
Enter in IP address
Press RETURN
Windows disappears and new window appears and prompts for username and password
Enter Username
Press TAB
Enter Password
Press RETURN
Thank you guys, I'm sure it's easy, but hey, for me Photoshop and Illustrator are a breeze :-0
-AndyTheFiredogHi
andythefiredog wrote:
Is it possible to use similar commands to maximize the java window?
Yes.
You must enable the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane
Add these lines after the last line wich contains "keystroke return"
delay 2
tell (first process whose frontmost is true) to click button 2 of window 1 -- zoom
Here's my test script ( the Speco camera demo), that works without problems here, I use the application "DVRJavaView4.1.jar", this script checks the existence of ui element (more reliable) rather than any delay.
on run
do shell script "/usr/bin/open '/Applications/DVRJavaView4.1.jar'"
tell application "System Events" to tell (first process whose frontmost is true)
repeat until exists window "Please Input DVR address"
delay 1
end repeat
keystroke "millapt.ddns.specoddns.net"
keystroke return
repeat until exists button "OK" of window 1
delay 1 -- wait until the login window is frontmost
end repeat
keystroke "user"
keystroke tab
delay 0.1
keystroke "4321"
delay 0.1
keystroke return
repeat until name of window 1 starts with "DVRJavaView"
delay 1 --wait while the login window is frontmost
end repeat
click button 2 of window 1 -- zoom
end tell
end run
Maybe you are looking for
-
Hi all, I have an scenario IDOC->PI->AS2. when we send to the Partner via AS2 they sent us back a Synchronous MDN, but we don't process it yet. I want to build an interface to process the MDN for bussiness to check if the Invoice they sent was receiv
-
IBook to Dell 2005FPW connectors
My new 2005FPW Dell was just picked up and the correct connectors aren't in there for my 14.1 iBook. I have the Mini-VGA/video out adapter but am missing a connection between the [Dell-VGA Cable] and the [Apple Video Adapter] does anyone know where t
-
Pre-order question for iPhone5/Verizon
I have a quick question... My wife and son currently have the iPhone4 with AT&T and they are now out of contract. I'm currently on Verizon. I want to change their carrier and pre-order the iPhone5 for both of them from Verizon. I want to add those
-
recently installed McAfee Security for Mac. Free download from AT&T. Since then, Safari has been dropping all preferences each time I launch the app. Is it the new install or something else?
-
Panorama settings are not retained after restart.
In 4.0, the Panorama settings are not retained after restart. The tabs that make up the Panorama settings are retained after restarting Firefox. Any suggestions?