Class error message
I get an error message when I boot up Livetype:
An unexpected error occured. (*class error for 'ProSystemStore;' class not loaded)
When I hit continue on the error message Livetype opens but when I select "New" under File the app quits. Any ideas other than reloading the app?
thanks,
Rob
G5 Mac Mac OS X (10.4.5)
sorry, I can't duplicate your duplicative post. the error appears ot be a unix command or a Java thingy but I cannot find any such item on my system. I can finds tons of "class" files and several with "pros" in the filoename but none with "prosystem"
Hope you get better advice.
bogiesan
Similar Messages
-
Hi,
Does anyone know what a duplicate class error message means and how to resolve it?
It just does not make any sense to me as there is only one instance of the class yet the compiler is throwing out a duplicate class error message.I copied your experiment and had no trouble compiling the four classes (A, B, C, and Test). One thing to note is that Test.class shows up in the root destination directory (above a.b.c) because Test.java is missing the package statement. Perhaps, as mentioned earlier in the thread, the missing package statement is causing the problem with your compiler.
I compiled them with ant using the following build.xml code:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="compile" name="PackageTest">
<property name="build.dir" location="build"/>
<property name="dist.dir" location="dist"/>
<target name="init">
<mkdir dir="${build.dir}/classes"/>
<mkdir dir="${dist.dir}"/>
</target>
<target name="compile"
depends="init"
description="Compile Source Code">
<javac srcdir="."
destdir="${build.dir}/classes"/>
</target>
</project> -
"method not found in class " error message !
Dear People,
I have an error message that says:
"Clerk.java": Error #: 300 : method doTransaction(stan_ch15p622.Transaction) not found in class stan_ch15p622.Bank at line 36, column 12
below is the Clerk class of the program.
doTransaction() is defined below the constructor and is called at the
bottom of the class.
Thank you in advance
Stan
package stan_From_Ivor_Horton_ch15p622;
public class Clerk implements Runnable
private Bank theBank; // the employer. who the clerk works for
private Transaction inTray; //holds a transaction
public Clerk(Bank theBank)
this.theBank = theBank;
inTray = null; // no transaction initially
//receive a transaction
public void doTransaction(Transaction transaction)
inTray = transaction;
//The working clerk...
public void run()
while(true) // no transaction waiting ?
while(inTray == null)
try
Thread.sleep(150); // then take a break
catch(InterruptedException e)
System.out.println(e);
theBank.doTransaction(inTray);
inTray = null;
//you can check whether a clerk is busy by calling the isBusy() member
// it returns true if the transaction is strill in progress
public boolean isBusy()
return inTray != null;
}Dear Hambone3,
Due to your help I was able to correct my error. I mispelled the
method in the Bank class. I wrote "toTransaction" instead of
"doTransaction".I have alwyas had a hard time interrpreting the
error messages literally because many times I don't see the
connection between the message and the error. Cold water over
the brain is sometimes what I need.
God bless you.
Stan -
Cannot lauch project, class error messages
The project was originally configured in LookoutDirect, then converted to Lookout 6.2.
One one computer I have a seperate Runtime and Development packages. This computer has been working satisfactoraly for two months.
Insatlled second runtime software on computer two, but cannot launch project because of class errors.
Can I copy the entire National Instrument folder from one computer to the other to correct this.
thanks
John Peterson
Solved!
Go to Solution.Problem solved
Believe drivers are DSComm4.cbx and Meter4.cbx, but don't bother moving them. Tried every conceivable location.
You must INSTALL the driver on both computers.Driver from Automation Direct (PC-DL-PLUS LOOKOUT DIRECT PLUS DRIVER OBJECT SFTWRE)
From the responses I think their is more than one with the problem.
Also make sure the tages are not pointing to the computer name. Tag path should start with "..\" or "..\..\" (test on yours) to work on both computers. Computer name appears depending on how you drill down to the PLC address. This doesn't stop the project, just gets rid of the red X's on the second computer.
Thanks for your responses
John Peterson -
"Class Circle not found in TryBouncingBalls" error message. Help !
Dear People,
I have an error message :
"TryBouncingBalls.java": Error : class Circle not found in class stan_bluej_ch5_p135.TryBouncingBalls at line 67, "
Circle circle = new Circle(xPos + 130, 30);
below are the classes TryBouncingBalls, BouncingBall, BallDemo, Canvas
Thank you in advance
Stan
package stan_bluej_ch5_p135;
import java.awt.*;
import java.awt.geom.*;
public class TryBouncingBalls
public static void main(String[] args)
Canvas myCanvas = new Canvas("Creativity at its best");
myCanvas.setVisible(true);
BouncingBall ball = new BouncingBall(50,50,16, Color.red, 500, myCanvas);
BouncingBall ball2 = new BouncingBall(70,80,20, Color.green, 500, myCanvas);
BouncingBall ball3 = new BouncingBall(90,100,16, Color.red, 500, myCanvas);
BouncingBall ball4 = new BouncingBall(30,30,20, Color.green, 500, myCanvas);
ball.draw();
ball2.draw();
ball.draw();
ball2.draw();
// make them bounce
boolean finished = false;
while(!finished) {
myCanvas.wait(50); // small delay
ball.move();
ball2.move();
ball3.move();
ball4.move();
// stop once ball has travelled a certain distance on x axis
if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
finished = true;
myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
myCanvas.setForegroundColor(Color.red);
myCanvas.drawString("We are having fun, ...\n\n", 20, 30);
myCanvas.wait(1000);
myCanvas.setForegroundColor(Color.black);
myCanvas.drawString("...drawing lines...", 60, 60);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.gray);
myCanvas.drawLine(200, 20, 300, 50);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.blue);
myCanvas.drawLine(220, 100, 370, 40);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.green);
myCanvas.drawLine(290, 10, 320, 120);
myCanvas.wait(1000);
myCanvas.setForegroundColor(Color.gray);
myCanvas.drawString("...and shapes!", 110, 90);
myCanvas.setForegroundColor(Color.red);
myCanvas.drawString("to bring to focus creative ideas !", 310, 290);
// the shape to draw and move
int xPos = 10;
Rectangle rect = new Rectangle(xPos + 40, 150, 30, 20);
Rectangle rect2 = new Rectangle(xPos + 80, 120, 50, 25);
Rectangle rect3 = new Rectangle(xPos+ 1200, 180, 30, 30);
Rectangle rect4 = new Rectangle(xPos + 150, 220, 40, 15);
myCanvas.fill(rect);
myCanvas.fill(rect2);
myCanvas.fill(rect3);
myCanvas.fill(rect4);
Circle circle = new Circle(xPos + 130, 30);
// Circle circle2 = new Circle(xPos + 150, 50);
// Circle circle3 = new Circle(xPos + 170, 30);
// Circle circle4 = new Circle(xPos + 200, 40);
// myCanvas.fill(circle);
// myCanvas.fill(circle2);
// myCanvas.fill(circle3);
// myCanvas.fill(circle4);
// move the rectangle and circles across the screen
for(int i = 0; i < 200; i ++) {
myCanvas.fill(rect);
myCanvas.fill(rect2);
myCanvas.fill(rect3);
myCanvas.fill(rect4);
myCanvas.wait(10);
myCanvas.erase(rect);
myCanvas.erase(rect2);
myCanvas.erase(rect3);
myCanvas.erase(rect4);
xPos++;
rect.setLocation(xPos, 150);
rect2.setLocation(xPos, 120);
rect3.setLocation(xPos, 180);
rect4.setLocation(xPos, 220);
// at the end of the move, draw once more so that it remains visible
myCanvas.fill(rect);
myCanvas.fill(rect2);
myCanvas.fill(rect3);
myCanvas.fill(rect4);
package stan_bluej_ch5_p135;
import java.awt.*;
import java.awt.geom.*;
* Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
* has the ability to move. Details of movement are determined by the ball itself. It
* will fall downwards, accelerating with time due to the effect of gravity, and bounce
* upward again when hitting the ground.
* This movement can be initiated by repeated calls to the "move" method.
* @author Bruce Quig
* @author Michael Kolling (mik)
* @author David J. Barnes
* @version 1.1 (23-Jan-2002)
public class BouncingBall
private static final int gravity = 3; // effect of gravity
private int ballDegradation = 2;
private Ellipse2D.Double circle;
private Color color;
private int diameter;
private int xPosition;
private int yPosition;
private final int groundPosition; // y position of ground
private Canvas canvas;
private int ySpeed = 1; // initial downward speed
* Constructor for objects of class BouncingBall
* @param xPos the horizontal coordinate of the ball
* @param yPos the vertical coordinate of the ball
* @param ballDiameter the diameter (in pixels) of the ball
* @param ballColor the color of the ball
* @param groundPos the position of the ground (where the wall will bounce)
* @param drawingCanvas the canvas to draw this ball on
public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
int groundPos, Canvas drawingCanvas)
xPosition = xPos;
yPosition = yPos;
color = ballColor;
diameter = ballDiameter;
groundPosition = groundPos;
canvas = drawingCanvas;
* Draw this ball at its current position onto the canvas.
public void draw()
canvas.setForegroundColor(color);
canvas.fillCircle(xPosition, yPosition, diameter);
* Erase this ball at its current position.
public void erase()
canvas.eraseCircle(xPosition, yPosition, diameter);
* Move this ball according to its position and speed and redraw.
public void move()
// remove from canvas at the current position
erase();
// compute new position
ySpeed += gravity;
yPosition += ySpeed;
xPosition +=2;
// check if it has hit the ground
if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
yPosition = (int)(groundPosition - diameter);
ySpeed = -ySpeed + ballDegradation;
// draw again at new position
draw();
* return the horizontal position of this ball
public int getXPosition()
return xPosition;
* return the vertical position of this ball
public int getYPosition()
return yPosition;
package stan_bluej_ch5_p135;
import java.awt.*;
import java.awt.geom.*;
* Class BallDemo - provides two short demonstrations showing how to use the
* Canvas class.
* @author Michael Kolling and David J. Barnes
* @version 1.0 (23-Jan-2002)
public class BallDemo
private Canvas myCanvas;
* Create a BallDemo object. Creates a fresh canvas and makes it visible.
public BallDemo()
myCanvas = new Canvas("Ball Demo", 600, 500);
myCanvas.setVisible(true);
* This method demonstrates some of the drawing operations that are
* available on a Canvas object.
public void drawDemo()
myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
myCanvas.setForegroundColor(Color.red);
myCanvas.drawString("We can draw text, ...", 20, 30);
myCanvas.wait(1000);
myCanvas.setForegroundColor(Color.black);
myCanvas.drawString("...draw lines...", 60, 60);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.gray);
myCanvas.drawLine(200, 20, 300, 50);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.blue);
myCanvas.drawLine(220, 100, 370, 40);
myCanvas.wait(500);
myCanvas.setForegroundColor(Color.green);
myCanvas.drawLine(290, 10, 320, 120);
myCanvas.wait(1000);
myCanvas.setForegroundColor(Color.gray);
myCanvas.drawString("...and shapes!", 110, 90);
myCanvas.setForegroundColor(Color.red);
// the shape to draw and move
int xPos = 10;
Rectangle rect = new Rectangle(xPos, 150, 30, 20);
// move the rectangle across the screen
for(int i = 0; i < 200; i ++) {
myCanvas.fill(rect);
myCanvas.wait(10);
myCanvas.erase(rect);
xPos++;
rect.setLocation(xPos, 150);
// at the end of the move, draw once more so that it remains visible
myCanvas.fill(rect);
* Simulates two bouncing balls
public void bounce()
int ground = 400; // position of the ground line
myCanvas.setVisible(true);
// draw the ground
myCanvas.drawLine(50, ground, 550, ground);
// crate and show the balls
BouncingBall ball = new BouncingBall(50, 50, 16, Color.blue, ground, myCanvas);
ball.draw();
BouncingBall ball2 = new BouncingBall(70, 80, 20, Color.red, ground, myCanvas);
ball2.draw();
// make them bounce
boolean finished = false;
while(!finished) {
myCanvas.wait(50); // small delay
ball.move();
ball2.move();
// stop once ball has travelled a certain distance on x axis
if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
finished = true;
ball.erase();
ball2.erase();
package stan_bluej_ch5_p135;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;
* Class Canvas - a class to allow for simple graphical
* drawing on a canvas.
* @author Michael Kolling (mik)
* @author Bruce Quig
* @version 1.8 (23.01.2002)
public class Canvas
private JFrame frame;
private CanvasPane canvas;
private Graphics2D graphic;
private Color backgroundColor;
private Image canvasImage;
* Create a Canvas with default height, width and background color
* (300, 300, white).
* @param title title to appear in Canvas Frame
public Canvas(String title)
this(title, 600, 600, Color.white);
* Create a Canvas with default background color (white).
* @param title title to appear in Canvas Frame
* @param width the desired width for the canvas
* @param height the desired height for the canvas
public Canvas(String title, int width, int height)
this(title, width, height, Color.white);
* Create a Canvas.
* @param title title to appear in Canvas Frame
* @param width the desired width for the canvas
* @param height the desired height for the canvas
* @param bgClour the desired background color of the canvas
public Canvas(String title, int width, int height, Color bgColor)
frame = new JFrame();
canvas = new CanvasPane();
frame.setContentPane(canvas);
frame.setTitle(title);
canvas.setPreferredSize(new Dimension(width, height));
backgroundColor = bgColor;
frame.pack();
* Set the canvas visibility and brings canvas to the front of screen
* when made visible. This method can also be used to bring an already
* visible canvas to the front of other windows.
* @param visible boolean value representing the desired visibility of
* the canvas (true or false)
public void setVisible(boolean visible)
if(graphic == null) {
// first time: instantiate the offscreen image and fill it with
// the background color
Dimension size = canvas.getSize();
canvasImage = canvas.createImage(size.width, size.height);
graphic = (Graphics2D)canvasImage.getGraphics();
graphic.setColor(backgroundColor);
graphic.fillRect(0, 0, size.width, size.height);
graphic.setColor(Color.black);
frame.show();
* Provide information on visibility of the Canvas.
* @return true if canvas is visible, false otherwise
public boolean isVisible()
return frame.isVisible();
* Draw the outline of a given shape onto the canvas.
* @param shape the shape object to be drawn on the canvas
public void draw(Shape shape)
graphic.draw(shape);
canvas.repaint();
* Fill the internal dimensions of a given shape with the current
* foreground color of the canvas.
* @param shape the shape object to be filled
public void fill(Shape shape)
graphic.fill(shape);
canvas.repaint();
* Fill the internal dimensions of the given circle with the current
* foreground color of the canvas.
public void fillCircle(int xPos, int yPos, int diameter)
Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
fill(circle);
* Fill the internal dimensions of the given rectangle with the current
* foreground color of the canvas. This is a convenience method. A similar
* effect can be achieved with the "fill" method.
public void fillRectangle(int xPos, int yPos, int width, int height)
fill(new Rectangle(xPos, yPos, width, height));
* Erase the whole canvas.
public void erase()
Color original = graphic.getColor();
graphic.setColor(backgroundColor);
Dimension size = canvas.getSize();
graphic.fill(new Rectangle(0, 0, size.width, size.height));
graphic.setColor(original);
canvas.repaint();
* Erase the internal dimensions of the given circle. This is a
* convenience method. A similar effect can be achieved with
* the "erase" method.
public void eraseCircle(int xPos, int yPos, int diameter)
Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
erase(circle);
* Erase the internal dimensions of the given rectangle. This is a
* convenience method. A similar effect can be achieved with
* the "erase" method.
public void eraseRectangle(int xPos, int yPos, int width, int height)
erase(new Rectangle(xPos, yPos, width, height));
* Erase a given shape's interior on the screen.
* @param shape the shape object to be erased
public void erase(Shape shape)
Color original = graphic.getColor();
graphic.setColor(backgroundColor);
graphic.fill(shape); // erase by filling background color
graphic.setColor(original);
canvas.repaint();
* Erases a given shape's outline on the screen.
* @param shape the shape object to be erased
public void eraseOutline(Shape shape)
Color original = graphic.getColor();
graphic.setColor(backgroundColor);
graphic.draw(shape); // erase by drawing background color
graphic.setColor(original);
canvas.repaint();
* Draws an image onto the canvas.
* @param image the Image object to be displayed
* @param x x co-ordinate for Image placement
* @param y y co-ordinate for Image placement
* @return returns boolean value representing whether the image was
* completely loaded
public boolean drawImage(Image image, int x, int y)
boolean result = graphic.drawImage(image, x, y, null);
canvas.repaint();
return result;
* Draws a String on the Canvas.
* @param text the String to be displayed
* @param x x co-ordinate for text placement
* @param y y co-ordinate for text placement
public void drawString(String text, int x, int y)
graphic.drawString(text, x, y);
canvas.repaint();
* Erases a String on the Canvas.
* @param text the String to be displayed
* @param x x co-ordinate for text placement
* @param y y co-ordinate for text placement
public void eraseString(String text, int x, int y)
Color original = graphic.getColor();
graphic.setColor(backgroundColor);
graphic.drawString(text, x, y);
graphic.setColor(original);
canvas.repaint();
* Draws a line on the Canvas.
* @param x1 x co-ordinate of start of line
* @param y1 y co-ordinate of start of line
* @param x2 x co-ordinate of end of line
* @param y2 y co-ordinate of end of line
public void drawLine(int x1, int y1, int x2, int y2)
graphic.drawLine(x1, y1, x2, y2);
canvas.repaint();
* Sets the foreground color of the Canvas.
* @param newColor the new color for the foreground of the Canvas
public void setForegroundColor(Color blue)
graphic.setColor(Color.blue);
* Returns the current color of the foreground.
* @return the color of the foreground of the Canvas
public Color getForegroundColor()
return graphic.getColor();
* Sets the background color of the Canvas.
* @param newColor the new color for the background of the Canvas
public void setBackgroundColor(Color newColor)
backgroundColor = newColor;
graphic.setBackground(newColor);
* Returns the current color of the background
* @return the color of the background of the Canvas
public Color getBackgroundColor()
return backgroundColor;
* changes the current Font used on the Canvas
* @param newFont new font to be used for String output
public void setFont(Font newFont)
graphic.setFont(newFont);
* Returns the current font of the canvas.
* @return the font currently in use
public Font getFont()
return graphic.getFont();
* Sets the size of the canvas.
* @param width new width
* @param height new height
public void setSize(int width, int height)
canvas.setPreferredSize(new Dimension(width, height));
Image oldImage = canvasImage;
canvasImage = canvas.createImage(width, height);
graphic = (Graphics2D)canvasImage.getGraphics();
graphic.drawImage(oldImage, 0, 0, null);
frame.pack();
* Returns the size of the canvas.
* @return The current dimension of the canvas
public Dimension getSize()
return canvas.getSize();
* Waits for a specified number of milliseconds before finishing.
* This provides an easy way to specify a small delay which can be
* used when producing animations.
* @param milliseconds the number
public void wait(int milliseconds)
try
Thread.sleep(milliseconds);
catch (InterruptedException e)
// ignoring exception at the moment
* Nested class CanvasPane - the actual canvas component contained in the
* Canvas frame. This is essentially a JPanel with added capability to
* refresh the image drawn on it.
private class CanvasPane extends JPanel
public void paint(Graphics g)
g.drawImage(canvasImage, 0, 0, null);Dear Miciuli,
I found the definition for the circle in the canvas class and used it to creates circles ! Thank you for jaring my brain into thinking !
Stan
Ellipse2D.Double circle = new Ellipse2D.Double(xPos, 70, 30 , 30); -
This is the error message I get when i click to open FF after i downloaded the newest version: "ug-in object: TypeError: Components.classes[cid] is undefined" . The message is in the top left corner and not fully visible. i sent a message a few min ago so i am sending this b/c i copied the error message to help diagnose the problem.
This issue can be caused by an extension that isn't working properly.
Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
* Don't make any changes on the Safe mode start window.
See:
* [[Troubleshooting extensions and themes]] -
When I open up Mozilla i get this error message--TypeError: Components.classes[cid] is undefined
also when i am working on my real estate web site and pull up a name i get the same messag. At the top it always says-- Java Script ApplicationThat error is caused by an incompatible/malfunctioning add-on. To identify the culprit follow the procedure in the [[troubleshooting extensions and themes]] article. One add-on that has caused this error for some is AVG safe search.
-
For weeks I have been viewing a doggy day care center via their web cam. This weekend I upgraded to Lion and have been unable to view the center. I get an error message for Java plug-in 1.6.0_29 ....webcam class not found. Any suggestions on how to fix this?
Sorry, don't know what else to suggest unless there's a URL to the problem stream that someone here can try. Otherwise we can't test it to try and determine what might be wrong.
BTW, make sure they're testing it with a Mac, not with a Windows system. If they test only with Windows, what they say is or is not working doesn't mean much.
Regards. -
I keep getting this error message: ITunes was unable to load data class information from Synch Services. Reconnect or try again later. What does that mean? Can I fix it? or do I have to wait for the next update?
See TS2690: iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert.
tt2 -
I recently updated my iTunes to the most recent version and I am receiving an error message when starting up iTunes: iTunes was unable to load data class information from sync services. Reconnect or try again later. (Does anyone know what this means and if it is going to cause me issues?)
http://support.apple.com/kb/TS2690?viewlocale=en_US&locale=en_US
-
Error message while creating Overwrite exit for a standard class method.
Hi,
I was trying to create an overwrite exit in class CL_HRTMC_AC_TA_DASHBOARD for method GET_DEVPLAN_ASSESSMENTS. I created an Enhancement Implementation first. But when I tried to insert Overwrite exit method, I got error message that "The class has not yet been converted to the new class-local types" . In the toolbar->Utilities, I saw an option "Convert Class-local types" and when I clicked that it asked for the Access key. Eventhough I cancelled the process, now I am seeing some inactive parts in from this class in my Inactive object list. When I try to activate, it's again asking for access key and not able to activate it. Not sure what has actually happened. Is it possible to revert it to old form? Please advice!
Thanks,
Mahesh Nair.Inbound delivery is not part of Sales and Distribution. You might want to move your post to either the Logistics Materials Management (MM) forum or the Workflow forum.
Also sometimes search for OSS notes by the message class and number helps. -
Getting error message Cannot Resolve Symbol when trying to compile a class
Hello All -
I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
the following error message:
D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
ConnectionPool.java
ConnectionPool.java:158: cannot resolve symbol
symbol : class PooledConnection
location: class cal.ConnectionPool
private void addConnection(PooledConnection value) {
^
ConnectionPool.java:144: cannot resolve symbol
symbol : class PooledConnection
location: class cal.ConnectionPool
PooledConnection pcon = new PooledConnection(con);
^
ConnectionPool.java:144: cannot resolve symbol
symbol : class PooledConnection
location: class cal.ConnectionPool
PooledConnection pcon = new PooledConnection(con);
The code is listed as follows for PooledConnection.java (it compiles fine)
package cal;
import java.sql.*;
public class PooledConnection {
// Real JDBC Connection
private Connection connection = null;
// boolean flag used to determine if connection is in use
private boolean inuse = false;
// Constructor that takes the passed in JDBC Connection
// and stores it in the connection attribute.
public PooledConnection(Connection value) {
if ( value != null ) {
connection = value;
// Returns a reference to the JDBC Connection
public Connection getConnection() {
// get the JDBC Connection
return connection;
// Set the status of the PooledConnection.
public void setInUse(boolean value) {
inuse = value;
// Returns the current status of the PooledConnection.
public boolean inUse() {
return inuse;
// Close the real JDBC Connection
public void close() {
try {
connection.close();
catch (SQLException sqle) {
System.err.println(sqle.getMessage());
Now the code for ConnectionPool.java class that gives the cannot
resolve symbol error
package cal;
import java.sql.*;
import java.util.*;
public class ConnectionPool {
// JDBC Driver Name
private String driver = null;
// URL of database
private String url = null;
// Initial number of connections.
private int size = 0;
// Username
private String username = new String("");
// Password
private String password = new String("");
// Vector of JDBC Connections
private Vector pool = null;
public ConnectionPool() {
// Set the value of the JDBC Driver
public void setDriver(String value) {
if ( value != null ) {
driver = value;
// Get the value of the JDBC Driver
public String getDriver() {
return driver;
// Set the URL Pointing to the Datasource
public void setURL(String value ) {
if ( value != null ) {
url = value;
// Get the URL Pointing to the Datasource
public String getURL() {
return url;
// Set the initial number of connections
public void setSize(int value) {
if ( value > 1 ) {
size = value;
// Get the initial number of connections
public int getSize() {
return size;
// Set the username
public void setUsername(String value) {
if ( value != null ) {
username = value;
// Get the username
public String getUserName() {
return username;
// Set the password
public void setPassword(String value) {
if ( value != null ) {
password = value;
// Get the password
public String getPassword() {
return password;
// Creates and returns a connection
private Connection createConnection() throws Exception {
Connection con = null;
// Create a Connection
con = DriverManager.getConnection(url,
username, password);
return con;
// Initialize the pool
public synchronized void initializePool() throws Exception {
// Check our initial values
if ( driver == null ) {
throw new Exception("No Driver Name Specified!");
if ( url == null ) {
throw new Exception("No URL Specified!");
if ( size < 1 ) {
throw new Exception("Pool size is less than 1!");
// Create the Connections
try {
// Load the Driver class file
Class.forName(driver);
// Create Connections based on the size member
for ( int x = 0; x < size; x++ ) {
Connection con = createConnection();
if ( con != null ) {
// Create a PooledConnection to encapsulate the
// real JDBC Connection
PooledConnection pcon = new PooledConnection(con);
// Add the Connection to the pool.
addConnection(pcon);
catch (Exception e) {
System.err.println(e.getMessage());
throw new Exception(e.getMessage());
// Adds the PooledConnection to the pool
private void addConnection(PooledConnection value) {
// If the pool is null, create a new vector
// with the initial size of "size"
if ( pool == null ) {
pool = new Vector(size);
// Add the PooledConnection Object to the vector
pool.addElement(value);
public synchronized void releaseConnection(Connection con) {
// find the PooledConnection Object
for ( int x = 0; x < pool.size(); x++ ) {
PooledConnection pcon =
(PooledConnection)pool.elementAt(x);
// Check for correct Connection
if ( pcon.getConnection() == con ) {
System.err.println("Releasing Connection " + x);
// Set its inuse attribute to false, which
// releases it for use
pcon.setInUse(false);
break;
// Find an available connection
public synchronized Connection getConnection()
throws Exception {
PooledConnection pcon = null;
// find a connection not in use
for ( int x = 0; x < pool.size(); x++ ) {
pcon = (PooledConnection)pool.elementAt(x);
// Check to see if the Connection is in use
if ( pcon.inUse() == false ) {
// Mark it as in use
pcon.setInUse(true);
// return the JDBC Connection stored in the
// PooledConnection object
return pcon.getConnection();
// Could not find a free connection,
// create and add a new one
try {
// Create a new JDBC Connection
Connection con = createConnection();
// Create a new PooledConnection, passing it the JDBC
// Connection
pcon = new PooledConnection(con);
// Mark the connection as in use
pcon.setInUse(true);
// Add the new PooledConnection object to the pool
pool.addElement(pcon);
catch (Exception e) {
System.err.println(e.getMessage());
throw new Exception(e.getMessage());
// return the new Connection
return pcon.getConnection();
// When shutting down the pool, you need to first empty it.
public synchronized void emptyPool() {
// Iterate over the entire pool closing the
// JDBC Connections.
for ( int x = 0; x < pool.size(); x++ ) {
System.err.println("Closing JDBC Connection " + x);
PooledConnection pcon =
(PooledConnection)pool.elementAt(x);
// If the PooledConnection is not in use, close it
if ( pcon.inUse() == false ) {
pcon.close();
else {
// If it is still in use, sleep for 30 seconds and
// force close.
try {
java.lang.Thread.sleep(30000);
pcon.close();
catch (InterruptedException ie) {
System.err.println(ie.getMessage());
I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
Any help would be greatly appreciated.
tnx..
addiIs ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
javac cal/ConnectionPool. -
Error message when syncing Ipad in itunes: unable to load data class
Hi there:
I t tried posting this question on the ipad community but no luck.
What happened last night I was trying to sync/backup my ipad 2 running ios 5.0.1 with itunes 10.5 (?) for over an hour. It stuck on step 2 of syncing ipad and it's been on that for a while. when I get to step two, after it asks me if I want to sync my purchased on my ipad to itunes, I click ok. then i keep getting the follow error message: itunes was unable to load data class information from Sync services. reconnect or try again later.
I keep trying and this message keeps popping up on step two;
then in itunes when I click on my ipad under devices, itunes will freeze.
I can't figure out what happened. when I previously synced I had no problem and it was quick.
I even tried to download itunes again and "repair" it but still same problem.
Please help.
thanksIn the course of your troubleshooting to date, have you worked through the following document, Jeff?
iTunes for Windows: "Unable to load data class" or "Unable to load provider data" sync services alert -
"Class can't be instantiated " error message. Help !
Dear Java People,
In trying to do a program that outputs a sound with every button click
I have no compilation errors but a runtime error that says:
"class can't be instantiated"
below is the program and below that the error message
thank you in advance
Norman
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import java.applet.*;
import java.awt.event.*;
import java.net.*;
public abstract class MyMusicApplet_1 extends JApplet implements ActionListener, AppletContext
//AppletContext myAppletContext = new AppletContext();
//Iterator i = myAppletContext.getStreamKeys();
JButton myJButton;
AudioClip acSound_1;
AudioClip acSound_2;
AudioClip acSound_3;
AudioClip acSound_4;
AudioClip acSound_5;
AudioClip acSound_6;
AudioClip acSound_7;
AudioClip acSound_8;
AudioClip acSound_9;
JButton myJButtonSound1;
JButton myJButtonSound2;
JButton myJButtonSound3;
JButton myJButtonSound4;
JButton myJButtonSound5;
JButton myJButtonSound6;
JButton myJButtonSound7;
JButton myJButtonSound8;
JButton myJButtonSound9;
public void init()
try
acSound_1 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_2 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_3 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_4 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_5 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_6 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_7 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_8 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
acSound_9 = getAudioClip(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore.wrk"));
catch (MalformedURLException e)
System.out.println("Error here " );
Container myContentPane = getContentPane();
myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
Dimension buttonSize = new Dimension(190,100);
Font myFont = new Font("Arial", Font.BOLD,14);
Border myEdge = BorderFactory.createRaisedBevelBorder();
//create 1st button's object
myJButtonSound1 = new JButton("sound #1");
myJButtonSound1.addActionListener(this);
//set the button's border and size, font background and foreground
myJButtonSound1.setBorder(myEdge);
myJButtonSound1.setPreferredSize(buttonSize);
myJButtonSound1.setFont(myFont);
myJButtonSound1.setBackground(Color.orange);
myJButtonSound1.setForeground(Color.black);
//create 2nd button's object
myJButtonSound2 = new JButton("sound #2");
myJButtonSound2.addActionListener(this);
//set the button's border and size, font, background and foreground
myJButtonSound2.setBorder(myEdge);
myJButtonSound2.setPreferredSize(buttonSize);
myJButtonSound2.setFont(myFont);
myJButtonSound2.setBackground(Color.blue);
myJButtonSound2.setForeground(Color.black);
//create 3rd button's object
myJButtonSound3 = new JButton("sound #3");
myJButtonSound1.addActionListener(this);
//set the button's border and size, font, background and foreground
myJButtonSound3.setBorder(myEdge);
myJButtonSound3.setPreferredSize(buttonSize);
myJButtonSound3.setFont(myFont);
myJButtonSound3.setBackground(Color.cyan);
myJButtonSound3.setForeground(Color.black);
//create 4th button's object
myJButtonSound4 = new JButton("sound #4");
myJButtonSound4.addActionListener(this);
//set the button's border and size, font background and foreground
myJButtonSound4.setBorder(myEdge);
myJButtonSound4.setPreferredSize(buttonSize);
myJButtonSound4.setFont(myFont);
myJButtonSound4.setBackground(Color.pink);
myJButtonSound4.setForeground(Color.black);
//create 5th button's object
myJButtonSound5 = new JButton("sound #5");
myJButtonSound5.addActionListener(this);
//set the button's border and size, font background and foreground
myJButtonSound5.setBorder(myEdge);
myJButtonSound5.setPreferredSize(buttonSize);
myJButtonSound5.setFont(myFont);
myJButtonSound5.setBackground(Color.red);
myJButtonSound5.setForeground(Color.black);
//create 6th button's object
myJButtonSound6 = new JButton("sound #6");
myJButtonSound6.addActionListener(this);
//set the button's border and size, font, background and foreground
myJButtonSound6.setBorder(myEdge);
myJButtonSound6.setPreferredSize(buttonSize);
myJButtonSound6.setFont(myFont);
myJButtonSound6.setBackground(Color.pink);
myJButtonSound6.setForeground(Color.black);
//create 7th button's object
myJButtonSound7 = new JButton("Choice #7");
myJButtonSound7.addActionListener(this);
//set the button's border and size, font, background and foreground
myJButtonSound7.setBorder(myEdge);
myJButtonSound7.setPreferredSize(buttonSize);
myJButtonSound7.setFont(myFont);
myJButtonSound7.setBackground(Color.cyan);
myJButtonSound7.setForeground(Color.black);
//create 8th button's object
myJButtonSound8 = new JButton("Choice #8");
myJButtonSound8.addActionListener(this);
//set the button's border and size, font background and foreground
myJButtonSound8.setBorder(myEdge);
myJButtonSound8.setPreferredSize(buttonSize);
myJButtonSound8.setFont(myFont);
myJButtonSound8.setBackground(Color.yellow);
myJButtonSound8.setForeground(Color.black);
//create 9th button's object
myJButtonSound9 = new JButton("Choice #9");
myJButtonSound9.addActionListener(this);
//set the button's border and size, font background and foreground
myJButtonSound9.setBorder(myEdge);
myJButtonSound9.setPreferredSize(buttonSize);
myJButtonSound9.setFont(myFont);
myJButtonSound9.setBackground(Color.blue);
myJButtonSound9.setForeground(Color.black);
//add the buttons to the content pane
myContentPane.add(myJButtonSound1);
myContentPane.add(myJButtonSound2);
myContentPane.add(myJButtonSound3);
myContentPane.add(myJButtonSound4);
myContentPane.add(myJButtonSound5);
myContentPane.add(myJButtonSound6);
myContentPane.add(myJButtonSound7);
myContentPane.add(myJButtonSound8);
myContentPane.add(myJButtonSound9);
public void actionPerformed(ActionEvent e)
myJButton = (JButton)e.getSource();
if(myJButton == myJButtonSound1)
acSound_1.play();
if(myJButton == myJButtonSound2)
acSound_2.play();
if(myJButton == myJButtonSound3)
acSound_3.play();
if(myJButton == myJButtonSound4)
acSound_4.play();
if(myJButton == myJButtonSound5)
acSound_5.play();
if(myJButton == myJButtonSound6)
acSound_6.play();
if(myJButton == myJButtonSound7)
acSound_7.play();
if(myJButton == myJButtonSound8)
acSound_8.play();
if(myJButton == myJButtonSound9)
acSound_9.play();
java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
load: stan_my_music_applet_1.MyMusicApplet_1.class can't be instantiated.
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
at sun.applet.AppletPanel.run(AppletPanel.java:292)
at java.lang.Thread.run(Thread.java:536)I also tried:
try
for(int a=0;a<8;a++)
{acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (i + 1) + ".wrk")));
and the error message still says:
"MyMusicApplet3.java": Error #: 300 : method getAudioClip(java.net.URL, java.net.URL) not found in class stan_my_music_applet_3.MyMusicApplet3 at line 19
Help !
below is the revised code
Norman
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import java.applet.*;
import java.awt.event.*;
import java.net.*;
public class MyMusicApplet3 extends JApplet implements ActionListener
AudioClip[] acSounds= new AudioClip[9];
public void init()
try
for(int a=0;a<8;a++)
{acSounds[a] = getAudioClip(getCodeBase(),(new URL ("c:/Program Files/Cakewalk/Cakewalk Pro Audio 9/seashore" + (a + 1) + ".wrk")));
catch (Exception e)
System.out.println("Error here " );
Container myContentPane = getContentPane();
myContentPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
myContentPane.add(getButton("1", Color.orange));
myContentPane.add(getButton("2", Color.blue));
myContentPane.add(getButton("3", Color.cyan));
myContentPane.add(getButton("4", Color.pink));
myContentPane.add(getButton("5", Color.red));
myContentPane.add(getButton("6", Color.pink));
myContentPane.add(getButton("7", Color.cyan));
myContentPane.add(getButton("8", Color.yellow));
myContentPane.add(getButton("9", Color.blue));
public void actionPerformed(ActionEvent e)
String command = e.getActionCommand();
int index = Integer.parseInt(command)-1;
acSounds[index].play();
public JButton getButton(String label, Color fore)
{ JButton button = new JButton("sound "+label);
button.setPreferredSize(new Dimension(190,100));
button.setFont(new Font("Arial", Font.BOLD,14));
button.setBorder(BorderFactory.createRaisedBevelBorder());
button.setForeground(fore);
button.setBackground(Color.orange);
button.addActionListener(this);
button.setActionCommand(label);
return button;
}//"MyMusicApplet3.java": Error #: 300 :
//method getAudioClip(java.net.URL, java.net.URL) not found in class
// stan_my_music_applet_3.MyMusicApplet3 at line 19, column 24 -
error message when starting Firefox 8 that says:
TypeError: Components.classes[TvtPwmComponent_CID] is undefined
I am using Window 7 64 bitStart Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
*Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
Maybe you are looking for
-
How to Identify open Stock Transport Orders and their Purchase Order No?
I am looking for the most efficient way, with the best SAP tables, to read , to get STOs and their Purchase Order numbers. Also, what would be the best way to get its related Sales Order Number. Thank-You.
-
Well, I have been reading all the threads now on 8.0 and 8.0.1. I converted over to 10.5 then 10.5.1 just a week ago. I read threads on doing clean installs, had never done one before, so I took the plunge and did it. Now I don't have alot of 3rd par
-
I downloaded some themes for my BB 8350 version 4.6.1 (which I have), I install them but I can't see them anywhere, I reinstall them and a message appears saying that they are allready installed and that if I want to reinstall them...so that means th
-
Please read this iTunes Devs.
For the love of God, it's impossible to find a direct feedback link on the site for iTunes, so I'm posting it here in prayer of a dev actually reading it. /end mini-rant I would like to have iTunes show me a column that simply displays a "Yes" or a "
-
How to change the Package of planning area and datasource to be transportab
Hi every body, I av created a datasource for the xxx planning area and saved in $tmp which is local package and cannot be transportable .and i would like to transport the planning area along with the data source.But before transpor