Got error while compiling this source code?
[code =java]package com.agent.client.movies;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
public interface DataSourceMovies extends Remote{
ArrayList<String[]> getAllMovies() throws RemoteException;
ArrayList<String[]> findMoviesByYear( int year) throws RemoteException;
ArrayList<String[]> findMoviesByDirector(String director) throws RemoteException;
ArrayList<String[]> findMoviesByGenre(String genre) throws RemoteException;
ArrayList<String[]> findMoviesByName(String name) throws RemoteException;
* To change this template, choose Tools | Templates
* and open the template in the editor.
* MovieClient.java
* Created on Apr 24, 2012, 10:49:58 AM
package com.agent.client.movies;
import com.agent.client.songs.SongsClient;
import com.agent.client.Utility;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import javax.naming.InitialContext;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
public class MovieClient extends javax.swing.JFrame {
ArrayList<String> mappedips = new ArrayList<String>();
DefaultListModel<String> modelmsg = new DefaultListModel<String>();
InitialContext ctx;
/** Creates new form MovieClient */
public MovieClient(String ips) {
setLookAndFeel();
initComponents();
Utility.setInCenter(this);
StringTokenizer stok = new StringTokenizer(ips, ":");
while(stok.hasMoreTokens())
mappedips.add(stok.nextToken());
public void setLookAndFeel(){
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//</editor-fold>
/** 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.
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
btclose = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jPanel8 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
txtkey = new javax.swing.JTextField();
btsearch = new javax.swing.JButton();
jPanel9 = new javax.swing.JPanel();
rdbyname = new javax.swing.JRadioButton();
rdbydirector = new javax.swing.JRadioButton();
rdbygenre = new javax.swing.JRadioButton();
rdbyyear = new javax.swing.JRadioButton();
jPanel5 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
lstMessages = new javax.swing.JList(modelmsg);
jPanel7 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
tabmovies = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(500, 500));
jLabel1.setFont(new java.awt.Font("Simplified Arabic", 1, 24));
jLabel1.setForeground(new java.awt.Color(0, 102, 204));
jLabel1.setText("Mobile Agent: Find Movie Information");
jPanel1.add(jLabel1);
getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
btclose.setText("Close");
btclose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btcloseActionPerformed(evt);
jPanel2.add(btclose);
getContentPane().add(jPanel2, java.awt.BorderLayout.PAGE_END);
jPanel3.setLayout(new java.awt.BorderLayout());
jPanel4.setLayout(new java.awt.GridLayout(2, 1));
jLabel2.setText("Key");
btsearch.setText("Search");
btsearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btsearchActionPerformed(evt);
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btsearch)
.addContainerGap(130, Short.MAX_VALUE))
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btsearch))
.addContainerGap(13, Short.MAX_VALUE))
jPanel4.add(jPanel8);
buttonGroup1.add(rdbyname);
rdbyname.setSelected(true);
rdbyname.setText("By name");
buttonGroup1.add(rdbydirector);
rdbydirector.setText("By director");
buttonGroup1.add(rdbygenre);
rdbygenre.setText("By genre");
buttonGroup1.add(rdbyyear);
rdbyyear.setText("By year");
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addComponent(rdbyname)
.addGap(36, 36, 36)
.addComponent(rdbydirector)
.addGap(37, 37, 37)
.addComponent(rdbygenre)
.addGap(33, 33, 33)
.addComponent(rdbyyear)
.addContainerGap(352, Short.MAX_VALUE))
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(rdbyname)
.addComponent(rdbydirector)
.addComponent(rdbygenre)
.addComponent(rdbyyear))
.addContainerGap(20, Short.MAX_VALUE))
jPanel4.add(jPanel9);
jPanel3.add(jPanel4, java.awt.BorderLayout.PAGE_START);
jPanel5.setLayout(new java.awt.BorderLayout());
jPanel6.setLayout(new java.awt.BorderLayout());
lstMessages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
jScrollPane1.setViewportView(lstMessages);
jPanel6.add(jScrollPane1, java.awt.BorderLayout.CENTER);
jPanel5.add(jPanel6, java.awt.BorderLayout.PAGE_END);
jPanel7.setLayout(new java.awt.BorderLayout());
tabmovies.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
new String [] {
"Name", "Director", "Genre", "Release Year"
jScrollPane2.setViewportView(tabmovies);
jPanel7.add(jScrollPane2, java.awt.BorderLayout.CENTER);
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
jPanel3.add(jPanel5, java.awt.BorderLayout.CENTER);
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btcloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcloseActionPerformed
System.exit(0);
}//GEN-LAST:event_btcloseActionPerformed
private void btsearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btsearchActionPerformed
searchMovies();
}//GEN-LAST:event_btsearchActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btclose;
private javax.swing.JButton btsearch;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JList lstMessages;
private javax.swing.JRadioButton rdbydirector;
private javax.swing.JRadioButton rdbygenre;
private javax.swing.JRadioButton rdbyname;
private javax.swing.JRadioButton rdbyyear;
private javax.swing.JTable tabmovies;
private javax.swing.JTextField txtkey;
// End of variables declaration//GEN-END:variables
private void searchMovies() {
if(txtkey.getText().trim().length()==0){
JOptionPane.showMessageDialog(null, "Please enter some words...");
return;
for(String ip : mappedips){
modelmsg.addElement("Looking up node : " + ip);
DataSourceMovies movies = null;
try {
ctx = new InitialContext();
movies = (DataSourceMovies)ctx.lookup("rmi://" + ip + "/movieserver");
} catch (Exception e) {
modelmsg.addElement("Error contacting node...");
e.printStackTrace();
break;
List<String[]> movieslist = null;
try{
if(rdbyname.isSelected())
movieslist = movies.findMoviesByName(txtkey.getText().trim());
else if(rdbydirector.isSelected())
movieslist = movies.findMoviesByDirector(txtkey.getText().trim());
else if(rdbygenre.isSelected())
movieslist = movies.findMoviesByGenre(txtkey.getText().trim());
else if(rdbyyear.isSelected()){
try {
movieslist = movies.findMoviesByYear(Integer.parseInt(txtkey.getText().trim()));
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Invalid year...");
return;
if(movieslist!=null && movieslist.size()>0){
modelmsg.addElement("Songs found...");
DefaultTableModel model = (DefaultTableModel) tabmovies.getModel();
while(model.getRowCount()>0){
model.removeRow(0);
tabmovies.revalidate();
for(String[] moviedata : movieslist)
model.addRow(moviedata);
catch(Exception ex) {
modelmsg.addElement("Error reading data...");
break;
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.agent.client.movies;
import com.agent.client.Utility;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JWindow;
import javax.swing.SwingConstants;
public class MovieSplashScreen {
private javax.swing.JLabel lbimage;
private javax.swing.JLabel lbloading;
private javax.swing.JLabel lbmobile;
private javax.swing.JPanel panelBack;
public static void main(String[] ar) {
new MovieSplashScreen().displaySplash(ar[0]);
public void displaySplash(String mapperip) {
JWindow window = new JWindow();
window.getContentPane().add(
new JLabel("Loading JFrame...", SwingConstants.CENTER));
window.setSize(525, 240);
Utility.setInCenter(window);
panelBack = new javax.swing.JPanel();
lbimage = new javax.swing.JLabel();
lbloading = new javax.swing.JLabel();
lbmobile = new javax.swing.JLabel();
panelBack.setBackground(new java.awt.Color(255, 255, 255));
panelBack.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 102), 2));
panelBack.setLayout(null);
lbimage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/agent/client/splash.jpg"))); // NOI18N
panelBack.add(lbimage);
lbimage.setBounds(250, 20, 250, 180);
lbloading.setFont(new java.awt.Font("Showcard Gothic", 0, 30)); // NOI18N
lbloading.setText("Loading...");
panelBack.add(lbloading);
lbloading.setBounds(50, 120, 210, 70);
lbmobile.setFont(new java.awt.Font("Tekton Pro Cond", 0, 24)); // NOI18N
lbmobile.setForeground(new java.awt.Color(0, 51, 51));
lbmobile.setText("Mobile Agents 1.0");
panelBack.add(lbmobile);
lbmobile.setBounds(30, 20, 230, 40);
window.add(panelBack, java.awt.BorderLayout.CENTER);
window.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
Socket client = null;
try {
client = new Socket(mapperip,2222);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Mapping server down...");
System.exit(0);
DataInputStream din = null;
DataOutputStream dout = null;
String ips = null;
try {
din = new DataInputStream(client.getInputStream());
dout = new DataOutputStream(client.getOutputStream());
dout.writeUTF("movies");
ips = din.readUTF();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Cannot retrieve mappings...");
e.printStackTrace();
System.exit(0);
window.setVisible(false);
MovieClient sclient = new MovieClient(ips);
sclient.setVisible(true);
window.dispose();
{code = java}package com.agent.client.movies;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;
public interface DataSourceMovies extends Remote{
ArrayList<String[]> getAllMovies() throws RemoteException;
ArrayList<String[]> findMoviesByYear( int year) throws RemoteException;
ArrayList<String[]> findMoviesByDirector(String director) throws RemoteException;
ArrayList<String[]> findMoviesByGenre(String genre) throws RemoteException;
ArrayList<String[]> findMoviesByName(String name) throws RemoteException;
* To change this template, choose Tools | Templates
* and open the template in the editor.
* MovieClient.java
* Created on Apr 24, 2012, 10:49:58 AM
package com.agent.client.movies;
import com.agent.client.songs.SongsClient;
import com.agent.client.Utility;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import javax.naming.InitialContext;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
public class MovieClient extends javax.swing.JFrame {
ArrayList<String> mappedips = new ArrayList<String>();
DefaultListModel<String> modelmsg = new DefaultListModel<String>();
InitialContext ctx;
/** Creates new form MovieClient */
public MovieClient(String ips) {
setLookAndFeel();
initComponents();
Utility.setInCenter(this);
StringTokenizer stok = new StringTokenizer(ips, ":");
while(stok.hasMoreTokens())
mappedips.add(stok.nextToken());
public void setLookAndFeel(){
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(SongsClient.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//</editor-fold>
/** 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.
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
btclose = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jPanel8 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
txtkey = new javax.swing.JTextField();
btsearch = new javax.swing.JButton();
jPanel9 = new javax.swing.JPanel();
rdbyname = new javax.swing.JRadioButton();
rdbydirector = new javax.swing.JRadioButton();
rdbygenre = new javax.swing.JRadioButton();
rdbyyear = new javax.swing.JRadioButton();
jPanel5 = new javax.swing.JPanel();
jPanel6 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
lstMessages = new javax.swing.JList(modelmsg);
jPanel7 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
tabmovies = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(500, 500));
jLabel1.setFont(new java.awt.Font("Simplified Arabic", 1, 24));
jLabel1.setForeground(new java.awt.Color(0, 102, 204));
jLabel1.setText("Mobile Agent: Find Movie Information");
jPanel1.add(jLabel1);
getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_START);
btclose.setText("Close");
btclose.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btcloseActionPerformed(evt);
jPanel2.add(btclose);
getContentPane().add(jPanel2, java.awt.BorderLayout.PAGE_END);
jPanel3.setLayout(new java.awt.BorderLayout());
jPanel4.setLayout(new java.awt.GridLayout(2, 1));
jLabel2.setText("Key");
btsearch.setText("Search");
btsearch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btsearchActionPerformed(evt);
javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btsearch)
.addContainerGap(130, Short.MAX_VALUE))
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(txtkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btsearch))
.addContainerGap(13, Short.MAX_VALUE))
jPanel4.add(jPanel8);
buttonGroup1.add(rdbyname);
rdbyname.setSelected(true);
rdbyname.setText("By name");
buttonGroup1.add(rdbydirector);
rdbydirector.setText("By director");
buttonGroup1.add(rdbygenre);
rdbygenre.setText("By genre");
buttonGroup1.add(rdbyyear);
rdbyyear.setText("By year");
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
jPanel9.setLayout(jPanel9Layout);
jPanel9Layout.setHorizontalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addComponent(rdbyname)
.addGap(36, 36, 36)
.addComponent(rdbydirector)
.addGap(37, 37, 37)
.addComponent(rdbygenre)
.addGap(33, 33, 33)
.addComponent(rdbyyear)
.addContainerGap(352, Short.MAX_VALUE))
jPanel9Layout.setVerticalGroup(
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel9Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(rdbyname)
.addComponent(rdbydirector)
.addComponent(rdbygenre)
.addComponent(rdbyyear))
.addContainerGap(20, Short.MAX_VALUE))
jPanel4.add(jPanel9);
jPanel3.add(jPanel4, java.awt.BorderLayout.PAGE_START);
jPanel5.setLayout(new java.awt.BorderLayout());
jPanel6.setLayout(new java.awt.BorderLayout());
lstMessages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102)));
jScrollPane1.setViewportView(lstMessages);
jPanel6.add(jScrollPane1, java.awt.BorderLayout.CENTER);
jPanel5.add(jPanel6, java.awt.BorderLayout.PAGE_END);
jPanel7.setLayout(new java.awt.BorderLayout());
tabmovies.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
new String [] {
"Name", "Director", "Genre", "Release Year"
jScrollPane2.setViewportView(tabmovies);
jPanel7.add(jScrollPane2, java.awt.BorderLayout.CENTER);
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
jPanel3.add(jPanel5, java.awt.BorderLayout.CENTER);
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btcloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcloseActionPerformed
System.exit(0);
}//GEN-LAST:event_btcloseActionPerformed
private void btsearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btsearchActionPerformed
searchMovies();
}//GEN-LAST:event_btsearchActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btclose;
private javax.swing.JButton btsearch;
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JList lstMessages;
private javax.swing.JRadioButton rdbydirector;
private javax.swing.JRadioButton rdbygenre;
private javax.swing.JRadioButton rdbyname;
private javax.swing.JRadioButton rdbyyear;
private javax.swing.JTable tabmovies;
private javax.swing.JTextField txtkey;
// End of variables declaration//GEN-END:variables
private void searchMovies() {
if(txtkey.getText().trim().length()==0){
JOptionPane.showMessageDialog(null, "Please enter some words...");
return;
for(String ip : mappedips){
modelmsg.addElement("Looking up node : " + ip);
DataSourceMovies movies = null;
try {
ctx = new InitialContext();
movies = (DataSourceMovies)ctx.lookup("rmi://" + ip + "/movieserver");
} catch (Exception e) {
modelmsg.addElement("Error contacting node...");
e.printStackTrace();
break;
List<String[]> movieslist = null;
try{
if(rdbyname.isSelected())
movieslist = movies.findMoviesByName(txtkey.getText().trim());
else if(rdbydirector.isSelected())
movieslist = movies.findMoviesByDirector(txtkey.getText().trim());
else if(rdbygenre.isSelected())
movieslist = movies.findMoviesByGenre(txtkey.getText().trim());
else if(rdbyyear.isSelected()){
try {
movieslist = movies.findMoviesByYear(Integer.parseInt(txtkey.getText().trim()));
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Invalid year...");
return;
if(movieslist!=null && movieslist.size()>0){
modelmsg.addElement("Songs found...");
DefaultTableModel model = (DefaultTableModel) tabmovies.getModel();
while(model.getRowCount()>0){
model.removeRow(0);
tabmovies.revalidate();
for(String[] moviedata : movieslist)
model.addRow(moviedata);
catch(Exception ex) {
modelmsg.addElement("Error reading data...");
break;
* To change this template, choose Tools | Templates
* and open the template in the editor.
package com.agent.client.movies;
import com.agent.client.Utility;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JWindow;
import javax.swing.SwingConstants;
public class MovieSplashScreen {
private javax.swing.JLabel lbimage;
private javax.swing.JLabel lbloading;
private javax.swing.JLabel lbmobile;
private javax.swing.JPanel panelBack;
public static void main(String[] ar) {
new MovieSplashScreen().displaySplash(ar[0]);
public void displaySplash(String mapperip) {
JWindow window = new JWindow();
window.getContentPane().add(
new JLabel("Loading JFrame...", SwingConstants.CENTER));
window.setSize(525, 240);
Utility.setInCenter(window);
panelBack = new javax.swing.JPanel();
lbimage = new javax.swing.JLabel();
lbloading = new javax.swing.JLabel();
lbmobile = new javax.swing.JLabel();
panelBack.setBackground(new java.awt.Color(255, 255, 255));
panelBack.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 102, 102), 2));
panelBack.setLayout(null);
lbimage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/agent/client/splash.jpg"))); // NOI18N
panelBack.add(lbimage);
lbimage.setBounds(250, 20, 250, 180);
lbloading.setFont(new java.awt.Font("Showcard Gothic", 0, 30)); // NOI18N
lbloading.setText("Loading...");
panelBack.add(lbloading);
lbloading.setBounds(50, 120, 210, 70);
lbmobile.setFont(new java.awt.Font("Tekton Pro Cond", 0, 24)); // NOI18N
lbmobile.setForeground(new java.awt.Color(0, 51, 51));
lbmobile.setText("Mobile Agents 1.0");
panelBack.add(lbmobile);
lbmobile.setBounds(30, 20, 230, 40);
window.add(panelBack, java.awt.BorderLayout.CENTER);
window.setVisible(true);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
Socket client = null;
try {
client = new Socket(mapperip,2222);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Mapping server down...");
System.exit(0);
DataInputStream din = null;
DataOutputStream dout = null;
String ips = null;
try {
din = new DataInputStream(client.getInputStream());
dout = new DataOutputStream(client.getOutputStream());
dout.writeUTF("movies");
ips = din.readUTF();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Cannot retrieve mappings...");
e.printStackTrace();
System.exit(0);
window.setVisible(false);
MovieClient sclient = new MovieClient(ips);
sclient.setVisible(true);
window.dispose();
Similar Messages
-
Hi ,
We are migrating from oracle 10gR2 on AIX 5.3 to oracle 11gR2 on AIX 6.1 (64bit Kernal) . As pat of this , we need to migrate all the pro*c codes and for that we are trying to complie those files on the new server . But while compiling , we are getting error as :
*1586-119 (U) The 32-bit file "/lib/crt0_64.o" is being linked in 64-bit mode, or vice versa.*
We have only one library in $ORACLE_HOME which is lib..Lib32 is not present .
Could you please help me in resolving this error ?
The details , that I feel will be helpful ,is provided below :
COMP_PROC ]>echo $ORACLE_HOME
*/data/oracle/product/11.2.0.2*
*/COMP_PROC ]>echo $LD_LIBRARY_PATH*
*/data/oracle/product/11.2.0.2/lib*
COMP_PROC ]>echo $LIBPATH
*/data/oracle/product/11.2.0.2/lib*
COMP_PROC ]>echo $PATH
*/data/oracle/product/11.2.0.2:/data/oracle/product/11.2.0.2/bin:/applications/tf3/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/bin:.::/dbjobs/utils/adsm:.:/applications/tf3/bin:/applications/tf3/bin/ctm/source:/usr/vac/bin:/applications/tf3/bin:/usr/lib:/tshome/tfapp:/tshome/tfapp/app/genio::/tshome/tfapp/app/genio/odbc:/tshome/tfapp/app/genio/odbc/lib:/data/oracle/product/11.2.0.2/lib:/data/oracle/product/11.2.0.2/bin:/tshome/tf01/:/usr/bin:/etc:/usr/sbin:/usr/ucb:/tshome/tfapp/bin:/usr/bin/X11:/sbin*
Compiler version :
COMP_PROC ]>cc -v
exec: /usr/bin/pg(/usr/bin/pg,/usr/vac/exe/default_msg/vac.help,NULL)
C for AIX Compiler, Version 6
os version :
COMP_PROC ]>uname -a
AIX 1 6 00F6249E4C00
Make file :
# File : makeheader.h #
# Description : #
# The target 'build' puts together an executable $(EXE) from the .o files
# in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the
# c sample programs. The rules to make .o files from .c and .pc files are
# later in this file.
# ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does
# not.)
# Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.
# If proc needs to find .h files, it should find the same .h files that the
# c compiler finds. We use a macro named INCLUDE to hadle that. The general
# format of the INCLUDE macro is
# INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...
# Normally, I_SYM=-I, for the c compiler. However, we have a special target,
# pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It
# is used like this:
# $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1
# This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).
USERID=xxxxx/yyyyy@zzzzzzz
SHELL=/bin/ksh
MQMLIBS=/usr/lpp/mqm/lib/libmqm.a
MQMCLIENTLIBS=/usr/lpp/mqm/lib/libmqic.a
#MQMLIBS=/pvcs/compile/proc/libmqm.a
CONVLIBS=/usr/lib/libiconv.a
NETWORKHOME=$(ORACLE_HOME)/network/
PLSQLHOME=$(ORACLE_HOME)/plsql/
#INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public
I_SYM=-I
AS_EXT=s
LIB_EXT=a
OBJ_EXT=o
PLB_EXT=plb
SO_EXT=so
LOCK_EXT=lk
SQL_EXT=sql
SYM_EXT=sym
LIB_PREFIX=lib
LDLIBFLAG=-l
LDPATHFLAG=-L
AS=as
AWK=awk
CAT=cat
CC=/usr/vac/bin/cc
CD=cd
CHMOD=chmod
CP=cp
CPP=cpp
DATE=date
ECHO=echo
ECHON=echo -n
EXEC=exec
FIND=find
FOLLOW=-follow
NOLEAF=-noleaf
GREP=grep
KILL=kill
SLEEP=sleep
LD=ld
LMAKE=make
LN=ln
LNS=ln -s
MKDIR=mkdir
MKDIRP=mkdir -p
MV=mv
NM=nm
PERL=perl
RM=rm
RMF=rm -f
RMRF=rm -rf
SED=sed
SORT=sort
TOUCH=touch
XARGS=xargs
LS=ls
SPFLAGS=
MATHLIB=-lm
LOCALLIBS=
OPTIMIZE=-O5
OTHERLIBS = `cat $(ORACLE_HOME)/lib/sysliblist`
CCFLAGS= -g
SO=a
LLIBTHREAD=-lpthreads
EXOSLIBS=
LIBBSD=
SECLIBS=
M6LIBS=
LIBHOME=$(ORACLE_HOME)/lib
VER =11
BASENAME =n
NETWORKHOME = $(ORACLE_HOME)/network/
NETWORKLIB = $(NETWORKHOME)lib/
RONAME=${BASENAME}ro${VER}
PFLAGS=
PFLAGS= $(INCLUDE) $(SPFLAGS) $(LPFLAGS)
RDBMS_VERSION = 11
LIBSERVERNAME=server$(RDBMS_VERSION)
LIBSERVER=$(LIBHOME)$(LIB_PREFIX)$(LIBSERVERNAME).$(LIB_EXT)
LLIBSERVER=$(LDLIBFLAG)$(LIBSERVERNAME)$(LIB_SUFFIX)
LIBCLIENTNAME=client$(RDBMS_VERSION)
LIBCLIENT=$(LIBHOME)$(LIB_PREFIX)$(LIBCLIENTNAME).$(LIB_EXT)
LLIBCLIENT=$(LDLIBFLAG)$(LIBCLIENTNAME)
LIBGENERICNAME=generic$(RDBMS_VERSION)
LIBGENERIC=$(LIBHOME)$(LIB_PREFIX)$(LIBGENERICNAME).$(LIB_EXT)
LLIBGENERIC=$(LDLIBFLAG)$(LIBGENERICNAME)
LIBDSBTSHNAME=dsbtsh$(RDBMS_VERSION)
LIBDSBTSH=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDSBTSHNAME).$(SO_EXT)
LIBSKGXPNAME=skgxp$(RDBMS_VERSION)
LIBSKGXP=$(LIBHOME)$(LIB_PREFIX)$(LIBSKGXPNAME).$(SKGXP_EXT)
LLIBSKGXP=$(LDLIBFLAG)$(LIBSKGXPNAME)
LIBCOMMONNAME=common$(RDBMS_VERSION)
LIBCOMMON=$(LIBHOME)$(LIB_PREFIX)$(LIBCOMMONNAME).$(LIB_EXT)
LLIBCOMMON=$(LDLIBFLAG)$(LIBCOMMONNAME)
LIBVSNNAME=vsn$(RDBMS_VERSION)
LIBVSN=$(LIBHOME)$(LIB_PREFIX)$(LIBVSNNAME).$(LIB_EXT)
LLIBVSN=$(LDLIBFLAG)$(LIBVSNNAME)
LIBAGENTNAME=agent$(RDBMS_VERSION)
LIBAGENT=$(LIBHOME)$(LIB_PREFIX)$(LIBAGENTNAME).$(LIB_EXT)
LLIBAGENT=$(LDLIBFLAG)$(LIBAGENTNAME)
LIBDBTOOLSNAME=dbtools$(RDBMS_VERSION)
LIBDBTOOLS=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDBTOOLSNAME).$(LIB_EXT)
#DEF_ON= $(RDBMSLIB)kpudfo.$(OBJ_EXT)
#DEF_OFF= $(RDBMSLIB)kpundf.$(OBJ_EXT)
#DEF_OPT= $(RDBMSLIB)defopt.$(OBJ_EXT)
LIBSLAXNAME=slax8
LIBSLAX=$(LIBHOME)$(LIB_PREFIX)$(LIBSLAXNAME).$(LIB_EXT)
LLIBSLAX=$(LDLIBFLAG)$(LIBSLAXNAME)
LIBSQLNAME=sql11
LIBSQL=$(LIBHOME)/$(LIB_PREFIX)$(LIBSQLNAME).$(LIB_EXT)
LLIBSQL=$(LDLIBFLAG)$(LIBSQLNAME)
#SCOREPT = $(LIBHOME)/scorept.$(OBJ_EXT)
#SSCOREED = $(LIBHOME)/sscoreed.$(OBJ_EXT)
LIBORA=$(LIBCLIENT) $(LIBCOMMON) $(LIBGENERIC)
LLIBORA=$(LLIBCLIENT) $(LLIBCOMMON) $(LLIBGENERIC)
LIBSQLNET = $(LDFLAGSLIST) $(ANOLIBD) $(PROTOCOLLIBD) $(NATIVELIBD) $(NATIVESYSLIBD) $(LIBNETWORK) $(LIBNL)
LLIBSQLNET = $(LDFLAGSLIST) $(ANOLIBS) $(PROTOCOLLIBS) $(NATIVELIBS) $(NATIVESYSLIBS) $(LLIBNETWORK) $(LLIBNL)
LIBRPC = $(LIBHOME)$(LIB_PREFIX)$(RONAME).$(LIB_EXT)
LLIBRPC = $(LDLIBFLAG)$(RONAME)
NETLIBS = $(LLIBSQLNET) $(LLIBRPC) $(LLIBSQLNET)
NETLIBD = $(LIBSQLNET) $(LIBRPC)
LDFLAGSFILE=$(NETWORKLIB)ldflags
LDFLAGSLIST=`$(CAT) $(LDFLAGSFILE)`
LDFLAGSLIST=
LIBNLSRTLNAME = nls11
LIBNLSRTL= $(LIBHOME)$(LIB_PREFIX)$(LIBNLSRTLNAME).$(LIB_EXT)
LLIBNLSRTL= $(LDLIBFLAG)$(LIBNLSRTLNAME)$(LIB_SUFFIX)
CORE_LIB_VER = 11
CORE_LIB_NAME = core
LIBCORE = $(LIBHOME)$(LIB_PREFIX)$(CORE_LIB_NAME)$(CORE_LIB_VER).$(LIB_EXT)
LLIBCORE = $(LDLIBFLAG)$(CORE_LIB_NAME)$(CORE_LIB_VER)
RDBMSHOME=$(ORACLE_HOME)/rdbms/
RDBMSLIB=$(RDBMSHOME)lib/
RDBMSADMIN=$(RDBMSHOME)admin/
LIBCLNTSHNAME=clntsh
LIBCLNTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBCLNTSHNAME).$(SO_EXT)
LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
LIBAGTSHNAME=agtsh
LIBAGTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBAGTSHNAME).$(SO_EXT)
LLIBAGTSH=$(LDLIBFLAG)$(LIBAGTSHNAME)
LIBKNLOPTNAME=knlopt
LIBKNLOPT=$(RDBMSLIB)$(LIB_PREFIX)$(LIBKNLOPTNAME).$(LIB_EXT)
LLIBKNLOPT=$(LDLIBFLAG)$(LIBKNLOPTNAME)
#LIBTRACENAME=trace9
#LIBTRACE=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
#LLIBTRACE=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
#LIBEPC=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
#LLIBEPC=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
CORELIBS = $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) $(LLIBCORE) \
$(LLIBNLSRTL)
OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist`
DEVTTLIBS=$(NETLIBS) $(LLIBORA) $(NETLIBS) $(LLIBORA) $(LIBPLSHACK) \
$(LLIBEPC) $(CORELIBS) $(SPLIBS) $(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) `cat $(ORACLE_HOME)/lib/sysliblist` $(MATHLIB)
CC=/usr/vac/bin/cc
PCC=proc
PROC=proc CODE=ANSI_C define=_64BIT_ define=_IBM_C define=_LONG_LONG sqlcheck=full userid=$(USERID) oraca=yes mode=oracle unsafe_null=yes dbms=v8
PCCINCLUDE=include=$(ORACLE_HOME)/precomp/lib
PCCFLAGS=$(PCCINCLUDE) sqlcheck=full ltype=none parse=full userid=$(USERID) lines=yes unsafe_null=yes dbms=v8
CFLAGS= $(GFLAG) -qmaxmem=8192 $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS) -L$(LIBHOME)
ECHO=
STATICPROLDLIBS=$(LLIBCLIENT) $(LIBSQL) $(SCOREPT) $(SSCOREED) $(DEF_ON) $(DEVTTLIBS) $(LLIBTHREAD)
PROLDLIBS=$(LLIBCLNTSH) $(STATICPROLDLIBS)
Tail of make.log :
[applications/tf3/bin/COMP_PROC ]>echo $ORACLE_HOME
/data/oracle/product/11.2.0.2
[applications/tf3/bin/COMP_PROC ]>cd $ORACLE_HOME
[data/oracle/product/11.2.0.2 ]>cd install
[data/oracle/product/11.2.0.2/install ]>tail -15 make.log
mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmo to /data/oracle/product/11.2.0.2/bin/nmo0:
No such file or directory
mv /data/oracle/product/11.2.0.2/sysman/lib/nmo /data/oracle/product/11.2.0.2/bin/
make: The error code from the last command is 1.
make: Ignored error code 1 from last command.
/bin/make -f /data/oracle/product/11.2.0.2/sysman/lib/ins_emagent.mk relink_exe EXENAME=nmhs
ld -b64 -o /data/oracle/product/11.2.0.2/sysman/lib/nmhs -L/data/oracle/product/11.2.0.2/lib/ -L/data/oracle/product/11.2.0.2/sysman/lib/ -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm /data/oracle/product/11.2.0.2/sysman/lib/s0nmhs.o -lnmhs -lcore11 -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm
rm -f /data/oracle/product/11.2.0.2/bin/nmhs.0
cp /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/nmhs.0
mv -f /data/oracle/product/11.2.0.2/bin/nmhs /data/oracle/product/11.2.0.2/bin/nmhs0
mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmhs to /data/oracle/product/11.2.0.2/bin/nmhs0:
No such file or directory
make: The error code from the last command is 1.
make: Ignored error code 1 from last command.
mv /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/
Edited by: Minu on Dec 3, 2011 12:36 AMApparently you are trying to mix 32-bit code and 64-bit code. You must ensure that the 32-bit or 64-bit option is used consistently on every command, compiling and linking. The form of the option can depend on the version of the C compiler you are using, and whether you are on an x86 or sparc system. Consult the Pro*C and C compiler documentation.
-
Getting bug error while compiling object binding code in javaFX
I am new to javaFX and exploring it from just last two days.
today i tried a simple binding object example and got weird exception about bug.
i created a simple file with name Calculator.fx having just one line public var result=1;and used object binding in another file Customer.fx with following code
var myStreet=21;
var address= bind Calculator{
result:myStreet;
println({address.result});i got following output error
init:
deps-jar:
Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
after checking for duplicates. Include in your report:
- the following diagnostics
- file C:\Users\omnidoc\AppData\Local\Temp\javafx_err_59993.txt
- and if possible, the source file which triggered this problem.
Thank you.
C:\cc_storage\Caculator\src\Customer.fx:3: cannot find symbol
symbol : variable VOFF$result
location: class Calculator
def address= bind Calculator{
1 error
ERROR: javafxc execution failed, exit code: 1
C:\cc_storage\Caculator\nbproject\build-impl.xml:143: exec returned: -1
BUILD FAILED (total time: 2 seconds)Am i doing something wrong or is it really a bug.
Also can anyone tell me how to do object binding in javaFX.
thanks
chauhanchauhan2003 wrote:
Am i doing something wrong or is it really a bug.When you get such error, that's both: you made a mistake (and at least you get a generally helpful message about it) but the compiler is bugging out and crashing... -
Error in compiling java source code in a package
hi all...
am having a problem in compiling a java source code:
i have a class named 'Test' in the package 'packone'....
i have another class named 'getTest' in the same package....
in the class getTest i am taking a reference to Test class...
on compiling i am getting the following error....
cannot resolve symbol
symbol : class Test
The source code for the two classes are :
package packone;
public class Test{
and
package packone;
public class getTest{
public void me(){
Test t = new Test();
i have included the directory path in the classpath....
still its not compiling .....
please help
thanks....Assume the current directory structure:
C:\
C:\packone...and that your classes are named Test & GetTest.
My guess is that you're compiling within the directory C:\packone using the command "javac GetTest.java", which is wrong; You must use a path corresponding to the package-name.
Move your command-line cursor to C:\ and type "javac packone\GetTest.java" and you'll be fine...
Regards,
/Håkan -
Getting error while compiling this pl/sql code
Hi,
I am trying to execute the below block of pl/sql code and i encountering an error. i tried all possible combination of paranthesis and quotes. still giving error. can someone please help?
IF inserting THEN
pk_imdb_audit.p_ins_characteristic_a_t
(in_'||rpad(column_name,35,' ')||'=> pk_imdb_audit.v_action_inserting,'
WHEN max_col = column_id THEN
in_'||rpad(column_name,35,' ')||'=> '||lower(in_col_value)||');'
ELSE
' in_'||rpad(column_name,35,' ')||'=> '||lower(in_col_value)||','
END text,
table_name,
column_id,
2 disp_ord
error snapshot:-
ORA-06550: line 14, column 14:
PLS-00103: Encountered the symbol "||rpad(column_name,35," when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ as between from using ||
multiset member SUBMULTISET_
The symbol "( was inserted before "||rpad(column_name,35," to continue.
ORA-06550: line 15, column 13:
PLS-00103: Encountered the symbol "WHEN" when expecting one of thHi,
here is a 'parseable' version of your query, but there is numerous ways to improve what you want to do (not sure even if the query is giving you what you're expecting from it):
SELECT text
FROM (SELECT (CASE
WHEN min_col = max_col THEN 'CREATE OR REPLACE TRIGGER '
|| SUBSTR(column_name,
1,
4
|| 'aud
AFTER INSERT
OR UPDATE
OF '
|| column_name
|| ',
OR DELETE ON imdb.'
|| table_name
|| '
FOR EACH ROW'
ELSE(CASE
WHEN min_col = column_id THEN 'CREATE OR REPLACE TRIGGER '
|| SUBSTR(column_name,
1,
4
|| 'aud
AFTER INSERT
OR UPDATE
OF '
|| column_name
|| ','
ELSE(CASE
WHEN max_col = column_id THEN ' '
|| column_name
|| '
OR DELETE ON imdb.'
|| table_name
|| '
FOR EACH ROW'
ELSE(CASE
WHEN column_id IS NULL THEN 'CREATE OR REPLACE TRIGGER '
|| SUBSTR
(column_name,
1,
4
|| 'aud
AFTER INSERT
OR UPDATE
OR DELETE ON imdb.'
|| table_name
ELSE ' '
|| column_name
|| ','
END
END
END
END
) text,
table_name1 table_name,
column_id,
1 disp_ord
FROM (SELECT LOWER(REPLACE(column_name,
'O_',
)) column_name, /*changing O to O_*/
LOWER(REPLACE(t.table_name,
'_A_',
)) table_name,
LOWER(t.table_name) table_name1,
c.column_id,
MIN(column_id) OVER(PARTITION BY c.table_name) min_col,
MAX(column_id) OVER(PARTITION BY c.table_name) max_col
FROM all_tab_columns c,
(SELECT object_name table_name
FROM all_objects
WHERE TRUNC(created) = TRUNC(SYSDATE)
AND object_name = 'CHARACTERISTIC_A_T') t
--AND object_name LIKE 'IMDB/_A/_%' ESCAPE '/') t /*commented this line for testing*/
WHERE c.table_name(+) = t.table_name
AND SUBSTR(column_name(+),
1,
2
) = 'O_'))
/*changed the substring condition to match new changes*/
UNION ALL
SELECT (CASE
WHEN min_col = column_id THEN 'DECLARE
BEGIN
IF inserting THEN
pk_imdb_audit.p_ins_characteristic_a_t
(in_'
|| RPAD(column_name,
35,
|| '=> pk_imdb_audit.v_action_inserting,'
ELSE(CASE
WHEN max_col = column_id THEN 'in_'
|| RPAD(column_name,
35,
|| '=> '
|| LOWER(in_col_value)
|| ');'
ELSE ' in_'
|| RPAD(column_name,
35,
|| '=> '
|| LOWER(in_col_value)
|| ','
END
END
) text /*,
table_name,
column_id,
2 disp_ord*/
FROM (SELECT table_name,
column_name,
column_id,
min_col,
max_col,
in_col_value,
trg_header,
'in_'
|| RPAD(column_name,
35,
|| '=> '
|| LOWER(in_col_value)
|| ',' in_col
FROM (SELECT LOWER(c.column_name) column_name,
LOWER(c.table_name) table_name,
c.column_id,
(CASE
WHEN SUBSTR(column_name,
1,
2
) = 'N_' THEN
/*changed the substring condition to match the new change*/
':NEW.'
|| REPLACE
(column_name,
'N_',
'N_'
/*changed the condition to match new requirement*/
WHEN SUBSTR(column_name,
1,
2
) = 'O_' THEN
/*changed the substring condition to match the new change*/
'NULL'
ELSE ':NEW.'
|| REPLACE(column_name,
'_A_',
END
) in_col_value,
LOWER(SUBSTR(column_name,
1,
3
)) trg_header,
MIN(column_id) OVER(PARTITION BY c.table_name) min_col,
MAX(column_id) OVER(PARTITION BY c.table_name) max_col
FROM all_tab_columns c
WHERE c.table_name IN(
SELECT object_name
FROM all_objects
WHERE TRUNC(created) = TRUNC(SYSDATE)
AND object_name = 'CHARACTERISTIC_A_T')
ORDER BY c.table_name,
c.column_id)) -
Got Error While Compiling Packages with TOAD (URGENT)
Dear Experts,
Please help me to resolve this erroe this is very criticla.
ORA-20000: You have insufficient privileges for an objects in this schema
ORA-06512: at "SYS.DBMS.UTILITY" LINE 422
ORA-06512: Line 1You should be connected to the user that owns the packages, or SYS.
-
hi,
i am new to ejb.......
i have got error while compiling the ejb java source files............
while compiling..........of this three i ahve got err in ejb home interface....
ejb remote interface - succeded
ejb bean class - succeded
ejb home interface - error
the error..............is in the return type of the ejb create() method in ejb home interface(which is the type of remote interface).
the error message is cannot resolve symbolHi,
thanks for ur reply .....
i have done enough searching in all sites including sun forum but in vain
i have pasted my error below...
can u plz predict anything from it
D:\>path=%path%;c:\j2sdk1.4.2_12\bin;
D:\>set classpath=%classpath%;d:\Sun\AppServer\lib\j2ee.jar;
D:\>javac d:\Librarys\Library.java
D:\>javac d:\Librarys\LibraryBean.java
D:\>javac d:\Librarys\LibraryHome.java
d:\Librarys\LibraryHome.java:8: cannot resolve symbol
symbol : class Library
location: interface Librarys.LibraryHome
public Library create(String id, String name, String address, String phoneNo
) throws RemoteException, CreateException;
^
d:\Librarys\LibraryHome.java:9: cannot resolve symbol
symbol : class Library
location: interface Librarys.LibraryHome
public Library findByPrimaryKey(String id) throws FinderException, RemoteExc
eption;
^
2 errors
thanks in advance... -
I am got error while trying to restore,, but i just only error file with 3194. I try many step by install lastest version and fix host file, but still fail. Anybody can give me any key point to solve this problem? Thank you
Error 3194:
This device isn't eligible for the requested build
It means that Apple has stopped signing the version of iOS that you have, try downloading the latest iOS version, then try Restore again. -
hi, i just try to update my 3g in itunes unfortunatly it got error while updating it asked me to restore update but unable to restore it , now my 3g i locked and on screen it displying usb symbol connect to itunes ,please help me regarding this
I suspect your error was 1015, not 1051. This usually involves a jailbroken iPhone, use Google to find your solution.
-
Can any solve this exception when compiling the source code
when i compile the source code . i am getting the following exceptions
1.java.lang.classnotfoundException and javax.jnlp.UnavailableServiceException
BadFieldException[ The field <jnlp>codebase has an invalid value: $$context/adempiereHome,$$context/adempiereHome]
at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)looks like you're using java web start to run app. am i right? personally i don't have much expertise in this area but i've had to deal with it before, essentially what your problem looks to me is that the codebase in your jnlp file is set up wrong
under my definition (vague) the codebase points to where java should look at to find your files and run them
do a search and read more about running apps. through web start if that's your case -
Error while compiling, please i need help
this error occured while i was compiling a source code, who can please tell me what to do?
ERROR: (Error : Invalid path, \bin\javac.exe -classpath C: -d C: C:\newjava.java )
THANK YOU!!!It sounds like \bin doesn't exist, which is just as well since it would be dumb to put javac in a \bin directory off the filesystem root. Something like "\jdk1.5.0_6\bin\j" might be more appropriate.
Where did you actually install the JDK? -
Error while compiling the PO Item Category KFF
Kindly help me. I am new and learning Purchasing module and now stuck because of an error while compiling the PO Item Category KFF. This is because a segment is saved in the database incompletely.
Now the segment does not show in the Segments Summary form. But when I enter the same Number, I get the error APP-FND-00924: You chose a sement number that is used by another segment.
When I freeze and compile the structure with different segments, I get the error
APP-FND-00668: The data that defines the flexfield on this field may be inconsistent. Inform your system administrator that the function: FDFRKS could not find the structure definition for the flexfield specified by Application = &APPL, Code = MCAT and Structure number = 201 (APPID=401)
APP-FND-00738: Error detected when attempting to load value set on Context: &CONTEXT for Segment: &SEGMENT in Routine: FDFBKS
APP-FND-01564: ORACLE error 1403 in FDFAVS3
Cause: FDFAVS3 failed due to ORA-01403: no data found.
The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.
Regards
ReemHi Sandeep
Sorry that I am bothering with basic questions, but I am not able to run any Select queries. It gives error Table or View does not exist. I can see the table from ALL_TABLES view, but I cannot Select.
I have logged in as oracle user. This is not Vision datbase. Can you let me know the default dba user and password or how to get the permission?
Regards
Reem -
Error while compiling the composite through custom ant script
Hi,
I am getting the following error while compiling the composite through custom built ant scripts which are intern call the ant-sca-package.xml. And the composite is created by upgrading the 10g bpels. But the same composite is successfully compiling from Jdeveloper (11.1.1.4).
oad of wsdl "oramds:/soa/shared/workflow/NotificationService.wsdl" failed
oracle.fabric.common.FabricException: Error in getting XML input stream: oramds:/soa/shared/workflow/NotificationService.wsdl: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:280)
at oracle.integration.platform.common.MDSMetadataManagerImpl.getInputStreamFromAbsoluteURL(MDSMetadataManagerImpl.java:555)
at oracle.fabric.common.metadata.MetadataManagerImpl.getDocumentAsInputStream(MetadataManagerImpl.java:159)
at oracle.integration.platform.common.MDSMetadataManagerImpl.getDocumentAsInputStream(MDSMetadataManagerImpl.java:417)
at oracle.fabric.common.wsdl.WSDLManager.loadWSDL(WSDLManager.java:241)
at oracle.fabric.common.wsdl.WSDLManager.loadWSDL(WSDLManager.java:304)
at oracle.soa.scac.ValidateComposite.loadWSDLs(ValidateComposite.java:934)
at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:491)
at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:150)
at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:135)
Caused by: java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:388)
at oracle.mds.internal.net.AbstractOraMDSURLConnection.getInputStream(AbstractOraMDSURLConnection.java:176)
at oracle.mds.internal.net.OraMDSURLConnection.getInputStream(OraMDSURLConnection.java:67)
at java.net.URL.openStream(URL.java:1010)
at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:276)
... 9 more
Caused by: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:339)
And in the following blog, its recommended to check for the adf-config.xml. But when upgrading the bpels from 10g to 11.1.1.4, I don't see any such file created by Jdeveloper.
http://orasoa.blogspot.com/2010/08/ant-and-mds-composite-compile-error.html
Not sure if I am missing some properties to add in by custom script while compiling.
Thanks
Sree
Edited by: Sree on Jul 4, 2011 7:25 AMHi Hussain,
Thanks for the reply.
Were you able to compile the form at the client side successfully?
1) Were you able to compile the form at the client side successfully?:
Ans: Yes, I was able to compile the form successfully at client side.
2) Are you logged in as applmgr user? Have you sourced the application env file before compiling the form?
Ans: No, I have not logged by applmgr user, i am using my own login. Yes I have sourced the application env file before compiling the form
3) What does "echo $FORMS_PATH" return?
Ans: echo $FORMS_PATH on server gives this path
/u01/app/EBS00/apps/apps_st/appl/au/12.0.0/resource:/u01/app/EBS00/apps/apps_st/appl/au/12.0.0/resource/stub
Can you please advise?
Thanks, -
How to compile the source code?
Hello,
I have got the source code and want to custom my nosql db.
how can I compile the source code?
thank you!You will have to apply some workarounds to achieve your goal, but they are not too bad.
One problem is that the sources for the Admin Console web application are missing from the distribution. You can build a kvstore.jar that lacks the web application but is functional in every other way. If you need to have the web application in your build, we can discuss that separately.
You will need to download the hadoop core jar file from http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-core/0.20.2/hadoop-core-0.20.2.jar .
Place it in the lib directory of the distribution.
I've appended to this message a context-style diff to show the changes that are needed in build.xml. You can apply these changes by hand, or use a diff-applying program such as "patch". The diff is small -- only three lines are changed.
With these changes in place, issue the command "ant jar", which should produce the file dist/lib/kvstore.jar. This jar file has dependencies such that it will not work correctly unless it resides in the same directory as the other jars in the distribution. Therefore you should move dist/lib/kvstore.jar to lib/kvstore.jar before you try to run with it.
This is certainly harder than it needs to be. We'll consider making this easier to do in a future release.
Let me know how it goes!
*** build.xml.~1~ 2011-12-14 15:11:06.000000000 -0500
--- build.xml 2012-04-19 09:44:19.649000428 -0400
*** 282,292 ****
<!-- ============================================================ -->
<target name="compile" depends="compile-src,
! compile-webapp,
compile-examples,
compile-test"/>
! <target name="compile-src" depends="dep-dirs, update-external-libraries">
<javac
srcdir="${srcdir}"
destdir="${destdir}"
--- 282,292 ----
<!-- ============================================================ -->
<target name="compile" depends="compile-src,
compile-examples,
compile-test"/>
! <target name="compile-src" depends="dep-dirs">
<javac
srcdir="${srcdir}"
destdir="${destdir}"
*** 402,408 ****
</java>
</target>
! <target name="jar" depends="compile-src, compile-webapp-gwtc, je-version, kvclientjar">
<delete failonerror="false" file="${jarfile}" />
<jar jarfile="${jarfile}">
<fileset refid="jarclasses"/>
--- 402,408 ----
</java>
</target>
! <target name="jar" depends="compile-src, je-version, kvclientjar">
<delete failonerror="false" file="${jarfile}" />
<jar jarfile="${jarfile}">
<fileset refid="jarclasses"/>Edited by: Guy Hillyer, Oracle on Apr 19, 2012 9:57 AM -
Hi All,
I am getting Memory fault error while compiling the form.
I tried with two commands.
I executed these commands from $AU_TOP/forms/US
At first I tried with
f60gen $AU_TOP/forms/US/XXTEST.fmb apps/opopop123 output_file =$XXEEG_TOP/forms/US/XXTEST.fmx
and I got following error
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
PL/SQL Version 8.0.6.3.0 (Production)
Oracle Procedure Builder V6.0.8.21.0 Build #0 - Production
Oracle Virtual Graphics System Version 6.0.5.39.0 (Production)
Oracle Multimedia Version 6.0.8.25.0 (Production)
Oracle Tools Integration Version 6.0.8.17.0 (Production)
Oracle Tools Common Area Version 6.0.5.32.0
Oracle CORE Version 4.0.6.0.0 - Production
Compiling package specification APP_CUSTOM...
No compilation errors.
Compiling package body APP_CUSTOM...
Memory fault
Secondly I tried with
f60gen Module=/opt/egapmdev/ebmdappl/au/11.5.0/forms/US/XXTEST.fmb Userid=apps/opopop123 Module_Type=FORM batch=yes Output_File=XXTEST.fmx
Now the error came was only 'Memory fault' without any other messages.
Please any one look into it.Sure,
I used two commands both are not working.
First
f60gen $AU_TOP/forms/US/XXTEST.fmb apps/opopop123 output_file =$XXEEG_TOP/forms/US/XXTEST.fmx
Second
f60gen Module=/opt/egapmdev/ebmdappl/au/11.5.0/forms/US/XXTEST.fmb Userid=apps/opopop123 Module_Type=FORM batch=yes Output_File=XXTEST.fmx
Both are not working
Error messages in first command
Forms 6.0 (Form Compiler) Version 6.0.8.28.0 (Production)
Forms 6.0 (Form Compiler): Release - Production
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
PL/SQL Version 8.0.6.3.0 (Production)
Oracle Procedure Builder V6.0.8.21.0 Build #0 - Production
Oracle Virtual Graphics System Version 6.0.5.39.0 (Production)
Oracle Multimedia Version 6.0.8.25.0 (Production)
Oracle Tools Integration Version 6.0.8.17.0 (Production)
Oracle Tools Common Area Version 6.0.5.32.0
Oracle CORE Version 4.0.6.0.0 - Production
Compiling package specification APP_CUSTOM...
No compilation errors.
Compiling package body APP_CUSTOM...
Memory fault
Error message in second command
Memory fault
I ran this command from
$AU_TOP/forms/us --(/opt/egapmdev/ebmdappl/au/11.5.0/forms/US)
Looking forward from you.
Maybe you are looking for
-
Can u have two icloud accounts attached to one itunes account
i would like to have my daughter ipod touch on a different account so that i dont recieve her texts on my phone. can i have two icloud accounts to one itunes account so that i dont have to open another itunes account and repurchase all her apps and
-
Struts tiles to create event based loading of tiles on a JSP
Hi All, I am working on a web app where I am using struts tiles to create my JSPs. I have tiles for header, footer & nav bar. Now I want to break up my JSP body in multiple tiles. It is required that I insert only one body tile initially, say body1,
-
Album shows purchased but wants me to buy songs again
I recently bought a iphone 4s and wanted to transfer my music to it and not everything will transfer. When I search the albums I have purchased it shows that I have purchased them but they won't download and wants me to buy each song again individual
-
Iam getting no signals in my 3gs 32gb model
hi there is no network on my phone,it keeps on saying 'searching' and 'no service', i have updated the phone to 6.1.3, still showing the same again i have tried factory resetting, the outcome is again same but the phone is unlocked and doing well..
-
Hi, I have been using an Epson PM-A850 printer (similar to Stylus X500 in U.S.) with my eMac with no problems but when I try to print from my MacMini through printer sharing I cannot get the full pulldown menu for printing. The "print settings" optio