Problem using jstl and displaytags

Hi all,
I am using display tags taglib for generation of table. One of the columns has to be shown with the hyperlink attached to it. In order to acheive this i am using jstl taglib together with displaytags
<display:table name="reportList" id="row" requestURI="viewengagementstatus.do" style="width: 100%;">
<display:column  title="Period"  sortable="true" style="text-align:  center;" >
<a href="/jsps/reportsummary.do?eid=<c:out value="${row.eid}" />&reportId=<c:out value="${row.ReportID}" />&reportPeriod=<c:out value="${row.targetDate}"/> " target="_blank"><font size="1"><c:out value="${row.targetDate}"/></font></a>
</display:column>I am using jstl1.1.2.jar for jstl.
When i run this on Weblogic10 and windows OS i am able to view the results. On performing the view source on the IE window, i get the following:
<td style="text-align:  center;">
               <a href="/jsps/reportsummary.do?eid=78004&reportId=104093&reportPeriod=Nov-2008 " target="_blank"><font size="1">Nov-2008</font></a>
</td>but when the same code is run on the Weblogic deployed on the Linux machine, i am not getting the links and the name:
the view-source of the application deployed on the linux machine shows:
td style="text-align:  center;">
               <a href="/jsps/reportsummary.do?eid=&reportId=&reportPeriod=" target="_blank"><font size="1"></font></a>
</td>Any Ideas why this is occuring?
Any help would be appreciated

You should be using the one or the other, not both. Since your actual code shows that you don't need the jstl/core_rt taglib (you're using the JSP EL ${ } in JSTL tags rather than scriptlets <%= %> ), just remove that taglib declaration and continue using the jstl/core taglib.
You should also rather place both the JSTL and standard JAR in the classpath of the application server. In case of Tomcat, put it in its /lib directory. Then remove all unnecessary JSTL and Standard JAR and TLD files from your whole webapplication project and also remove any related entries from the web.xml of your webapplication project. To use JSTL you only need to put the JAR files in the classpath of the application server and define the taglib in your JSP. Nothing less and nothing more. If you're using JSTL 1.2 rather than JSTL 1.1, then you need to remove the standard.jar file too since it is already merged in the jstl-1.2.jar file.
Oh, the web.xml should also be declared that way that the application server uses at least servlet 2.4.

Similar Messages

  • Simple setup problems with JSTL and Tomcat

    Hi all, I'm having some problems getting JSTL to work the 1st time. JSTL setup seems to be a common problem for relative newbies, but having read previous threads, I still haven't been able to solve my problem so hopefully someone can help:
    the jstl.jar and standard.jar are in my WEB-INF/lib directory, so I don't think it's a classpath problem.
    My jsp page has the following at the top:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>Later, I reference a bean var with :
    <c:out value="My var is : ${var.property}"/>In my web.xml I have:
      <taglib>
       <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
       <taglib-location>/WEB-INF/lib/jstl.jar</taglib-location>
      </taglib>And I've placed the actual tld (c.tld) in the WEB-INF directory.
    On startup I get the error when compiling the JSP:
    No such tag out in the tag library imported with prefix c
    Can anyone help here?
    Thanks in advance,
    Mike

    I think this note from the JSTL mailing list by Shawn Bayern, one of the lead developers of Jakarta JSTL and the author of "JSTL In Action", will clarify it:
    http://www.mail-archive.com/[email protected]/msg04587.html
    Don't put that <taglib> in your web.xml. All the books tell you to do it, but Shawn Bayern has the right answer. The URI should be the one that's in the TLD JAR .tld files.
    I use JSTL and Tomcat 4.1.24 without the <taglib>, and it works fine. - MOD

  • Problem using JSTL

    Hi
    i am stupid in jstl . I want use JSTL . i am using tomcat 5.0 & jdk 1.3
    i kept jstl.jar and standard.jar in /WEB-INF/lib and using core tags in jsp but when i run jsp it show me error like .i have not written anything in web.xml
    what should i do? plzz tell me
    org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file "file:/E:/Tomcat 5.0/webapps/JSTL/WEB-INF/lib/standard.jar": java.lang.IllegalStateException: zip file closed
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:411)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:183)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)
         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.

    Maybe jdk 1.4 or higher versions would solve your problem. Googled around and read that this may be a bug in lower versions when reading unsigned jars.
    cheers,
    ram.

  • Any problem using bseg and bkpf tables

    For fico details i using  bseg  and bkpf  tables.
    I noted that programming is very difficult because of these tables are cluster table.
    plz give me other tables
    if i using these tables any problem will come?

    >
    mysvijai197715 wrote:
    > Hi Aniesh,
    >
    >            BSEG and BKPF are cluster tables. It contains transperant tables like BSIS, BSIK etc. For example to take vendor details usr the BSIK.If you use BSEG and BKPF it will take long time search. suppose your concern having lot of data means may be your server will get shutdown. So use only trasnperant tables like BSIS, BSIK etc.
    >
    >
    > Regards
    > R.Vijai
    Incorrect.  BKPF is a transparent table and not a cluster table and you can use it just like any other transparent table.  BSEG is a cluster table but there is no problem selecting from it so long as you use the key of BUKRS, BELNR, GJAHR - unless you are selecting a very large amount of data, but then this can cause problems when selecting from any type of table.
    The advantage of using BSEG over the other FI line item tables such as BSIS and BSIK is that it holds all the lines of an FI document while the others will hold only a subset eg BSIK will only hold lines that contain a vendor reference and BSAS holds only cleared GL account lines.  Though you can only use it when you have the key.  If you need to search on vendor, you can use BSIK as a starting point, but since I usually need to get hold of all the lines on an FI document, I then have to select from BSEG anyway.

  • Problem Using JSTL in JSPProviderChannel

    hi every one ..
    has any one used JSTL with JSPProviderChannel..
    plz tell me where to put all jar files and tld files and what changes are to be made in web.xml file ..
    thanks
    san

    Hi,
    I have done all the above ie.,
    Copied the jar files (jstl.jar, standard.jar) to <portal-install-dir>/SUNWps/web-apps/portal/<instance>/WEB-INF/lib
    also copied the same jar files to desktop/default/classes directory.
    copied the *.tld's to desktop/default/tld directory
    and in my jsp file changed the
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    to
    <%@ taglib uri="/tld/fmt.tld" prefix="fmt"%>
    it gives me error :
    JSPProvider.processJSPFile(): jsp=content.jsp,
    com.sun.portal.providers.ProviderException: JSPProvider.processJSPFile(): jsp=content.jsp, com.sun.portal.providers.jsp.jasper3.jasper.compiler.CompileException: /etc/opt/SUNWps/desktop/default/SimpleUserInfo/content.jsp(6,0) Unable to open taglibrary /tld/fmt.tld : Unable to open the tag library descriptor: java.sun.com     at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:712)
         at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:674)
         at com.sun.portal.providers.jsp.JSPProvider.getContent(JSPProvider.java:473)
         at com.sun.portal.desktop.context.ReusableProviderCaller.run(ReusableProviderCaller.java:145)
    com.sun.portal.providers.jsp.jasper3.jasper.compiler.CompileException: /etc/opt/SUNWps/desktop/default/SimpleUserInfo/content.jsp(6,0) Unable to open taglibrary /tld/fmt.tld : Unable to open the tag library descriptor: java.sun.com     at com.sun.portal.providers.jsp.jasper3.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:742)
         at
    If I refer it in my jsp as
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    I get the following exception
    JSPProvider.processJSPFile(): jsp=content.jsp,
    com.sun.portal.providers.ProviderException: JSPProvider.processJSPFile(): jsp=content.jsp, com.sun.portal.providers.jsp.jasper3.jasper.compiler.CompileException: /etc/opt/SUNWps/desktop/default/SimpleUserInfo/content.jsp(6,0) Unable to open taglibrary http://java.sun.com/jstl/fmt : Could not locate TLD http://java.sun.com/jstl/fmt     at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:712)
         at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:674)
         at com.sun.portal.providers.jsp.JSPProvider.getContent(JSPProvider.java:473)
         at com.sun.portal.desktop.context.ReusableProviderCaller.run(ReusableProviderCaller.java:145)
    com.sun.portal.providers.jsp.jasper3.jasper.compiler.CompileException: /etc/opt/SUNWps/desktop/default/SimpleUserInfo/content.jsp(6,0) Unable to open taglibrary http://java.sun.com/jstl/fmt : Could not locate TLD http://java.sun.com/jstl/fmt     at com.sun.portal.providers.jsp.jasper3.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:742)
    Please help on using JSTL with Portal 6.1
    Thanks

  • Color palette problems using Toolbar and ImageList ActiveX Controls

    I'm using Toolbar and ImageList ActiveX controls to implement toolbar functionality in a top-level VI.
    I designed the icons used in the toolbar with a 256 color palette. When I initially added the icon images to the ImageList control and ran the VI, the icons were properly displayed in the toolbar, as expected. After saving VI, exiting LabVIEW, and reloading, it appears that a different palette has been applied to the images in the ImageList control. I'm attaching a screenshot of the problem as well.
    Has anyone encountered this type of problem before? Any suggestions you provide will be greatly appreciated.
    Thanks,
    Zach
    Software Engineer
    OnWafer Technologies, Inc.
    www.onwafer.com
    Attachments:
    icon.zip ‏3 KB

    I'm using Toolbar and ImageList ActiveX controls to implement toolbar functionality in a top-level VI.
    I designed the icons used in the toolbar with a 256 color palette. When I initially added the icon images to the ImageList control and ran the VI, the icons were properly displayed in the toolbar, as expected. After saving VI, exiting LabVIEW, and reloading, it appears that a different palette has been applied to the images in the ImageList control. I'm attaching a screenshot of the problem as well.
    Has anyone encountered this type of problem before? Any suggestions you provide will be greatly appreciated.
    Thanks,
    Zach
    Software Engineer
    OnWafer Technologies, Inc.
    www.onwafer.com
    Attachments:
    icon.zip ‏3 KB

  • BUG? JDev 10.1.3.1.0 on MacBook Pro - problem using space and delete keys

    Is anyone using JDev 10.1.3.1.0 production release on a Macbook Pro? I am experiencing problems using the delete and space keys. The delete key no longer seems to work at all when using any of the key bindings including Default MacOS X. Using the spacebar also seems to have a conflict with the code completion feature. I am finding that the code completion always pops up when the space bar is used and no space is inserted with the editor. The space bar only works when used in conjuction with the shift key. Can anyone verify if they are able to use these keys in JDeveloper 10.1.3.1.0 on a Macbook Pro?
    Thanks,
    Richard

    This was from the dmg file.
    I found that in Preferences | Accelerators, Completion Insight lists 'Space' as an accelerator, right after 'CommandAIC'. Removing that fixed the problem, but I still can't fix the Delete issue.
    The Delete action is assigned to the 'Delete' key, which is recognizes as the key combination fn-Delete. I tried to assign the Delete Previous Char to just the delete key, but pressing the Delete key while in the New Accelerator field is not recognized - it just pretends as if I had not pressed a key.
    I'm looking at the the file:
    jdevhome/system/oracle.jdeveloper.10.1.3.39.84/Default_macosx.kdf
    trying to find entries for Delete and they are not in there - is there some other place I should be looking?
    Thanks,
    --ee                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problems using Hotmail and Twitter in Firefox

    I'm having problems using both Hotmail and Twitter in Firefox (and Google Chrome) but they both seem to work fine in Internet Explorer. I can log-in to both sites but in Hotmail the drop-down menus and links don't work, and in Twitter the stream does not appear at all.
    I've tried everything: deleted cache, history, cookies, disabled add-ons etc... I've also tried re-installing both new and older versions of Firefox and I've still had no joy. If anybody has any ideas for a fix I'd really appreciate it. I can't stand using IE but I am forced to at the moment.

    My problem with Firefox & yahoo seems similar - so you are not alone.

  • Problems using MAX and PXI 8186 RT

    Hi all !
    I'm facing to problems using MAX
    1) We have a 1GB switch in order to connect my PXI 8186 RT controller and the host PC, when i use this switch, and i try to access the cards plugged in the PXI card with MAX, MAX crash! When i use a 10/100 Mb switch everything is ok, i can access to the card without any problem ! I know the PXI 8186 controller is only fitted with a 10/100 Mb Ethernet card, but i think that must not be a problem , am i wrong ? Is this problem a known bug ??
    2) I want to install all software used by my application on the host computer (in order to be able to reinstall the PXI8186 controller in case of a crash)! To do that i installed MAX 3.1.1, then all drivers NI-DAQmx 7.4, CAN2.2, VISA 3.3, and finally Labview RT 7.1 Embedded on my gost computer! After that i tried to download these software in the controller using MAX! The problem is these software are on the host computer (there are visible in system/ software) , but when i try to install them on the controller, max don't see them ! I tried to uninstall and re-install all software but no changes ... Is there a procedure or an order to install all these software ??? What should i do ???

    Hello,
    The process to install software on RT controller is :
    1/ Install LabVIEW Real-Time 7.1 on your host computer
    2/ Install all driveres you need on your RT target
    3/ On your host machine, in MAX, go to "remote targets"
    4/ Expand "Software"
    5/ Clik on "Install" button.
    This application note will give you more details about above process.
    Our controller is only provided with 10/100 MB network device. You have to check if you can configure your 1GB switch into 10/100 MB.
    Regards,
    Isabelle
    Ingénieur d'applications
    National Instruments France

  • Problem using JSTL XML tags.

    My xml tag is giving problems. All other tags (core/sql and EL) are working fine. Even a very simple code like :
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <!-- parse an XML document -->
    <x:parse var="simple">
    <a>
    <b>
    <c>C </c>
    </b>
    <d>
    <e> E </e>
    </d>
    </a>
    </x:parse>
    <!-- display using XPath expressions -->
    <x:out select="$simple//e"/>
    gives error as :
    javax.servlet.ServletException: Cannot inherit from final class
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
         org.apache.jsp.jsp.xml.first_jsp._jspService(first_jsp.java:65)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    Pls. help!

    Works with no problems for me. (same exact code posted into a JSP)
    Running on Tomcat 5, Java1.4
    What server are you running, and version of java?
    Is there anything else on the page? Are you extending a class somehow?
    Do you have any extra libraries in the web-inf/lib directory that might be conflicting?

  • Problem using JDBC and MS SQL Server

    I got a problem trying to acces a database on my SQL Server. I created the table and my connection seems ok, but when i try to get some data from a table, this happens (see below).
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'players'.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute (JdbcOdbcStatement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
    at Team.<init>(Team.java:18)
    at Simulator.main(Simulator.java:5)
    here's the code that i used to access the db with:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:odbc:BRAIN2WINXPPJH","sm","sm");
    Statement stm = conn.createStatement();
    String query = "Select * from players where teamnr = " + nr +
    " order by squadnr";
    ResultSet rs = stm.executeQuery(query);
    any help is more than welcome
    tnx
    Jo

    If all the tables are in the same database, you can use
    Connection.setCatalog("db-name")
    to change the current database. But the suggestion to include the database name in the SQL statement is safer, because you do not need to worry about changing the database at the right point.
    Thomas

  • PROBLEMS USING WEBUTIL_FILE_TRANSFER AND CLIENT_HOST COMMAND TO VIEW BLOB

    I am using webutil_file_transfer.DB_To_Client_with_progress to retrieve a blob
    from the database (that was saved in a word format) into a .doc file on the
    client.
    1st problem: The document that is being saved is not readable. It has all
    kind of special characters in it.
    Then using the client_host command, I open the document into ms word.
    2nd problem: The document opens fine (again not readable in garbage
    characters) but when I close the document, notepad pops up blank with nothing
    in it.
    Below is a sample of the code.:
    PROCEDURE DOWNLOAD_DB IS
    l_success boolean;
    username varchar2(30);
    document_name varchar2(20);
    wordexe varchar2(20);
    BEGIN
         username := webutil_clientinfo.get_user_name;
         document_name := 'wo'||:wod.fk_work_order_number||'.doc';
         :locals.file_name := 'Documents and Settings\'||username||'\my documents\'||document_name;
    l_success := webutil_file_transfer.DB_To_Client_with_progress
    (clientFile => 'C:\'||:locals.file_name
    ,tableName => 'DEFECTS'
    ,columnName => 'DESCRIPTION'
    ,whereClause => 'FK_WORK_ORDER_DATE_ID = '||:DEF.FK_WO_DATE_ID
    ,progressTitle => 'Defect document being opened'
    ,progressSubTitle=> 'Please wait'
    if l_success
    then
    CLIENT_HOST('cmd /c start /wait winword.exe C:\'||'"'||:locals.file_name||'"');
    else
    message('File download from Database failed');
    end if;
    exception
         when others
         then
         message('File download failed: '||sqlerrm);
    END;
    Any ideas?

    Hello,
    I use this kind of code with 9i and 10g and it works fine with word, excel and any of windows files.
    I think that, if the file is not correct, the cause may be the first save of the file in the database.
    Which instruction did you use to save first the doc in the BLOB column ?
    Francois

  • Mapping Problem using hibernate and annotations

    Hi,
    i am German student and new to hibernate. I established a mn conetction between to entities using hbm.xml mapping files. now I try to create the same connection applying annotations. unfortunately it does not work and I do not now why. First my error message followed by my classes and xml's:
    Initial SessionFactory creation failed.org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:39)
    at services.HibernateUtil.getSessionFactory(HibernateUtil.java:20)
    at test.Test.main(Test.java:20)
    Caused by: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:552)
    at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:517)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:36)
    ... 2 more
    package domain;
    import java.util.LinkedList;
    import java.util.List;
    import domain.Termin;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "PERSON")
    public class Person {
       private long id;
       private String vorname;
       private String nachname;
       private List<Termin> termine=new LinkedList<Termin>();
       public Person() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getNachname() {
          return nachname;
       public void setNachname(String nachname) {
          this.nachname = nachname;
       public String getVorname() {
          return vorname;
       public void setVorname(String vorname) {
          this.vorname = vorname;
       public void addTermin(Termin termin){
          termine.add(termin);
       @ManyToMany(mappedBy="person")
       public List<Termin> getTermine() {
          return termine;
       public void setTermine(List<Termin> termine) {
          this.termine = termine;
    package domain;
    import java.util.ArrayList;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "TERMIN")
    public class Termin {
       private long id;
       private String titel;
       private Person eigentuemer;
       private List<Person> teilnehmer= new ArrayList<Person>();
       public void addTeilnehmer(Person person){
          teilnehmer.add(person);
       @ManyToMany
       public List<Person> getTeilnehmer() {
          return teilnehmer;
       public void setTeilnehmer(List<Person> teilnehmer) {
          this.teilnehmer = teilnehmer;
       public Termin() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getTitel() {
          return titel;
       public void setTitel(String titel) {
          this.titel = titel;
       public Person getEigentuemer() {
          return eigentuemer;
       public void setEigentuemer(Person eigentuemer) {
          this.eigentuemer = eigentuemer;
    package test;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    import org.hibernate.tool.hbm2ddl.SchemaExport;
    import services.HibernateUtil;
    import domain.Person;
    import domain.Termin;
    public class Test {
       public static void main(String[] args) {
          Session session = null;
          HibernateUtil.setRecreateDB(true);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          /*      Person person1 =new Person();
          person1.setNachname("P1");
          Transaction transaction = session.beginTransaction();
          session.save(person1);
          transaction.commit();
          Person person2 =new Person();
          person2.setNachname("P2");
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(person2);
          transaction.commit();
          Termin termin1 =new Termin();
          termin1.setTitel("T1");
          termin1.setEigentuemer(person1);
          termin1.addTeilnehmer(person1);
          termin1.addTeilnehmer(person2);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(termin1);
          transaction.commit();
       Termin termin2 =new Termin();
          termin2.setTitel("t2");
          termin2.setEigentuemer(person1);
          termin2.addTeilnehmer(person1);
          termin2.addTeilnehmer(person2);
          transaction = session.beginTransaction();
          session.save(termin2);
          transaction.commit();
          session.close();
    package services;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.AnnotationConfiguration;
    import domain.Person;
    import domain.Termin;
    public class HibernateUtil {
       private static boolean recreateDB = false;
       public static void setRecreateDB(boolean recreateDB) {
          HibernateUtil.recreateDB = recreateDB;
       public static SessionFactory getSessionFactory() {
          if (sessionFactory == null) {
             sessionFactory = sessionFactory("hibernate.cfg.xml");
          return sessionFactory;
       private static SessionFactory sessionFactory = null;
       private static SessionFactory sessionFactory(String configurationFileName) {
          try {
             AnnotationConfiguration annotationConfiguration =
                new AnnotationConfiguration()
                .addAnnotatedClass(Person.class)
                .addAnnotatedClass(Termin.class);
             if (recreateDB) annotationConfiguration.setProperty("hibernate.hbm2ddl.auto", "create");
             annotationConfiguration.configure();
             return annotationConfiguration.buildSessionFactory();
          } catch (Throwable ex){
             System.err.println("Initial SessionFactory creation failed." + ex);
             throw new ExceptionInInitializerError(ex);
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-configuration
        PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory >
          <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
            <property name="hibernate.connection.password">application</property>
            <property name="hibernate.connection.url">jdbc:mysql://localhost/test</property>
            <property name="hibernate.connection.username">application</property>
            <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
           <property name="current_session_context_class">thread</property>
          <property name="hibernate.show_sql">true</property>
        </session-factory>
    </hibernate-configuration>

    The error message is pretty much telling you the problem:
    mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    This tells you that there's a mappedBy setting on the Person class's termine property annotation, and that the property it's referring to (the person property of the Termin class) doesn't exist.
    @ManyToMany(mappedBy="person")
    public List<Termin> getTermine() {
       return termine;
    }If we have a look at the Termin class, indeed it has the following properties:
    id
    teilnehmer
    titel
    eigentuemerAnd no person property. Remember, a property is defined by the existence of a get/set pair for the name. It's unrelated to the types returned by them and the private variables implementing them.
    mappedBy has the equivalent effect to the inverse property in a hbm.xml mapping file - it defines which entity's property will cause the foreign key value to be updated (persisting the relationship to the database). From the context of your code, I'm guessing you really want the annotation to read:
    @ManyToMany(mappedBy="teilnehmer")

  • Character encoding problem using XSLT and Tomcat on Linux

    Hi,
    I have an application running on a Tomcat 4.1.18 application server that applies XSLT transformations to DOM objects using standard calls to javax.xml.transform API. The JDK is J2SE 1.4.1_01.
    It is all OK while running on a development enviroment (which is Windows NT 4.0 work station), but when I put it in the production enviroment (which is a red hat linux 8.0), it comes up with some kind of encoding problem: the extended characters (in spanish) are not shown as they should.
    The XSL stylesheets are using the ISO-8859-1 encoding, but I have also tried with UTF-8.
    These stylesheets are dynamicly generated from a JSP:
    // opens a connection to a JSP that generates the XSL
    URLConnection urlConn = (new URL( xxxxxx )).openConnection();
    Reader readerJsp = new BufferedReader(new InputStreamReader( urlConn.getInputStream() ));
    // Gets the object that represents the XSL
    Templates translet = tFactory.newTemplates( new StreamSource( readerJsp ));
    Transformer transformer = translet.newTransformer();
    // applies transformations
    // the output is sent to the HttpServletResponse's outputStream object
    transformer.transform(myDOMObject, new StreamResult(response.getOutputStream()) );Any help would be appreciated.

    Probably you need to set your LANG OS especific environment variable to spanish.
    Try adding this line:
    export LANG=es_ES
    to your tomcat/bin/catalina.sh, and restart tomcat.
    It should look like this:
    # OS specific support.  $var _must_ be set to either true or false.
    cygwin=false
    case "`uname`" in
    CYGWIN*) cygwin=true;;
    esac
    export LANG=es_ES
    # resolve links - $0 may be a softlink
    PRG="$0"
    .(BTW, keep using ISO-8859-1 encoding for your XSL)
    HTH
    Un Saludo!

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi
    I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have:
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    And OC4J 9.0.3 is compatible with tlib version 1.0 and jsp version 1.2. When I run the web app I get:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    Any ideas?

    Hi
    Thanks for the reply.
    I tried it and I get the same error:
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
    Error: oracle.xml.parser.v2.XMLParseException ( /dataSource.jsp ):
    line #:1 column #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
    line #:2 column #:18 : Attribute 'xmlns:xsi' used but not declared.
    line #:3 column #:19 : Attribute 'xmlns:acme' used but not declared.
    line #:4 column #:27 : Attribute 'xsi:schemaLocation' used but not declared.
    line #:7 column #:16 : Attribute 'version' used but not declared.
    line #:14 column #:15 : Invalid element 'tag-class' in content of 'tag', expected elements '[tagclass]'.
    line #:14 column #:15 : Element 'tag-class' used but not declared.
    line #:15 column #:18 : Invalid element 'body-content' in content of 'tag', expected elements '[tagclass]'.
    line #:15 column #:18 : Element 'body-content' used but not declared.
    line #:16 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:18 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:18 column #:12 : Element 'type' used but not declared.
    line #:22 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:24 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:24 column #:12 : Element 'type' used but not declared.
    line #:28 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:30 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.
    line #:30 column #:12 : Element 'type' used but not declared.
    line #:34 column #:15 : Invalid element 'attribute' in content of 'tag', expected elements '[tagclass]'.
    line #:36 column #:12 : Invalid element 'type' in content of 'attribute', expected elements '[required, rtexprvalue]'.

Maybe you are looking for

  • Aging report of vendor and ekorg related amount

    Hi, My requirement is for vendor 122 within certain period for certain ekorg-c100 and D100 show different amount. is it possible for vendor aging report. I developed a vendor aging report for displaying comp-code, vendor, Pur-org, Total-amount, month

  • HP Officejet 6500 E709n All In One.

     HP Officejet 6500 E709n All In One.   I am getting receipts for blocked calls using up an unnecessary sheet of paper. These printouts also have a message noting: " Image on Fax Send Report is set to Off and an image of page 1 will appear here for fa

  • IDOC to email (flat file attachment) scenarion

    Hello everybody, I'm working with XI 3.0 I have a scenario IDOC - XI - flat file, but the file need be sent by email and not by FTP. Using normal configuration of email communication Channel , i notify is not possible sent a flat file, but only XML.

  • Spaces in file names

    Hi all, I was wondering if any of you have run into this problem before. I am using java on an as400 system and there is a space in the file name. When I got to read/write from this file it comes up with a java.io error and says the file doesn't exis

  • Lexical Parameter in Oracle Reports . . .

    Hi all, I am trying to pass a value to a query in oracle reports . . . the use of the parameter is to add 2 additional columns to an existing query, if a bind parameter is set to 'Yes' else the parameter carries a value NULL; Here is the code I have