Ejb packaging configuration

Hi, there
I am new to ejb 3 and struts. I have a question about how to set packaging configuration.
For example:
If I set output source directory: /ejbtest/www/WEB-INF/classes
jar file: /ejbtest/www/WEB-INF/classes
war file:/ejbtest/www
and then put them into ear file, I will get class cast error. I figured it out because war file contains class files as well as jar file.
So if I set output source directory: /ejbtest/build/classes
jar file: /ejbtest/build/classes
war file: /ejbtest/www
then it will work as war file does not contain jar file now.
The normal structure of a web application has classes folder within WEB-INF folder, and it has all the classes files. How can package my jar and war file properly, so I won't get cast error? Any help will be appreicated.
Cheers
Ming

try to do this in the class where you get class cast exp.
private static final long serialVersionUID = 1L;and build the war/jar

Similar Messages

  • Unable to copy hidden package "Configuration Manager Client Package" to local DP

    Content status lists it as successfully distributed to all DPs (including the local site server)
    However, component status for SMS_DISTRIBUTION_MANAGER continually logs these events:
    Distribution Manager failed to process package "Configuration Manager Client Package" (package ID = CDW00001).
    Possible cause: Distribution manager does not have access to either the package source directory or the distribution point.
    Solution: Verify that distribution manager can access the package source directory/distribution point.
    Possible cause: The package source directory contains files with long file names and the total length of the path exceeds the maximum length supported by the operating system.
    Solution: Reduce the number of folders defined for the package, shorten the filename, or consider bundling the files using a compression utility.
    Possible cause: There is not enough disk space available on the site server computer or the distribution point.
    Solution: Verify that there is enough free disk space available on the site server computer and on the distribution point.
    Possible cause: The package source directory contains files that might be in use by an active process.
    Solution: Close any processes that maybe using files in the source directory. If this failure persists, create an alternate copy of the source directory and update the package source to point to it.
    NOTE: It appears to not be any of these causes.
    If I look at the smsdpmon.log on the server in question, the following is logged every half hour:
    Intializing DP Monitoring Manager...    SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting monitoring thread priority SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting content library root path SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting site code SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting algorithm ID SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Failed to find algorighm ID from registry. Use default algorithm. SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting DP Cert Type SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Failed to find DP cert type from registry. Use default type. SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Getting this DP NALPath SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Failed to create certificate store from encoded certificate..
    An error occurred during encode or decode operation. (Error: 80092002; Source: Windows) SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    Failed to initialize DP monitoring object. Error code: 0x80092002 SMS_Distribution_Point_Monitoring 1/2/2013 1:29:45 PM 2840 (0x0B18)
    distmgr.log shows the following:
    STATMSG: ID=2304 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=BRICK-CONFIGMGR.corp.COMPANY.com SITE=CDW PID=2212 TID=2124 GMTDATE=Wed Jan 02 19:29:45.109 2013 ISTR0="CDW00001" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=400 AVAL0="CDW00001"    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Retrying package CDW00001    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    No action specified for the package CDW00001.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Start validating package CDW00001 on server ["Display=\\BRICK-CONFIGMGR.corp.COMPANY.com\"]MSWNET:["SMS_SITE=CDW"]\\BRICK-CONFIGMGR.corp.COMPANYNAME.com\...    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Failed to start DP health monitoring task for package 'CDW00001'. Error code: -1    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Updating package info for package CDW00001    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Only retrying local DP update for package CDW00001, no need to replicate package definition to child sites or DP info to parent site.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    StoredPkgVersion (2) of package CDW00001. StoredPkgVersion in database is 2.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    SourceVersion (2) of package CDW00001. SourceVersion in database is 2.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    STATMSG: ID=2302 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_DISTRIBUTION_MANAGER" SYS=BRICK-CONFIGMGR.corp.COMPANYNAME.com SITE=CDW PID=2212 TID=2124 GMTDATE=Wed Jan 02 19:29:45.213 2013 ISTR0="Configuration Manager Client Package" ISTR1="CDW00001" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=1 AID0=400 AVAL0="CDW00001"    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Failed to process package CDW00001 after 41 retries, will retry 59 more times    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Exiting package processing thread.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:45 PM    2124 (0x084C)
    Used 0 out of 3 allowed processing threads.    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:50 PM    3784 (0x0EC8)
    Sleep 1825 seconds...    SMS_DISTRIBUTION_MANAGER    1/2/2013 1:29:50 PM    3784 (0x0EC8)

    Both errors are certificate related. Is there anything special about your configuration such as special ACLs on the certificate store or FIPS compliance mode (see
    http://support.microsoft.com/kb/811833) being enabled?
    Nothing special with certificates; I've used the basic stuff for intranet management of clients.
    The only related thing I can think of that may have affected this, is that I discovered earlier today that my MP installation got hosed (error 500) due to a broken client install on the site server itself. I uninstalled the client manually and the server
    (as indicated by the component status views) appears to have repaired the MP install. Perhaps it didn't repair it completely? Would a site reset do me any good?

  • Combining package configuration and Execute SQL task at run time

    Hi everyone,
    I have an issue regarding setting values at run time
    I use package configuration to manage different enviroments scenarios (DEV, PROD):
    XML file to store the connections string of SSISConfigDB
    and the actual values of parameters in that SSISConfig DB tables Filtered by ConfigurationFilter column
    Now, one of my packages needs in addition setting at run time value of a flat file name
    i used an Execute SQL task - within the task i read into a variable the file name using command line
    then, the full path of Flat File Connection is set by expression concatenating the root folder and the variable
    the problem is that the variable stays empy! as if the Execute SQL task was never executed!
     Am i doing something incorrect? in the package configuration wizard the configured value are only XML file and the connection string of the DB.
    to summerize - how can i combine package configuration, default value, Execute SQL task and expression at runtime?

    1.EvaluateasExpression=TRUE (Full Path variable)
    2. Do you mean to invlole a ISNULL() function in the expression? if so, no
    3. Of course i recieve a valid value
    4. The Full path expression is evaluated to the root folder - without the portion of the file name
    here is the syntax in Execute SQL Task:
      truncate table OnErrorFlagTable
      Declare @Path varchar(128)
      Declare @FileName varchar(128) 
      Declare @SenderID varchar(5)
      Declare @INST_COD varchar(5)
      Declare @Flag int = 0
     Declare @FileType varchar(2)='01'
      Truncate table TraumaRecords
    Select @Path = 'C:\RootFolder\'
     --***Insert into Temp table the file so we can take his name***--
    Create Table #Tmp(Txt Varchar(Max))
    Insert Into #Tmp(Txt)
    Exec master..xp_cmdshell 'Dir *.txt C:\RootFolder\/b'
    select top 1 @Filename = Txt From #Tmp
    Where ISNUMERIC(substring(Txt,1,1))=1
    order by Txt desc
    Insert into OnErrorFlagTable
    Select 2,@FileName
    Select @FileName as TraumaFileName,@FileType as FileType
    Then, in ResultSet TraumaFileName and FileType are mapped
    Expression of @TraumaFlatfileFullPath is
    @[User::TraumaFlatfilePath]+ @[User::TraumaFlatFileName]
    where the variable @[User::TraumaFlatfilePath] is evaluated in variable window (default value)
    and it's value is C:\RootFolder\
    and @[User::TraumaFlatFileName] is the ResultSet of the ExecuteSQLTask
    and for some reason when executed in SSIS return null while in SSMS return the expected value
    Can you try making this into a procedure with required parameters and call it from SQL task to see if you get return value correctly? Use OUTPUT parameters for getting back required values
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • When Deploying SSIS Packages to SQL Server using SSMS Import feature, is the package configuration file deployed at the same time?

    Hello, everyone,
    I have an SSIS package with a XML package configuration file. I deployed it to the sql server using the import feature in SSMS (in Stored Packages, right click MSDB, select Import, select the package to deploy in file system). My question is 
    Is the XML package configuration file also deployed? If so, which folder is it stored so that I can change the values in it? If not, is setting up the Configuration tab when scheduling a agent job the way to go manually bring the configuration file in?
    Your help and information is much appreciated.
    Regards

    Thank you Arthur for your reply. I appreciate it.
    A followup questions:
    I used direct setting for the configuration file path on C:\. But it needs to be on D:\ on the remote server. I can't create the D:\ path because I don't have D:\ drive on my computer (I understand I could use indirect setting to change the path in the remote
    server. But that's not the concern here).
    My question is:  since the configuration is not deployed, can I make it up by setting up the Configurations in creating the agent job step? That is, copy the configuration file to the D:\ drive on the remote server, in Configurations tab, add the configuration
    file on D:\ to the configuration. Will it work? Will the package still look for the original config file on C:\?  and if it doesn't find it there, will it cause any error?
    Thank you in advance for your help.
    Regards

  • Package Configuration via SQL Server For a Reporting Queue

    The scenario is a reporting queue for a web application. Currently when a user queues a report it stores the parameters in a table by queue ID.  When that report is set to run the database creates a dtexec command with all the parameters. We use this
    method for transferring the values the user selected to the SSIS packages.
    I have used SQL Server package configurations before but they are usually a single table with a distinct ConfigurationFilter column.  Is it possible to take the standard table layout for the SQL Server package configuration and add another column, say
    QueueID.  We send the QueueID to each package at run time and use this value to filter the table to the configuration specific to that report?

    Here is a better break down of the current process:
    1. A user goes to the web application and selects a report/parameters.
    2. This will add data to [QUEUE] and [QUEUE_PARAMETERS] tables associated by the QUEUE_ID
    3. The server has a windows service which looks for reports in the [QUEUE] table in pending status and gets the next one available and calls a stored procedure with that QUEUE_ID.
    4. The stored procedure puts together a dtexec command through xp_cmdshell which contains all the user parameters from the [QUEUE_PARAMETERS] table.
    The purposed process is to replace the self made [QUEUE_PARAMETERS] table with the package configuration table.  This means we would only have to send the QUEUE_ID via the dtexec command and not all the other parameters.  The problem is that if
    I add QUEUE_ID to the package configuration table I am not sure how I would reference a specific QUEUE_ID from the SSIS package configuration dynamically.  There does not appear to be an expression that can be applied to the package configuration in SSIS
    which means the relationship must make the ConfigurationFilter field unique, even though it is not a primary key.

  • How to configure Data Sources in a Package Configuration?

    Good morning,
    I'm trying to create a configuration file to deploy my SSIS package on which I have defined 3 data sources shared between several different packages.
    When I open the package configurations option and I create a new file configuration, I can select on it the connection managers defined for the data sources but not the proper data sources.
    It's the first time that I use data sources and I try to create a configuration file for them so I don't know if I'm doing something wrong or my concept about the use of the data sources is wrong.
    Could someone give me a tip/article to know how I can create the configuration file to deploy my package?
    Thank you,
    Virgilio

    What do you mean under "but not the proper data sources"?
    Arthur My Blog

  • Error:ejb package does not exist

    I seem to be having a problem with recognizing my EJB packages. I tried putting some quick & dirty java code directly into a jsp to see if I can use the EJB correctly. I keep getting compile errors that the package is not there:
    testEJB_jsp.java:8: package com.hs.ejbs does not exist import com.hs.ejbs.*;
    testEJB_jsp.java:66: package com.hs.ejbs does not exist
    com.hs.ejbs.XreviewsLocalHome rv;
    ^
    testEJB_jsp.java:73: package com.hs.ejbs does not exist
    rv = (com.hs.ejbs.XreviewsLocalHome) c.lookup("java:comp/env/ejb/XreviewsBean");
    I have tried putting the jar files in several locations and adding those locations to my class path. Apparently I still do not have the right path there.
    Here is my code:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import= "javax.ejb.*" %>
    <%@page import= "javax.naming.*" %>
    <%@page import= "com.hs.ejbs.*" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>testEJB</title>
        </head>
        <body>
    <%
        SessionContext context;
        com.hs.ejbs.XreviewsLocalHome rv;
        try {
            javax.naming.Context c = new javax.naming.InitialContext();
         rv = (com.hs.ejbs.XreviewsLocalHome) c.lookup("java:comp/env/ejb/XreviewsBean");
        } catch(Exception e){
        out.println("ejb retrieval error e="+e);
        out.println("made it past the ejb retrieval code");
    %>   
        </body>
    </html>Assistance will be greatly appreciated.

    Hi,
    You can get this by putting your jar file in
    YourApp/WEB-INF/lib folderstill if you are not getting then extract the jar file in
    YourApp/WEB-INF/classes folderok
    bye

  • Business service EJB Transport configuration error

    Hi,
    When configuring Business service to work on ejb protocol, on EJB Transport Configuration tab, I get error message saying
    Generate: Error during generation of the WSDL: Cannot run program "null/modules/org.apache.ant_1.7.1/bin/ant.bat": CreateProcess error=2, The system cannot find the file specified
    BEA_HOME, MIDDLEWARE_HOME, ANT_HOME tried to set, not helped.
    JrockIt 4.0.0.,Weblogic 10.3.3, OEPE 11.1.1.6.
    What could be the problem?
    Thanks in advance.

    Hi,
    haven't found product.properties file in directory. Here is eclipse.ini file
    -startup
    plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.0.v20100503
    -showsplash
    org.eclipse.platform
    --launcher.defaultAction
    openFile
    -vmargs
    -Xms256m
    -Xmx768m
    -XX:MaxPermSize=512m
    -Dsun.lang.ClassLoader.allowArraySyntax=true
    -Dweblogic.home=D:\middleware\wlserver_10.3
    -Dharvester.home=D:\middleware\oracle_osb1\harvester
    -Dosb.home=D:\middleware\oracle_osb1
    -Dosgi.bundlefile.limit=500
    -Dosgi.nl=en_US
    So only OSB and Weblogic homes are set.
    I tried with/without setting additional homes (such as BEA_HOME etc.) just because this line :
    Cannot run program "null/modules/org.apache.ant_1.7.1/bin/ant.bat" confused me. It's like path to middleware installation isn't set, that's why it's NULL here.
    Any ideas?
    Thanks in advance.
    Edited by: frf on 20/8/2010 5:22

  • SSIS package configurations

    Hi Experts,
    I am trying to configure my SSIS packages.
    I have a master package to call child packages for Dimernsions and Facts.
    Below are my two main approaches for configuration
    1. Configuring all packages to read a single XML file for database connections and File paths.
        In this case if someone want to change the location of config file then I need to change all my package.  Is there any other issue with this approach?
    2. Configuring via parent package variable. Here I will use the values from the parent package.
       But after I did this , if we open the package the connection managers will throw error when we migrate to other server as the hard coding of the connection manager not matches with the actual database.  If we run the master package it will
    run successfully as it get the correct value from the master package.
    Here Is there any way avoid this poping of error?
    Please suggest what would be the best way ?
    Regards
    Mukejee

    Hi Mukejee,
    The error occurs because the variables passed from the parent child cannot get their runtime value in the child package at design-time. To avoid this issue, we can set the For your first approach, to avoid updating the Package Configurations after moving
    to a new server, you can create environment variables on the each server, and export the relevant package configurations to the environment variables.
    In reality, we can set the DelayValidation property of the Connection Manager as well as the Data Flow Tasks in the source package so that they don’t prompt for the error messages after being opened in the BIDS/SSDT on a new server.
    Regards,
    Mike Yin
    TechNet Community Support

  • Package Configuration Wizard or Project Deployment Model

    I am using SQL Server 2012 and I have multiple SSIS packages working in DEV.
    My aim is to deploy these to File System for execution by a Windows Service application. Should I therefore using the Package Configuration Wizard for storing DEV and PROD server details?
    Is the Project Deployment Model only required when deploying to SQL Server?

    Hi DarrenOD,
    The project deployment model enables you to deploy your projects to the Integration Services server. And there are some features like Parameters, Environment, Environment variables, SSISDB catalog and Catalog stored procedures and views that are available
    to projects developed only for the project deployment model.
    After converting project deployment model to package deployment model, there are four steps in the package deployment process:
    The first optional step is optional and involves creating package configurations that update properties of package elements at run time. The configurations are automatically included when you deploy the packages.
    The second step is to build the Integration Services project to create a package deployment utility. The deployment utility for the project contains the packages that you want to deploy.
    The third step is to copy the deployment folder that was created when you built the Integration Services project to the target computer.
    The fourth step is to run, on the target computer, the Package Installation Wizard to install the packages to the file system.
    Reference:
    Deployment of Projects and Packages
    How to: Deploy a Package
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSIS Package configuration.

    The SSIS packages is developed using BIDS 2008 and Database SQL Server 2008 R2.The package was developed in local box/Developement box and since the
    connection string is pointing to local box , it works fine and data got loaded into the target tables.
    When the SSIS packages is moved from Dev box to Pre Production or Production box , the package need to be modified since the database connection string
    of local is different from Prod box.
    To achieve the above process xml configuration has been done which contains the connection string details, but xml is pointing from the dev box path which might not exists in the prod box, so the package need to be open in Prod box and modify the xml file
    path again, which the Client is not suppose to do..
    To avoid that an Environment variable need to be created which will contain the xml path.
    But xml is not that much secure compare to database configuration. So they advice us to configure by SQL Configuration.
    The Configuration table will be created in the Db and with the help of SQL Job , the SSIS package will be scheduled, but if the tomrrow the database server
    changes the package need to re open again and modify the connection string for the configuration tables.
    Could you please suggest the best possible solution for SSIS package configuration when the User move the package from Dev box to Prod Box
    with least possible modification.

    Hi SubhadipRoy,
    Just adding to ltz's suggestion. SSIS provides several options for handling package configuration values such as environment variables, XML files, registry settings, and a table in a SQL Server database. We can store the package configuration parameter values
    in a SQL Server database table, then use those stored values when executing the package.
    As per my understanding, I think this method is a better solution. Because when we move the package from Dev box to Production box, we can directly use simple T-SQL commands such as INSERT, UPDATE and DELETE to change the configuration data without changing
    the package.
    For more information about SQL Server Integration Services SSIS Package Configuration, please refer to the following blog:
    http://www.mssqltips.com/sqlservertip/1405/sql-server-integration-services-ssis-package-configuration/
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Business Package configuration  steps:

    Hello Experts,
    We have installed following SRM  Business Packages on Portal.
    BP ERP05 BUYER 1.41
    BP ERP05 COMMON PARTS 1.41
    BP SRM 7.0
    BP SUPP COLL CONT 4.0
    Are there any specific configuration steps after installing Business Packages? Can you please let me know the documentation link for it.
    Regards,
    Arpit.

    Dear Bill,
    URL you have given is quite generic one. I have already searched there for 'Business Package configuration  steps"
    ( SRM 7.0 , EP :7.0 EHp1 ).
    Are there any specific configuration steps for business Packages ?
    Regards,
    Arpit.

  • Package Configuration Files Not loading SSIS 2012

    I've migrated an SSIS 2008 project to SSIS 2012 that uses xml configuration files. When I execute the first package through the IDE, the values in the config file are not populating variables as they did in SSIS 2008. I've enabled Package Configurations
    and added the config files and not sure what I could be doing wrong. Could anyone offer any suggestions.
    Thanks

    Someone else migrated it for me before I had vs2012 installed. So I decided I would try migrating it myself. Now the config files are loading. When I migrated it there was an option for ignore config files that was checked. I unchecked it. Could that have
    been the problem?
    I just have one more issue now...Whenever I open the solution, it loads the config files, but two passwords are encrypted. For some reason it tries to login to the database when I load the package. This didn't occur in SSIS 2008. Do you know of any way to
    disable this? I get about 2 failures before I'm locked out of the db.
    Thanks

  • Javax.ejb package

    Hi
    I am new to java, i just want to understand this, does the javax.ejb package come with J2EE jar file or must i download an SDK of some sort to have it my environment? I am currently using NetBeans 5.5 and getting package does not exist error.
    Someone please clarify
    thank you

    Actually the javax.ejb package is not present ordinary J2SE.
    It's present in the J2EE v1.4. You can download this from http://java.sun.com/j2ee/1.4/download.html.
    The javax.ejb is present in the j2ee.jar which is present in C:\Sun\AppServer\lib\j2ee.jar (installed in C: drive).
    Before compiling, classpath needs to declared either in environmental variables or in the command prompt.
    classpath: C:\Sun\AppServer\lib\j2ee.jar;C:\Sun\AppServer\bin;
    Then your javax.ejb package will be included.

  • Import EJB packages missing.

    Hi,
    running few examples I noticed that
    when generating code from EJB CMP 2.0 the
    tool doesn't include (in the import section) the EJB packages. And so the code won't compile.
    Am I missing something ?

    Giuseppe,
    I tried a few examples using the 9.0.3 Mapping Workbench, and while the import line wasn't added, all declarations of EJB classes were fully qualified, so an import shouldn't be necessary for compilation.
    Can you give any more details?

Maybe you are looking for