EJB:Error in adding class file in JAR
Hi im doing project in EJB
when i add class files to JAR this type error occurs
Pls help in need of help
Generally WEB-INF\classes\ is for compiled classes.
You should move your java source files to say SecondWap\src\com\hclasses to match up with your package name in your ajva file.
Similar Messages
-
Error while converting class file to exp and jca file
error while converting *.class file to *.exp and *.jca file
=====================================================================================================================
linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
Java Card 2.2.1 Class File Converter, Version 1.3
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
conversion completed with 2 errors and 0 warnings.
=====================================================================================================================i compile a file javacard use this command:
===
javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
===
and try to convert this class use this command
===
/home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
===
result convert:
===
Java Card 2.2.1 Class File Converter, Version 1.3
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
converting com.sun.javacard.samples.Identity.Identity
error: export file framework.exp of package javacard.framework not found.
conversion completed with 1 errors and 0 warnings.
===
why ??
please your comment for this problem.
thank 4 all. -
How to get the class file of jar file
hello all,
is there any way to get the class file of jar file,as we have when we compile a java file we get class file
same do we have any option to get the class file of jar fileA jar file is a zip archive, so you can uznip it or extract the contents with the command "jar" - if it is what you need.
-
Create database fails with error ORA-01505: error in adding log files
hi all,
hope someone can help me out, I'm trying to create a database using a SQL script, the content of the script is:
create database testora
user sys identified by oracle
user system identified by oracle
logfile group 1 ('/u01/app/oracle/oradata/testora/redo01a.log', '/u02/app/oracle/oradata/testora/redo01b.log') size 100m blocksize 512 reuse,
group 2 ('/u01/app/oracle/oradata/testora/redo02a.log', '/u02/app/oracle/oradata/testora/redo02b.log') size 100m blocksize 512 reuse,
group 3 ('/u01/app/oracle/oradata/testora/redo03a.log', '/u02/app/oracle/oradata/testora/redo03b.log') size 100m blocksize 512 reuse,
maxlogfiles 5
maxlogmembers 5
maxdatafiles 100
character set US7ASCII
national character set AL16UTF16
extent management local
datafile '/u01/app/oracle/oradata/testora/system01.dbf' size 400m reuse
sysaux datafile '/u01/app/oracle/oradata/testora/sysaux01.dbf' size 400m reuse
default tablespace users
datafile '/u02/app/oracle/oradata/testora/users01.dbf' size 500m reuse autoextend on maxsize unlimited
default temporary tablespace tempts1
tempfile '/u01/app/oracle/oradata/testora/temp01.dbf' size 20m reuse autoextend on maxsize 4g
undo tablespace undotbs1
datafile '/u01/app/oracle/oradata/testora/undotbs01.dbf' size 200m reuse autoextend on maxsize unlimited
It fails in creating the database with the following output:
SQL> @/home/oracle/Oracle_Scripts/testora_db_script.sql
create database testora
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-01501: CREATE DATABASE failed
ORA-01505: error in adding log files
ORA-01184: logfile group 1 already exists
Process ID: 3486
Session ID: 1 Serial number: 3sorry to revive this thread but i have one more issue with this. I created a database with DBCA insetead of CREATE DATABASE command and selected option for Fast Recovery Area space. This automatically set initialization parameter db_recovery_file_dest and db_recovery_file_dest_size, but did not create a OMF redo log group, but instead created three redo log groups with 1 member each.
select * from v$logfile returns:
1 ONLINE /u01/app/oracle/oradata/testdb2/redo01.log NO
2 ONLINE /u01/app/oracle/oradata/testdb2/redo02.log NO
3 ONLINE /u01/app/oracle/oradata/testdb2/redo03.log NO
Any idea why if creating a database with create database command and specifying db_recovery_file_dest creates an OMF redo log group and with DBCA it doesn't? -
How to run .class file and .jar file in jdev9i
I want to run .class file and .jar file in jdev9i,what should I do?
Also,I want to generate .class file and .jar file in jdev9i,what should i do?Add the .class file containing the public static void main(...) method to the project by clicking on the + toolbar button in the navigator, open the project properties and properly set the additional classpath then right click on the .class in the navigator and say run. It should work, I've just tried it.
Doesn't work for a .jar yet, in JDeveloper 9.0.3 it works both for .class and .jar
Michel -
Adding Classes to the JAR File's Classpath
Ques 1- Can I use the wildcard * symbol in Manifest file to add classes/othes jar files to the JAR File's Classpath.I have folder named - Lib . where there are many jar files.Now,do I have to add each jar file by- Class-Path: Lib/jar1-name Lib/jar2-name . Instead, can I do this- Class-Path: Lib/*.jar OR Class-Path: Lib/*.class
RIDICULOUS....105 views has been made but YET NO ANSWER. Isn't there anybody who knows the answer.
Edited by: Tanvir007 on Apr 30, 2008 2:21 AMQues 1- Can I use the wildcard * symbol in Manifest file to add ... other jar files ...?No. You could, however, place all your needed JARs in JavaHome/jre1.x.x/lib/ext - if this is a way for you.
Ques 2 ??
RIDICULOUS....105 views has been made but YET NO ANSWER.What hindered you to test it yourself?
And the things we don't know far exceed the things we know. Why do you wonder?
Have a nice day
J�rg -
Can't access class files in jar file
I'm running Eclipse and trying to access class files in a jar file from source. I have added the jar file through Properties/Java Build Path/Add External JARs... but the class files are not visible from my source code. Any ideas what is happening?
Thanks!Depends what you mean by "visible." Are you getting a ClassNotFoundException? If so, your JAR isn't in your runtime CLASSPATH. You should be able to solve that (in Eclipse) by by modifying your project classpath.
If "visible" means your code is usng a ZIP class to peek inside the JAR & it's not working, best bet is to re-study the ZIP class Javadocs & examine the error messages carefully.
If this doesn't solve the problem, please provide more details & the specific error message/stack trace you're getting. -
Adding .class files to your project and making them work.
Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
itemRequest.setSearchIndex("Books");
its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
itemRequest.setSearchIndex("Books");
the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?It's working fine. It's just that you have to put your code in a method.
-
Error wile importing class file
hi,
i am trying to import a class file(exp) in jsp, but it gives error mesg like unable to find the class file. the code is
class file is plcaced in "C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT\WEB-INF\classes"
<%@ page language="java" import="exp" %>
<html>
<body>
<%! test t = new test(); %>
Length of Sabarish is <%= t.strLength("Sabarish") %>
</body>
</html>kindly helphai,
try placing ur class in a package and provide fully qualified class name in jsp import
hope this will help
regards,
varma. -
Invisible class files inside jar archives
Hi!
After developing an application with J2SE 1.4.1_05, under Windows 98, using some packages archived in jar files, I cannot launch the application with the J2RE 1.4.2_02 or J2SE 1.4.2_02 (in the same Windows 98) because the class files in the jars are not 'visible', even if the CLASSPATH is set up correctly. The only classes that work right are the unpacked ones. But it still does work in Windows 2000.
What might be wrong?Thank you for your answer, and excuse me if my question was kind of confusing.
The issue here is that the files ARE in the jar files (without './' on the front), but in the environment (Windows 98 + J2RE 1.4.2_02) the application does not work, unless I unpack the jars and use the packages in the same manner I did during the development stage (for example, all classes of package 'myutils' in the folder 'myutils').
The weird thing is that this DOES NOT happen in the environment (Windows 2000 + J2RE 1.4.2_02)!!! Just after installing the J2RE 1.4.2_02 under Win2K, the app does work OK! That is why it seems that ONLY in the first case (Windows 98 + J2RE 1.4.2_02) the class files inside the jars seem to be 'invisible' to the environment.
As I have mentioned in my question, the app was developed in the environment (Windows 98 + J2RE 1.4.1_05), and it did still work with the jar files, so I wonder if there might be some compatibility between Windows 98 and the J2RE 1.4.2_02.
Except my own jars, the same thing does happen with the jai_core.jar file coming with JAI 1.1.2. But this does not happen when it comes about rt.jar, in ..\jre\bin!!!
All in all, the question still is: what might be wrong? -
How to protect the class files inside jar file.
Hi Group,
pls help me.
my need is i created a executable jar file with certain classes.
and i'm supposed to send it to my client.
but if the client needs he can extract the class files from the jar and with the
help of some decompilers he can convert class file to .java source code and read the whole
stuff.
how can i protect my jar file from these.
is there any security mechanism for that
pls help me.
Regards,
Ranjith.MIn order to protect my jar file I tried the jar signer technology but it only protects the jar from modification so I need to know how to protect jar file from decoding of the contents inside.
-
Help adding new files to Jar file.
I am new to Java and am having problems haveing our Web App work after I have recreated the JAR file...this is what I did...
Changed to the following directory at a dos prompt:
D:\jdk1.3.1_01\bin
Ran the following to extract the files from the jar file.
jar xvf app2.jar
...this created 5 directories with various files.
copied new and updated graphic files to
D:\jdk1.3.1_01\bin\app2\images
Recreated the jar file using the following command (pv com javavp meta-inf borland are the 5 directories that were extracted from the original jar file above):
jar.exe cvf app2.jar pv com app2 meta-inf borland
I now have a new jar file that is a similar size, so it looks good, but when I put it in our web site, it does not recognize certain frames (that get information from the database) that it did before (the frames are blank)
Any thoughts on what I am doing wrong?
Also, are there any Windows programs that i can use to make this easier instead of using the dos commands?
Thanks...To change the contents while inside a java program, you might be able to use Runtime.exec(String[]). Make the array with "jar.exe" as the first index, flags in the second, and remaining arguments in the remaining indecies.
-
Urgent,java Error when compiling class file for jsp
Hi!
Reference to statement is ambbiguous,both class java.sql.statement in java.sql and class.java.beans.statement in java beans match.
this is my file . When i comment the java.import.bean headre it does compile but my server is not able to recognize the class file.,Cud someone help me.
THis is my source file
package dbmg;
//import java.beans.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class DbBean
Connection con;
ResultSet rs;
String sql;
boolean queryType;
int edited;
public DbBean() throws Exception
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:Forums");
public void setQueryType(String s)
queryType=s.equalsIgnoreCase("select");
public void setSql(String s)
sql = s;
synchronized public void processRequest(HttpServletRequest req) throws
Exception
if (queryType)
Statement stmt=con.createStatement();
rs=stmt.executeQuery(sql);
else
PreparedStatement ps=null;
ps=con.prepareStatement(sql);
int count=0;
String sqlParam,paramValue;
boolean set=true;
while (set)
count++;
sqlParam="param"+String.valueOf(count);
if (sqlParam==null)
set=false;
continue;
paramValue=req.getParameter(sqlParam);
if (paramValue==null)
set=false;
continue;
else
paramValue=paramValue.trim();
try
ps.setString(count,paramValue);
catch(Exception ex)
set=false;
continue;
try
edited=ps.executeUpdate();
catch(SQLException e)
edited=0;
public Connection getConnection()
return con;
public ResultSet getResultSet()
return rs;
public int stored()
return edited;
public void closeCon() throws Exception
con.close();
rs = null;No need of commenting your import statement. Whenever there is ambiguity, you can use full class name (with package).
Like,
java.sql.Statement stmt=con.createStatement();
Now there is no ambiguity.
Sudha -
Error in reading .class files
What kind of program opens .class files?
i'm new to java technology and am very confused with all these.
Can someone please help?
.class files ...
i think its got something to do with JVM
please send me instructions on how to run .class files
thanksYou need java.exe from the JRE or J2SDK. You can find the download links on the front page of http://java.sun.com. At its simplest, if your class file is called MyProgram.class, you would run it with the command "java MyProgram".
-
Error while reading CPS file in jar
Hi,
I am getting error :-
Error while initializing CAZM Factory : CardAuthorizationManagerFactory : getFactory : in one of my class in WSAD
Root cause i guess its not reading CPS file which is there in one of the jar file.
Please help me to get solution.
Regards,
DivyaI am also using a raw file destination using a variable.
I have set DelayValidation = true on both the DataFlow task and even the Sequence Container.
I get the same error when I run the entire ssis package, however
when I run the individual container or individual task it runs without an error.
Also, something interesting is the error is not the same path as the variable name.
Warning: The system cannot find the file specified.
Error: File "C:\Users\MyName\AppData\Local\Temp\GUIDNumber\\RawFileName" cannot be opened for reading. Error may occur when there are no privileges or the file is not found. Exact cause is reported in previous error message.
The variable is "C:\Temp\ProjectName\RawFileName"
I have other RawFile sources in this same project, but only this one file is giving me grief.
Any other suggestions? Is this a bug?
Have you set an expression for connection string property of raw file? Is it based on variable/expression or configuration? If yes, check the value of variable/ expression or configuraton item at runtime by putting a breakpoint in the pre execute event of task
and make sure path value its getting is correct. It may be that path is getting a different value at runtime due to expression/configuration set for it.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
I have my daughters i phone now how do i change the name and owner on the i tunes account
My daughter has given me her old 3GS I phone. I now have her tunes in with mine in my I tunes record. However I want to buy more tunes but the account is now in my daughters name and has her password which will charge to her bank account. How do I ch
-
Why is the graphic performance of Logic Pro so crappy? OK, I'm not using the latest Quad Intel but even when scrolling around in an arrange window with a few tracks and even when not playing, the graphics stutter. Everything takes a little while to r
-
Reference of Contract for an FOC document type
Dear all, I have a scenario where i create a Contract with value, then for that contract if needed i send materials in FOC, so when you check the copy contral we can assign the contrac to FOC sales order document type. when when i really create the F
-
EP7.31 integration with Sharepoint 2010
Hi , we are integrating EP 7.31 with Sharepoint 2010 server, we can able to see in HTTP header in MYSSO2 ticket cookie,but Sharepoint application can't able to parse the ticket, Here is the Log : [Thr 10788] Initializing SSF Library Version [Thr
-
my problem is:cannot find symbol variable coefsAndDegs ; Line 54 please help me import java.util.*; class Term { private int coefficient; private int degree; public Term(int coefficient, int degree) { this.coefficient = coeff