Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] JSP Generator Problem resourceshape

Hi Jan-Patrick 

Please see https://github.com/eclipse/lyo.designer/issues/129 for a simple workaround to avoid the exception you mention below. It's a bug that I will fix, but it's actually a good idea for you anyway to add a "#" at the end of the namespace anyway.

@all!
For those interested, I am continuing this dialog under two issues in Lyo Github. Feel free to subscribe to notifications there if interested:
Bug in vocabulary terms: https://github.com/eclipse/lyo.designer/issues/129  
Control over JSP generation:  https://github.com/eclipse/lyo.designer/issues/128 

regards
______________________________
Jad El-khoury, PhD
KTH Royal Institute of Technology
School of Industrial Engineering and Management, Mechatronics Division
Brinellvägen 83, SE-100 44 Stockholm, Sweden
Phone: +46(0)8 790 6877 Mobile: +46(0)70 773 93 45
jad@xxxxxx, www.kth.se 

-----Original Message-----
From: lyo-dev-bounces@xxxxxxxxxxx <lyo-dev-bounces@xxxxxxxxxxx> On Behalf Of Jan-Patrick Osterloh
Sent: Thursday, 7 November 2019 14:12
To: lyo-dev@xxxxxxxxxxx
Subject: [lyo-dev] JSP Generator Problem resourceshape

Hi everybody,

when I generate my project from scratch (I deleted all jsp files to get current versions of the files after I added more properties to my resources), then there is one problem in the resourceshape.jsp. It generates the following code in the "Describes" section:

79:                         <%for(URI next :
aResourceShape.getDescribes()) {%>
80:                             <li>
81:                                 <a href="<%=next%>">
82:                                     <%= next.toString().split("#")[1]%></a>
83:                             </li>
84:                         <%}%>
85:                     </ul>

My "Describes" are all "null", because I didnt set this property.
Side note: I can't set it because the editor just tells me "Please select a valid 'Class'", but I don't have anything in my project that is accepted as a valid class...

Nevertheless, if I then open any of the ResourceShapes in my model (.../services/resourceShapes/<ResourceShape>, I get an Exception:

An exception occurred processing JSP page /package/resourceshape.jsp at line 82 ...
java.lang.ArrayIndexOutOfBoundsException: 1
        at
org.apache.jsp.package.resourceshape_jsp._jspService(resourceshape_jsp.java:184)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)

I have removed the for loop completely and this "fixes" the problem, but I think that might be better fixed in the generator template...

Best
Jan-Patrick

P.S. Is there an option to always regenerate the jsps? I just use them for "debugging", so from my point of view they could be updated...?

--
Dipl. Inform. Jan-Patrick Osterloh
Senior Research Engineer
Human Centered Design Group

OFFIS e.V. - Institut für Informatik | Institute for Information Technology
             FuE Bereich Verkehr     | R&D Division Transportation
             Escherweg 2, 26121 Oldenburg - Germany
Room:        D107
Phone/Fax:   +49 441 97 22-524 / -502
E-Mail:      osterloh@xxxxxxxx
URL:         http://www.offis.de 

Registergericht: Amtsgericht Oldenburg VR 1956
Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),
          Prof. Dr. techn. Susanne Boll-Westermann,
          Prof. Dr.-Ing. Axel Hahn,
          Prof. Dr.-Ing. Andreas Hein,
          Prof. Dr. Sebastian Lehnhoff 

Unsere Hinweise zum Datenschutz sind abrufbar unter: 
https://www.offis.de/datentransparenz.html

_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/lyo-dev

Back to the top