Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Weitzel
portlet-model-hints.xml overwritten by build service
September 20, 2013 10:35 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 204

Join Date: November 18, 2009

Recent Posts

How do I stop src/META-INF/portlet-model-hints.xml from being overwritten when I run build--service in the IDE?

I am pretty sure this has only recently happened but then I haven't been changing the service.xml file recently (only making changes the Impl classes.)

This completely screwed up my development environment by effectively deleting many rows of tables as the new columns were default 75 characters but had been changed before to be text columns.

using std GA2 build and IDE.

I have now at least set auto update to false (hopefully that works!) but would love to get new tables.sql code for my model hints file so I can recreate the database tables I want but unfortunately every time I run service builder it defaults everything,
David H Nebinger
RE: portlet-model-hints.xml overwritten by build service
September 20, 2013 11:58 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11793

Join Date: September 1, 2006

Recent Posts

Eek, that's not good. I've actually not had that happen to me, but I do remember someone reporting it as an issue using maven-based projects. Are you in maven or ant?
Dave Weitzel
RE: portlet-model-hints.xml overwritten by build service
September 23, 2013 6:14 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 204

Join Date: November 18, 2009

Recent Posts

Hi David,
this is an Ant project. It happens every time, trying to see if there was particular section that it didnt like (all I actually added was 3 boolean fields
but even this section gets reverted back:
<field name="reference1Title" type="String">
<hint name="max-length">1000</hint>
</field>
<field name="reference1URL" type="String">
<hint name="max-length">256</hint>
</field>

as there is no DTD or other documentation on model hints it is hard to validate

this is standard 6.1 GA2
David H Nebinger
RE: portlet-model-hints.xml overwritten by build service
September 23, 2013 6:41 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11793

Join Date: September 1, 2006

Recent Posts

Just a thought, have you tried either w/ the version from lcepatchers.org or GA3? I mean, GA2 does have bugs in it, and I wonder if this was one of them...
David H Nebinger
RE: portlet-model-hints.xml overwritten by build service
September 23, 2013 7:01 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11793

Join Date: September 1, 2006

Recent Posts

It's important to note that SB is actually invoked out of the portal-impl.jar file. So I don't think you'd need to upgrade or anything, just get either bundle, set up your build.username.properties in the SDK to point at the new bundle, then build services in your portlet (but nothing else). If it was a fixed bug, you should get the appropriate output in your files.

You can then switch the build.username.properties file back to your GA2 installation and hopefully continue on...
Dave Weitzel
RE: portlet-model-hints.xml overwritten by build service
September 23, 2013 7:31 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 204

Join Date: November 18, 2009

Recent Posts

Thanks David,
lcepatchers.org build worked,

FYI the GA3 seems to have different signature for the basic ProcessBuilder java run methods:
I haven't compared the 2 SDKs to see what is different in build-common-plugin.xml

But lcepatchers build did seem to work

Dave

build-service:
C:\LiferaySDK\61GA2\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:172: java.io.IOException: Cannot run program "C:\LiferaySites\GA2April\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\bin\java.exe": CreateProcess error=87, The parameter is incorrect
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:798)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
Caused by: java.io.IOException: Cannot run program "C:\LiferaySites\GA2April\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\bin\java.exe": CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
... 18 more
Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 23 more
Java Result: -1
${service.test.output}
David H Nebinger
RE: portlet-model-hints.xml overwritten by build service
September 23, 2013 8:21 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11793

Join Date: September 1, 2006

Recent Posts

Yeah, lcepatchers.org is GA 2 w/ patches applied, so it's better than a vanilla GA2 (I would definitely recommend going with it if you can).

Caused by: java.io.IOException: Cannot run program "C:\LiferaySites\GA2April\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\bin\java.exe": CreateProcess error=87, The parameter is incorrect


This error is a failure to launch the JRE within GA2 within Ant, I don't believe it has anything to do w/ GA3, but probably however it's configured...